]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Add support to undo Ctrl-U in insert mode.
authorSimon Ruderich <simon@ruderich.org>
Mon, 5 Dec 2011 06:35:57 +0000 (07:35 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 5 Dec 2011 06:35:57 +0000 (07:35 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 0e5545176a00a696a5d8894a11a11d70d708a71c..9e98ef675bca1522958bea887413e1e8de949165 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -328,6 +328,11 @@ endif
 " vimgor (bot) in #vim on Freenode (2010-03-30 05:58 CEST).
 noremap <silent> <C-L> :nohlsearch<CR><C-L>
 
+" Ctrl-U in insert mode deletes a lot, break undo sequence before deleting the
+" line so the change can be undone. Thanks to the vimrc_example.vim file in
+" Vim's source.
+inoremap <C-U> <C-G>u<C-U>
+
 
 " ABBREVIATIONS