Bram Moolenaar wrote:
[...]
I'll add a specific line to copy rgb.txt.


Just for the record, after reformatting the entries to a common format and sorting, a diff between my ~/.build/vim/vim71a/runtime/rgb.txt and my /usr/share/X11/rgb.txt shows no other difference than the header comment -- so I suppose copying it unconditionally oughtn't to harm the OSs where there already is an rgb.txt.

Oh, and just for fun: I slapped together a syntax script for rgb.txt (attached). I use it with a zero-length ftplugin and a one-line detection autocommand in filetype.vim (which are not attached: the autocommand is: "au BufRead,BufNewFile rgb.txt setf rgb"); Bram, what do you think of it?


Best regards,
Tony.
" Syntax plugin for rgb (rgb.txt) files
" Language:             rgb.txt
" Maintainer:           Tony Mechelynck <[EMAIL PROTECTED]>
" Last Change:          9 May 2007

sy match rgbError /^.*$/
hi def link rgbError Error

sy match rgbComment /^!.*$/ display
hi def link rgbComment Comment

sy match rgbLine transparent /^\s*\d\+\s\+\d\+\s\+\d\+\s\+\a.*$/ 
contains=rgbNumber,rgbName

sy match rgbNumber /\<\d\+\>/ contained
hi def link rgbNumber Number

sy match rgbName /\<\a.*$/ contained
hi def link rgbName Identifier

Reply via email to