From fcc227c0c138ad0619017d34821876a717c45a97 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 1 Mar 2009 22:04:53 +0100 Subject: [PATCH] Add mapping to append ; to the current line. Very useful for languages which require a ; at the end of the line (PHP, Perl, C, ...) --- vimrc | 5 +++++ 1 file changed, 5 insertions(+) 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. -- 2.44.2