How to disable vimplugins while invoking vimdiff command

pluginvimdiffvimrc

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?

Best Answer

You could use this syntax, in your .vimrc:

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