open your userDefineLang and change the value for every <WordsStyle ... />
fontName="Source Code Pro"
<WordsStyle name="KEYWORDS1" fgColor="0060FF" bgColor="FFFFFF" fontName="Source Code Pro" fontStyle="0" nesting="0" />than import new
<WordsStyle name="KEYWORDS1" fgColor="0060FF" bgColor="FFFFFF" fontName="Source Code Pro" fontStyle="0" nesting="0" />than import new
#NoEnv SetBatchLines, -1 Loop, .\themes\*.xml { FileRead, FullXML, % file := A_LoopFileLongPath if RegExMatch( FullXML, "si)name=""ruby"".*?LexerType", RUBY ) ; if there is a Ruby Entry GoSub, CreateEntry else, NoEntry .= A_LoopFileLongPath "`n" } if ( NoEntry ) MsgBox, 262208, Could Not Create:, % SubStr( NoEntry, 1, -1 ) Return CreateEntry: { RegExMatch( RUBY, "si)name=""DEFAULT"".*?bgColor=""\K.{6}", BGCOLOR ) , RegExMatch( RUBY, "si)name=""IDENTIFIER"".*?fgColor=""\K.{6}", IDENTIFIER ) , RegExMatch( RUBY, "si)name=""COMMENTLINE"".*?fgColor=""\K.{6}", COMMENT ) , RegExMatch( RUBY, "si)name=""INSTRUCTION.*?fgColor=""\K.{6}", INSTRUCTION ) , RegExMatch( RUBY, "si)name=""STRING"".*?fgColor=""\K.{6}", STRING ) , RegExMatch( RUBY, "si)name=""NUMBER"".*?fgColor=""\K.{6}", NUMBER ) , RegExMatch( RUBY, "si)name=""CLASS NAME"".*?fgColor=""\K.{6}", CLASS_NAME ) , RegExMatch( RUBY, "si)name=""DEF NAME"".*?fgColor=""\K.{6}", REGEX ) , RegExMatch( RUBY, "si)name=""REGEX"".*?fgColor=""\K.{6}", DEF_NAME ) template = ( join`r`n <Styles> <WordsStyle name="DEFAULT" styleID="0" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" styleID="1" fgColor="%COMMENT%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" styleID="2" fgColor="%COMMENT%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="NUMBERS" styleID="3" fgColor="%NUMBER%" bgColor="%BGCOLOR%" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS1" styleID="4" fgColor="%INSTRUCTION%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS2" styleID="5" fgColor="%REGEX%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS3" styleID="6" fgColor="%NUMBER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS4" styleID="7" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="2" nesting="0" /> <WordsStyle name="KEYWORDS5" styleID="8" fgColor="%INSTRUCTION%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" styleID="9" fgColor="ÞF_NAME%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" styleID="10" fgColor="%INSTRUCTION%" bgColor="%BGCOLOR%" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS8" styleID="11" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" styleID="12" fgColor="%INSTRUCTION%" bgColor="%BGCOLOR%" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" styleID="13" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" styleID="14" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" styleID="15" fgColor="%COMMENT%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" styleID="16" fgColor="%STRING%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS2" styleID="17" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS3" styleID="18" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" styleID="19" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" styleID="20" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" styleID="21" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" styleID="22" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" styleID="23" fgColor="%IDENTIFIER%" bgColor="%BGCOLOR%" fontName="" fontStyle="0" nesting="0" /> </Styles> ) FileRead, AHKUDL, % ahkudlfile := "userDefineLang_AHK.xml" NewXML := RegExReplace( AHKUDL, "sm`ai)<Styles>.*</Styles>", template) FileDelete, % SubStr(ahkudlfile, 1, -4) . SubStr(file, InStr(file, "\", false, 0) + 1) ; delete file if it already exists FileAppend, %NewXML%, % SubStr(ahkudlfile, 1, -4) . SubStr(file, InStr(file, "\", false, 0) + 1) Return }
I modified the Syntax Highlighting theme in this post along with a theme that comes w/ npp to produce this dark theme:
I made a post here for all those looking for a dark theme.
Thanks for this post!
I can't get debugger client to work - "Failed to connect to an active debugger client"
Problem Solved
[X] Start with closed socket (Firewall problems work around)
EDIT2: It worked once then stopped working again
Awesome job on all this, jNizM. Any chance of having highlighting for gLabels and vLabels?
Hi all,
I'm just starting to dive into AHK since yesterday, but I'm already very impressed by the power and multitude of the possibilities.
In response to this thread:
I've followed instructions to enable syntaxhighlighting and autocomplete for AHK in N++ .
I can get it to work, but *only* after I first create a new document in a different language (Java f.i.), start typing there (autocomplete works immediately for that file), and then return to my existing .AHK file.
If I simply open N++, load my .AHK file as the only open doc, autocomplete will not start (code coloring does work right from the start btw).
I'm using the latest N++ update 6.4.5 for this.
Am I doing something wrong, or is this a known issue?
I'm using AHK ANSI-32, followed the instructions in the first post. Restarted AHK, Language > UserDefined is listed, when I load a AHK script, there is no syntax highlighting ? Shouldn't AHK syntax highlighting be listed under the H heading with the language list ?