OpenSer is a Vim software plugin that provides users with syntax highlighting for OpenSER configuration.
Installation of Openser is simple. Install the script into the vim syntax files directory, and then switch to openser syntax using "setf openser" or by adding filetype detection. The filetype detection works well instead of standard *.cfg with the following code:
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*modparams*('
setf openser
return
elseif getline(n) =~ '^s*loadmodules*"[^"]+.so"s*$'
setf openser
return
elseif getline(n) =~ '^s*routes*{s*'
setf openser
return
endif
endfor
setf cfg
endfunc
Vim is a text editor first released by Bram Moolenaar in 1991 for the Amiga computer. Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code. The program is free and open source software, released under a software license compatible with the GNU General Public License, with some charityware clauses.
Vim's interface is based on commands given in a text user interface rather than menus or icons. The GUI mode, gVim, adds menus and toolbars, but the full functionality is still available through its command line mode. Vim may be difficult and slow for users initially, but the basics of the software can be learned quickly, and editing becomes significantly more efficient. Vim includes a built-in tutorial for beginners, and the Vim Users' Manual offers details of basic and more advanced features. There is also a built-in help facility (using the :help command) that allows users to query and navigate through commands and features.
Version 1.00: N/A