09 - More mappings

Created Tuesday 17 June 2014

http://learnvimscriptthehardway.stevelosh.com/chapters/09.html

Run the command to set the key shortcut
:nnoremap jk dd

Remove the shortcut
:nunmap jk

Double quote current word
:nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel

Single quote
:nnoremap <leader>' viw<esc>a'<esc>hbi'<esc>lel

In visual mode — problems with multiline selection
:vnoremap <leader>" o<esc>i"<esc>gvol<esc>a"<esc>



Backlinks: