How to quickly go to the previous window on another tab?

I really like Ctrl-O and Ctrl-I to go back and forth.
If I open fileA , use :tabe fileB to open another file in a new tab.
In the second tab, I type Ctrl-O to return to the previous location.
Vim just shows fileA in the current window instead of going to the 1st tab.
Now I have two tabs displaying the same files. This is not what I want.
I can use :drop fileA , but I need to provide the full name. This is not good. Is there a good way to switch between window navigation pages?

+4
source share
1 answer

Yes, switchbuf parameter:

 set switchbuf=useopen,usetab 

I know that you know where you can get more information about the possible values ​​.; -)

By the way, along with set hidden this is the key to efficiently using buffers and windows and tabs in Vim.

+5
source

Source: https://habr.com/ru/post/1436273/


All Articles