Vim: Mapping Alt Key

:map
:nmap " Show Normal mode maps
:vmap " Show Visual and select mode maps
:smap " Show Select mode maps
:xmap " Show Visual mode maps
:omap " Show Operator pending mode maps

:map!
:imap " Show Insert mode maps
:cmap " Show Command-line mode maps

:clearmap
:clearmap!
# In terminal type:
sed -n l

# Press Alt followed by j

# You will get something like: ^[j
" Mapping Alt-J
:map ^[j <stuff-you-want-to-map-to>

" Because ^[ is equal to <Esc>
:map <Esc>j <stuff-you-want-to-map-to>

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *