I've set switchbuf to vsplit but when I use :sbr, vim uses a horizontal split to open the new buffer. This seems directly contrary to what :help sbr says:
:sbr[ewind] [+cmd]
Split window and go to first buffer in buffer list. If the
buffer list is empty, go to the first unlisted buffer.
Respects the 'switchbuf' option.
And :help switchbuf says:
split If included, split the current window before loading
a buffer for a |quickfix| command that display errors.
Otherwise: do not split, use current window.
vsplit Just like "split" but split vertically.
The output of :version (I'm using Ubuntu 16.04's vim-gtk3-py2):
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
I know about :vert sbr, and I can make an alias to make that more convenient, but I'd really like to figure out what's causing switchbuf to not work as expected. Thanks!
switchbufand, perhaps more importantly, what's the output of:set switchbuf?immediately before using:sbr? – 8bittree Mar 01 '17 at 18:34:set switchbuf=vsplitfollowed by:set switchbuf?printsvsplit, and following that with:sbrresults in a horizontal split, I'm inclined to think you may have found a bug. Seems to ignoreswitchbuf=newtabas well. And:sbnextmisbehaves in the same manner as:sbr. – 8bittree Mar 01 '17 at 18:40set switchbuf=vsplitin .vimrc and with:set switchbufand:setlocal switchbuf(didn't expect that one to work, but worth a shot);set switchbuf?givesswitchbuf=vsplitright before:sbr, just as you said. – Haldean Brown Mar 01 '17 at 19:18