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