Syntax Highlight p/ macros no notepad++
Quem desenvolve/edita macros sabe como essa pode ser uma tarefa cansativa, tanto mentalmente quanto visualmente. Por isso criei esse syntax highlight, para notepad++. Para quem não sabe, Syntax Highlight é uma função dos editores de texto que deixa seu código colorido.
Exemplo de antes e depois:
Primeiramente, salve o codigo abaixo como
macro.xml em qualquer lugar do seu computador.
<NotepadPlus>
<UserLang name="Macro" ext="mkb" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1">- +</Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1">ms t</Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">+ - / * != < > | || &&</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">if else endif do for loop next foreach until while</Keywords>
<Keywords name="Keywords2">stop
exit
exec
unset
disconnect
unsafe
endunsafe
config
import
unimport
set
</Keywords>
<Keywords name="Keywords3">craft get inventorydown inventoryup item look pick placesign playsound respawn set slot sprint tile unsprint key toggle presstype break calc dec do echo encode iif inc join lcase log match prompt random replace split sqrt strip ucase unset wait arrysize indexof pop put bind chat fog fov gamma music resource sensi shader volume achievement clear gui show store time filter modif pass</Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00$${ 01 02}$$ 03" 04 05" 06( 07 08) 09[ 10 11] 12% 13 14% 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="6" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="009D9D" bgColor="FFFFFF" fontName="" fontStyle="5" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="400000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="5" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="5" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="004040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFF80" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="400080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="117702655" />
<WordsStyle name="DELIMITERS2" fgColor="DF4800" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="16" />
<WordsStyle name="DELIMITERS3" fgColor="002448" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="117702655" />
<WordsStyle name="DELIMITERS4" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="001C00" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="8" />
<WordsStyle name="DELIMITERS6" fgColor="400080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Ou pastebin:
http://pastebin.com/LisvFNDk
Para instalar no notepad++, siga estes passos
- Clique em Language no menu superior
- Clique em Define your Language
- Clique em Import
- Selecione o macro.xml
Agora que você instalou, basta utiliza-lo.
- Abra seu macro
- Clique em Language
- Clique em Macro
- Magica!
Se o Macro não aparecer na lista, tente reiniciar o notepad++