mrxvtrc filetype and syntax files

2006-04-27 Thread Gautam Iyer
Hi Bram,

Attached are the filetype, syntax and ftdetect files for mrxvt config
files. Sorry I couldn't make your April 20th deadline ... but maybe you
can stick these in Vim-7.1 if they don't make the Vim-7.0 release.

Gautam

-- 
BTW, FWIW, IMHO, AFAIK, yes. OTOH, AAMOF, maybe not. YMMV.
 Created   : Wed 26 Apr 2006 01:20:53 AM CDT
 Modified  : Thu 27 Apr 2006 03:21:09 AM CDT
 Author: Gautam Iyer [EMAIL PROTECTED]
 Description   : Syntax file for mrxvtrc

 Quit when a syntax file was already loaded
if exists(b:current_syntax)
  finish
endif

 Define options.
let s:boolOpts = 
'(highlightTabOnBell|syncTabTitle|hideTabbar|autohideTabbar|bottomTabbar|hideButtons|syncTabIcon|veryBoldFont|maximized|fullscreen|reverseVideo|loginShell|jumpScroll|scrollBar|scrollbarRight|scrollbarFloating|scrollTtyOutputInhibit|scrollTtyKeypress|scrollWithBuffer|transparent|transparentForce|transparentScrollbar|transparentMenubar|transparentTabbar|tabUsePixmap|utmpInhibit|visualBell|mapAlert|meta8|mouseWheelScrollPage|multibyte_cursor|tripleclickwords|showMenu|xft|xftNomFont|xftSlowOutput|xftAntialias|xftHinting|xftAutoHint|xftGlobalAdvance|tabShell|cmdAllTabs|cmdInitTabs|protectSecondary|thai|borderLess|overrideRedirect|holdExit|broadcast|smartResize|smoothResize|pointerBlank|cursorBlink|noSysConfig|disableMacros|linuxHomeEndKey|sessionMgt)'

let s:colorOpts = 
'(vt\d+.(foreground|background)|background|foreground|ufBackground|textShadow|i?tab(Foreground|Background)|color([0-9]|1[0-5]|BD|UL|RV)|(scroll|trough|highlight|cursor|pointer|border|tint)Color|cursorColor2)'

let s:numOpts = 
'(vt\d+.saveLines|maxTabWidth|minVisibleTabs|saveLines|scrollbarThickness|xftmSize|xftSize|desktop|externalBorder|internalBorder|lineSpace|pointerBlankDelay|cursorBlinkInterval|initTermNumber|shading|backgroundFade|bgRefreshInterval|fading|opacity|opacityDegree|xftPSize)'

let s:strOpts = 
'(vt\d+\.(tabTitle|command)|tabTitle|termName|title|clientName|iconName|bellCommand|holdExitText|backspaceKey|deleteKey|printPipe|cutChars|answerbackString|smClientID|geometry|confFileSave|path|boldFont|m?font[1-5]?|xftFont|xftmFont|xftPFont|inputMethod|greektoggle_key|menu|menubarPixmap|vt\d+\.Pixmap|Pixmap|scrollbarPixmap|tabbarPixmap|appIcon|multichar_encoding)'

syn case match

syn match   mrxvtComment[EMAIL PROTECTED] '^\s*!.*$'
syn match   mrxvtComment'\v^\s*!\s*\w+[.*]\w+.*:.*'


 Generic options (string / color / number / boolean)

syn match   mrxvtOptErr '\v^\s*\w+[.*]?.{-}(:|$)'
exec 'syn match mrxvtBoolOpts   nextgroup=mrxvtBoolVal,mrxvtValErr'
\ '\v^\w+[.*]'.s:boolOpts.':\s*'
exec 'syn match mrxvtNumOptsnextgroup=mrxvtNumVal,mrxvtValErr'
\ '\v^\w+[.*]'.s:numOpts.':\s*'
exec 'syn match mrxvtColorOpts  nextgroup=mrxvtColorVal'
\ '\v^\w+[.*]'.s:colorOpts.':\s*'
exec 'syn match mrxvtStrOptsnextgroup=mrxvtStrVal,mrxvtValErr'
\ '\v^\w+[.*]'.s:strOpts.':\s*'

syn match   mrxvtValErr contained '\v.+$'
syn match   mrxvtBoolValcontained
\ '\v\c(0|1|yes|no|on|off|true|false)\s*$'
syn match   mrxvtStrVal contained '\v.+$'
syn match   mrxvtColorVal   contained '\v#[0-9a-fA-F]{6}\s*$'
syn match   mrxvtNumVal contained '\v[+-]?(0[0-7]+|\d+|0x[0-9a-fA-F]+)$'


 Options with special values

syn match   mrxvtOptionsnextgroup=mrxvtSBstyle,mrxvtValErr
\ '\v^\w+[.*]scrollbarStyle:\s*'
syn match   mrxvtSBstylecontained '\v(plain|xterm|rxvt|next|sgi)$'

syn match   mrxvtOptionsnextgroup=mrxvtSBalign,mrxvtValErr
\ '\v^\w+[.*]scrollbarAlign:\s*'
syn match   mrxvtSBaligncontained '\v(top|bottom)$'

syn match   mrxvtOptionsnextgroup=mrxvtTSmode,mrxvtValErr
\ '\v^\w+[.*]textShadowMode:\s*'
syn match   mrxvtTSmode contained
\ '\v(none|(top|bot)?(left|right)|(top|bottom))$'

