Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bringing window to top instead of opening a new editor on a file that is already being edited #1504

Open
andrewcmyers opened this issue Oct 20, 2024 · 1 comment

Comments

@andrewcmyers
Copy link

My primary pain point with MacVim is that I often want to edit a file I am already editing, somewhere in the deep stack of windows. It would be a time-saver if it were easier to just bring that window to the top with keyboard focus, in the case where I am editing that file, but instead create a new editing window in the case where I am not currently editing it. Currently it always opens an editing window but then warns me that the file is already being edited, which is better than not warning, but also not as efficient as it could be.

Ideally there would be an option to gvim that tells it just to wake up the existing editor window if the file is already being edited.

The main alternative is to write a script to detect whether a file is being edited, using AppleScript to bring the appropriate window to the foreground. I've actually written such a script but it seems unnecessarily painful.

@ychin
Copy link
Member

ychin commented Oct 21, 2024

So there is already this option:

image

When you open the file it should find the currently editing buffer and switch to that. Does that not work for you? I think that option may not work when using the mvim script though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants