I use Notepad++ as my main editor when writing HTML files. The default
html.xml API file that defines the autocompletion rules for HTML files always annoys me, because it's full of old/obsolete/invalid tag names. To combat this, I am attempting to create a new API file for valid HTML5.
One of the problems is that non-alphanumeric characters do not seem to be recognised by the editor (you can see one instance of this in the default HTML autocompletion file - it defines
!doctype but you can never get that to appear since the editor doesn't seem to like the
I have tried replacing the characters in question with escaped versions (such as
! for the exclamation mark), but that doesn't seem to make a difference.
So my question is, is there a way to get Notepad++ user defined language files to recognise non-alphanumeric characters?
(Another question is whether this question should be asked here or on StackOverflow... I posted it here because it doesn't really ask anything about programming. It's more about the use of a programming tool.)
Example (enable autocompletion in preferences, select HTML as language and type a letter):
Delete the letter you just typed, and type an exclamation mark. No autocomplete selection pops up, even though if you scroll to the top of it (when it opens for other characters) the first entry is
The fact that this is the case with the default HTML API file kind of makes me believe that it can't be done, but if that's the case, why is
!doctype listed in there at all?
I have also tried changing the default encoding in the API file from
UTF-8 (and some others), and changing the encoding in a test file to match (in the Encoding menu), but this appears to make no difference.