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