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