Page 1 of 1

Notepad++ styling language xml files

Posted: 31 Jan 2021, 21:55
by PuzzledGreatly
I use notepad++ to edit ahk scripts and have an xml language file that colors comments in green. I just tried using a multiple file filter with fileselectfile and this uses a semicolon to separate the filters. All the text in the filter after the semi-colon has also gone green. This is disconcerting. Is there any way to add an exception to the xml file so that it only turns true comments green? Thanks.

Re: Notepad++ styling language xml files

Posted: 01 Feb 2021, 10:15
by kczx3
Can you supply a code sample to reproduce?

Re: Notepad++ styling language xml files

Posted: 02 Feb 2021, 18:38
by PuzzledGreatly
Thanks for the reply:

Code: Select all

FileSelectFile, deck, 3, %dir%, Select a Game List:, Documents(*.csv;*.txt)	;for example
Ideally the text ;for example should be green but the *.txt) should be black.

Re: Notepad++ styling language xml files

Posted: 02 Feb 2021, 20:18
by kczx3
Hmmm I see it too. I'm not sure though. I haven't used Notepad++ in a long time to edit AHK files. Technically, AHK comments must have white space before the semicolon OR start at the beginning of the line. I'm not sure how to force the space thing unfortunately. You might post this on the Notepad++ Community forum.

Re: Notepad++ styling language xml files

Posted: 02 Feb 2021, 20:26
by kczx3
It seems AutoGUI highlights the comments correctly but it highlights some of the other things strangely too. This is part of the problem when strings aren't required to be within delimeters like " and '.

Re: Notepad++ styling language xml files

Posted: 02 Feb 2021, 21:44
by PuzzledGreatly
Thanks, using quotation marks works with fileselectfile so the issue is resolved in this case.

EDIT 2021-02-06: Using quotation marks fails! Further tests show in practice it breaks the filter.