2017-08-09 113 views

回答

5

可以使用windotabdo commmands

(虽然我没有在下面所提供的映射使用这些)要再次显示出发视图下进行窗口和标签操作,运行:intro

这里是一个小小的映射,以完成你原来的问题,似乎最适合我:

" this will fail if there are unsaved changes 
function! StartOver() 
    new  " open a new, empty split 
    only " close other windows 
    tabonly " close other tabs 
    intro " show opening screen 
endfunction 
nnoremap <F4> :call StartOver()<CR> 
+0

非常好,谢谢。只有一个美学问题:使用'intro'等待'CR'的按键,因此并不像一个全新的vim实例。有没有解决这个问题? – Remo

+0

@Remo,我也注意到了,并希望Vim在第一次打开时的行为更加精确。看过':help:intro'后,我没有看到任何其他选项可以改善这一点... –

+0

好的,谢谢。在功能上它是完美的! – Remo

相关问题