我试图弄清楚如何配置ViM,以便在启动时显示我的Tagbar插件和NERDTree插件,但我不希望它出现在我提交的时候GIT中的文件。到目前为止,我有......
if has("autocmd")
" startup with tagbar window shown
autocmd VimEnter * TagbarToggle
" startup with nerdtree window shown
autocmd VimEnter * NERDTreeToggle
" startup in the correct window
autocmd VimEnter * wincmd l
endif
除了在Git中提交消息时,它会执行所有操作。我该如何检查文件?
我试过
if !globpath( '.', '**/.git/' )
echom 'youre not in a git file'
endif