diff options
author | Teddy Wing | 2014-06-03 22:25:39 -0400 |
---|---|---|
committer | Teddy Wing | 2014-06-03 22:26:54 -0400 |
commit | e4e0419337001ea431dd70ce4ddc5427a94f9d4f (patch) | |
tree | 5331d3cc872c710dd94b05d868a54317ebfdd611 | |
parent | 0484e8661f0becfe7f43224bb9066a83ea4e3924 (diff) | |
download | dotvim-e4e0419337001ea431dd70ce4ddc5427a94f9d4f.tar.bz2 |
vimrc: ensure an undo entry is created when saving in Insert mode
Add a `<c-g>u` to my save command mapping in Insert mode so I can be
sure that my edits are progressively fed to the undo tree.
-rw-r--r-- | vimrc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -190,6 +190,9 @@ " 2014.06.03: " * Ignore "vendor/" directories when searching in Command-T. Makes it " easier to search in Ruby projects. +" * Save an undo (using Ctrl-g + u) when saving in Insert mode. It didn't +" appear to be doing so before and I want to make sure that an undo +" entry is created every time I save. " @@ -423,7 +426,7 @@ vnoremap <S-Tab> <Esc> " Control-h to save (Why 'h'? Because it seemed to be a non-important combo " across modes, and because bash by default doesn't let me map Control-s) nnoremap <c-h> <esc>:update<cr> -inoremap <c-h> <esc>:update<cr>a +inoremap <c-h> <c-g>u<esc>:update<cr>a vnoremap <c-h> <esc>:update<cr>v " Preserve indentation on empty lines |