Skip to main content
Topic: Syntax Highlighting Scripts Within (Read 58673 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Syntax Highlighting Scripts Within

Syntax highlighting

Many of the Title Formatting scripts are fairly complicated and difficult to read.  To help, I've put together Synatax Highlighting scripts for UltraEdit32 and TextPad that you can use to color code the syntax, and match parens and brackets to make developing a little easier.  You can do the same thing for Multiedit and Edipad, but neither lend themselves to this format.  However, you can use these as a basis for both.

I hunted through ALL the messages in the Title Format thread to find as many of the user-defined tags as I could and also used the excellent doc put together by Bamral, which you can get at http://home.attbi.com/~billamral/TAGZ.TXT, so I think everything should be here.  If not, please post your corrections.  I'm sure I missed some things and also might have included some obsolete tags.

Both UltraEdit and TextPad have help files that explain how to implement thes (It's pretty straightforward).  In both, you will also have to define the colors you want to use with each category after you incorporate the tags, but theres not much more to it and it makes life much easier.


Have Fun!


UltraEdit32 - This will be added to Wordfile.txt in UltraEdit directory

Quote
/L10"Foobar" Nocase HTML_LANG Line Comment =  Line Comment Alt =  Block Comment On =  Block Comment Off =  Block Comment On Alt =  Block Comment Off Alt = Escape Char = String Chars = File Extensions =
/Delimiters = (){}[],.?
/Function String = "%[^t ]++function[^t ]+^([a-zA-Z0-9_&]+*^){"
/Function String 1 = "%[^t ]++function[^t ]+^([a-zA-Z0-9_&]+*^)^p*{"
/Indent Strings =
/Unindent Strings =

/C1"Tags"
%artist% %album%
%date%
%performer%
%title% %tracknumber%
%version%

/C2"Internal_Fields"
%_composer% %_comment% %__channels%
%_date% %_directoryname% %disc%  %discnumber% %_diskwriter_index%
%_foobar2000_version% %_filename% %_filename_ext%
%_genre%
%_isplaying%
%_length% %_length_seconds%
%_path% %_path_raw% %_playlist_number%
%_subsong%

/C3"File_Specs"
%__bitrate%
%__extrainfo%
%__replaygain_album_gain% %__replaygain_album_peak% %__replaygain_track_gain% %__replaygain_track_peak%
%__samplerate%

/C4"Math_Functions"
$add
$div $dec
$hex
$mul $mod $min $max
$num

/C5"Colors"


/C6"If_Else_Functions"
$if $ifgreater $if2 $iflonger

/C7"String_Functions"
$abbr
$caps $caps2 $cut
$date
$ext
$lower $longest $len $left
$null
$pad $padcut $pad_right $padcut_right
$replace $right $rot13 $repeat
$sub $substr $strchr $strcmp $stricmp $shortest $strstr $strlchr $strrchr
$upper



For TextPad - You'll need to create a document class and associate it with the syntax file called foobar.syn
The script below is what will be in foobar.syn

Quote
; TurinsRevenge syntax definitions for TextPad
;

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = yes
KeyWordLength =
BracketChars = {[()]}
OperatorChars = -+*/<>!~^&|=
PreprocStart = #
SyntaxStart =
SyntaxEnd =
HexPrefix = 0x
CommentStart = /*
CommentEnd = */
CommentStartAlt =
CommentEndAlt =
SingleComment = //
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt =
StringEsc = \
CharStart = '
CharEnd = '
CharEsc = \


[Keywords 1]
%artist%
%album%
%date%
%performer%
%title%
%tracknumber%
%version%

[Keywords 2]
%_composer%
%_comment%
%__channels%
%_date%
%_directoryname%
%disc%
%discnumber%
%_diskwriter_index%
%_foobar2000_version%
%_filename%
%_filename_ext%
%_genre%
%_isplaying%
%_length%
%_length_seconds%
%_path%
%_path_raw%
%_playlist_number%
%_subsong%

[Keywords 3]
%__bitrate%
%__extrainfo%
%__replaygain_album_gain%
%__replaygain_album_peak%
%__replaygain_track_gain%
%__replaygain_track_peak%
%__samplerate%

[Keywords 4]
$add
$div
$dec
$hex
$mul
$mod
$min
$max
$num


[Keywords 5]
$abbr
$caps
$caps2
$cut
$date
$ext
$lower
$longest
$len
$left
$null
$pad
$padcut
$pad_right
$padcut_right
$replace
$right
$rot13
$repeat
$sub
$substr
$strchr
$strcmp
$stricmp
$shortest
$strstr
$strlchr
$strrchr
$upper

[Keywords 6]
$if
$ifgreater
$if2
$iflonger
Master of Fate. By Fate Mastered

Syntax Highlighting Scripts Within

Reply #1
Nice idea, I'm sure that would help a if I used UltraEdit or TextPad  but lots of people will find syntax highlighting very usefull.

Syntax Highlighting Scripts Within

Reply #2
Thanks, TurinsRevenge. That helps a lot.  B)
That's so plausible, I can't believe it.

Syntax Highlighting Scripts Within

Reply #3
Here is an editing mode for jEdit.

Installation:
Put tagz.xml in either %UserProfile%\.jedit\modes or %ProgramFiles%\jEdit\modes
Add the following to catalog, which is in the same directory:
<MODE NAME="tagz"   FILE="tagz.xml"
            FILE_NAME_GLOB="*.{t*gz,fb2k}" />

And that's it.
Now you just have to give your Tagz files one of these extensions: tgz, tagz or fb2k.

Get it as a zip file here. That way you will get the correct indentation.

Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!--
Tagz syntax highlight for jEdit
http://www.jedit.org/42docs/users-guide/writing-modes.html for info on editing this file.
-->

<MODE>
    <PROPS>
 <PROPERTY NAME="lineComment" VALUE="//" />
 
 <!-- Auto indent. Uncomment the following if you want auto indentation -->
 <!-- You may want to play around with TRUE and FALSE -->
 <!--
 <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
 <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
 <PROPERTY NAME="doubleBracketIndent" VALUE="FALSE" />
 <PROPERTY NAME="lineUpClosingBracket" VALUE="TRUE" />
 -->
    </PROPS>
    
    <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
 
 <!-- Add any custom keywords here. They will override anything else that might match -->
 <!-- See http://www.jedit.org/42docs/users-guide/mode-syntax-tokens.html for other TYPEs that can be used -->
 <!-- LITERAL 1-4 is already used elsewhere, so you may want to avoid using them -->
 <SEQ TYPE="KEYWORD1">$if2</SEQ> <!-- $if2 have to come before $if, otherwise only $if will be highlighted -->
 <SEQ TYPE="KEYWORD1">$if3</SEQ> <!-- $if3 have to come before $if, otherwise only $if will be highlighted -->
 <SEQ TYPE="KEYWORD1">$ifgreater</SEQ> <!-- $ifgreater have to come before $if, otherwise only $if will be highlighted -->
 <SEQ TYPE="KEYWORD1">$iflonger</SEQ> <!-- $iflonger have to come before $if, otherwise only $if will be highlighted -->
 <SEQ TYPE="KEYWORD1">$if</SEQ>
 <SEQ TYPE="KEYWORD1">$and</SEQ>
 <SEQ TYPE="KEYWORD1">$not</SEQ>
 <SEQ TYPE="KEYWORD1">$or</SEQ>
 <SEQ TYPE="KEYWORD1">$xor</SEQ>
 
 <SEQ TYPE="KEYWORD2">$puts</SEQ> <!-- $puts have to come before $put, otherwise only $put will be highlighted -->
 <SEQ TYPE="KEYWORD2">$put</SEQ>
 <SEQ TYPE="KEYWORD2">$get</SEQ>
 
 <SEQ TYPE="KEYWORD3">$char</SEQ>
 <SEQ TYPE="KEYWORD3">$crlf</SEQ>
 <SEQ TYPE="KEYWORD3">$tab</SEQ>
 
 <SEQ TYPE="OPERATOR">$add</SEQ>
 <SEQ TYPE="OPERATOR">$div</SEQ>
 <SEQ TYPE="OPERATOR">$dec</SEQ>
 <SEQ TYPE="OPERATOR">$hex</SEQ>
 <SEQ TYPE="OPERATOR">$muldiv</SEQ> <!-- $muldiv have to come before $mul, otherwise only $mul will be highlighted -->
 <SEQ TYPE="OPERATOR">$mul</SEQ>
 <SEQ TYPE="OPERATOR">$mod</SEQ>
 <SEQ TYPE="OPERATOR">$min</SEQ>
 <SEQ TYPE="OPERATOR">$max</SEQ>
 <SEQ TYPE="OPERATOR">$num</SEQ>
 <SEQ TYPE="OPERATOR">$rand</SEQ>
 
 <!-- No custom keywords after this line, unless you know what you are doing -->
 
 <!-- Comments -->
 <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
 
 <!-- () and [] -->
 <SEQ TYPE="MARKUP">(</SEQ>
 <SEQ TYPE="MARKUP">)</SEQ>
 <SEQ TYPE="MARKUP">[</SEQ>
 <SEQ TYPE="MARKUP">]</SEQ>
 
 <!-- Functions, eg. $if. The parens will not be coloured by this -->
 <MARK_FOLLOWING TYPE="FUNCTION">$</MARK_FOLLOWING>
 
 <!-- Raw text, eg. 'bla' -->
 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
     <BEGIN>'</BEGIN>
     <END>'</END>
 </SPAN>
 
 <!-- Colour codes, eg. AF0B89. -->
 <SPAN TYPE="LITERAL2" NO_LINE_BREAK="FALSE">
     <BEGIN></BEGIN>
     <END></END>
 </SPAN>
 
 <!-- _ fields, eg. %_filename%. Also tech info fields, eg. %__bitrate% -->
 <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE">
     <BEGIN>%_</BEGIN>
     <END>%</END>
 </SPAN>
 
 <!-- Fields, eg. %artist% -->
 <SPAN TYPE="LITERAL4" NO_LINE_BREAK="FALSE">
     <BEGIN>%</BEGIN>
     <END>%</END>
 </SPAN>
 
    </RULES>
</MODE>

Syntax Highlighting Scripts Within

Reply #4
Here is another jEdit mode:
Code: [Select]
<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!-- 2004-11-11 - Go2Null
 Inital draft.
 FUNCTION - Tag Operations
 KEYWORD1 - Variable Operations                  
 KEYWORD2 - Metadata (%lower_case%)
 KEYWORD3 - System Variables (Special - %_lower_case%; Tech Info %__lower_case%)
 KEYWORD4 - Column UI Variables (b_Boolean; c_Character; i_Integer; s_String; %_tUserVar%)
 LABEL    - EOL character
 LITERAL1 - String delimiters
 LITERAL2 - Colour delimiters
-->

<MODE>
    <PROPS>
 <PROPERTY NAME="lineComment" VALUE="// " />
   <PROPERTY NAME="folding" VALUE="explicit" />
    </PROPS>

 <RULES IGNORE_CASE="TRUE" NO_WORD_SEP="_" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[[:xdigit:]]{6}">
   <!-- COMMENTs -->
   <EOL_SPAN AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="TRUE" TYPE="COMMENT2">// {{{</EOL_SPAN>
   <EOL_SPAN AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="TRUE" TYPE="COMMENT2">// }}}</EOL_SPAN>
   <EOL_SPAN TYPE="COMMENT1">// </EOL_SPAN>


   <!-- KEYWORD2: Metadata '%all_lower%' -->
   <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
     <BEGIN>%[[:lower:]][[:lower:]]</BEGIN>
     <END>%</END>
   </SPAN_REGEXP>

   <!-- KEYWORD3 - System Variables -->
   <!-- Variable names are all lower case. -->
     <!-- KEYWORD3: System Variables: Tech Info '%__all_lower%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
       <BEGIN>%__[[:lower:]][[:lower:]]</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

     <!-- KEYWORD3 - System Variables: Special '%_all_lower%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
       <BEGIN>%_[[:lower:]][[:lower:]]</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

   <!-- KEYWORD4: Column UI Variables -->
   <!-- Variable names are initial lower case, then title case. -->
     <!-- KEYWORD4 - Column UI Variables 'lowerTitle' -->
     <!-- 'b_' - boolean -->
     <!-- 'c_' - character -->
     <!-- 'i_' - integer -->
     <!-- 's_' - string -->
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">b_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">c_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">i_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">s_</MARK_FOLLOWING>

     <!-- KEYWORD4: Column UI Variables: globals '%_lowerTitle%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD4" NO_LINE_BREAK="TRUE">
       <BEGIN>%_[bcis]_</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

   <!-- LABEL: EOL Character  -->
   <SEQ TYPE="LABEL"></SEQ>

   <!-- LITERAL1: string delimiters -->
   <SPAN TYPE="LITERAL1">
     <BEGIN>'</BEGIN>
     <END>'</END>
   </SPAN>

   <!-- LITERAL2: Colour delimiters  -->
   <SEQ TYPE="LITERAL2"></SEQ>
   <SEQ TYPE="LITERAL2">|</SEQ>

   <!-- OPERATOR -->
   <SEQ TYPE="OPERATOR">(</SEQ>
   <SEQ TYPE="OPERATOR">)</SEQ>
   <SEQ TYPE="OPERATOR">[</SEQ>
   <SEQ TYPE="OPERATOR">]</SEQ>
   <SEQ TYPE="OPERATOR">,</SEQ>
   <SEQ TYPE="OPERATOR">=</SEQ>

 <KEYWORDS>
     <!-- FUNCTION: Title Formatting functions -->
     <FUNCTION>$abbr</FUNCTION>
     <FUNCTION>$ansi</FUNCTION>
     <FUNCTION>$blend</FUNCTION>
     <FUNCTION>$caps2</FUNCTION>
     <FUNCTION>$caps</FUNCTION>
     <FUNCTION>$char</FUNCTION>
     <FUNCTION>$crlf</FUNCTION>
     <FUNCTION>$cut</FUNCTION>
     <FUNCTION>$fix_eol</FUNCTION>
     <FUNCTION>$hex</FUNCTION>
     <FUNCTION>$info</FUNCTION>
     <FUNCTION>$insert</FUNCTION>
     <FUNCTION>$left</FUNCTION>
     <FUNCTION>$len2</FUNCTION>
     <FUNCTION>$len</FUNCTION>
     <FUNCTION>$lower</FUNCTION>
     <FUNCTION>$meta_sep</FUNCTION>
     <FUNCTION>$meta_num</FUNCTION>
     <FUNCTION>$meta</FUNCTION>
     <FUNCTION>$num</FUNCTION>
     <FUNCTION>$pad_right</FUNCTION>
     <FUNCTION>$padcut_right</FUNCTION>
     <FUNCTION>$padcut</FUNCTION>
     <FUNCTION>$pad</FUNCTION>
     <FUNCTION>$rand</FUNCTION>
     <FUNCTION>$repeat</FUNCTION>
     <FUNCTION>$replace</FUNCTION>
     <FUNCTION>$right</FUNCTION>
     <FUNCTION>$roman</FUNCTION>
     <FUNCTION>$rgb</FUNCTION>
     <FUNCTION>$strchr</FUNCTION>
     <FUNCTION>$strrchr</FUNCTION>
     <FUNCTION>$strstr</FUNCTION>
     <FUNCTION>$substr</FUNCTION>
     <FUNCTION>$sub</FUNCTION>
     <FUNCTION>$trim</FUNCTION>
     <FUNCTION>$tab</FUNCTION>
     <FUNCTION>$transition</FUNCTION>
     <FUNCTION>$upper</FUNCTION>

     <!-- FUNCTION: that operate on objects external to the script -->
     <FUNCTION>$directory</FUNCTION>
   <FUNCTION>$ext</FUNCTION>
     <FUNCTION>$filename</FUNCTION>
     <FUNCTION>$progress</FUNCTION>
     <FUNCTION>$progress2</FUNCTION>

     <!-- KEYWORD1 - Variable Operations -->
     <KEYWORD1>$get</KEYWORD1>
     <KEYWORD1>$puts</KEYWORD1>
     <KEYWORD1>$put</KEYWORD1>

     <!-- OPERATOR - Math Operations -->
     <OPERATOR>$add</OPERATOR>
     <OPERATOR>$div</OPERATOR>
     <OPERATOR>$mod</OPERATOR>
     <OPERATOR>$muldiv</OPERATOR>
     <OPERATOR>$mul</OPERATOR>

     <!-- OPERATOR - Logical Operations -->
     <OPERATOR>$and</OPERATOR>
     <OPERATOR>$not</OPERATOR>
     <OPERATOR>$or</OPERATOR>
     <OPERATOR>$xor</OPERATOR>

     <!-- OPERATOR - Comparison Operations -->
     <OPERATOR>$greater</OPERATOR>
     <OPERATOR>$if2</OPERATOR>
     <OPERATOR>$if3</OPERATOR>
     <OPERATOR>$if</OPERATOR>
     <OPERATOR>$ifgreater</OPERATOR>
     <OPERATOR>$iflonger</OPERATOR>
     <OPERATOR>$longer</OPERATOR>
     <OPERATOR>$longest</OPERATOR>
     <OPERATOR>$min</OPERATOR>
     <OPERATOR>$max</OPERATOR>
     <OPERATOR>$shortest</OPERATOR>
     <OPERATOR>$strcmp</OPERATOR>
     <OPERATOR>$stricmp</OPERATOR>
     <OPERATOR>$select</OPERATOR>

   </KEYWORDS>
 </RULES>

 <RULES SET="SYSTEMVARIABLES" IGNORE_CASE="TRUE" NO_WORD_SEP="_">
 <!-- Haven't figured out how to use as DELEGATE!? -->

   <!-- foobar2000 fields -->
   <SEQ TYPE="LITERAL3">%_foobar2000_version%</SEQ>
   <SEQ TYPE="LITERAL3">%_path%</SEQ>
   <SEQ TYPE="LITERAL3">%_path_raw%</SEQ>
   <SEQ TYPE="LITERAL3">%_filename%</SEQ>
   <SEQ TYPE="LITERAL3">%_filename_ext%</SEQ>
   <SEQ TYPE="LITERAL3">%_directoryname%</SEQ>
   <SEQ TYPE="LITERAL3">%_length%</SEQ>
   <SEQ TYPE="LITERAL3">%_length_seconds%</SEQ>

   <!-- foobar2000 Special fields (playlist) -->
   <SEQ TYPE="LITERAL3">%_isplaying%</SEQ>
   <SEQ TYPE="LITERAL3">%_ispaused%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_number%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_total%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_name%</SEQ>

   <!-- foobar2000 Special fields (status bar, window title and copy command) -->
   <SEQ TYPE="LITERAL3">%_time_elapsed%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_remaining%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_total%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_elapsed_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_remaining_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_total_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_ispaused%</SEQ>
 </RULES>
</MODE>
"There is no point in saving WAV... unless you have a huge HD in a very slow computer" - Jan S. (WAV or FLAC, Space No Problem)

Syntax Highlighting Scripts Within

Reply #5
I've also made one up for Notepoad++, which is quite a bit simpler than jEdit and more free than the other ones mentioned in this thread.

Add this to your %Application Data%/Notepad++/userDefineLang.xml file.  I am sure it could use some tweaking, but it's a VERY simple and free way to start making your foobar2000 scripts a bit easier to read.

Code: [Select]
<NotepadPlus>
   <UserLang name="foobar" ext="">
       <Settings>
           <Global caseIgnored="no" />
           <TreatAsSymbol comment="no" commentLine="no" />
           <Prefix words1="no" words2="no" words3="no" words4="no" />
       </Settings>
       <KeywordLists>
           <Keywords name="Folder+">BlockBegin</Keywords>
           <Keywords name="Folder-">BlockEnd</Keywords>
           <Keywords name="Operators">&apos; &quot; ( ) , |</Keywords>
           <Keywords name="Comment"> 1 2 0//</Keywords>
           <Keywords name="Words1">%artist% %album% %date% %performer% %title% %tracknumber% %version% %legality% %year% %comment% %genre% %band%</Keywords>
           <Keywords name="Words2">%_composer% %_comment% %__channels% %_date% %_directoryname% %disc% %discnumber% %_diskwriter_index% %_foobar2000_version% %_filename% %_filename_ext% %_genre% %_isplaying% %_length% %_length_seconds% %_path% %_path_raw% %_playlist_number% %_subsong% %__bitrate% %__extrainfo% %__replaygain_album_gain% %__replaygain_album_peak% %__replaygain_track_gain% %__replaygain_track_peak% %__samplerate%</Keywords>
           <Keywords name="Words3">$greater $add $div $dec $hex $mul $mod $min $max $num $abbr $caps $caps2 $cut $date $ext $lower $longest $len $left $null $pad $padcut $pad_right $padcut_right $replace $right $rot13 $repeat $sub $substr $strchr $strcmp $stricmp $shortest $strstr $strlchr $strrchr $upper $meta_sep $meta_num</Keywords>
           <Keywords name="Words4">$if $ifgreater $if2 $iflonger $if3</Keywords>
       </KeywordLists>
       <Styles>
           <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" />
           <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FF8000" bgColor="FFFF80" fontName="" fontStyle="0" />
           <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FF8040" bgColor="FFFF80" fontName="" fontStyle="0" />
           <WordsStyle name="KEYWORD1" styleID="5" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="KEYWORD3" styleID="7" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="KEYWORD4" styleID="8" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="COMMENT" styleID="1" fgColor="FFFF00" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" />
           <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
           <WordsStyle name="OPERATOR" styleID="10" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="0" />
       </Styles>
   </UserLang>
</NotepadPlus>


Edited to add: Notepad++ has a nice graphical way of editing these .xml styles, so you can tweak it without needing to learn how to actually edit the text in the above code.  Recommended for people who are not serious programmers who want to tweak simple scripts .

Syntax Highlighting Scripts Within

Reply #6
I have created an STX (syntax) file for EditPlus.

It can be found here: foobar.stx

In EditPlus you can also create autocomplete and cliptext files as well.  If anyone is interested I could post those also.

I also have cue.acp (autocomplete), cue.ctl (cliptext) and cue.stx (syntax) files for cuesheet editing.

[span style='font-size:8pt;line-height:100%']Edit: updated link to new site.[/span]
I'm on a horse.

Syntax Highlighting Scripts Within

Reply #7
Well, here is my own UltraEdit wordlist entry for TAGZ:

Code: [Select]
/L12"foobar2000's TAGZ" Nocase Line Comment = // String Chars = '%
/Delimiters = ~!@$%^&*()+=|\/{}[]:;"'<>  ,.?/
/Open Brace Strings =  "{" "(" "["
/Close Brace Strings = "}" ")" "]"

/C1"Functions"
abbr ansi
blend
caps caps2 channels char codec crlf cut
directory
ext
filename fix_eol
get
hex
info insert
left len len2 longest lower
max meta meta_num meta_sep meta_test
num
pad pad_right padcut padcut_right progress progress2 put puts
repeat replace rgb rgb right roman
select shortest strchr strrchr strstr substr
tab transition trim
upper

/C2"If Functions"
if if2 if3 ifgreater iflonger

/C3"Logical Functions"
and
greater
longer
not
or
strcmp stricmp
xor

/C4"Mathematical Functions"
add
div
min mod mul muldiv
rand
sub


You will notice that it's more colorful with the functions, since it knows 4 different types, but treats all variables enclosed by % as strings -> which is a gray text color by default.

I find Open/CloseBraceStrings especially useful with TAGZ, because scripts can get messed up very quickly.

String coloring isn't perfect. I used it both for variables and for text enclosed by the ' character, but other text that would normally be written out by fb2k remains black, instead of gray.

Syntax Highlighting Scripts Within

Reply #8
wow, cool idea! thank you very much!

Syntax Highlighting Scripts Within

Reply #9
Here's my UltraEdit 11 Highlighting.
Again another approach for ' ',%vars% and colors

Quote
/L15"Tagz" Nocase Line Comment = // String Chars = '
/Delimiters = %$()[],'   .
/Indent Strings = "("
/Unindent Strings = ")"
/Open Brace Strings =  "(" "["
/Close Brace Strings = ")" "]"
/Open Fold Strings = "("
/Close Fold Strings = ")"
/C2"Functions"
$abbr $abbr $add $and $ansi
$blend
$caps $caps2 $char $crlf $cut
$directory $div
$ext
$filename $fix_eol
$greater
$hex
$if $if2 $if3 $ifgreater $iflonger $info $insert
$left $len $len2 $longer $lower $longest
$mod $mul $muldiv $min $max $meta $meta_sep $meta_num
$num $not
$or
$pad $pad_right $padcut $padcut_right $progress $progress2
$rand $repeat $replace $right $roman $rgb, $rgb
$shortest $strchr $strrchr $strstr $sub $strcmp $stricmp $substr $select
$trim $tab $transition $upper $xor
/C3"Variable Functions"
$get
$put $puts
/C4"Special Chars"
(
)
[
]
/C5"Variables"
** %

Syntax Highlighting Scripts Within

Reply #10
I downloaded Notepad++, but where do I paste all that code in? There is no .xml file in notepad++ folder you mentioned.

Syntax Highlighting Scripts Within

Reply #11
This is pretty neat. Trying out the TextPad syntax, Thanks.

Syntax Highlighting Scripts Within

Reply #12
is there an updated language script for notepad++ these days?

Syntax Highlighting Scripts Within

Reply #13
The one posted here works pretty well. You could always add some missing elements.

Syntax Highlighting Scripts Within

Reply #14
[deleted]

Syntax Highlighting Scripts Within

Reply #15
The one posted here works pretty well. You could always add some missing elements.



yeah, i checked it out. there seems to be no way to use it with the current version of n++. that post is almost 2 years old 

Syntax Highlighting Scripts Within

Reply #16
Odd. I got version 3.5 installed right now, and I've used it to build my 0.9 strings.

Syntax Highlighting Scripts Within

Reply #17
I had some trouble with the np++ stuff too, so I made a new one:

Code: [Select]
<NotepadPlus>
    <UserLang name="foobar" ext="">
        <Settings>
            <Global caseIgnored="yes" />
            <TreatAsSymbol comment="no" commentLine="yes" />
            <Prefix words1="no" words2="no" words3="no" words4="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">0[00]0</Keywords>
            <Keywords name="Folder+">BlockBegin</Keywords>
            <Keywords name="Folder-">BlockEnd</Keywords>
            <Keywords name="Operators">&apos; &quot; ( ) , [ ] |</Keywords>
            <Keywords name="Comment">1 2 0//</Keywords>
            <Keywords name="Words1">%artist% %album% %date% %performer% %title% %tracknumber% %version% %legality% %year% %comment% %genre% %band% %totaltracks% %_composer% %_comment% %__channels% %_date% %_directoryname% %disc% %discnumber% %_diskwriter_index% %_foobar2000_version% %_filename% %_filename_ext% %_genre% %_isplaying% %_length% %_length_seconds% %_path% %_path_raw% %_playlist_number% %_subsong% %__bitrate% %__extrainfo% %__replaygain_album_gain% %__replaygain_album_peak% %__replaygain_track_gain% %__replaygain_track_peak% %__samplerate% %track% %bitrate%</Keywords>
            <Keywords name="Words2">$roman $char $meta $abbr $caps $caps2 $cut $ext $lower $longest $left $pad $padcut $pad_right $padcut_right $replace $right $rot13 $substr $shortest $upper $rgb $tab $repeat $meta_sep $info $channels $codec $extra $meta_test</Keywords>
            <Keywords name="Words3">$add $div $dec $hex $mul $mod $min $max $num $sub $meta_num $len $strstr $strchr $muldiv $strrchr</Keywords>
            <Keywords name="Words4">$select $greater $if $ifgreater $if2 $iflonger $if3 $put $puts $set_global $get_global $get $stricmp $strcmp $or $not $xor $and $ifequal</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="12" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FF8000" bgColor="FFFF80" fontName="" fontStyle="0" />
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FF8040" bgColor="FFFF80" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="FFFF00" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="1F7223" bgColor="FFFFFF" fontName="Comic Sans MS" fontStyle="0" fontSize="11" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="C41C13" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

(paste into %appdata%\notepad++\UserDefineLang.xml
or UserDefineLang.xml whereever you installed np++)

Granted, it's not perfect, but it's good enough for me, hope someone can use it


Syntax Highlighting Scripts Within

Reply #19

I have syntax highlighting for tagz for Vim, and I can probably produce one for Vile, if anyone is interested.

I've always been wanting to write a vim file for Tagz, but never got to learning vimfile syntax. Could you please upload it somewhere? Thank you, in advance.


I am also interested in the Vim syntax highlighting.  Please share 

Syntax Highlighting Scripts Within

Reply #20


I have syntax highlighting for tagz for Vim, and I can probably produce one for Vile, if anyone is interested.

I've always been wanting to write a vim file for Tagz, but never got to learning vimfile syntax. Could you please upload it somewhere? Thank you, in advance.


I am also interested in the Vim syntax highlighting.  Please share 

Ditto 

I tried both notepad++ user defined language xml and one has a little bit better code word differentiation.  Thanx to both contributors.

I'd really like to try out one for vim.

Syntax Highlighting Scripts Within

Reply #21
I improved KalleGold syntax highlighting script for notepad++ by just adding more TAGZ function, words and metadata tags.

Code: [Select]
<NotepadPlus>
    <UserLang name="foobar2000" ext="TAGZ fcs">
        <Settings>
            <Global caseIgnored="yes" />
            <TreatAsSymbol comment="no" commentLine="yes" />
            <Prefix words1="no" words2="no" words3="no" words4="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">&apos;00&apos;00</Keywords>
            <Keywords name="Folder+">BlockBegin</Keywords>
            <Keywords name="Folder-">BlockEnd</Keywords>
            <Keywords name="Operators">&apos; ( ) , [ ] | =</Keywords>
            <Keywords name="Comment">1 1 2 2 0//</Keywords>
            <Keywords name="Words1">%title% %artist% %album% %album artist% %track artist% %date% %year% %genre% %tracknumber% %totaltracks% %totaldiscs% %discnumber% %performer% %version% %legality% %comment% %band% %rating% %length%</Keywords>
            <Keywords name="Words2">%isplaying% %_ispaused% %_composer% %_comment% %__channels% %_date% %_directoryname% %disc% %_diskwriter_index% %_foobar2000_version% %_filename% %_filename_ext% %_genre% %_isplaying% %ispaused% %_length% %_length_seconds% %_path% %_path_raw% %_playlist_number% %_subsong% %__bitrate% %__extrainfo% %__replaygain_album_gain% %__replaygain_album_peak% %__replaygain_track_gain% %__replaygain_track_peak% %__samplerate% %playback_time% %length% %length_seconds% %_time_elapsed% %_time_elapsed_seconds% %_time_remaining% %_time_remaining_seconds% %play_count% %codec% %codec_profile% %filename% %filename_ext% %directoryname% %path% %subsong% %path_sort% %length_seconds% %filesize% %bitrate% %channels% %samplerate% %__mp3_stereo_mode% %added% %_system_year% %_system_month% %_system_day% %_system_hour% %last_played% %_selected_back% %_back% %_selected_back_no_focus% %_selected_text% %_time_total% %_time_total_seconds%</Keywords>
            <Keywords name="Words3">$if $if2 $if3 $ifequal $ifgreater $iflonger $select $repeat</Keywords>
            <Keywords name="Words4">$put $puts $get $abbr $lower $upper $num $caps $caps2 $len $pad $pad_right $cut $padcut $padcut_right $insert $add $sub $mul $div $muldiv $mod $min $max $left $right $and $or $xor $not $fix_eol $fix_eol2 $meta $meta_sep $mets_num $mets_test $info $char $strcmp $stricmp $directory $greater $longer $strchr $strrchr $strstr $progress $progress2 $replace $ext $substr $rgb $transition $blend $rand $trim $tab $crlf $longest $shortest $set_style $calculate_blend_target $offset_colour</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="10" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FF8000" bgColor="FFFF80" fontName="" fontStyle="0" />
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FF8040" bgColor="FFFF80" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="Arial" fontStyle="0" fontSize="10" />
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="4646FF" bgColor="FFFFFF" fontName="Arial" fontStyle="0" fontSize="10" />
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="FF0000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="11" />
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="FF4646" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="11" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="FFFF00" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="Arial" fontStyle="2" fontSize="10" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="FF0080" bgColor="FFFFFF" fontName="Arial" fontStyle="0" fontSize="10" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" />
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="A25151" bgColor="FFFFFF" fontName="Arial" fontStyle="0" />
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="FFFFFF" bgColor="FFFFFF" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>    
</NotepadPlus>


As KalleGold wrote: (paste into %appdata%\notepad++\UserDefineLang.xml
or UserDefineLang.xml whereever you installed np++)

Syntax Highlighting Scripts Within

Reply #22
Here is another jEdit mode:

Thanks for the nice work.
I have added the following (these are missing from your definitions):
$set_global
$get_global
$ifequal

Code: [Select]
<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!-- 2004-11-11 - Go2Null
Inital draft.
FUNCTION - Tag Operations
KEYWORD1 - Variable Operations                  
KEYWORD2 - Metadata (%lower_case%)
KEYWORD3 - System Variables (Special - %_lower_case%; Tech Info %__lower_case%)
KEYWORD4 - Column UI Variables (b_Boolean; c_Character; i_Integer; s_String; %_tUserVar%)
LABEL    - EOL character
LITERAL1 - String delimiters
LITERAL2 - Colour delimiters
-->

<MODE>
<PROPS>
<PROPERTY NAME="lineComment" VALUE="// " />
   <PROPERTY NAME="folding" VALUE="explicit" />
</PROPS>

<RULES IGNORE_CASE="TRUE" NO_WORD_SEP="_" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[[:xdigit:]]{6}">
   <!-- COMMENTs -->
   <EOL_SPAN AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="TRUE" TYPE="COMMENT2">// {{{</EOL_SPAN>
   <EOL_SPAN AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="TRUE" TYPE="COMMENT2">// }}}</EOL_SPAN>
   <EOL_SPAN TYPE="COMMENT1">// </EOL_SPAN>


   <!-- KEYWORD2: Metadata '%all_lower%' -->
   <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
     <BEGIN>%[[:lower:]][[:lower:]]</BEGIN>
     <END>%</END>
   </SPAN_REGEXP>

   <!-- KEYWORD3 - System Variables -->
   <!-- Variable names are all lower case. -->
     <!-- KEYWORD3: System Variables: Tech Info '%__all_lower%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
       <BEGIN>%__[[:lower:]][[:lower:]]</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

     <!-- KEYWORD3 - System Variables: Special '%_all_lower%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
       <BEGIN>%_[[:lower:]][[:lower:]]</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

   <!-- KEYWORD4: Column UI Variables -->
   <!-- Variable names are initial lower case, then title case. -->
     <!-- KEYWORD4 - Column UI Variables 'lowerTitle' -->
     <!-- 'b_' - boolean -->
     <!-- 'c_' - character -->
     <!-- 'i_' - integer -->
     <!-- 's_' - string -->
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">b_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">c_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">i_</MARK_FOLLOWING>
     <MARK_FOLLOWING TYPE="KEYWORD4" AT_WORD_START="FALSE">s_</MARK_FOLLOWING>

     <!-- KEYWORD4: Column UI Variables: globals '%_lowerTitle%' -->
     <SPAN_REGEXP HASH_CHAR="%" TYPE="KEYWORD4" NO_LINE_BREAK="TRUE">
       <BEGIN>%_[bcis]_</BEGIN>
       <END>%</END>
     </SPAN_REGEXP>

   <!-- LABEL: EOL Character  -->
   <SEQ TYPE="LABEL"></SEQ>

   <!-- LITERAL1: string delimiters -->
   <SPAN TYPE="LITERAL1">
     <BEGIN>'</BEGIN>
     <END>'</END>
   </SPAN>

   <!-- LITERAL2: Colour delimiters  -->
   <SEQ TYPE="LITERAL2"></SEQ>
   <SEQ TYPE="LITERAL2">|</SEQ>

   <!-- OPERATOR -->
   <SEQ TYPE="OPERATOR">(</SEQ>
   <SEQ TYPE="OPERATOR">)</SEQ>
   <SEQ TYPE="OPERATOR">[</SEQ>
   <SEQ TYPE="OPERATOR">]</SEQ>
   <SEQ TYPE="OPERATOR">,</SEQ>
   <SEQ TYPE="OPERATOR">=</SEQ>

<KEYWORDS>
  <!-- FUNCTION: Title Formatting functions -->
  <FUNCTION>$abbr</FUNCTION>
  <FUNCTION>$ansi</FUNCTION>
  <FUNCTION>$blend</FUNCTION>
  <FUNCTION>$caps2</FUNCTION>
  <FUNCTION>$caps</FUNCTION>
  <FUNCTION>$char</FUNCTION>
  <FUNCTION>$crlf</FUNCTION>
  <FUNCTION>$cut</FUNCTION>
  <FUNCTION>$fix_eol</FUNCTION>
  <FUNCTION>$hex</FUNCTION>
  <FUNCTION>$info</FUNCTION>
  <FUNCTION>$insert</FUNCTION>
  <FUNCTION>$left</FUNCTION>
  <FUNCTION>$len2</FUNCTION>
  <FUNCTION>$len</FUNCTION>
  <FUNCTION>$lower</FUNCTION>
  <FUNCTION>$meta_sep</FUNCTION>
  <FUNCTION>$meta_num</FUNCTION>
  <FUNCTION>$meta</FUNCTION>
  <FUNCTION>$num</FUNCTION>
  <FUNCTION>$pad_right</FUNCTION>
  <FUNCTION>$padcut_right</FUNCTION>
  <FUNCTION>$padcut</FUNCTION>
  <FUNCTION>$pad</FUNCTION>
  <FUNCTION>$rand</FUNCTION>
  <FUNCTION>$repeat</FUNCTION>
  <FUNCTION>$replace</FUNCTION>
  <FUNCTION>$right</FUNCTION>
  <FUNCTION>$roman</FUNCTION>
  <FUNCTION>$rgb</FUNCTION>
  <FUNCTION>$strchr</FUNCTION>
  <FUNCTION>$strrchr</FUNCTION>
  <FUNCTION>$strstr</FUNCTION>
  <FUNCTION>$substr</FUNCTION>
  <FUNCTION>$sub</FUNCTION>
  <FUNCTION>$trim</FUNCTION>
  <FUNCTION>$tab</FUNCTION>
  <FUNCTION>$transition</FUNCTION>
  <FUNCTION>$upper</FUNCTION>

     <!-- FUNCTION: that operate on objects external to the script -->
  <FUNCTION>$directory</FUNCTION>
  <FUNCTION>$ext</FUNCTION>
  <FUNCTION>$filename</FUNCTION>
  <FUNCTION>$progress</FUNCTION>
  <FUNCTION>$progress2</FUNCTION>

  <!-- KEYWORD1 - Variable Operations -->
  <KEYWORD1>$get</KEYWORD1>
  <KEYWORD1>$puts</KEYWORD1>
  <KEYWORD1>$put</KEYWORD1>
  <KEYWORD1>$set_global</KEYWORD1>
  <KEYWORD1>$get_global</KEYWORD1>

  <!-- OPERATOR - Math Operations -->
  <OPERATOR>$add</OPERATOR>
  <OPERATOR>$div</OPERATOR>
  <OPERATOR>$mod</OPERATOR>
  <OPERATOR>$muldiv</OPERATOR>
  <OPERATOR>$mul</OPERATOR>

  <!-- OPERATOR - Logical Operations -->
  <OPERATOR>$and</OPERATOR>
  <OPERATOR>$not</OPERATOR>
  <OPERATOR>$or</OPERATOR>
  <OPERATOR>$xor</OPERATOR>

     <!-- OPERATOR - Comparison Operations -->
  <OPERATOR>$greater</OPERATOR>
  <OPERATOR>$if2</OPERATOR>
  <OPERATOR>$if3</OPERATOR>
  <OPERATOR>$if</OPERATOR>
  <OPERATOR>$ifequal</OPERATOR>
  <OPERATOR>$ifgreater</OPERATOR>
  <OPERATOR>$iflonger</OPERATOR>
  <OPERATOR>$longer</OPERATOR>
  <OPERATOR>$longest</OPERATOR>
  <OPERATOR>$min</OPERATOR>
  <OPERATOR>$max</OPERATOR>
  <OPERATOR>$shortest</OPERATOR>
  <OPERATOR>$strcmp</OPERATOR>
  <OPERATOR>$stricmp</OPERATOR>
  <OPERATOR>$select</OPERATOR>

   </KEYWORDS>
</RULES>

<RULES SET="SYSTEMVARIABLES" IGNORE_CASE="TRUE" NO_WORD_SEP="_">
<!-- Haven't figured out how to use as DELEGATE!? -->

   <!-- foobar2000 fields -->
   <SEQ TYPE="LITERAL3">%_foobar2000_version%</SEQ>
   <SEQ TYPE="LITERAL3">%_path%</SEQ>
   <SEQ TYPE="LITERAL3">%_path_raw%</SEQ>
   <SEQ TYPE="LITERAL3">%_filename%</SEQ>
   <SEQ TYPE="LITERAL3">%_filename_ext%</SEQ>
   <SEQ TYPE="LITERAL3">%_directoryname%</SEQ>
   <SEQ TYPE="LITERAL3">%_length%</SEQ>
   <SEQ TYPE="LITERAL3">%_length_seconds%</SEQ>

   <!-- foobar2000 Special fields (playlist) -->
   <SEQ TYPE="LITERAL3">%_isplaying%</SEQ>
   <SEQ TYPE="LITERAL3">%_ispaused%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_number%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_total%</SEQ>
   <SEQ TYPE="LITERAL3">%_playlist_name%</SEQ>

   <!-- foobar2000 Special fields (status bar, window title and copy command) -->
   <SEQ TYPE="LITERAL3">%_time_elapsed%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_remaining%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_total%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_elapsed_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_remaining_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_time_total_seconds%</SEQ>
   <SEQ TYPE="LITERAL3">%_ispaused%</SEQ>
</RULES>
</MODE>

Syntax Highlighting Scripts Within

Reply #23
(paste into %appdata%\notepad++\UserDefineLang.xml
or UserDefineLang.xml whereever you installed np++)

Granted, it's not perfect, but it's good enough for me, hope someone can use it


I have Notepad++ v 3.6 and this file is NOT in my directory by default. I created a UserDefineLang.xml file and put that code in it . . . and nothing happens. Getting notepad++ to work with the TAGZ language has been very frustrating because every post in this thread assumes the existence of a file that, in newer installations, doesn't.

Can anyone provide some assistance on what I should do here?

Syntax Highlighting Scripts Within

Reply #24
If you have created the UserDefineLang.xml and pasted the code in there then all you need to do is save the file you are working on as either an .fcs or .TAGZ

It won't work if the file isn't saved as one of those 2.

 
SimplePortal 1.0.0 RC1 © 2008-2018