I'm running Cygwin and would like to use Notepad++ as the main shell editor, kind of like what I have on my Mac, where I can type mate whatever
to open up an instance of TextMate. In my ~/.bashrc
file in Cygwin I have the following alias and environment variable set:
export EDITOR="/cygdrive/c/Program\ Files/Notepad++/notepad++.exe"
alias np="/cygdrive/c/Program\ Files/Notepad++/notepad++.exe"
It mostly works: when I type np whatever
or when a Cygwin program calls for $EDITOR, Notepad++ opens.
However, the shell waits until Notepad++ is closed and won't allow any input until then. This may be specific to bash, but how can I open Notepad++ from Cygwin and tell the shell to not wait for an exit code to continue? Adding a &
to the end of the alias command doesn't work correctly—it just opens an untitled file and warns filename: command not found
instead of opening the file.
Thanks!