Show useful builtin and custom keyboard shortcuts.
map x y
map y x
noremap x y
noremap y x
i correspond to specific modes in vim. Running:help map in vim will provide the following:
COMMANDS MODES ~
:map :noremap :unmap Normal, Visual, Select, Operator-pending
:nmap :nnoremap :nunmap Normal
:vmap :vnoremap :vunmap Visual and Select
:smap :snoremap :sunmap Select
:xmap :xnoremap :xunmap Visual
:omap :onoremap :ounmap Operator-pending
:map! :noremap! :unmap! Insert and Command-line
:imap :inoremap :iunmap Insert
:lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg
:cmap :cnoremap :cunmap Command-line
:tmap :tnoremap :tunmap Terminal
" NOTE: <leader> corresponds to `\` in linux and <c-h> corresponds to
" `ctrl + h`
" Force use of hjkl-style movement and pageup(c-b)/pagedown(c-f)
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
map <pageup> <nop>
map <pagedown> <nop>
map <home> <nop>
map <end> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
imap <pageup> <nop>
imap <pagedown> <nop>
imap <home> <nop>
imap <end> <nop>
" Command line mode without shift+:
noremap ; :
" Faster split window navigation
noremap <c-h> <c-w><c-h>
noremap <c-j> <c-w><c-j>
noremap <c-k> <c-w><c-k>
noremap <c-l> <c-w><c-l>
" Search word under cursor
nnoremap <leader>w :grep! "\b<c-r><c-w>\b"<cr>:cw<cr>
" Mappings for quickfix list
nmap <silent> <c-n> :cn<cr>zv
nmap <silent> <c-p> :cp<cr>zv
" Remove highlight after search
nnoremap <leader>h :nohls<cr>
" Buffer Mappings
nnoremap <leader>b :buffers<cr>:buffer<space>
nnoremap <leader>t :e#<cr>
f[char]F[char]f[char]F[char];/,v + p,w,s,[,(,{,<,’,”,`vi + p,w,s,[,(,{,<,’,”,`ctrl + hctrl + wctrl + tctrl + dctrl + r\<register\>ctrl + o\<command\>ctrl + bctrl + f*cwescn.n then .ci\<x\>di\<x\>