From: Iain Patterson Date: Wed, 27 Aug 2008 12:39:50 +0000 (+0000) Subject: Allow vim to be used by crontab -e. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=95120cbd748ebe21f1cf944911632f9afdad1958;p=profile.git Allow vim to be used by crontab -e. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@143 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.vimrc b/.vimrc index 2b6167a..d2aa0c5 100644 --- a/.vimrc +++ b/.vimrc @@ -305,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")