auto-indentation in javascript file
-
how to get auto-indent function in javascript file? any hint? any plug-in?
-
go to
plugins > plugins adminand installjstool.
(jstool is available on both 64 bit and 32 bit versions of notepad++)after installing jstool, open up any unformatted .js file in notepad++ and go to
plugins > jstool > jsformathere is a larger unformatted .js file (jquery compressed), if you need something to test on: https://code.jquery.com/jquery-3.3.1.min.js
(this is a good file for testing, as it has 86kb of code in just 3 lines, which will be expanded to readable 118kb in 4157 lines, after running jsformat)note: i did not find any plugins, that are able to correctly format/indent mixed html and js code.
if you have mixed html/js files, you currently have to copy the js code part(s) to a new tab, runplugins > jstool > jsformatfrom there, and then copy/paste the formatted js back to your mixed html/js file, replacing the unformatted js code part. -
thanks it works!!!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login