-1

This is what i put in _vimrc to make E:\Workspace as project folder after hit Ctrl+Space after activate Ctrlp

nnoremap <C-Space> :CtrlP E:\Workspace\<CR>

but when I hit Ctrl+Space it doesn't work and the file names on the list are still the everything under E:\Vim\Vim73

BTW does this config make sense in Windows?

set runtimepath^=E:\Vim\vimfiles\bundle\ctrlp.vim\plugin

1 Answer 1

2

That runtime path doesn't look right to me. When I try to run set runtimepath^=somepathonmysystem vim gives me an unknown option error. Maybe you meant to type $VIMRUNTIME which you shouldn't need to do just to configure ctrlP.

Usually the problem with vim on windows is it gets its cwd from the shortcut launcher if you haven't set that. You may need to be conscious of what your current working directory is. cd to e:\workspace and try and it should work without needing special configuration.

Instead of setting the runtimepath in the vimrc on windows, I right-click the shortcut-icon on the taskbar, go to its properties, and there's a field in the properties where you can set the path that vim starts up in, so I set that to my home folder and avoid confusion.

I hope this helps! I tried to post some images but not enough rep.

EDIT: Sweet! I can post images now.

Giving the right-click to the taskbar icon of Vim and choosing to see the properties of it.

Here I have entered my home path for the field labeled: start in

Also, note that you can enter a shortcut (hotkey) for your shortcut (link).

Control + Shift + N in this case. (Just type N into the box.)

Notes on using this method of changing where the shortcut starts up in: Don't go overboard. At first I was like ooh I'll have one to launch vim here and one to launch vim here and then ... well anyway I DO suggest windows vim users might want to set this on the launcher but I DON'T suggest making a ton of different launcher shortcuts for the same program just starting in different places. It's a slippery slope.

1
  • The set starts up path in the shortcut properties works for me, I will quit configuring runtimepath in windows. Thanks for the answer, hope now you can have the rep to post images :D
    – Dreamer
    Jun 4, 2014 at 19:32

You must log in to answer this question.

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