The title may be a bit confusing, but here's the problem. I use Notepad++ both for coding, and for writing documentation in Markdown. For some reason Markdown is not on the list of "supported languages", so I created a custom language, and changed the font to Arial, as it's easier for me to read.
However now if I use parentheses in the text, Notepad highlights them for me, and during highlighting it doesn't just make them red, it also makes them Courier. Because of some weird kerning issues it also makes parenthes move down and to the right by 1-2 pixels, as they change the font face momentarily, and it just looks very distracting. I'd like to disable this. Let them be highlighted, sure, no problem with that, but I don't want them twitch and flicker from Arial to Courier and back every time I use parentheses.
Typically, to disable this effect, I'd be expected to go to "Style Configurator"; navigate to "Global Styles", and set the font for "Brackets Highlighting" to "empty". That's what I've done, but it doesn't seem to work. Font name is set to "", Font size is set to "", Bold/Italic/Underlined are all unchecked, but it still flickers from Arial to Courier. I checked the XML file with styles, and the value for font face there seems to realy be ="" (empty), and yet it still flickers.
I also looked for a way to disable parenthesis highlighting for my custom language, but cannot find a way to do it.
Any suggestions?
UPDATE: Here's another solution I tried that DOES NOT work (or at least doesn't work easily). It may seem from the menus that one can try to set a default (global) font in the style configurator, and then specify different fonts for different languages, but it is not possible. Here's what I tried: went to "Style configurator", and set "Default Style" to "Arial". Now my MD is in Arial (good), but my code is in Arial as well (horrible). Then I went to one of the languages (Python), and changed "DEFAULT" Style "Font Name" to "Courier New". It changed indents and line spaces, but actually did not change font-face, as it appears that other Styles (STRING, NUMBER, COMMENTLINE etc.) do not inherit to DEFAULT.
If I manually change all of the styles for "Python" to Courier, it actually does seem to work, so technically it is a working solution, but it is super-awkward, as one would have to do it for every language they work with, and every style within this language, instead of just changing it once for Markdown.
I am now wondering whether it is possible to integrate Markdown into Style Configurator. Should I be able to describe it in the "stylers.XML" directly? Or would it be too hard?
UPDATE2: Another option that does not work: adding a language to the list of default languages (via "langs.xml"), or hijacking one of existing languages for "md" extension, to set them to Arial. Adding does not work because, well, it just does not make anything happen. It seems that the list of languages is hardcoded somewhere inside Notepad, and only then uploaded from XML. Just adding a new item to the XML doesn't create a new language.
There's a nice "neutral" language called "normal" with a default ext of "txt", that would be ideal for hosting "md" as well. Alas, it does not have any style fields to edit, so it is impossible to set a font for it.
Adding a DEFAULT style to "normal" language in "stylers.xml" doesn't change anything; it is simply ignored.
Hijacking a proper language that is already in the list also does not work, as languages have all sort of special characters defined for them, and it doesn't seem to be possible to edit those. You can clean all keywords and change comment sign in "lang.xml", but it keeps processing numbers and operators as special styles. And finally, even if you manually set all styles to "Arial, black", it still flickers parentheses to courier as you type. So this is also a dead end.
Any other ideas, anyone?
No comments:
Post a Comment