From 91fb3f281be0e45ef91b9458e6312af1183c3e3d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 30 Oct 2014 12:34:25 -0400 Subject: vimrc: Add tq mapping tq quits a window and goes to the previous tab. I was getting tired of doing `:q` -> `gT`. I know I have td but I've been working on some projects lately where I don't want to delete the buffers from my session. --- vimrc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index c14c35b..ebc0eaa 100644 --- a/vimrc +++ b/vimrc @@ -250,6 +250,10 @@ " 2014.09.10: " * Add r mapping to reload the current file. " +" 2014.10.30: +" * Add tq to close a window and go to the previous tab. Works +" like td but doesn't delete the buffer. +" " Pathogen @@ -507,6 +511,9 @@ nnoremap tn :tabnew " Delete buffer and go to previous tab nnoremap td :bdelete \| normal! gT +" Quit buffer and go to previous tab +nnoremap tq :quit \| normal! gT + " Go to last viewed tab " http://stackoverflow.com/a/2120168 let g:last_viewed_tab = 1 -- cgit v1.2.3