Your Digital Media Has Never Looked So Good

 
hastinbe
Topic Author
Posts: 2
Joined: Sun Feb 06, 2011 12:57 pm

Notepad++ BrightScript Highlighting

Sun Feb 06, 2011 1:20 pm

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:
Image
 
jbrave
Posts: 716
Joined: Mon Mar 22, 2010 3:00 pm
Location: Ben Lomond, CA
Contact:

Re: Notepad++ BrightScript Highlighting

Sun Feb 06, 2011 9:45 pm

nice!
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: Notepad++ BrightScript Highlighting

Sun Feb 06, 2011 11:01 pm

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

-JT
 
gplayersv
Posts: 10
Joined: Tue Feb 22, 2011 3:05 am

Re: Notepad++ BrightScript Highlighting

Tue Feb 22, 2011 3:34 am

Thank you!
 
bollywood
Posts: 99
Joined: Sun May 01, 2011 4:58 pm

Re: Notepad++ BrightScript Highlighting

Wed May 04, 2011 5:45 pm

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
 
elio2001
Posts: 14
Joined: Sun Feb 07, 2010 1:55 am

Re: Notepad++ BrightScript Highlighting

Wed May 04, 2011 9:47 pm

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

Image
 
dewcansam
Posts: 1
Joined: Sun Mar 25, 2012 9:30 am

Re: Notepad++ BrightScript Highlighting

Sun Mar 25, 2012 9:45 am

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 )
 
belltown
Posts: 1465
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: Notepad++ BrightScript Highlighting

Sun Mar 25, 2012 12:43 pm

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.
https://github.com/belltown/
 
challgren
Posts: 1
Joined: Sun Mar 25, 2012 10:05 pm

Re: Notepad++ BrightScript Highlighting

Sun Mar 25, 2012 11:20 pm

I submitted this to Notepad++ developers so maybe they will include it in the next release https://sourceforge.net/tracker/?func=d ... id=612385#

Who is online

Users browsing this forum: No registered users and 4 guests