]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
Add mapping to append ; to the current line.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index a3163f81e1275616f5174ee3096aac05c37ffb8d..9015ca9645f74021cf836b25129b47410110688f 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -113,6 +113,11 @@ nnoremap - <C-b>
 map <Leader>se :set spelllang=en_us<CR>
 map <Leader>sd :set spelllang=de_de<CR>
 
+" 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 <silent> ; :call setline(line('.'), getline('.') . ';')<CR>
+
 " I often type "W" instead of "w" when trying to save a file. Fix my mistake.
 " Thanks to Tony Mechelynck <antoine.mechelynck@gmail.com> from the Vim
 " mailing list for the commands.