sponsor Vim development Vim logo Vim Book Ad

openser.vim : Openser configuration syntax

 script karma  Rating 43/34, Downloaded by 1006  Comments, bugs, improvements  Vim wiki

created by
Stanisław Pitucha
 
script type
syntax
 
description
Syntax file for Openser configuration. In version 1.00 it includes all core keywords as of version 1.3.X.
Works in Vim 7.1.
 
install details
Install script into vim syntax files directory. Switch to openser syntax either with "setf openser" or add filetype detection.
This detection works quite well if used instead of standard *.cfg:

au BufNewFile,BufRead *.cfg   call s:cfgType()

func! s:cfgType()
   let max = line("$") > 50 ? 50 : line("$")
   for n in range(1, max)
      if getline(n) =~ '^\s*modparam\s*('
         setf openser
         return
      elseif getline(n) =~ '^\s*loadmodule\s*"[^"]\+.so"\s*$'
         setf openser
         return
      elseif getline(n) =~ '^\s*route\s*{\s*'
         setf openser
         return
      endif
   endfor
   setf cfg
endfunc
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
openser.vim 1.00 2008-05-18 7.0 Stanisław Pitucha Initial upload
ip used for rating: 35.170.81.33

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github