Notepad++ does auto-complete for html and also for JavaScript. but the auto-completion depends on file extension.html file supports completion for html only. Is there a way to enable auto-completion for javascript in the script tag of an html file? I mean, other than copying the auto-completion keyword list from "javascript.xml" to "html.xml" files...
3 Answers
You would either need to
- write your own lexer plugin (may possibly have an issue of conflicting with the internal HTML lexer), or
- modify the source and compile your own notepad++/Scilexer.dll
Both are not quick undertakings.
1 Comment
NikhilWanpal
Ohk.. Thanks for the help,Ben.. Its difficult for me as I am not a developer for windows applications, but if I ever do will post the link to the plugin for sure! :)
Another way to do is to create 2 files and code
- JavaScript in the second one (but never save it)
- HTML in the first one (and copy/paste your Javascript between
<script> </script>balises)
Best way to work (for security) is to use 2 separated files : your JavaScript could be protected when the user try show source-code in his browser.
by the way, Notepad++ is a very fast and smart editor, you could just add complements to it like JSLint, emmet, nppFTP, indent by fold... and change it theme by a dark one (Obsidian) : it would be enough for small projects coding. ;)