Use ^w-^ to switch to the last used window.
authorIain Patterson <me@iain.cx>
Fri, 20 Jan 2012 11:32:29 +0000 (11:32 +0000)
committerIain Patterson <me@iain.cx>
Fri, 17 Feb 2012 16:01:43 +0000 (16:01 +0000)
For consistency with tmux, which uses ^ to switch to the last pane,
which is in itself for consistency with vim using ^ to switch to
the last buffer.

Default vim action would be to split and edit the last buffer.  That's
sometimes useful but overall less useful than switching windows.

.vimrc

diff --git a/.vimrc b/.vimrc
index 3d83fbd..28d060e 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -75,6 +75,10 @@ inoremap <C-l> <C-n><C-p>
 " Swap jump keys.
 noremap ' `
 noremap ` '
+
+" Select previous widnow.
+noremap <C-w>^ <C-w>p
+noremap <C-w><C-^> <C-w>p
 "}}}1
 
 " Find stuff.