Saturday, August 22, 2009

NEdit = Super Edit

Somewhere along the line, they upgraded to full regex support I believe. The backreference thing didn't work well for me, but anyway. Here are the things I've added (though the menus, but you can cut&paste) to get syntax highlighting with Autohotkey code. A true software type might do a much better job at this.

In each section (denoted by nedit.whatever - shown here just as a label - don't add this line) add the lines given

nedit.highlightPatterns: Ada:Default\n\

Autohotkey:1:0{\n\
comment:"(;.+$)|(^/\\*.+^\\*/)":::Comment::\n\
hotkey:"^[ \\t]*[^:]+(?=::)":::Flag::\n\
command:"^ *[a-zA-Z0-9_]+(?=($|[ \\t]*,|[ \\t]+[^ \\t:=(]))":::Keyword::\n\
string:"""[^""]*""|'[^']*'":::String1::\n\
builtin:"(?iif|loop|return|break|continue|while)\\s*(?=\\()":::Subroutine::\n\
expression:"^\\s*\\w+\\s*(?=[:=])":::Storage Type::\n\
}

nedit.languageModes: Ada:.ada .ad .ads .adb .a:::::::\n\
Autohotkey:.ahk::Smart:None:4::".,/\\\\`'!$@#%^&*()-=+{}[]"":;<>?~|":

nedit.macroCommands: \
Comments>Comment@Autohotkey:F3::: {\n\
replace_in_selection("^", "; ", "regex")\n\
process_cancel()\n\
}\n\
Comments>Uncomment@Autohotkey:F4::: {\n\
replace_in_selection("^; ", "", "regex")\n\
}\n

No comments: