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 (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
/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
; 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
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.
Thanks, TurinsRevenge. That helps a lot. B)
Here is an editing mode for jEdit (http://www.jedit.org).
Installation:Put tagz.xml in either
%UserProfile%\.jedit\modes or
%ProgramFiles%\jEdit\modesAdd 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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=29971). That way you will get the correct indentation.
<?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>
Here is another jEdit mode:
<?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>
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.
<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">' " ( ) , |</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 .
I have created an STX (syntax) file for EditPlus (http://www.editplus.com/).
It can be found here: foobar.stx (http://www.neilpopham.pwp.blueyonder.co.uk/foobar/foobar.stx)
In EditPlus (http://www.editplus.com/) 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]
Well, here is my own UltraEdit wordlist entry for TAGZ:
/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.
wow, cool idea! thank you very much!
Here's my UltraEdit 11 Highlighting.
Again another approach for ' ',%vars% and colors
/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"
** %
I downloaded Notepad++, but where do I paste all that code in? There is no .xml file in notepad++ folder you mentioned.
This is pretty neat. Trying out the TextPad syntax, Thanks.
is there an updated language script for notepad++ these days?
The one posted here works pretty well. You could always add some missing elements.
[deleted]
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
Odd. I got version 3.5 installed right now, and I've used it to build my 0.9 strings.
I had some trouble with the np++ stuff too, so I made a new one:
<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">' " ( ) , [ ] |</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
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 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
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.
I improved KalleGold syntax highlighting script for notepad++ by just adding more TAGZ function, words and metadata tags.
<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">'00'00</Keywords>
<Keywords name="Folder+">BlockBegin</Keywords>
<Keywords name="Folder-">BlockEnd</Keywords>
<Keywords name="Operators">' ( ) , [ ] | =</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++)
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<?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>
(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?
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.
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.
I tried that. Don't see any colors, chief. Is my Notepad++ install just retarded, you figure?
Hmmm... you didn't happen to change the option to use %appdata% for your settings when you installed it did you?
I tried that. Don't see any colors, chief. Is my Notepad++ install just retarded, you figure?
Ok I had the same issue, no colors .
I uninstalled it, when I reinstalled it, I did this differently:
Install This Application For:
*anyone(all users)
*only for me
I selected ONLY FOR ME.
and guess what folks, we are seeing technicolor with a .fcs file!
(.TAGZ too)
Ok I had the same issue, no colors .
I uninstalled it, when I reinstalled it, I did this differently:
Install This Application For:
*anyone(all users)
*only for me
I selected ONLY FOR ME.
and guess what folks, we are seeing technicolor with a .fcs file!
(.TAGZ too)
This really should not be this big of a head-ache, and I'm about 3 minutes from saying screw it and dealing with how it is natively in foobar. lol
Anyway, I think I did notice something problematic. Here's a line from the notepad++ code up there:
<UserLang name="foobar" ext="">
Should that extention field be left blank like that? I'm thinking not. I've changed it to:
<UserLang name="TAGZ" ext="tagz fcs">
That ought to let it like .tagz and .fcs files. But it still doesn't.
About the only thing I can think of is that it doesn't like where I've put UserDefinedLang.xml. I have it in C:/Program Files/Notepad++/, since I'm assuming %appdata% = C:/Program Files/ in this instance. Any other ideas, people?
Btw, I uninstalled v3.6 and upgraded to v3.8, so this is a fresh install I'm working with.
Ok I had the same issue, no colors .
I uninstalled it, when I reinstalled it, I did this differently:
Install This Application For:
*anyone(all users)
*only for me
I selected ONLY FOR ME.
and guess what folks, we are seeing technicolor with a .fcs file!
(.TAGZ too)
This really should not be this big of a head-ache, and I'm about 3 minutes from saying screw it and dealing with how it is natively in foobar. lol
Anyway, I think I did notice something problematic. Here's a line from the notepad++ code up there:
<UserLang name="foobar" ext="">
Should that extention field be left blank like that? I'm thinking not. I've changed it to: <UserLang name="TAGZ" ext="tagz fcs">
That ought to let it like .tagz and .fcs files. But it still doesn't.
About the only thing I can think of is that it doesn't like where I've put UserDefinedLang.xml. I have it in C:/Program Files/Notepad++/, since I'm assuming %appdata% = C:/Program Files/ in this instance. Any other ideas, people?
Btw, I uninstalled v3.6 and upgraded to v3.8, so this is a fresh install I'm working with.
No, UserDefineLang.xml should reside in
C:\Documents and Settings\{yourName}\Application Data\Notepad++\
Should work when you change.
well if you dont select only for me, its not going to work
you could try putting the UserDefineLang.xml in the defaultuser folder or alluser folder
No, UserDefineLang.xml should reside in
C:\Documents and Settings\{yourName}\Application Data\Notepad++\
Should work when you change.
Jesus, if someone had just said that earlier . . . lol
Anyway, Notepad++ didn't automatically create that folder, so I assume that means I need to reinstall.
well if you dont select only for me, its not going to work
you could try putting the UserDefineLang.xml in the defaultuser folder or alluser folder
Honestly, on installation I don't remember being given the option . . .
you could try putting the UserDefineLang.xml in the defaultuser folder or alluser folder
Honestly, on installation I don't remember being given the option . . .
[/quote]
It is a standard and a very common installation window
(however people have the nasty habit of going click happy through them)
Hit Next
Select Yes, Then Next
This is the screen you want !!!
DO NOT HIT NEXT
Read this entire window very carefully!
(http://i104.photobucket.com/albums/m165/qaturn/SS.jpg)
For Notepad++ it's on the component selection screen.
Don't use %APPDATA%
Just have to make sure that is unchecked.
Someone having Syntax Highlghters for PSPad (http://www.pspad.com/en/)?
(http://i104.photobucket.com/albums/m165/qaturn/SS.jpg)
OffTopic, but...
Nice VS. What's that?
Someone having Syntax Highlghters for PSPad (http://www.pspad.com/en/)?
I'd like this as well.
Here's one for PSPad I did some time ago. Don't remember if it's really 100% complete.
Save with extension .ini in %pspad%\Syntax
;PSPad user HighLighter definition file
[Settings]
Name=Foobar2000 Tagz 0.9
HTMLGroup=0
FileType=*.tagz,*.tag,*.fb2k
CommentString=
SlashComment=1
SlashComment=1
IndentChar=
UnIndentChar=
TabWidth=0
SingleQuote=1
KeyWordChars=-_
CodeExplorer=ftUnknown
[KeyWords]
abbr=
add=
and=
blend=
caps=
caps2=
char=
cut=
directory=
div=
ext=
fix_eol=
get=
greater=
if=
if2=
if3=
ifequal=
ifgreater=
iflonger=
info=
insert=
left=
len=
longer=
longest=
lower=
max=
meta=
meta_num=
meta_sep=
min=
mod=
mul=
not=
num=
or=
pad=
pad_right=
padcut=
padcut_right=
progress=
progress2=
put=
puts=
rand=
repeat=
replace=
rgb=
right=
select=
strchr=
strcmp=
stricmp=
strrchr=
strstr=
sub=
substr=
tab=
transition=
trim=
upper=
xor=
[ReservedWords]
album=
artist=
artist=
bitrate=
channels=
codec=
codec_profile=
date=
directoryname=
disc=
discnumber=
filename=
filename_ext=
genre=
ispaused=
isplaying=
length=
length_seconds=
list_index=
list_total=
path=
path_sort=
playback_time=
playback_time_remaining=
playback_time_remaining_seconds=
playback_time_seconds=
samplerate=
subsong=
title=
totaldiscs=
totaltracks=
track=
tracknumber=
[KeyWords2]
get_global=
set_global=
set_style=
[KeyWords3]
Here's one for PSPad I did some time ago. Don't remember if it's really 100% complete.
Save with extension .ini in %pspad%\Syntax
Thanks Brother John!
Thanks BrotherJohn,
you just saved my evening. Since i'm an newbie and not so familiar with this type of program language, i appreciate everything whats help me.
I've been pretty hopelessly with a (for me ) complex compare. Thanks to that program, i can go sleep now (hope i dont dream from brackets )
Thx Brother John. Please change code to codebox...
Has anyone made for Notepad2 (http://www.flos-freeware.ch/notepad2.html) too?
Has anyone made for Notepad2 (http://www.flos-freeware.ch/notepad2.html) too?
i was looking for this some time ago and according to the info ive found highlight syntax preset is hardcoded inside notepad2 (with no possibility for custom)... the only way as ive read on one forum is to download source of notepad2 rewrite part of the code and recompile with your highlight preset...
but my informations may be outdated
Thanks for the info, cartman
Notepad2 isn't being updated for a while... and i like it's interface. I've tried Notepad++ but i didn't like it, and it comes with a lot of junk (for me... the plugins).
I will try others... thanks
Hello people,
Could anyone tell me if there's a way of setting colors in Notepad++, without editing manually the .xml file?
I can't see the foobar language file, whithin the other language files in the color setting box.
Thanks
the UserDefineLang.xml file needs to be in directory "C:\Documents & Settings\User\Application Data\Notepad++" or the french equivalent.
for manual editing your style file use the build-in configurator - accessable through a button in the icon bar. you can also add additional keywords in here (see screenshot below)
(http://img338.imageshack.us/img338/1599/notepadow9.th.png) (http://img338.imageshack.us/my.php?image=notepadow9.png)
Thanks a lot, I couldn't find it in the menu .. now it's configurable, really powerful !
About the location, I already had it set, after reading the posts, above and it worked fine.
I just have to check for possibility of having different colour for different level of brackets .. and it will be fine.
Any updates to the .xml for the latest Notepad++? I'm using the last last code posted (worked the best) but I still see all kinds of crap floating around in the code.
I still see all kinds of crap floating around in the code.
What do you mean exactly ?
Any updates to the .xml for the latest Notepad++? I'm using the last last code posted (worked the best) but I still see all kinds of crap floating around in the code.
I think that with a minimum effort you could update it to the latest functions.
I have updated the Notepad++ Language file to include a lot of the cwb_hooks fields and also the panels_ui fields.
Mine was based on a previous version posted here.
<NotepadPlus>
<UserLang name="foobar2000" ext="foob TAGZ fcs foo">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">'00'00</Keywords>
<Keywords name="Folder+">BlockBegin</Keywords>
<Keywords name="Folder-">BlockEnd</Keywords>
<Keywords name="Operators">' ( ) , [ ] | =</Keywords>
<Keywords name="Comment">1 1 2 2 0//</Keywords>
<Keywords name="Words1">%album artist% %album% %date% %artist% %title% %tracknumber% %genre% %subgenre% %performer% %instrument% %composer% %conductor% %orchestra% %publisher% %work% %cat#% %tempo% %situation% %rating% %emyfav% %bpm% %check sm% %score% %check ly% %lyrics% %check tad% %check q% %check gs% %check pi% %check lc% %added% %downloaded% %length% %cwb_systemdate%</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% %bitrate% %_width% %_height% %_trackinfo_mode% %_trackinfo_notrack% %cwb_systemdate% %cwb_systemdatetime% %cwb_activelist% %cwb_activelist_count% %cwb_playinglist% %cwb_playinglist_count% %cwb_queueindex% %cwb_queueindexes% %cwb_queuelength% %cwb_queue_end_playlist% %cwb_next_title% %cwb_next_artist% %cwb_playback_order%</Keywords>
<Keywords name="Words3">$if $if2 $if3 $ifequal $ifgreater $iflonger $select $repeat $panel $drawrect $font $imageabs $imageabs2 $button $button2 $sorted $pad</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 $setpvar $glass $getpvar $eval $align $alignset $alignrel $alignabs $calcwidth $calcheight $fileexists $cwb_urldecode $cwb_httpclean $cwb_removethe $cwb_ltrim $cwb_datediff</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>
yet another syntax highlighter for Sublime Text editor - DX/OGL based editor with python extensions
I accidentally run to this editor which uses TextMate style syntax definitions (Apple XML p-lists) so I guess this would work on Mac too:
tagz.tmLanguage<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>tagz fcs</string>
</array>
<key>name</key>
<string>foobar2000: tagz</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>%(_foobar2000_version|_path_raw|album|album artist|artist|bitrate|channels|codec|codec_profile|date|directoryname|discnumber|filename|filename_e
xt|filesize|filesize_natural|genre|ispaused|isplaying|last_modified|length|length_ex|length_samples|l
ength_seconds|length_seconds_fp|list_index|list_total|path|path_sort|playback_time|playback_time_rema
ining|playback_time_remaining_seconds|playback_time_seconds|queue_index|queue_indexes|queue_total|rep
laygain_album_gain|replaygain_album_peak|replaygain_track_gain|replaygain_track_peak|samplerate|subso
ng|title|totaldiscs|totaltracks|track artist|tracknumber|meta_branch|meta_branch_remap)%</string>
<key>name</key>
<string>keyword.tagz</string>
</dict>
<dict>
<key>match</key>
<string>%(artist webpage url|band|bpm|comment|commercial information url|composer|conductor|content group|copyright|copyright url|encoded by|encoding settings|file webpage url|genre|style|internet radio webpage url|isrc|lyrics|original album|original artist|original release date|owner|paymemt url|performer|publisher|publisher url|radio station|remixed by|source webpage url|subtitle|unsynced lyrics|writer)%</string>
<key>name</key>
<string>entity.other.inherited-class.tagz</string>
</dict>
<dict>
<key>match</key>
<string>%<(artist|album artist|producer|composer|performer|genre)>%</string>
<key>name</key>
<string>support.function.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(abbr|ansi|ascii|blend|caps|caps2|channels|char|crc32|crlf|cut|date|day_of_month|directory|dir
ectory_path|ext|filename|fix_eol|get|hex|hsl|info|insert|left|len|len2|longer|longest|lower|meta|meta
_num|meta_sep|meta_test|month|num|pad|pad_right|padcut|padcut_right|progress|progress2|put|puts|repea
t|replace|rgb|right|roman|rot13|strchr|strcmp|stricmp|stripprefix|strrchr|strstr|substr|swapprefix|ta
b|time|transition|trim|upper|year)\b</string>
<key>name</key>
<string>support.function.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(?i:if|if2|if3|ifequal|ifgreater|iflonger|and|or|not|xor|greater|select|add|div|max|min|mod|mul|muldiv
|rand|sub)\b</string>
<key>name</key>
<string>keyword.control.tagz</string>
</dict>
<dict>
<key>match</key>
<string>%\b(?i:|title|is_locked|lock_name|size|length|filesize|filesize_raw|is_active|is_playing|play_count|first
_played|last_played|played_per_day|added|rating|lock|length_hours|length_seconds|filesize_natural|isp
laying|isactive|list_index|list_total|_list)\b%</string>
<key>name</key>
<string>support.class.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(?i:set_global|get_global|set_style|set_font|reset_font|calculate_blend_target|offset_colour|meta_bran
ch_swapprefix|meta_branch_stripprefix|meta_branch_remap_swapprefix|meta_branch_remap_stripprefix)\b</string>
<key>name</key>
<string>support.function.cui.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(?i:drawellipse|drawimage|drawrect|drawroundrect|drawstring|drawtext|drawtextex|fillrect|findfile|font
|getcaption|getimagewidth|gettextheight|gettextwidth|gradientrect|imageabs|imageabs_rc|imagebutton|is
visible_c|movepanel|setparcentmode|showpanel|textbutton)\b</string>
<key>name</key>
<string>constant.other.pss.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(?i:addcolour|averagecolour|blendcolour|drawblurrect|drawellipse|drawfocusrect|drawrect|drawroundrect|
drawstring|drawtext|drawtextex|drawthemerect|drawtriangle|el_scale|enabledraw|fillrect|fillroundrect|
findfile|font|getgroupformat|getimagewidth|getlastpos|getsyscolour|gettextheight|gettextwidth|gradien
trect|ifequal|imageabs|imageabs_rc|measurestring|popuphide|popupsize|popuptracknum|puts|rgb|setcoordi
nate|setworldtransform|subcolour|xorcolour)\b</string>
<key>name</key>
<string>constant.other.elp.tagz</string>
</dict>
<dict>
<key>match</key>
<string>\$\b(?i:calc_text|draw_image|draw_line|draw_rect|draw_text|eval|fill_draw_rect|fill_rect|gp_calc_string|gp
_calc_string_path|gp_draw_arc|gp_draw_ellipse|gp_draw_line|gp_draw_pie|gp_draw_rectangle|gp_draw_stri
ng|gp_draw_string_path|gp_fill_ellipse|gp_fill_pie|gp_fill_rectangle|gp_set_brush|gp_set_font|gp_set_
pen|gp_set_smoothing_mode|gp_set_string_format|gp_set_text_rendering_hint|round_rect|set_brush|set_fo
nt|set_font_color|set_org|set_pen|set_size|sum)\b</string>
<key>name</key>
<string>constant.other.gb.tagz</string>
</dict>
<dict>
<key>match</key>
<string>%\b(?i:_system_year|_system_month|_system_day|_system_day_of_week|_system_hour|is_status_pane|_isplaying|
_ispaused|_time_elapsed_seconds|_time_elapsed|_is_group|_themed|_display_index|_selected_back_no_focu
s|_selected_back|_back|_width|_height||lastfm_bio|lastfm_album_content|lastfm_similar_artist|lastfm_a
rtist_playcount|lastfm_album_playcount|lastfm_artist_listeners|lastfm_album_listeners|\[el]_is_hide|\[el]_is_hide_item|_height|_is_hide|_width|el_backcolour|el_direct_item_count|el_focused|el_foob
ar2000_path|el_group_count|el_group_depth|el_group_first_path|el_group_format|el_group_index|el_group
_row|el_height|el_is_collapsed|el_is_empty|el_is_group|el_is_hide_item|el_is_noheader|el_is_selected|
el_is_themed|el_is_valid|el_isplaying|el_item_count|el_item_count2|el_item_index|el_item_index2|el_po
pup_height|el_popup_width|el_preset_index|el_preset_name|el_row_height|el_selected|el_subgroup_count|
el_subgroup_count2|el_subgroup_index|el_sum_length|el_sum_length_seconds|el_total_group_count|el_tota
l_group_index|el_total_item_count|el_user_profile_path|el_width|foo|__ADD_ART_ROW__|__ART_MARGIN__|__
ART_PATH__|__ART_ROW__|__FOCUS__|__IS_ART_ON_GH__|__IS_REFLECTION__|__PLAY_BG__|__PLAY_TEXT__|__SEL_B
G__|__TEXT__|gb_calc_*|gb_calc_height|gb_calc_width|gb_calc_x|gb_calc_y|gb_col|gb_col_count|gb_focuse
d|gb_group|gb_height|gb_isplaying|gb_item_count|gb_item_index|gb_length|gb_length_seconds|gb_mouse_ov
er|gb_playlist_number|gb_row|gb_row_count|gb_subitem_count|gb_track_count|gb_track_index|gb_width)\b%</string>
<key>name</key>
<string>variable.parameter.tagz</string>
</dict>
<dict>
<key>match</key>
<string>"\b(.*?)\b"</string>
<key>name</key>
<string>string.tagz</string>
</dict>
<dict>
<key>match</key>
<string>'\b(.*?)\b'</string>
<key>name</key>
<string>string.tagz</string>
</dict>
<dict>
<key>begin</key>
<string>//</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.tagz</string>
</dict>
</dict>
<key>end</key>
<string>$\n?</string>
<key>name</key>
<string>comment.line.double-slash.tagz</string>
</dict>
<dict>
<key>begin</key>
<string>"|'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.tagz</string>
</dict>
</dict>
<key>end</key>
<string>"|'</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.tagz</string>
</dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>(?\$)[a-zA-Z0-9_\-]*\(|%[a-zA-Z0-9_\-\s]*%)</string>
<key>name</key>
<string>invalid.deprecated.tagz</string>
</dict>
</array>
<key>scopeName</key>
<string>source.tagz</string>
</dict>
</plist>
tmLanguage files are not auto reloaded, so for that make a *.sublime-options file with the same base name as the .tmLanguage file with some text in it, i.e.:
tagz.sublime-optionsextensions tagz fcs
or get it from here (http://home.2e7ah.operaunite.com/file_sharing/content/tagz.rar) and extract the archive to "%appdata%\Sublime Text\Packages"
screen-shots:
[a href=\"http://img218.imageshack.us/img218/7685/sshot1zx.png\" target=\"_blank\"]
thanks 2E7AH. Sublime text is an amazing text editor!
Anyone who wants to try the fine 2E7AH contribution should just be sure to replace the following line:
<string>(?sad.gif\$)[a-zA-Z0-9_\-]*\(|%[a-zA-Z0-9_\-\s]*%)</string>
which probably was altered by the forum software (emoticons enabled).
Correct form is
<string>(?:(\$)[a-zA-Z0-9_\-]*\(|%[a-zA-Z0-9_\-\s]*%)</string>
I use Notepad2-mod for just about all text based tasks...
I find its feature set has the perfect balance of speed, advanced features, utility, and general Windows Notepad replacement.
It takes INI files for configuration.
Does anybody here have a custom "Notepad2" config you may have created for the foobar syntax?
It would be great to "emulate" the foobar2000 syntax color scheme of "Sublime Text Editor" (previous post) in "Notepad2" !!
* EDIT *
Unfortunately, I just discovered that Notepad2 is hard coded with the schemes it accepts; editing the INI file does nothing.
You would have to modify the source code of Notepad2 to have foobar2000 TAGZ syntax included in this text editor.
Bummer.
Anybody here want to have a go at modifying the source of Notepad2-mod :-)
here is the homepage [code.google.com - BSD Licence]: http://code.google.com/p/notepad2-mod/ (http://code.google.com/p/notepad2-mod/)
New lexer should be made for Scintilla component which this editor uses, but I doubt anyone can justify the effort just make foobar title formatting colorful. AFAIK it can be easier to extend SciTE (> v2.10) with lexers written in Lua. Finally IMHO Notepad++ is easiest and feature rich editor for which 'tagz' syntax highlighting is provided some posts above.
I only wish Linux world had real Notepad++ alternative
Well, for now --until a coder with love for Notepad2 comes around-- I have a workaround for scripting in foobar2000...
Utilize the closest matching existing syntax scheme built in to "Notepad2-mod".
After some trial testing, I decided the "AutoIt3 Script" scheme in "Notepad2-mod" is a good TAGZ scripting scheme for foobar2000.
It is easy on the eyes and there are no glaring wrong elements.
In a nutshell
- the "Variables" ($if; $meta, $stricmp, etc) are colored "Olive"
- the "Strings" ('anything enclosed by single quote marks like here') are "Blue-Green"
- the "Operators" (a syntax argument enclosed by start-end parenthesis like here) will change color to "Bold Red" when you click on any parenthesis character,
thus it very easy to see the "start" and "end" parenthesis of the argument.
That's it, nothing more, but it works nicely.
I must mention, there is one small problem...
"Comments" do not change color ("Autoit" uses the ";" (semicolon) and not the "//" (double slashes)), but there is a workaround...
Instead of typing this: // This is a comment (which will come out as black text)
Type this: //; This is a comment
And... to change the color of the comment strings, go to "View > Customize Schemes > AutoIt3 Script > Comment (sub-menu) > Fore... (button)"
That's it for me, thanks for reading.
The good news is that I have some C++ code for a titleformatting lexer for Scintilla/Scilexer lying around somewhere. The bad news is that I just never got around to packaging it as a scilexer extension DLL.
foobar2000 syntax for PSPad v2011/11/10- conforms to the newest stable version (foobar2000 v1.1.9)
- contains syntax highlighter AND definition file - just press CTRL+SPACE and get list of all available commands with full description of syntax
- autocompletes fields & functions for you.
- included is also syntax for foo_albumlist.dll, foo_ui_columns.dll, foo_plorg.dll, foo_playcount.dll and foo_uie_esplaylist.dll
- easy installation even for first time users
Screenshot(http://img215.imageshack.us/img215/8449/screenshotv.gif) (http://imageshack.us/photo/my-images/215/screenshotv.gif/)
Downloadhttp://www.mediafire.com/file/31f9w9ghzjyfzau/PSPad-Foobar2000_syntax-v20111110.zip
Enjoy
foobar2000 syntax for PSPad v2011/11/14 - new version. Adding because now it works with selections, that is important, time saving feature. Few bugfixes and improvements were made as well.
http://www.mediafire.com/file/pb613srw30n0pin/PSPad-Foobar2000_syntax-v20111114.zip
foobar2000 syntax for PSPad v2012/01/02. Now it works with almost all tag fields which foobar supports (- at least all documented), for existing fields was made description more fitting and precise. Also was added syntax for foo_textdisplay.dll and of course few minor tweaks & fixes. In next version I'd like to add to fields like $meta() or $info() selection box with all available options... but that will take some time.
http://www.mediafire.com/?lyyfi1fxoolsoi5
Does anyone have a working syntax highlighting file for Sublime Text 3? The previously posted sublime file doesn't work for version 3 so I've been trying to build my own but I'm still new to xml and regex.
Does anyone have a working syntax highlighting file for Sublime Text 3? The previously posted sublime file doesn't work for version 3 so I've been trying to build my own but I'm still new to xml and regex.
Update is anyone is interested. I put together a working syntax file for Sublime Text 3.
%YAML 1.2
---
name: Foobar2000
file_extensions: [foobar, f2k, fb2k, fb, tagz]
scope: source.tagz
contexts:
main:
# Strings begin and end with quotes, and use backslashes as an escape
# character
- match: '"'
scope: punctuation.definition.string.begin.tagz
push: double_quoted_string
# Comments STARTS with a '//' and finish at the end of the line (end of line see 'line_comment:')
- match: '//'
scope: punctuation.definition.comment.tagz
push: line_comment
- match: '\b(if|if2|if3|ifequal|ifgreater|iflonger|and|or|not|xor|greater|select|add|div|max|min|mod|mul|muldiv|rand|sub)\b'
scope: keyword.control.tagz
# Numbers
- match: '\b(-)?[0-9.]+\b'
scope: constant.numeric.tagz
- match: '%(_foobar2000_version|_path_raw|album|album artist|artist|bitrate|channels|codec|codec_profile|date|directoryname|discnumber|filename|filename_e
xt|filesize|filesize_natural|genre|ispaused|isplaying|last_modified|length|length_ex|length_samples|l
ength_seconds|length_seconds_fp|list_index|list_total|path|path_sort|playback_time|playback_time_rema
ining|playback_time_remaining_seconds|playback_time_seconds|queue_index|queue_indexes|queue_total|rep
laygain_album_gain|replaygain_album_peak|replaygain_track_gain|replaygain_track_peak|samplerate|subso
ng|title|totaldiscs|totaltracks|track artist|tracknumber|meta_branch|meta_branch_remap)%'
scope: keyword.tagz
# Globals
- match: '\$\b(init_ps_global|set_global|get_global|get_ps_global|set_style|set_font|reset_font|calculate_blend_target|offset_colour|meta_bran
ch_swapprefix|meta_branch_stripprefix|meta_branch_remap_swapprefix|meta_branch_remap_stripprefix)\b'
scope: support.function.cui.tagz
# PSS
- match: '\b(drawellipse|drawimage|drawrect|drawroundrect|drawstring|drawtext|drawtextex|fillrect|findfile|font|getcaption|
getimagewidth|gettextheight|gettextwidth|gradientrect|imageabs|imageabs_rc|imagebutton|isvisible_c|movepanel|movepanel_c|
setparcentmode|showpanel|showpanel_c|textbutton)\b'
scope: constant.other.pss.tagz
- match: '\b(SETGLOBAL|REFRESH)\b'
scope: constant.other.pss.tagz
- match: '\b(addcolour|averagecolour|blendcolour|drawblurrect|drawellipse|drawfocusrect|drawrect|drawroundrect|
drawstring|drawtext|drawtextex|drawthemerect|drawtriangle|el_scale|enabledraw|fillrect|fillroundrect|
findfile|font|getgroupformat|getimagewidth|getlastpos|getsyscolour|gettextheight|gettextwidth|gradien
trect|ifequal|imageabs|imageabs_rc|measurestring|popuphide|popupsize|popuptracknum|puts|rgb|setcoordi
nate|setworldtransform|subcolour|xorcolour)\b'
scope: constant.other.elp.tagz
# System variables
- match: '\b(_system_year|_system_month|_system_day|_system_day_of_week|_system_hour|is_status_pane|_isplaying|_ispaused|
_time_elapsed_seconds|_time_elapsed|_is_group|_themed|_display_index|_selected_back_no_focus|_selected_back|_back|_width|
_height||lastfm_bio|lastfm_album_content|lastfm_similar_artist|lastfm_artist_playcount|lastfm_album_playcount|lastfm_artist_listeners|
lastfm_album_listeners|\[el]_is_hide|\[el]_is_hide_item|_height|_is_hide|_width|el_backcolour|el_direct_item_count|el_focused|
el_foobar2000_path|el_group_count|el_group_depth|el_group_first_path|el_group_format|el_group_index|el_group_row|el_height|
el_is_collapsed|el_is_empty|el_is_group|el_is_hide_item|el_is_noheader|el_is_selected|el_is_themed|el_is_valid|el_isplaying|
el_item_count|el_item_count2|el_item_index|el_item_index2|el_popup_height|el_popup_width|el_preset_index|el_preset_name|el_row_height|
el_selected|el_subgroup_count|el_subgroup_count2|el_subgroup_index|el_sum_length|el_sum_length_seconds|el_total_group_count|
el_total_group_index|el_total_item_count|el_user_profile_path|el_width|foo|
__ADD_ART_ROW__|__ART_MARGIN__|__ART_PATH__|__ART_ROW__|__FOCUS__|__IS_ART_ON_GH__|__IS_REFLECTION__|__PLAY_BG__|__PLAY_TEXT__|__SEL_BG__|__TEXT__|
gb_calc_*|gb_calc_height|gb_calc_width|gb_calc_x|gb_calc_y|gb_col|gb_col_count|gb_focused|gb_group|gb_height|gb_isplaying|gb_item_count|
gb_item_index|gb_length|gb_length_seconds|gb_mouse_over|gb_playlist_number|gb_row|gb_row_count|gb_subitem_count|gb_track_count|gb_track_index|gb_width)\b'
scope: variable.parameter.tagz
# Functions
- match: '\b(abbr|ansi|ascii|blend|caps|caps2|channels|char|crc32|crlf|cut|date|day_of_month|directory|
directory_path|ext|filename|fix_eol|get|hex|hsl|info|insert|left|len|len2|longer|longest|lower|meta|
meta_num|meta_sep|meta_test|month|num|pad|pad_right|padcut|padcut_right|progress|progress2|put|puts|
repeat|replace|rgb|right|roman|rot13|strchr|strcmp|stricmp|stripprefix|strrchr|strstr|substr|swapprefix|
tab|time|transition|trim|upper|year)\b'
scope: support.function.tagz
- match: '\b(calc_text|draw_image|draw_line|draw_rect|draw_text|eval|fill_draw_rect|fill_rect|gp_calc_string|
gp_calc_string_path|gp_draw_arc|gp_draw_ellipse|gp_draw_line|gp_draw_pie|gp_draw_rectangle|
gp_draw_string|gp_draw_string_path|gp_fill_ellipse|gp_fill_pie|gp_fill_rectangle|gp_set_brush|gp_set_font|
gp_set_pen|gp_set_smoothing_mode|gp_set_string_format|gp_set_text_rendering_hint|round_rect|set_brush|
set_font|set_font_color|set_org|set_pen|set_size|sum)\b'
scope: constant.other.gb.tagz
double_quoted_string:
- meta_scope: string.quoted.double.tagz
- match: '\\.'
scope: constant.character.escape.tagz
- match: '"'
scope: punctuation.definition.string.end.tagz
pop: true
# Comments END
line_comment:
- meta_scope: comment.line.tagz
- match: '\n'
pop: true