How to make notepad++ function like regular notepad in cmd?
Notepad++ is a known app, so if you launch it with the START
builtin, it'll work without having to modify the PATH
.
start notepad++ MyJava.java
Add notepad++ to your path
In Windows (Using GUI):
From the Start Menu, right-click Computer, select Advanced system settings in the left area, then select Environment Variables at the bottom in the window that pops up.
Go to the PATH user variable and click edit, and append YOUR path to notepad++ to the end. For example:
C:\Program Files (x86)\Notepad++;
Don't forget the semi-colon! Be sure the entry before it is also ended with a semi-colon.
In Windows (Using command line running as Administrator)
To set only for the duration of command line session:
set PATH=%PATH%;C:\Program Files (x86)\Notepad++;
To permanently set, use the same command as above but replace set
with setx
:
Note that not all Windows distributions come with setx, and can be manually installed here.