iTerm2 instructions: https://gregrs-uk.github.io/2018-11-01/open-files-neovim-iterm2-macos-finder/
Terminal.app instructions:
- Open Automator and create a new Application
- Add a
Run AppleScript
action and paste in the code below.on run {input, parameters} # Must use full path. set cmd to "/usr/local/bin/nvim " set filepaths to "" if input is not {} then repeat with currentFile in input set filepaths to filepaths & quoted form of POSIX path of currentFile & " " end repeat end if tell application "System Events" to set terminalIsRunning to exists application process "Terminal" tell application "Terminal" activate if terminalIsRunning is true then do script with command cmd & filepaths else do script with command cmd & filepaths in window 1 end if end tell end run
- Save the Automator document somewhere as
nvim.app
- (Optional) Drag
nvim.app
to the Dock. - Find a
.txt
file (for example) and view its info (CMD-i
).- In the
Open with:
menu, selectnvim.app
. - Also click
Change All…
to apply to all*.txt
files.
- In the