When we have a buffer open, and we open a new one with :split
or :vsplit
, if in any opened window we execute :bprev
or :bnext
, we could have the same buffer open at the same time in both windows.
Is there any option (if any I will try with a vimscript) to not have the same same buffer open in multiple windows (e.g. don't show it in the new window if it's already open in another one, all in the same tab) while cycling through buffer list ?
a
of vims:ls
command. A function which checks if a buffer is already active and acts accordingly is all there is to it.