From 3b5e603cf5b24a1b38cac08ebaf243d709134a22 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 8 Oct 2013 22:49:34 +1300 Subject: Apply sensible setting to 'switchbuf' Turns out I've been using Vim completely wrong. --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index 6557fb1c..2b408462 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -535,6 +535,14 @@ nnoremap ZA :wa! " done with yy anyway); this fixes it so it only yanks the rest of the line nnoremap Y y$ +" Allow jumping between windows and tabs to find an open instance of a given +" buffer with :sbuffer. +if v:version >= 701 + set switchbuf=useopen,usetab +else + set switchbuf=useopen +endif + " Fedora's default environment adds a few auto commands that I don't like, " including the 'return to previous position in buffer' one; fortunately " they're nice enough to group the commands, so I can just clear them -- cgit v1.2.3