From e4e0419337001ea431dd70ce4ddc5427a94f9d4f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 3 Jun 2014 22:25:39 -0400 Subject: vimrc: ensure an undo entry is created when saving in Insert mode Add a `u` to my save command mapping in Insert mode so I can be sure that my edits are progressively fed to the undo tree. --- vimrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 99a59e8..f5f4990 100644 --- a/vimrc +++ b/vimrc @@ -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 " 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 :update -inoremap :updatea +inoremap u:updatea vnoremap :updatev " Preserve indentation on empty lines -- cgit v1.2.3