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

I have some JavaScript code that is written on one line (without carriage return), it is not fully readable ...

With Notepad ++, I tried replacing these characters ( { , } ; ) on their own, plus carriage returns, but it's still not very convenient ...

Is there a way to do it right in Notepad +?

+68
javascript indentation notepad ++ text-indent
Feb 02 '12 at 15:38
source share
7 answers

I think you need a code decoder, this one looks quick and easy: http://jsbeautifier.org/

+62
Feb 02 2018-12-12T00:
source share

JSTool is best suited for stability.

Actions

  • Choose Plugins> Connection Manager> Show Connection Manager
  • Check JSTool> Install> Restart Notepad ++
  • Open js file> Plugins> JSTool> JSFormat
    screenshot

Link:

+136
Apr 6 '14 at 4:40
source share

Try the notepad ++ JSMinNpp plugin (Changed the name for JSTool from version 1.15)

http://www.sunjw.us/jsminnpp/

+51
Mar 23 2018-12-23T00:
source share

Use jsbeautifier instead of trying to do it manually.

+7
Feb 02 2018-12-12T00:
source share

Could you use online services like this ?

Update: (as requested)

Google chrome will also do this http://cristian-radulescu.ro/article/pretty-print-javascript-with-google-chrome.html

+7
Feb 02 '12 at 15:41
source share

Inside the Notepad ++ plugin manager, you have the JSON viewer plugin, which is exactly for this purpose.

After installation, press Ctrl + Alt + Shift + M to decorate your JSON

+2
Apr 04 '17 at 7:32
source share

Mark this

It provides a more readable format not only for Js, but also for Html, Css

+1
Dec 29 '15 at 9:03
source share



All Articles