Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hastinbe
Newbie

Notepad++ BrightScript Highlighting

I have created the following styler settings for BrightScript files in Notepad++. You can save the following to brightscript.xml. Open Notepad++ and go to the View menu -> User-Defined Dialogue. Click Import... and select brightscript.xml. The colors might look bad if you use a bright colored background (see note below)

Note: It was created on a darker global background color set in the Style Configurator. You can set your global background color from the Settings menu -> Style Configurator, Select Global Styles | Global override, check Enable global background colour, then pick your background colour; I use RGB(62,62,62) in the screenshot. You can also customize the colors of BrightScript from the User-Defined Dialogue after selecting BrightSript for User language at the top left.

<NotepadPlus>
<UserLang name="BrightScript" ext="brs">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<Keywords name="Folder+"></Keywords>
<Keywords name="Folder-"></Keywords>
<Keywords name="Operators">- ! # $ % ( ) * , . / ; [ ] ^ { } + &lt; = &gt;</Keywords>
<Keywords name="Comment"> 1 1 2 2 0&apos; 0REM</Keywords>
<Keywords name="Words1">if then else elseif endif for endfor to step exit each in end while endwhile exitwhile sub endsub function endfunction return print goto dim stop not and or next boolean integer float double string object interface invalid dynamic brsub true false ?</Keywords>
<Keywords name="Words2">getlastruncompileerror getlastrunruntimeerror sleep wait createobject getinterface uptime rebootsystem listdir readasciifile writeasciifile copyfile matchfiles deletefile deletedirectory createdirectory formatdrive strtoi ucase lcase asc chr instr left len mid right str string val abs atn cos csng cdbl exp fix int log sgn sin sqr tan cint type tab pos rnd box run eval line_num objfun</Keywords>
<Keywords name="Words3">as</Keywords>
<Keywords name="Words4"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="FEC150" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="80FF80" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="FFFF80" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="4EBBEF" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="NUMBER" styleID="4" fgColor="00D96C" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="FFFF80" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="C0C0C0" bgColor="000000" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
</NotepadPlus>


And here's what it looks like:
0 Kudos
8 REPLIES 8
jbrave
Channel Surfer

Re: Notepad++ BrightScript Highlighting

nice!
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
renojim
Community Streaming Expert

Re: Notepad++ BrightScript Highlighting

Thanks, I'll have to give it a try. I've just been using the vbs style.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
gplayersv
Visitor

Re: Notepad++ BrightScript Highlighting

Thank you!
0 Kudos
bollywood
Visitor

Re: Notepad++ BrightScript Highlighting

i just tried using this but every time i select this , notepad++ crashes. any ideas?
Hawk Cam
Live footage from the nest on top of Bobst Library at N.Y.U.
copy and paste the link in your browser or use keyword: hawkcam

https://owner.roku.com/add/hawkcam
0 Kudos
elio2001
Visitor

Re: Notepad++ BrightScript Highlighting

I use a free editor born for VIsualBasic Script, really usefull also for editing Roku's script.
ftp://ftp.koansoftware.com/public/freew ... editor.zip

0 Kudos
dewcansam
Visitor

Re: Notepad++ BrightScript Highlighting

And, here is the lighter version. Also included is the roku default colors taken from the eclipse highlighting.
If you are running a version of Notepad++ that does not have import / export on the "User-Defined Dialogue" then just add the lines to your "userDefineLang.xml" file.
<NotepadPlus>
<UserLang name="BrightScript" ext="brs">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<Keywords name="Folder+"></Keywords>
<Keywords name="Folder-"></Keywords>
<Keywords name="Operators">- ! # $ % ( ) * , . / ; [ ] ^ { } + &lt; = &gt;</Keywords>
<Keywords name="Comment">1 1 2 2 0&apos; 0REM</Keywords>
<Keywords name="Words1">if then else elseif endif for endfor to step exit each in end while endwhile exitwhile sub endsub function endfunction return print goto dim stop not and or next boolean integer float double string object interface invalid dynamic brsub true false ?</Keywords>
<Keywords name="Words2">getlastruncompileerror getlastrunruntimeerror sleep wait createobject getinterface uptime rebootsystem listdir readasciifile writeasciifile copyfile matchfiles deletefile deletedirectory createdirectory formatdrive strtoi ucase lcase asc chr instr left len mid right str string val abs atn cos csng cdbl exp fix int log sgn sin sqr tan cint type tab pos rnd box run eval line_num objfun</Keywords>
<Keywords name="Words3">as</Keywords>
<Keywords name="Words4"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="2800C8" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="4B00F0" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="004080" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="66CDAA" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="66CDAA" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="NUMBER" styleID="4" fgColor="7D1919" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="FF1919" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="326464" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="32CD32" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
</NotepadPlus>

roku eclipse highlighter default colors:
task( 127, 159, 191 )
comments( 102, 205, 170 )
strings( 50, 100, 100 )
numbers( 125, 25, 25 )
reserved( 40, 0, 200 )
return( 255, 25, 25 )
entry( 50, 205, 50 )
events( 40, 0, 150 )
variables( 75, 0, 240 )
functiongeneral( 225, 75, 25 )
functionstrings( 255, 75, 25 )
functionmath( 255, 75, 25 )
attribcontent( 255, 140, 0 )
attribtheme( 255, 140, 0 )
attribhttp( 255, 140, 0 )
0 Kudos
belltown
Roku Guru

Re: Notepad++ BrightScript Highlighting

That looks very nice. I was able to get a similar result using by going to Settings>Style Configurator ..., selecting Language : VB/VBS, adding brs as a user ext., then adding in a few user-defined keywords (by selecting Style: WORD): endif void invalid.

I'm going to try using your style for a while and see if I like it better. The only thing I would change so far would be to add "void" as a keyword.
0 Kudos
challgren
Visitor

Re: Notepad++ BrightScript Highlighting

I submitted this to Notepad++ developers so maybe they will include it in the next release https://sourceforge.net/tracker/?func=d ... id=612385#
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.