Cygwin Tutorial: Use External Editor Notepad++
Open your .baschrc file in your home directory and add these commands at the bottom of the file. You can modify any of the options being passed to notepad++ as well. By default this allows multiple instances, turns off sessions and disables plugins. You might have to update the path to notepad++ so it matches where you have it installed on your computer:
#allows you to execute the command npp filename.ext npp () { /cygdrive/c/Program Files/Notepad++/notepad++.exe -multiInst -nosession -noPlugin $(cygpath -w -- "$@") } #launches all typical vi commands in notepad++ vi () { /cygdrive/c/Program Files/Notepad++/notepad++.exe -multiInst -nosession -noPlugin $(cygpath -w -- "$@") }
Now restart cygwin for your changes to take effect. Test it out by running these commands!
$ vi test.php $ npp test.php