2 command! -nargs=+ Calc :r! python -c "from math import *; print <args>"
4 " I frequently type :Q or :WQ, etc instead of :q, :wq
18 " Unhighlight search results
19 map <C-l> :nohlsearch<CR>:redraw!<CR>
21 " Map Y to be consistent with D, C, etc
24 " CTRL-n and CTRL-p to go forwards and backwards through files
25 nnoremap <C-n> :next<CR>
26 nnoremap <C-p> :prev<CR>
28 " CTRL-J/K to move up and down, collapsing open windows
29 map <C-J> <C-W>j<C-W>_
30 map <C-K> <C-W>k<C-W>_
32 " Press CTRL-X after pasting something to fix up formatting
33 imap <C-z> <ESC>u:set paste<CR>.:set nopaste<CR>i
35 " Tab to switch between split windows
38 " Spell checking mode toggle
40 if !exists("s:spell_check") || s:spell_check == 0
43 setlocal spell spelllang=en_au
45 echo "Spell check off"
47 setlocal spell spelllang=
50 map <F8> :call <SID>spell()<CR>
51 imap <F8> <C-o>:call <SID>spell()<CR>