gtkrc.vim 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. " 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. " Setup
  8. " quit when a syntax file was already loaded
  9. if exists("b:current_syntax")
  10. finish
  11. endif
  12. setlocal iskeyword=_,-,a-z,A-Z,48-57
  13. syn case match
  14. " Base constructs
  15. syn match gtkrcComment "#.*$" contains=gtkrcFixme
  16. syn keyword gtkrcFixme FIXME TODO XXX NOT contained
  17. syn region gtkrcACString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcWPathSpecial,gtkrcClassName,gtkrcClassNameGnome contained
  18. syn region gtkrcBString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcKeyMod contained
  19. syn region gtkrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gtkrcStockName,gtkrcPathSpecial,gtkrcRGBColor
  20. syn match gtkrcPathSpecial "<parent>" contained
  21. syn match gtkrcWPathSpecial "[*?.]" contained
  22. syn match gtkrcNumber "^\(\d\+\)\=\.\=\d\+"
  23. syn match gtkrcNumber "\W\(\d\+\)\=\.\=\d\+"lc=1
  24. syn match gtkrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)" contained
  25. syn cluster gtkrcPRIVATE add=gtkrcFixme,gtkrcPathSpecial,gtkrcWPathSpecial,gtkrcRGBColor,gtkrcACString
  26. " Keywords
  27. syn keyword gtkrcInclude include
  28. syn keyword gtkrcPathSet module_path pixmap_path
  29. syn keyword gtkrcTop binding style
  30. syn keyword gtkrcTop widget widget_class nextgroup=gtkrcACString skipwhite
  31. syn keyword gtkrcTop class nextgroup=gtkrcACString skipwhite
  32. syn keyword gtkrcBind bind nextgroup=gtkrcBString skipwhite
  33. syn keyword gtkrcStateName NORMAL INSENSITIVE PRELIGHT ACTIVE SELECTED
  34. syn keyword gtkrcPriorityName HIGHEST RC APPLICATION GTK LOWEST
  35. syn keyword gtkrcPriorityName highest rc application gtk lowest
  36. syn keyword gtkrcTextDirName LTR RTL
  37. syn keyword gtkrcStyleKeyword fg bg fg_pixmap bg_pixmap bg_text base font font_name fontset stock text
  38. syn match gtkrcKeyMod "<\(alt\|ctrl\|control\|mod[1-5]\|release\|shft\|shift\)>" contained
  39. syn cluster gtkrcPRIVATE add=gtkrcKeyMod
  40. " Enums and engine words
  41. syn keyword gtkrcKeyword engine image
  42. syn 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
  43. syn keyword gtkrcConstant TRUE FALSE NONE IN OUT LEFT RIGHT TOP BOTTOM UP DOWN VERTICAL HORIZONTAL ETCHED_IN ETCHED_OUT
  44. syn keyword gtkrcFunction function nextgroup=gtkrcFunctionEq skipwhite
  45. syn match gtkrcFunctionEq "=" nextgroup=gtkrcFunctionName contained skipwhite
  46. syn 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
  47. syn cluster gtkrcPRIVATE add=gtkrcFunctionName,gtkrcFunctionEq
  48. " Class names
  49. syn 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
  50. syn 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
  51. syn 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
  52. syn cluster gtkrcPRIVATE add=gtkrcClassName,gtkrcClassNameGnome
  53. " Stock item names
  54. syn 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
  55. syn cluster gtkrcPRIVATE add=gtkrcStockName
  56. " Gtk Settings
  57. syn 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
  58. syn cluster gtkrcPRIVATE add=gtkrcSettingsName
  59. " Catch errors caused by wrong parenthesization
  60. syn region gtkrcParen start='(' end=')' transparent contains=ALLBUT,gtkrcParenError,@gtkrcPRIVATE
  61. syn match gtkrcParenError ")"
  62. syn region gtkrcBrace start='{' end='}' transparent contains=ALLBUT,gtkrcBraceError,@gtkrcPRIVATE
  63. syn match gtkrcBraceError "}"
  64. syn region gtkrcBracket start='\[' end=']' transparent contains=ALLBUT,gtkrcBracketError,@gtkrcPRIVATE
  65. syn match gtkrcBracketError "]"
  66. " Synchronization
  67. syn sync minlines=50
  68. syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>"
  69. " Define the default highlighting
  70. hi def link gtkrcComment Comment
  71. hi def link gtkrcFixme Todo
  72. hi def link gtkrcInclude Preproc
  73. hi def link gtkrcACString gtkrcString
  74. hi def link gtkrcBString gtkrcString
  75. hi def link gtkrcString String
  76. hi def link gtkrcNumber Number
  77. hi def link gtkrcStateName gtkrcConstant
  78. hi def link gtkrcPriorityName gtkrcConstant
  79. hi def link gtkrcTextDirName gtkrcConstant
  80. hi def link gtkrcSettingsName Function
  81. hi def link gtkrcStockName Function
  82. hi def link gtkrcConstant Constant
  83. hi def link gtkrcPathSpecial gtkrcSpecial
  84. hi def link gtkrcWPathSpecial gtkrcSpecial
  85. hi def link gtkrcRGBColor gtkrcSpecial
  86. hi def link gtkrcKeyMod gtkrcSpecial
  87. hi def link gtkrcSpecial Special
  88. hi def link gtkrcTop gtkrcKeyword
  89. hi def link gtkrcPathSet gtkrcKeyword
  90. hi def link gtkrcStyleKeyword gtkrcKeyword
  91. hi def link gtkrcFunction gtkrcKeyword
  92. hi def link gtkrcBind gtkrcKeyword
  93. hi def link gtkrcKeyword Keyword
  94. hi def link gtkrcClassNameGnome gtkrcGtkClass
  95. hi def link gtkrcClassName gtkrcGtkClass
  96. hi def link gtkrcFunctionName gtkrcGtkClass
  97. hi def link gtkrcGtkClass Type
  98. hi def link gtkrcImage gtkrcOtherword
  99. hi def link gtkrcOtherword Function
  100. hi def link gtkrcParenError gtkrcError
  101. hi def link gtkrcBraceError gtkrcError
  102. hi def link gtkrcBracketError gtkrcError
  103. hi def link gtkrcError Error
  104. let b:current_syntax = "gtkrc"