Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've added the following useful settign to _vimrc:

map <F2> :NERDTreeToggle<CR>

If I open gvim and then press F2 NERDTree will open but in the directory Windows/system32 which takes a long time to cache.

Can I change the setting so that it opens in M:\. I've used help: NERDTreeToggle and from the help I've tried the following but it doesn't seem to work:

:NERDTreeToggle M:\

Maybe I need another setting so that only on start-up NERDTree will automatically start and be visible and open at M:\ - is this possible?

share|improve this question
up vote 4 down vote accepted

By default, NERDTree starts in the current working directory. You've probably started Vim through the installed Start Menu shortcut, which defaults to the system32 directory. (You can check from inside Vim with :pwd.)

I would recommend that you modify the shortcut that starts GVIM (gvim.lnk: right mouse button > Properties > Start in:) to start in M:\. That's probably a better default for starting Vim, and it also solves the NERDTree problem.

share|improve this answer
+1 perfect Ingo. Was thinking of you yesterday - now I am 1wk into the vim experiment (addiction) I remembered you mentioned working on SO posts using vim do you do that? and why is it quicker? do you write them in vim and then copy them across to here? – whytheq May 19 '13 at 8:12
Various plugins integrate an external editor (for text areas) into the browser. I use Firefox + Pentadactyl; I've described the exact setup in a blog post. – Ingo Karkat May 19 '13 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .