blob: e3a555006b88f3910da49ad8d857ae8211d25ffc [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" This is a GENERATED FILE. Please always refer to source file at the URI below.
3" Language: Gtk+ theme files `gtkrc'
4" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
5" Last Change: 2002-10-31
6" URL: http://trific.ath.cx/Ftp/vim/syntax/gtkrc.vim
7
8" Setup
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009" quit when a syntax file was already loaded
10if exists("b:current_syntax")
11 finish
Bram Moolenaar071d4272004-06-13 20:20:40 +000012endif
13
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020014setlocal iskeyword=_,-,a-z,A-Z,48-57
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
16syn case match
17
18" Base constructs
19syn match gtkrcComment "#.*$" contains=gtkrcFixme
20syn keyword gtkrcFixme FIXME TODO XXX NOT contained
21syn region gtkrcACString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcWPathSpecial,gtkrcClassName,gtkrcClassNameGnome contained
22syn region gtkrcBString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcKeyMod contained
23syn region gtkrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gtkrcStockName,gtkrcPathSpecial,gtkrcRGBColor
24syn match gtkrcPathSpecial "<parent>" contained
25syn match gtkrcWPathSpecial "[*?.]" contained
26syn match gtkrcNumber "^\(\d\+\)\=\.\=\d\+"
27syn match gtkrcNumber "\W\(\d\+\)\=\.\=\d\+"lc=1
28syn match gtkrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)" contained
29syn cluster gtkrcPRIVATE add=gtkrcFixme,gtkrcPathSpecial,gtkrcWPathSpecial,gtkrcRGBColor,gtkrcACString
30
31" Keywords
32syn keyword gtkrcInclude include
33syn keyword gtkrcPathSet module_path pixmap_path
34syn keyword gtkrcTop binding style
35syn keyword gtkrcTop widget widget_class nextgroup=gtkrcACString skipwhite
36syn keyword gtkrcTop class nextgroup=gtkrcACString skipwhite
37syn keyword gtkrcBind bind nextgroup=gtkrcBString skipwhite
38syn keyword gtkrcStateName NORMAL INSENSITIVE PRELIGHT ACTIVE SELECTED
39syn keyword gtkrcPriorityName HIGHEST RC APPLICATION GTK LOWEST
40syn keyword gtkrcPriorityName highest rc application gtk lowest
41syn keyword gtkrcTextDirName LTR RTL
42syn keyword gtkrcStyleKeyword fg bg fg_pixmap bg_pixmap bg_text base font font_name fontset stock text
43syn match gtkrcKeyMod "<\(alt\|ctrl\|control\|mod[1-5]\|release\|shft\|shift\)>" contained
44syn cluster gtkrcPRIVATE add=gtkrcKeyMod
45
46" Enums and engine words
47syn keyword gtkrcKeyword engine image
48syn keyword gtkrcImage arrow_direction border detail file gap_border gap_end_border gap_end_file gap_file gap_side gap_side gap_start_border gap_start_file orientation overlay_border overlay_file overlay_stretch recolorable shadow state stretch thickness
49syn keyword gtkrcConstant TRUE FALSE NONE IN OUT LEFT RIGHT TOP BOTTOM UP DOWN VERTICAL HORIZONTAL ETCHED_IN ETCHED_OUT
50syn keyword gtkrcFunction function nextgroup=gtkrcFunctionEq skipwhite
51syn match gtkrcFunctionEq "=" nextgroup=gtkrcFunctionName contained skipwhite
52syn keyword gtkrcFunctionName ARROW BOX BOX_GAP CHECK CROSS DIAMOND EXTENSION FLAT_BOX FOCUS HANDLE HLINE OPTION OVAL POLYGON RAMP SHADOW SHADOW_GAP SLIDER STRING TAB VLINE contained
53syn cluster gtkrcPRIVATE add=gtkrcFunctionName,gtkrcFunctionEq
54
55" Class names
56syn keyword gtkrcClassName GtkAccelLabel GtkAdjustment GtkAlignment GtkArrow GtkAspectFrame GtkBin GtkBox GtkButton GtkButtonBox GtkCList GtkCTree GtkCalendar GtkCheckButton GtkCheckMenuItem GtkColorSelection GtkColorSelectionDialog GtkCombo GtkContainer GtkCurve GtkData GtkDialog GtkDrawingArea GtkEditable GtkEntry GtkEventBox GtkFileSelection GtkFixed GtkFontSelection GtkFontSelectionDialog GtkFrame GtkGammaCurve GtkHBox GtkHButtonBox GtkHPaned GtkHRuler GtkHScale GtkHScrollbar GtkHSeparator GtkHandleBox GtkImage GtkImageMenuItem GtkInputDialog GtkInvisible GtkItem GtkItemFactory GtkLabel GtkLayout GtkList GtkListItem GtkMenu GtkMenuBar GtkMenuItem GtkMenuShell GtkMessageDialog GtkMisc GtkNotebook GtkObject GtkOptionMenu GtkPacker GtkPaned GtkPixmap GtkPlug GtkPreview GtkProgress GtkProgressBar GtkRadioButton GtkRadioMenuItem GtkRange GtkRuler GtkScale GtkScrollbar GtkScrolledWindow GtkSeparatorMenuItem GtkSocket GtkSpinButton GtkStatusbar GtkTable GtkTearoffMenuItem GtkText GtkTextBuffer GtkTextMark GtkTextTag GtkTextView GtkTipsQuery GtkToggleButton GtkToolbar GtkTooltips GtkTree GtkTreeView GtkTreeItem GtkVBox GtkVButtonBox GtkVPaned GtkVRuler GtkVScale GtkVScrollbar GtkVSeparator GtkViewport GtkWidget GtkWindow GtkWindowGroup contained
57syn keyword gtkrcClassName AccelLabel Adjustment Alignment Arrow AspectFrame Bin Box Button ButtonBox CList CTree Calendar CheckButton CheckMenuItem ColorSelection ColorSelectionDialog Combo Container Curve Data Dialog DrawingArea Editable Entry EventBox FileSelection Fixed FontSelection FontSelectionDialog Frame GammaCurve HBox HButtonBox HPaned HRuler HScale HScrollbar HSeparator HandleBox Image ImageMenuItem InputDialog Invisible Item ItemFactory Label Layout List ListItem Menu MenuBar MenuItem MenuShell MessageDialog Misc Notebook Object OptionMenu Packer Paned Pixmap Plug Preview Progress ProgressBar RadioButton RadioMenuItem Range Ruler Scale Scrollbar ScrolledWindow SeparatorMenuItem Socket SpinButton Statusbar Table TearoffMenuItem Text TextBuffer TextMark TextTag TextView TipsQuery ToggleButton Toolbar Tooltips Tree TreeView TreeItem VBox VButtonBox VPaned VRuler VScale VScrollbar VSeparator Viewport Widget Window WindowGroup contained
58syn keyword gtkrcClassNameGnome GnomeAbout GnomeAnimator GnomeApp GnomeAppBar GnomeCalculator GnomeCanvas GnomeCanvasEllipse GnomeCanvasGroup GnomeCanvasImage GnomeCanvasItem GnomeCanvasLine GnomeCanvasPolygon GnomeCanvasRE GnomeCanvasRect GnomeCanvasText GnomeCanvasWidget GnomeClient GnomeColorPicker GnomeDEntryEdit GnomeDateEdit GnomeDialog GnomeDock GnomeDockBand GnomeDockItem GnomeDockLayout GnomeDruid GnomeDruidPage GnomeDruidPageFinish GnomeDruidPageStandard GnomeDruidPageStart GnomeEntry GnomeFileEntry GnomeFontPicker GnomeFontSelector GnomeHRef GnomeIconEntry GnomeIconList GnomeIconSelection GnomeIconTextItem GnomeLess GnomeMDI GnomeMDIChild GnomeMDIGenericChild GnomeMessageBox GnomeNumberEntry GnomePaperSelector GnomePixmap GnomePixmapEntry GnomeProcBar GnomePropertyBox GnomeScores GnomeSpell GnomeStock GtkClock GtkDial GtkPixmapMenuItem GtkTed contained
59syn cluster gtkrcPRIVATE add=gtkrcClassName,gtkrcClassNameGnome
60
61" Stock item names
62syn keyword gtkrcStockName gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear gtk-close gtk-convert gtk-copy gtk-cut gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-execute gtk-find gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to gtk-justify-center gtk-justify-fill gtk-justify-left gtk-justify-right gtk-missing-image gtk-new gtk-no gtk-ok gtk-open gtk-paste gtk-preferences gtk-print gtk-print-preview gtk-properties gtk-quit gtk-redo gtk-refresh gtk-remove gtk-revert-to-saved gtk-save gtk-save-as gtk-select-color gtk-select-font gtk-sort-ascending gtk-sort-descending gtk-spell-check gtk-stop gtk-strikethrough gtk-undelete gtk-underline gtk-undo gtk-yes gtk-zoom-100 gtk-zoom-fit gtk-zoom-in gtk-zoom-out contained
63syn cluster gtkrcPRIVATE add=gtkrcStockName
64
65" Gtk Settings
66syn keyword gtkrcSettingsName gtk-double-click-time gtk-cursor-blink gtk-cursor-blink-time gtk-split-cursor gtk-theme-name gtk-key-theme-name gtk-menu-bar-accel gtk-dnd-drag-threshold gtk-font-name gtk-color-palette gtk-entry-select-on-focus gtk-can-change-accels gtk-toolbar-style gtk-toolbar-icon-size
67syn cluster gtkrcPRIVATE add=gtkrcSettingsName
68
69" Catch errors caused by wrong parenthesization
70syn region gtkrcParen start='(' end=')' transparent contains=ALLBUT,gtkrcParenError,@gtkrcPRIVATE
71syn match gtkrcParenError ")"
72syn region gtkrcBrace start='{' end='}' transparent contains=ALLBUT,gtkrcBraceError,@gtkrcPRIVATE
73syn match gtkrcBraceError "}"
74syn region gtkrcBracket start='\[' end=']' transparent contains=ALLBUT,gtkrcBracketError,@gtkrcPRIVATE
75syn match gtkrcBracketError "]"
76
77" Synchronization
78syn sync minlines=50
79syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>"
80
81" Define the default highlighting
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020082command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000083
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020084HiLink gtkrcComment Comment
85HiLink gtkrcFixme Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000086
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020087HiLink gtkrcInclude Preproc
Bram Moolenaar071d4272004-06-13 20:20:40 +000088
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020089HiLink gtkrcACString gtkrcString
90HiLink gtkrcBString gtkrcString
91HiLink gtkrcString String
92HiLink gtkrcNumber Number
93HiLink gtkrcStateName gtkrcConstant
94HiLink gtkrcPriorityName gtkrcConstant
95HiLink gtkrcTextDirName gtkrcConstant
96HiLink gtkrcSettingsName Function
97HiLink gtkrcStockName Function
98HiLink gtkrcConstant Constant
Bram Moolenaar071d4272004-06-13 20:20:40 +000099
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200100HiLink gtkrcPathSpecial gtkrcSpecial
101HiLink gtkrcWPathSpecial gtkrcSpecial
102HiLink gtkrcRGBColor gtkrcSpecial
103HiLink gtkrcKeyMod gtkrcSpecial
104HiLink gtkrcSpecial Special
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200106HiLink gtkrcTop gtkrcKeyword
107HiLink gtkrcPathSet gtkrcKeyword
108HiLink gtkrcStyleKeyword gtkrcKeyword
109HiLink gtkrcFunction gtkrcKeyword
110HiLink gtkrcBind gtkrcKeyword
111HiLink gtkrcKeyword Keyword
Bram Moolenaar071d4272004-06-13 20:20:40 +0000112
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200113HiLink gtkrcClassNameGnome gtkrcGtkClass
114HiLink gtkrcClassName gtkrcGtkClass
115HiLink gtkrcFunctionName gtkrcGtkClass
116HiLink gtkrcGtkClass Type
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200118HiLink gtkrcImage gtkrcOtherword
119HiLink gtkrcOtherword Function
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200121HiLink gtkrcParenError gtkrcError
122HiLink gtkrcBraceError gtkrcError
123HiLink gtkrcBracketError gtkrcError
124HiLink gtkrcError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200126delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127
128let b:current_syntax = "gtkrc"