Hey guys I have mostly succeeded by now in completely copying my scite4ahk colors over to Notepad++ but the last thing I am missing is the percent sign highlighting.
Here is an example of how scite4ahk treats it:
and here is Notepad++:
First I tried changing the delimiter settings to this
but this breaks all the code if I don't close the percent sign. It seems that Scite makes everything before any % sign blue no matter what but I have no idea what setting I have to change to achieve this
How to highlight variables with % in Notepad++?
- BrockPlaysFortnite
- Posts: 84
- Joined: 06 Nov 2021, 08:47
Re: How to highlight variables with % in Notepad++?
Found the solution here. Just make sure you remove % from the keyword and operator lists in case you have it in there.
Alternatively, if you want different styling options for both uses of %:
1. Define % as a keyword that requires a prefix - this covers your %var% cases.
2. Add % to the operator list in the edit box on the right side (for the operators that must be surrounded by whitespace) - in that way, e. g. in Loop, % expression, at least % is highlighted (with the operator colour), though there does not seem to be a way to highlight the expression as well.
HTH
Alternatively, if you want different styling options for both uses of %:
1. Define % as a keyword that requires a prefix - this covers your %var% cases.
2. Add % to the operator list in the edit box on the right side (for the operators that must be surrounded by whitespace) - in that way, e. g. in Loop, % expression, at least % is highlighted (with the operator colour), though there does not seem to be a way to highlight the expression as well.
HTH
Who is online
Users browsing this forum: No registered users and 6 guests