Notepad++ styling language xml files

Scripting and setups with Notepad++ and AutoHotkey.
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Notepad++ styling language xml files

31 Jan 2021, 21:55

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.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Notepad++ styling language xml files

01 Feb 2021, 10:15

Can you supply a code sample to reproduce?
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: Notepad++ styling language xml files

02 Feb 2021, 18:38

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.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Notepad++ styling language xml files

02 Feb 2021, 20:18

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.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Notepad++ styling language xml files

02 Feb 2021, 20:26

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 '.
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: Notepad++ styling language xml files

02 Feb 2021, 21:44

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.

Return to “Notepad++”

Who is online

Users browsing this forum: No registered users and 5 guests