How to know if vim call from Git, in vimrc -
.gitconfig
[core] editor = /usr/bin/vim .vimrc
autocmd vimenter * nerdtree ./
i don't want call in git commit.
i want this
if !gitcommit autocmd vimenter * nerdtree ./ endif
this snippet should put in right direction:
augroup isnotgitcommit autocmd! autocmd vimenter * nerdtree ./ augroup end autocmd bufread commit_editmsg autocmd! isnotgitcommit the notgitcommit group contains generic autocmd works "regular" file.
the other autocmd triggered when edit commit message, before vimenter event, , removes notgitcommit group.
Comments
Post a Comment