macvim icon indicating copy to clipboard operation
macvim copied to clipboard

Configure mvim as cli tool via the settings

Open greenchapter opened this issue 1 year ago • 3 comments

Most of the time I would start mvim from the command line, but that is only possible if you add a softlink into /usr/local/bin/ so I would recommend a more user friendly version.

Described solution A clear and concise description of what you want to happen.

I would recommend a new check box within the settings panel which will add a softlink to /usr/local/bin/ from the GUI. Screenshot 2023-05-08 at 16 30 52

Currently way to add mvim to the cli A clear and concise description of any alternative solutions or features you've considered.

  1. Install macvim
  2. Add a softlink sudo ln -s /Applications/MacVim.app/Contents/bin/mvim /usr/local/bin/mvim

greenchapter avatar May 26 '23 09:05 greenchapter

Most of the time I would start mvim from the command line, but that is only possible if you add a softlink into /usr/local/bin/ so I would recommend a more user friendly version.

These days we usually just recommend adding /Applications/MacVim.app/Contents/bin to your path directly so you don't have to make a symlink. See :h macvim-PATH. It has pros and cons compared to making a symlink to /usr/local/bin/mvim but I like the current recommendation more because it is easier and requires less permission to do.

The description already exists (see the above help link) but I admit it's a little hard to discover. It could be useful to have a button to do this for the user, but it's a little harder to add a folder to $PATH (since the user may have different shells they use) compared to a simple symlink, which is a simple command to call (albeit needing root permissions).

ychin avatar May 26 '23 13:05 ychin

Most of the time I would start mvim from the command line, but that is only possible if you add a softlink into /usr/local/bin/ so I would recommend a more user friendly version.

These days we usually just recommend adding /Applications/MacVim.app/Contents/bin to your path directly so you don't have to make a symlink. See :h macvim-PATH. It has pros and cons compared to making a symlink to /usr/local/bin/mvim but I like the current recommendation more because it is easier and requires less permission to do.

Thank you very much @ychin 🤩 good comment, I changed it directly…

The description already exists (see the above help link) but I admit it's a little hard to discover. It could be useful to have a button to do this for the user, but it's a little harder to add a folder to $PATH (since the user may have different shells they use) compared to a simple symlink, which is a simple command to call (albeit needing root permissions).

I think it can be very valuable to some users to bring the possibility to set this path into the macvim UI. Currently for me the macOS app kaleidoscope solved that very well.

Screenshot 2023-05-26 at 16 19 30

greenchapter avatar Jun 01 '23 11:06 greenchapter

Right. Let me think about it a little. Just need to play around with it a bit and triage when I get time to work on this.

ychin avatar Jun 04 '23 00:06 ychin