Is it possible to indent JavaScript code in Notepad++?
I have some JavaScript code that is written in one line (no carriage returns), it's completely unreadable...
With Notepad++, I tried to replace these characters ({
, }
, ;
) by themselves plus a carriage return, but it still isn't very handy...
Is there a way to do this correctly in Notepad++?
Solution 1:
JSTool is the best for stability.
Steps:
- Select menu Plugins>Plugin Manager>Show Plugin Manager
- Check to JSTool checkbox > Install > Restart Notepad++
- Open js file > Plugins > JSTool > JSFormat
Reference:
- Homepage: http://www.sunjw.us/jstoolnpp/
- Source code: http://sourceforge.net/projects/jsminnpp/
Solution 2:
I think you want a code beautifier, this one looks quick and easy: http://jsbeautifier.org/
Solution 3:
Try the notepad++ plugin JSMinNpp(Changed name to JSTool since 1.15)
http://www.sunjw.us/jsminnpp/