Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

  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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.