I use notepad++ with my WSL (ubuntu) as the default editor for both Windows and Linux and have setup so that it is launched from both contexts for files under either filesystem.
Set up an alias as follows:
alias npp="/mnt/c/Program Files/Notepad++/Notepad++.exe"
Now I can launch as
Add the notepad.exe to your PATH.
- From start menu; choose edit environment settings
- Choose environment variables:
- Add to the path variable the location of Notepad++. Unless you've changed defaults; it would be in:
C:\Program Files (x86)\Notepad++
Now you can launch notepad++ from any folder.
Editing Windows Files
With the path set; you can do the usual windows:
These can be accessed via the
/mnt mountpoints, so you would do:
These can be accessed via the so-called P9 filesystem WSL provides, so you would do:
(remember to rename for your WSL distro)
With the alias set; you can do
$ npp foo.txt