vim syntax theme file

Dave Foster daf at minuslab.net
Sat Sep 16 12:56:51 EDT 2006


Hi all,

I've had this on my machine for a long time, but finally decided to
"finish it up".  it has an annoying bug with "border.color" becuase the
vim docs say keywords take precendence over match/ranges, and i don't
know how to avoid it.

Instructions to use are at the top, apologies if someone made something
like this already.

Drop this in ~/.vim/syntax and follow instructions to get it to auto
detect.

dave
-------------- next part --------------
" Vim syntax file
" Language: 	Openbox v3.2 themerc syntax	
" Author:		Dave Foster <daf at minuslab.net>
" Version:		1
"
" Syntax highlighting for Openbox theme files. Requires vim 6.3 or
" later.
"
" Based on Ciaran McCreesh's Gentoo packages.keywords syntax file
"
" For automatic detection, you can put this (not very good) line in
" your ~/.vim/filetype.vim:
" au BufNewFile,BufRead themerc setf ob3-theme
"
" Or, to just set the syntax at run time, use:
" :set syntax=ob3-theme
"

if &compatible || v:version < 603
    finish
endif

if exists("b:current_syntax")
  finish
endif

" matches

syn region OB3Comment start=/\!\|\#/ end=/$/
syn match OB3ThemeItem /^\(\w\+\.\)\+\w\+:/ 
syn match OB3HexCode /#[A-Fa-f0-9]\{6\}/
syn match OB3Number /[0-9]\+/

" this is really an incomplete list.  when I find where all the possibilities
" are, i'll put them in here.
" 
" TODO: There is a bug when these are in the ThemeItems, like border.width or
" border.color.  Figure out how to fix this.
syn keyword OB3Keyword left center right sunken flat raised bevel1 bevel2 interlaced gradient crossdiagonal pyramid mirrorhorizontal horizontal splitvertical vertical parentrelative border


" colors

hi def link OB3Comment					          Comment
hi def link OB3HexCode			  		          Special
hi def link OB3Number					          Number
hi def link OB3Keyword					          Keyword
hi def link OB3ThemeItem			              Identifier

let b:current_syntax = "ob3-theme"



More information about the openbox mailing list