" Python Calculator command! -nargs=+ Calc :r! python -c "from math import *; print " " I frequently type :Q or :WQ, etc instead of :q, :wq command! WQA :wqa command! WqA :wqa command! WQa :wqa command! Wqa :wqa command! WA :wa command! Wa :wa command! WQ :wq command! Wq :wq command! W :w command! Wn :wn command! WN :wn command! Wp :wp command! WP :wp command! QA :qa command! Qa :qa command! Q :q " Unhighlight search results nmap :nohlsearch:redraw! " Map Y to be consistent with D, C, etc nmap Y y$ " CTRL-n and CTRL-p to go forwards and backwards through files nmap :next nmap :prev " CTRL-J/K to move up and down, collapsing open windows map j_ map k_ " Press CTRL-z after pasting something to fix up formatting imap u:set paste.:set nopastei " Tab to switch between split windows nmap " Q to reformat paragraph. I never use ex mode anyway (default binding for Q) nmap Q gwip " Go up and down by display lines, not linebreaks imap gj imap gk nmap gj nmap gk nmap 0 g0 nmap ^ g^ nmap $ g$ " Allow backspace, space, left/right keys to move across lines set whichwrap=b,s,<,>,[,] " Spell checking mode toggle function s:spell() if !exists("s:spell_check") || s:spell_check == 0 echo "Spell check on" let s:spell_check = 1 setlocal spell spelllang=en_au else echo "Spell check off" let s:spell_check = 0 setlocal spell spelllang= endif endfunction map :call spell() imap :call spell()