X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=d2aa0c5f1d4740a9e860ca95caa3227b7423e166;hp=91fd6c15205c345aff3525d751940f34a12e022d;hb=736982b20af663fed7884dc39fe050eabdfbd511;hpb=a444a2977d10626b30b822d5b4812d305c9bad22 diff --git a/.vimrc b/.vimrc index 91fd6c1..d2aa0c5 100644 --- a/.vimrc +++ b/.vimrc @@ -256,6 +256,9 @@ call Mapping("/", ":let @/=\"\":") " Forget the Ex mode mapping. map Q +" Vim tip 99: What's the highlighting group under the cursor? +call Mapping("h", ":echo \"hi<\" . synIDattr(synID(line(\".\"),col(\".\"),1),\"name\") . '> trans<' . synIDattr(synID(line(\".\"),col(\".\"),0),\"name\") . \"> lo<\" . synIDattr(synIDtrans(synID(line(\".\"),col(\".\"),1)),\"name\") . \">\"") + endif """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -278,7 +281,10 @@ if has("gui_running") se guifont=DejaVu\ Sans\ Mono\ 10 colo darkblue elseif &t_Co > 16 - colo iain + try + colo iain + catch + endtry endif if has("win32") se guifont=DejaVu_Sans_Mono:h10:cANSI @@ -299,6 +305,9 @@ highlight LineNr term=underline cterm=bold guifg=blue ctermfg=blue au BufWinEnter quickfix let g:quickfixing=1 au BufUnload * if &ft == "qf" | let g:quickfixing=0 | endif +" Allow in-place editing of crontabs. +au FileType crontab set backupcopy=yes + " Make * and # work the way you expect in visual mode. vnoremap * y/\V=substitute(escape(@@,"/\\"),"\n","\\\\n","ge") vnoremap # y?\V=substitute(escape(@@,"?\\"),"\n","\\\\n","ge")