I like to be able to sweep my code clean with a quick key stroke. Under the Run dialogue in Notepad++ I use this external command, save and activate with Alt F7 :-
ptidy “$(FULL_CURRENT_PATH)”
A quick batch file ptidy.bat in my path does the heavy sweeping.
@call perltidy -b %1 @del %1.bak
You have to call perltidy as it’s a batchfile itself and we want to remove the .bak file it creates.
Notepad++ should detect the file has changed and reload it. If perltidy does encounter an error, you’ll get a *.err file and it leaves the original untouched.