/**
 * dond's brush file for highlighting ViM files using SyntaxHighlighter
 *
 * 9. 2. 2009 (c) dond
 *
 */

dp.sh.Brushes.Vim=function() {
  var keywords='source set hi let map au syntax imap colorscheme vmap compiler inoremap silent load lan'+
    'mkview loadview';
  var values='nowrap backspace autoindent ruler mouse mousefocus fo autowriteall autoread modeline'+
    'modelines backup backupdir runtimepath cinkeys visualbell showmatch scrolloff sidescroll'+
    'sidescrolloff virtualedit splitright whichwrap viminfo gfn enc fileencodings tenc bg laststatus'+
    'stl guioptions incsearch nohlsearch history mapleader maplocalleader nu foldmethod fcs lines'+
    'columns on sync fromstart plugin indent cindent cino smarttab expandtab sw ts fdm fdc commentstring'+
    'indentexpr tw keywordprg indentkeys makeprg smartindent matchpairs nocindent nonu';
  var auKeywords='BufEnter FileType BufWinLeave BufWinEnter GUIEnter';
	
	this.regexList = [
    {regex:new RegExp('^\\s*".*','gm'),css:'comment'},// singleline comments
		{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},// double quoted strings
		{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},// single quoted strings
		{regex:new RegExp('(-?\\d+)(\.\\d+)','g'),css:'value'},// sizes
		{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},// keywords
		{regex:new RegExp(this.GetKeywords(values),'g'),css:'value'},// values
    {regex:new RegExp(this.GetKeywords(auKeywords),'g'),css:'au_keyword'}// keywords for automated loading
		];

  this.CssClass='dp-vim';
  this.Style='.dp-vim .value {color:#966;} .dp-vim .au_keyword {color:#669;}';
}

dp.sh.Brushes.Vim.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Vim.Aliases=['vi','vim','Vim','VIM','ViM','VI'];

