[Updated 8/5/2026 after the process got easier in new versions of Neovide]
Another nvim howto, to remind myself how to do this when I want to set up Neovide on a new machine …
I previously (ie up until last week) used MacVim, and was able to open files using the mvim command. By default, Neovide is a bit clunkier, running a new instance in the foreground whenever you open it (this might be improved soon). Fortunately someone else has done the hard work for me, so it’s pretty easy to fix.
Firstly, save this script the script below to somewhere in your path (I put it in /usr/local/bin/nv), and make it executable (chmod u+x /usr/local/bin/nv). This gives you an nv command in the shell, which will either open Neovide if it’s not running, or open the files you give it in a running instance. The script converts path:line to +line path, so you can run nv path/to/file:42 and the file will open on that line.
#!/bin/bash
if [[ "$*" =~ ^[^\ ]+:[0-9]+$ ]] ; then
args="+${*#*:} ${*%:*}"
else
args="$@"
fi
open -n -a Neovide --args --no-tabs --reuse-instance --chdir "$PWD" $argsIf you want to be able to open a file at a specific line with nv path:lineno (or by command-clicking on a stack trace entry etc), I created a fork of the above script which sends the command to jump to the specified line after opening the file.
Secondly, fire up Automator, and create a new application. Add a Run Shell Script action, set it to pass input as arguments, and change the content to the following:
/usr/local/bin/nv "$@"
Save it somewhere (eg in /Applications), then you can tell the Finder to open any files/file types you want to edit in Neovide to open with this application. This also gives you command-click editing in iTerm.
Finally, to be able to command-click a path with a line number (eg from a stack trace) in iTerm, open the preferences, go to pointer, general, and enable semantic history. Then go to profiles, select the one you use, and in the advanced tab set semantic history to run the following command:
open -n -a Neovide --args --no-tabs --reuse-instance --chdir "$PWD" +\2 \1