macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.47k stars 680 forks source link

Reuse existing tab after :make error #1484

Closed radlyeel closed 3 months ago

radlyeel commented 3 months ago

My Vim/Makefile development workflow depends heavily on Vim's response to a complier error when I invoke :make.
MacVim's response is to open a new tab on the offendimg source file, even if there is already a tab open on that file. Thus, every tim I run :make and get an error I must close atleast one tab, which seems unnecessary.

What would be a real help is for MacVim to find an existing tab to switch to before deciding to open a new tab. Even better would be for someone to point me to a correct usage pattern to achieve the same goal. For now I'll just shelve MacVim in favor of plain old Vim.

ychin commented 3 months ago

You mean you are calling :make within MacVim? The behavior of where the new file is opened is controlled entirely within Vim via switchbuf, so there should be no difference in behavior. Can you describe in more details how you are configuring it exactly, and what your settings for switchbuf are? You at least share the same .vimrc between MacVim and Vim right?

radlyeel commented 3 months ago

Srttin switchbuf to usetab had exactly the desired effect. Thank you!