-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
Feature Request: detect and reuse MacVim instance to open file by mvim:// url #1402
Comments
Thank you for sharing What do you mean with "MacVim doesn't reuse old instance"? My the only guess "MacVim opens a new window", is it correct? If my guess is correct, please, look into preferences, "open from applications" and report if it's working correctly. |
Yes. That's correct.
Thanks for this suggestion. |
I personally prefer, that opens a new window instead of a tab or a buffer. |
Right. How would you expect the |
@ychin Thanks for you reply.
My idea is to compare the working directories of each windows and find the closest one. For example, having three windows:
Looks reasonable and it's explicit. Hope to see this feature implemented, and comparing working directories could be optional. |
I think this could get complicated really quickly and will be very specific to an individual's workflow. First, Vim has three levels of "current directory": global ( Also, sometimes Vim users can be using CWD
I'm more inclined to include this option as it's explicit and allows you to structure your workflow as needed. |
OK. That will be fine. Thanks. ❤️ |
Greeting!
I configure
mvim://
in React Developer Tools to open file in MacVim from the browser extension.It works good, but there's a small issue. The issue is that MacVim doesn't reuse the instance that I opened if the target file hasn't been opened. For example, I launch MacVim from
/path/to/my-project
, and I open files/path/to/my-project/{a,b,c}.js
fromReact Developer Tools
. They have different results:I hope the
c.js
can be opened likea.js
andb.js
.I have a workaround in favor of
Raycast
Script Command deeplinks. My script launch MacVim with specified servername, the launched instance will be reuse if I execute the script again. Here it is (I have multiple ones generated by another script):With this script, I replace
mvim://
url withRaycast
's deeplink:It's fixed! However it would be better to have native support in MacVim.
I would suggestion to add feature to detect the instance I want to open file with (like if the opening file path is in the working directory of an instance, the closest one), or add another parameter to specified the instance.
Thanks!
The text was updated successfully, but these errors were encountered: