Modes of Mapping - Query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Modes of Mapping - Query

Varun Gupta
Hi


The concept of mapping in VIM is just too good n off
late has evoked a lot of interest . But I am still not
clear regarding the various mappings

i.e vnoremap , nnoremap , nmap , etc etc ....

Is there any information regarding this ???


Best Regards

Varun


               
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
Reply | Threaded
Open this post in threaded view
|

Re: Modes of Mapping - Query

A.J.Mechelynck
Varun Gupta wrote:

> Hi
>
>
> The concept of mapping in VIM is just too good n off
> late has evoked a lot of interest . But I am still not
> clear regarding the various mappings
>
> i.e vnoremap , nnoremap , nmap , etc etc ....
>
> Is there any information regarding this ???
>
>
> Best Regards
>
> Varun

See ":help map-overview" and in general ":help map.txt".

The difference of noremap vs. map is that the former is not recursive.

Now let's see the various commands:

nmap Normal mode only
vmap Visual mode only
omap Operator-pending (e.g., for a "motion" command after y d etc.)
imap Insert or Replace mode only
cmap Command-line mode only
lmap mappings which are turned on or off together with keymaps
        ":lmap" is only rarely used as such; but every line after the
        "loadkeymap" command in a keymap is interpreted as an lmap.

map Normal, Visual or Operator-pending
map! Insert, Replace or Command-line modes

map (with no arguments): list all n- v- or o- mappings
map! (with no arguments): list all i- (r-) or c- mappings
        etc.

map {lhs} list mappings for that particular {lhs}
        etc.

map {lhs} {rhs} define a mapping from {lhs} to {rhs}
        etc.

unmap {lhs} remove all n- v- o- mappings for that {lhs}
        similarly: unmap! iunmap cunmap vunmap etc.

mapclear remove any n- v- o- mappings for any {lhs}
        similarly: mapclear! imapclear vmapclear etc.


Best regards,
Tony.