syn match   mrxvtOptionsnextgroup=mrxvtGrkKbd,mrxvtValErr
\ '\v^\w+[.*]greek_keyboard:\s*'
syn match   mrxvtGrkKbd contained '\v(iso|ibm)$'

syn match   mrxvtOptionsnextgroup=mrxvtXftWt,mrxvtValErr
\ '\v^\w+[.*]xftWeight:\s*'
syn match   mrxvtXftWt  contained '\v(light|medium|bold)$'

syn match   mrxvtOptionsnextgroup=mrxvtXftSl,mrxvtValErr
\ '\v^\w+[.*]xftSlant:\s*'
syn match   mrxvtXftSl  contained '\v(roman|italic|oblique)$'

syn match   mrxvtOptionsnextgroup=mrxvtXftWd,mrxvtValErr
\ '\v^\w+[.*]xftWidth:\s*'
syn match   mrxvtXftWd  contained
\ '\v((ultra)?(condensed|expanded)|normal)$'

syn match   mrxvtOptionsnextgroup=mrxvtXftHt,mrxvtValErr
\ '\v^\w+[.*]xftRGBA:\s*'
syn match   mrxvtXftHt  contained '\v(v?(rgb|bgr)|none)$'


Re: mrxvtrc filetype and syntax files

2006-04-27 Thread Nikolai Weibull
On 4/27/06, Gautam Iyer [EMAIL PROTECTED] wrote:
 Attached are the filetype, syntax and ftdetect files for mrxvt config
 files. Sorry I couldn't make your April 20th deadline ... but maybe you
 can stick these in Vim-7.1 if they don't make the Vim-7.0 release.

Just a comment on the syntax definition.  You could be using
:syn-keyword for quite a few of the things that you're currently using
:syn-match for.  :syn-keyword is clearer and a lot faster as well.

  nikolai


Re: mrxvtrc filetype and syntax files

2006-04-27 Thread Gautam Iyer
On Thu, Apr 27, 2006 at 11:35:52AM +0200, Nikolai Weibull wrote:

 On 4/27/06, Gautam Iyer [EMAIL PROTECTED] wrote:

  Attached are the filetype, syntax and ftdetect files for mrxvt config
  files. Sorry I couldn't make your April 20th deadline ... but maybe you
  can stick these in Vim-7.1 if they don't make the Vim-7.0 release.
 
 Just a comment on the syntax definition.  You could be using
 :syn-keyword for quite a few of the things that you're currently using
 :syn-match for.  :syn-keyword is clearer and a lot faster as well.

Hi Nicolai,

Thanks for pointing this out, I'll correct it.

Since Benji Fisher's computer is 6 times faster than mine (which I'm
still envious about), I'll jump through hoops to get my Vim to load up
0.1s faster ... :)

:).

Gautam

-- 
A physics professor is one who talks in someone else's sleep.


Re: mrxvtrc filetype and syntax files

2006-04-27 Thread Nikolai Weibull
On 4/27/06, Gautam Iyer [EMAIL PROTECTED] wrote:
 On Thu, Apr 27, 2006 at 11:35:52AM +0200, Nikolai Weibull wrote:

  Just a comment on the syntax definition.  You could be using
  :syn-keyword for quite a few of the things that you're currently using
  :syn-match for.  :syn-keyword is clearer and a lot faster as well.

 Hi Nicolai,

Hi.  I'm curious, why did you spell my name with a 'c'?  During the
last couple of days, people have called me Nicholas, Niklas, and twice
Nicolai.  I see a conspiracy forming...

 Thanks for pointing this out, I'll correct it.

:-)

  n.o.w.


Re: mrxvtrc filetype and syntax files

2006-04-27 Thread Gautam Iyer
On Thu, Apr 27, 2006 at 09:40:56PM +0200, Nikolai Weibull wrote:

 On 4/27/06, Gautam Iyer [EMAIL PROTECTED] wrote:

  On Thu, Apr 27, 2006 at 11:35:52AM +0200, Nikolai Weibull wrote:
 
   Just a comment on the syntax definition.  You could be using
   :syn-keyword for quite a few of the things that you're currently using
   :syn-match for.  :syn-keyword is clearer and a lot faster as well.
 
  Hi Nicolai,
 
 Hi.  I'm curious, why did you spell my name with a 'c'?  During the
 last couple of days, people have called me Nicholas, Niklas, and twice
 Nicolai.  I see a conspiracy forming...

Well if Vim does not flag it as a spell error, I don't give it a second
thought. Though I'm knot quiet clear weather this algorithm always leads
two the write spelling.

:)

GI

-- 
'Television' -- The electronic device that alternates between extreme 
violence and finding great long-distance rates.


Re: mrxvtrc filetype and syntax files

2006-04-27 Thread Mikolaj Machowski
Dnia czwartek, 27 kwietnia 2006 21:40, Nikolai Weibull napisaƂ:
  Hi Nicolai,

 Hi.  I'm curious, why did you spell my name with a 'c'?  During the
 last couple of days, people have called me Nicholas, Niklas, and twice
 Nicolai.  I see a conspiracy forming...

Hello Mikolaj,

It is popular name but in each language is spelled differently :)

m.