Move through the buffer list without wrecking your window/tab layout
From Vim Tips Wiki
Tip 1242 Previous Next created May 24, 2006 · complexity intermediate · author Anon · version n/a
I have too many ways to move between buffers. The :ls command lists all the buffers and their buffer numbers; :b<number> replaces the contents of the current window with the requested buffer; :gt moves to the next tab; and I configured <Leader>w to move to the next window (within a tab). That's a lot of options.
Generally, I want a way to move between 'files' without disturbing my current window and tab layout. As I finally learned, a combination of :sb and 'switchbuf' makes this possible.
The :sb <buffer> (split buffer) command usually opens a new window with the requested buffer. You can give the command a buffer number or a filename. With the set switchbuf=usetab option, you can tell Vim to first search the tab and window list for the requested buffer - if the buffer exists is in a window or tab, the focus goes right to that window. The :sbn (split buffer next), when used with switchbuf, lets me flip through the list of my open files.
