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 am new new to vim and I have learned tabe n and tabe p I don't know anything about mapping.

Is there any way that in putty in vim if I press f5 --> tabe n And f6 ---> tabe p

Also where to write those map commands .

I looked on Internet and find some commands but was not able to figure out where to write those commands.

Also is there any ready to use script or configuration file where some has already mapped those keys so that I can see what other people are doing on daily basis so that I don't need to spent time on those

share|improve this question
@Saathya , maddham maddham teri gili hassi . . . . . .. :) – user1721949 Jan 3 '13 at 4:08
up vote 2 down vote accepted

As long as you understand the Vim modes, writing a mapping is very straightforward.

  1. Choose the mode (cp. :help map-modes), e.g. normal mode = :nnoremap. Using the *noremap is preferred, because it avoids complications from other mappings applying.
  2. Select an unused key. It needs to be written in Vim's notation, e.g. <F5>
  3. The general syntax is :map {lhs} {rhs}, where {rhs} is what you have usually typed manually. :help map.txt has all the details. To make them permanent, place them into your ~/.vimrc file (create it if necessary), which contains your user options and customizations.

For example:

:nnoremap <F5> :tabe n<CR>
:nnoremap <F6> :tabe p<CR>
share|improve this answer
wow that worked, thanks buddy that was my first mapping. – user1721949 Jan 3 '13 at 4:57

You must log in to answer this question.

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