HTML5 syntax highlighting supported in some text editor? Notepad++ maybe?
I'm trying to move to HTML5 on new projects, that don't require high cross-browser-ism. However, I can't find a way to add the HTML5 tags, such as header
or aside
, to "normal" tags within other html-tags, so they would be highlighted. Un-colored code really slows development down, so I have to stick with xhtml until this issue gets resolved.
I'm using Notepad++, so i开发者_开发知识库t would be great to fix this issue in it specifically. If that's out of range, I'd like to hear any other similar (light, compact) text-editor, which supports HTML5 better.
One way I can think of is to modify %ProgramFiles%\Notepad++\langs.xml
, but I don't know if that is going to get overwritten when you upgrade Notepad++. You'll want to back up that file regardless, just in case.
Find this chunk (simply searching for <Language name="html"
will do):
<Language name="html" ext="html htm shtml shtm xhtml" commentLine="" commentStart="<!--" commentEnd="-->">
<Keywords name="instre1">...</Keywords>
</Language>
Inside the <Keywords>
element, add the HTML5 element names space-separated, making sure you don't type over the existing names inside, of course.
You may have to have elevated privileges in order to save the file, but when you save it and restart Notepad++, it'll recognize your added names as HTML identifiers.
精彩评论