tags:

views:

299

answers:

4

I downloaded this vimrc file. It contains entries for mapping comma seperated keys to certain commands. ie:

map ,e :e <C-R>=expand("%:p:h") . "/" <CR>

What i can't figure out is how to run these commands in Vim.

How to i run ",e"?

+2  A: 

You would just type , and then e. To verify that it's actually being mapped, you can use the command :map ,e.

John Feminella
slight tweak to this ckeck is :verbose map ,eThis will give you the line it has been set
michael
+1  A: 

just type it

,e

thats it, since the map is a normal mapping, it ought to work in normal, visual and operator pending mode. see

:h 40.1

in vim, for the help on map modes

Sujoy
+2  A: 

Press the ESCAPE key and then type ,e

The escape will confirm you are out of insert mode (if you entered it)

nik
A: 

If you use these maps, you'll also want to use

nnoremap ,, ,

So you can have the , functionality (repeat latest fFtT motion, but in the opposite direction). This is occasionally useful, though not as useful as that edit file in current file's directory map you have there.