4

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?

mtk
  • 26,802
  • 35
  • 91
  • 130
  • 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 03 '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? – Gilles 'SO- stop being evil' Jun 03 '16 at 22:36
  • @Gilles just the two nerdTree and syntastic for now. any way, .vimrc or commandline – mtk Jun 04 '16 at 03:32

1 Answers1

1

You could use this syntax, in your .vimrc:

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