Skip to content

Instantly share code, notes, and snippets.

@karmajunkie
Created August 22, 2012 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karmajunkie/3428222 to your computer and use it in GitHub Desktop.
Save karmajunkie/3428222 to your computer and use it in GitHub Desktop.

One of the few problems I have with Janus, the vim settings bundle/plugin/whatever you want to call it, is that whenever I change to the vim window it refreshes the NERDTree. My project has a ton of files in it (like really, a ridiculous amount) so that refresh takes tens of seconds sometimes. Thanks to Tim Tyrrell's (@timtyrrell) tip on twitter after I bitched about it, I found the offending lines in Janus's NERDTree plugin:

#~/.vim/janus/vim/tools/janus/after/plugin/nerdtree.vim
augroup AuNERDTreeCmd
autocmd AuNERDTreeCmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
autocmd AuNERDTreeCmd FocusGained * call s:UpdateNERDTree()

By adding the following line to your ~/.vimrc.after or ~/.gvimrc.after you can punt on the autocommands from Janus (I don't care about either of them)

:autocmd! AuNERDTreeCmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment