aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-08 22:49:34 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-08 22:49:34 +1300
commit3b5e603cf5b24a1b38cac08ebaf243d709134a22 (patch)
tree5e74b0d8f68caf9424619d9952c186bd76629fa7 /vim/vimrc
parentAdd simple term information to README (diff)
downloaddotfiles-3b5e603cf5b24a1b38cac08ebaf243d709134a22.tar.gz
dotfiles-3b5e603cf5b24a1b38cac08ebaf243d709134a22.zip
Apply sensible setting to 'switchbuf'
Turns out I've been using Vim completely wrong.
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc8
1 files changed, 8 insertions, 0 deletions
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!<CR>
" 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