Take the 2-minute tour ×

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
add comment

1 Answer

  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
add comment

Your Answer


