Last Updated: February 25, 2016
·
10.8K
· sequoia

Opening files in Notepad++ from Cygwin

#!/bin/bash
/cygdrive/c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe `cygpath.exe -w "$*"`
  • Launch notepad++.exe...
  • With the shell path to your file converted to a proper windows path.

Save the file somewhere in your path (I saved the file ~/bin/npp, ~/bin/ is in my path) then you can open files thus: npp filename.ext.

See here for npp command line switches.

Note that your path to notepad++.exe may vary. Obviously you may use another editor (switch out .exe path) or, even better, just run Vim from the terminal, but I know that's not for everyone. ;)