Is it possible to indent JavaScript code in Notepad++?

GianT971 picture GianT971 · Feb 2, 2012 · Viewed 112.4k times · Source

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++?

Answer

Quang Vinh picture Quang Vinh · Apr 6, 2014

JSTool is the best for stability.

Steps:

  1. Select menu Plugins>Plugin Manager>Show Plugin Manager
  2. Check to JSTool checkbox > Install > Restart Notepad++
  3. Open js file > Plugins > JSTool > JSFormat
    screenshot

Reference: