My .vimrc does a lot of extra things I don't want to do if it's launched by git (for example, during commit), since the purpose of that Vim instance is very specific so it makes no sense to launch many windows I would launch in normal way.
Is there any way I can detect whether this instance is launched by git?
FileType
isgitcommit
. You can probably use anautocmd
based on that.if exists("$GIT_DIR")
.