4

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...

1
  • I did, here is the link. Same opinion even there! Commented Mar 4, 2011 at 4:00

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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! :)
1

I was faced with the same dilemma. For me, The most simple way to get the functionality you desire was to switch to an editor that already does this by default called Brackets. It is specifically designed for web development and is completely free and lightweight.

Comments

1

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. ;)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.