Is there a function in Vim which will switch to a buffer? For example, if I know that I have the TODO.txt file open in some window in some tab, I’d like to jump to that tab and focus that window. Is that possible?
3 Answers
set swb=useopen,usetabe will set make :sb [number] or :sb [pattern] switch to an open window in whichever tab.
2 Comments
David Wolever
 Hrm… Either things have changed in 7.3 (I'm on 7.2), or 
  swb doesn't quite do what I want. In 7.2, it seems like swb is only checked when jumping to errors and using quickfix and stuff. When I've got set swf=useopen,usetab, running :b foo still replaces the current window with the buffer matching foo.Peter Rincker
 @David Wolever, your absolutely correct. You should be using 
  :sb instead of :b. I have corrected the post.I believe it's :drop filename
1 Comment
David Wolever
 Hhmm… Close, although that requires the full path to the file, which kind of sucks if you've got a bunch of files open (where as, with buffers, you can tab-complete fairly easily).