]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Add support to undo <C-@>, <C-A> and <C-W> in insert mode.
authorSimon Ruderich <simon@ruderich.org>
Tue, 3 Jan 2012 13:07:33 +0000 (14:07 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 3 Jan 2012 13:07:33 +0000 (14:07 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 9e98ef675bca1522958bea887413e1e8de949165..6516546234febcfcfa372f56827426d8cc30d28a 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -332,6 +332,12 @@ noremap <silent> <C-L> :nohlsearch<CR><C-L>
 " 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>
+" Same for <C-@> (insert previously inserted text and leave insert mode).
+inoremap <C-@> <C-G>u<C-@>
+" And for <C-A> (insert previously inserted text).
+inoremap <C-A> <C-G>u<C-A>
+" And for <C-W> (delete word before cursor).
+inoremap <C-W> <C-G>u<C-W>
 
 
 " ABBREVIATIONS