![open file in macvim from terminal open file in macvim from terminal](https://screenshots.macupdate.com/JPG/25988/25988_1632662085_scr_uc1.jpg)
![open file in macvim from terminal open file in macvim from terminal](https://linuxhint.com/wp-content/uploads/2022/01/word-image-1558.png)
Set whatever shortcut you like Control+Shift+E worked for meĪll right! Now the moment of truth.Double click on it and then click “Add keyboard shortcut”.Search for “MacVim” or whatever editor name you gave the external tool.One of my favorite things about this feature is that P圜harm lets you assign a key binding to each tool, so now that you have a “MacVim” tool in the menu tree, you can assign it a key binding.
#Open file in macvim from terminal code
For “Working directory” enter “$ProjectFileDir$”, an Intellij macro that will automatically set the working directory to the directory containing your Intellij project file this is my preference because in P圜harm the project file directory is usually the directory you opened the first time you opened your code in P圜harm, and for me, that is my git checkout (see “Insert macro” for other directories you can use).For “Parameters” enter “$FilePath$”, an Intellij macro that will automatically send the absolute path of the current file to the external editor.Set the program path - for GUI OS X applications, this is the application bundle, e.g.Uncheck “Open console” if the editor is a GUI application.Check “Synchronize files after execution” to sync edits made between the editors while the file is open in both.Click on or search for “External Tools”.Step 1: Set up an external tools entry for your editor So, how does it work? Easy - this should only take a minute or so! Instructions are geared toward OS X users, but should be clear to users on other operating systems. This works with both GUI and console-based applications, and its most trivial use case seems to be opening the current file in an external editor. This was an annoying process until today, when I discovered that P圜harm and other Intellij editors can open the current file in an external tool. Even though I use P圜harm, I still drop into Vim occasionally to edit configuration files.