I added few vim plugins like sytastic, nerdTree. They change the status line and other UI elements, which works fine while editing files.

But when I invoke vimdiff on 2 files, the nerdTree pane also open, the status lines are of no help. Is there anyway I can disable these plugins if I call vimdiff command?

  • there must be a cleaner way, but you could try using a dummy HOME directory so your plugins wont be found: HOME=/home/dummy vmdiff ...
    – meuh
    Jun 3 '16 at 20:03
  • Do you want to disable just a specific list of plugins, or all plugins? Do you want to modify your .vimrc, or does everything have to be done on the vimdiff command line? Jun 3 '16 at 22:36
  • @Gilles just the two nerdTree and syntastic for now. any way, .vimrc or commandline
    – mtk
    Jun 4 '16 at 3:32

You could use this syntax, in your .vimrc:

if !(&diff) 
  Plugin 'scrooloose/nerdtree'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.