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'd like to have a shortcut in gvim to switch directories. I have the following in my gvimrc.

"noremap <F6> :cd "c:\\project\\working\\code"<return>" 

I can't get it to work, though. What could be the problem?

share|improve this question
Presumably the outer set of quotes aren't really there, since they would probably start a comment or if not, confuse the inner set. – noodl Nov 13 '12 at 15:32
I don't have the outer set of quotes. My rc file only has noremap <F6> :cd "c:\\project\\working\\code"<return> and it was not working. Anyways I got it working. It ain't the double backslash or the forward slash, it was the quotes in the path. – tecMav Nov 13 '12 at 17:08
  1. Get rid of the quotes around the directory
  2. Change \\ to /. Even on Windows, vim can use / to navigate directories

New command

noremap <F6> :cd C:/Project/Working/Code<CR>
share|improve this answer

You must log in to answer this question.

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