From 23e8f0b598d92dfa8a223acd7cc154baa6713075 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 4 Jul 2017 12:30:52 +0200 Subject: vimrc: Add ZA mapping to update all buffers and quit Tested this out for a while without committing it and it turns out I actually started using this mapping frequently enough, so I'm saving it. The real impetus for this is that I recently (in the last couple months) set: $ git config commit.verbose 1 to get a diff of changes to be committed in my Vim commit buffer. This is really handy. Often I end up opening Vim windows to see the rest of the diff while still having my commit message open and visible. Thus my normal workflow of writing a commit message and committing with ZZ no longer works in these cases where there are multiple windows open. To more quickly save the commit message and quit all windows, this command comes in really handy. --- vimrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 821d5cc..b2ab0a6 100644 --- a/vimrc +++ b/vimrc @@ -369,6 +369,9 @@ " 2017.05.04: " * Add sm mapping to split chained method calls. " +" 2017.06.05: +" * Add ZA mapping to save all buffers and quit. +" " Pathogen @@ -595,6 +598,9 @@ nnoremap :update inoremap u:updatea vnoremap :updategv +" Update all files and quit +nnoremap ZA :xall + " Preserve indentation on empty lines " http://stackoverflow.com/a/7413117 inoremap x -- cgit v1.2.3