From: Simon Ruderich Date: Sun, 1 Mar 2009 21:04:53 +0000 (+0100) Subject: Add mapping to append ; to the current line. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=fcc227c0c138ad0619017d34821876a717c45a97;p=config%2Fdotfiles.git Add mapping to append ; to the current line. Very useful for languages which require a ; at the end of the line (PHP, Perl, C, ...) --- diff --git a/vimrc b/vimrc index a3163f8..9015ca9 100644 --- a/vimrc +++ b/vimrc @@ -113,6 +113,11 @@ nnoremap - map se :set spelllang=en_us map sd :set spelllang=de_de +" Add semicolon to the end of the line. Thanks to +" http://www.van-laarhoven.org/vim/.vimrc for this idea and godlygeek in #vim +" for an improved version which doesn't clobber any marks. +nnoremap ; :call setline(line('.'), getline('.') . ';') + " I often type "W" instead of "w" when trying to save a file. Fix my mistake. " Thanks to Tony Mechelynck from the Vim " mailing list for the commands.