summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-15 20:25:09 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-15 20:25:09 +0000
commitc6249bb24629c49cfc315ac540a21edf18a61eaf (patch)
tree815229a041a28df27396d1bbe8bfb418a2154928 /runtime
parent01a347a1bb78774a62dd8c251c75a7541b58cdb7 (diff)
downloadvim-git-c6249bb24629c49cfc315ac540a21edf18a61eaf.tar.gz
updated for version 7.0d05
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/rubycomplete.vim308
-rw-r--r--runtime/colors/morning.vim4
-rw-r--r--runtime/compiler/eruby.vim12
-rw-r--r--runtime/compiler/ruby.vim13
-rw-r--r--runtime/doc/eval.txt49
-rw-r--r--runtime/doc/tags4
-rw-r--r--runtime/doc/usr_41.txt6
-rw-r--r--runtime/filetype.vim8
-rw-r--r--runtime/ftplugin/eruby.vim12
-rw-r--r--runtime/ftplugin/ruby.vim16
-rw-r--r--runtime/indent/eruby.vim14
-rw-r--r--runtime/synmenu.vim12
-rw-r--r--runtime/syntax/doxygen.vim557
-rw-r--r--runtime/syntax/eruby.vim12
-rw-r--r--runtime/syntax/ruby.vim11
-rw-r--r--runtime/syntax/smcl.vim308
-rw-r--r--runtime/syntax/stata.vim449
17 files changed, 1731 insertions, 64 deletions
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim
new file mode 100644
index 000000000..8def228ed
--- /dev/null
+++ b/runtime/autoload/rubycomplete.vim
@@ -0,0 +1,308 @@
+" Vim completion script
+" Language: Ruby
+" Maintainer: Mark Guzman ( segfault AT hasno DOT info )
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
+" ----------------------------------------------------------------------------
+"
+" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
+" ----------------------------------------------------------------------------
+
+if !has('ruby')
+ echo "Error: Required vim compiled with +ruby"
+ finish
+endif
+
+if version < 700
+ echo "Error: Required vim >= 7.0"
+ finish
+endif
+
+func! GetRubyVarType(v)
+ let stopline = 1
+ let vtp = ''
+ let pos = getpos('.')
+ let [lnum,lcol] = searchpos('^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$','nb',stopline)
+ if lnum != 0 && lcol != 0
+ call setpos('.',pos)
+ let str = getline(lnum)
+ let vtp = substitute(str,'^\s*#\s*@var\s*'.a:v.'\>\s\+\([^ \t]\+\)\s*$','\1','')
+ return vtp
+ endif
+ call setpos('.',pos)
+ let [lnum,lcol] = searchpos(''.a:v.'\>\s*[+\-*/]*=\s*\([^ \t]\+.\(now\|new\|open\|get_instance\)\>\|[\[{"'']\)','nb',stopline)
+ if lnum != 0 && lcol != 0
+ let str = matchstr(getline(lnum),'=\s*\([^ \t]\+.\(now\|new\|open\|get_instance\)\>\|[\[{"'']\)',lcol)
+ let str = substitute(str,'^=\s*','','')
+ call setpos('.',pos)
+ if str == '"' || str == ''''
+ return 'String'
+ elseif str == '['
+ return 'Array'
+ elseif str == '{'
+ return 'Hash'
+ elseif strlen(str) > 4
+ let l = stridx(str,'.')
+ return str[0:l-1]
+ end
+ return ''
+ endif
+ call setpos('.',pos)
+ return ''
+endf
+
+function! rubycomplete#Complete(findstart, base)
+ "findstart = 1 when we need to get the text length
+ if a:findstart
+ let line = getline('.')
+ let idx = col('.')
+ while idx > 0
+ let idx -= 1
+ let c = line[idx-1]
+ if c =~ '\w'
+ continue
+ elseif ! c =~ '\.'
+ idx = -1
+ break
+ else
+ break
+ endif
+ endwhile
+
+ return idx
+ "findstart = 0 when we need to return the list of completions
+ else
+ execute "ruby get_completions('" . a:base . "')"
+ return g:rbcomplete_completions
+ endif
+endfunction
+
+
+function! s:DefRuby()
+ruby << RUBYEOF
+ReservedWords = [
+ "BEGIN", "END",
+ "alias", "and",
+ "begin", "break",
+ "case", "class",
+ "def", "defined", "do",
+ "else", "elsif", "end", "ensure",
+ "false", "for",
+ "if", "in",
+ "module",
+ "next", "nil", "not",
+ "or",
+ "redo", "rescue", "retry", "return",
+ "self", "super",
+ "then", "true",
+ "undef", "unless", "until",
+ "when", "while",
+ "yield",
+ ]
+
+Operators = [ "%", "&", "*", "**", "+", "-", "/",
+ "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
+ "[]", "[]=", "^", ]
+
+def identify_type(var)
+ @buf = VIM::Buffer.current
+ enum = @buf.line_number
+ snum = (enum-10).abs
+ nums = Range.new( snum, enum )
+ regxs = '/.*(%s)\s*=(.*)/' % var
+ regx = Regexp.new( regxs )
+ nums.each do |x|
+ ln = @buf[x]
+ #print $~ if regx.match( ln )
+ end
+end
+
+def load_requires
+ @buf = VIM::Buffer.current
+ enum = @buf.line_number
+ nums = Range.new( 1, enum )
+ nums.each do |x|
+ ln = @buf[x]
+ begin
+ eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln )
+ rescue Exception
+ #ignore?
+ end
+ end
+end
+
+def get_completions(base)
+ load_requires
+ input = VIM::evaluate('expand("<cWORD>")')
+ input += base
+ message = nil
+
+
+ case input
+ when /^(\/[^\/]*\/)\.([^.]*)$/
+ # Regexp
+ receiver = $1
+ message = Regexp.quote($2)
+
+ candidates = Regexp.instance_methods(true)
+ select_message(receiver, message, candidates)
+
+ when /^([^\]]*\])\.([^.]*)$/
+ # Array
+ receiver = $1
+ message = Regexp.quote($2)
+
+ candidates = Array.instance_methods(true)
+ select_message(receiver, message, candidates)
+
+ when /^([^\}]*\})\.([^.]*)$/
+ # Proc or Hash
+ receiver = $1
+ message = Regexp.quote($2)
+
+ candidates = Proc.instance_methods(true) | Hash.instance_methods(true)
+ select_message(receiver, message, candidates)
+
+ when /^(:[^:.]*)$/
+ # Symbol
+ if Symbol.respond_to?(:all_symbols)
+ sym = $1
+ candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name}
+ candidates.grep(/^#{sym}/)
+ else
+ []
+ end
+
+ when /^::([A-Z][^:\.\(]*)$/
+ # Absolute Constant or class methods
+ receiver = $1
+ candidates = Object.constants
+ candidates.grep(/^#{receiver}/).collect{|e| "::" + e}
+
+ when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/
+ # Constant or class methods
+ receiver = $1
+ message = Regexp.quote($4)
+ begin
+ candidates = eval("#{receiver}.constants | #{receiver}.methods")
+ rescue Exception
+ candidates = []
+ end
+ candidates.grep(/^#{message}/).collect{|e| receiver + "::" + e}
+
+ when /^(:[^:.]+)\.([^.]*)$/
+ # Symbol
+ receiver = $1
+ message = Regexp.quote($2)
+
+ candidates = Symbol.instance_methods(true)
+ select_message(receiver, message, candidates)
+
+ when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/
+ # Numeric
+ receiver = $1
+ message = Regexp.quote($4)
+
+ begin
+ candidates = eval(receiver).methods
+ rescue Exception
+ candidates
+ end
+ select_message(receiver, message, candidates)
+
+ when /^(\$[^.]*)$/
+ candidates = global_variables.grep(Regexp.new(Regexp.quote($1)))
+
+# when /^(\$?(\.?[^.]+)+)\.([^.]*)$/
+ when /^((\.?[^.]+)+)\.([^.]*)$/
+ # variable
+ receiver = $1
+ message = Regexp.quote($3)
+
+ cv = eval("self.class.constants")
+
+ vartype = VIM::evaluate("GetRubyVarType('%s')" % receiver)
+ if vartype != ''
+ candidates = eval("#{vartype}.instance_methods")
+ elsif (cv).include?(receiver)
+ # foo.func and foo is local var.
+ candidates = eval("#{receiver}.methods")
+ elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver
+ # Foo::Bar.func
+ begin
+ candidates = eval("#{receiver}.methods")
+ rescue Exception
+ candidates = []
+ end
+ else
+ # func1.func2
+ candidates = []
+ ObjectSpace.each_object(Module){|m|
+ next if m.name != "IRB::Context" and
+ /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name
+ candidates.concat m.instance_methods(false)
+ }
+ candidates.sort!
+ candidates.uniq!
+ end
+ #identify_type( receiver )
+ select_message(receiver, message, candidates)
+
+ #when /^((\.?[^.]+)+)\.([^.]*)\(\s*\)*$/
+ #function call
+ #obj = $1
+ #func = $3
+
+ when /^\.([^.]*)$/
+ # unknown(maybe String)
+
+ receiver = ""
+ message = Regexp.quote($1)
+
+ candidates = String.instance_methods(true)
+ select_message(receiver, message, candidates)
+
+ else
+ candidates = eval("self.class.constants")
+
+ (candidates|ReservedWords).grep(/^#{Regexp.quote(input)}/)
+ end
+
+ #print candidates
+ if message != nil && message.length > 0
+ rexp = '^%s' % message.downcase
+ candidates.delete_if do |c|
+ c.downcase.match( rexp )
+ $~ == nil
+ end
+ end
+
+ outp = ""
+ # tags = VIM::evaluate("taglist('^%s$')" %
+ (candidates-Object.instance_methods).each { |c| outp += "{'word':'%s','item':'%s'}," % [ c, c ] }
+ outp.sub!(/,$/, '')
+ VIM::command("let g:rbcomplete_completions = [%s]" % outp)
+end
+
+
+def select_message(receiver, message, candidates)
+ candidates.grep(/^#{message}/).collect do |e|
+ case e
+ when /^[a-zA-Z_]/
+ receiver + "." + e
+ when /^[0-9]/
+ when *Operators
+ #receiver + " " + e
+ end
+ end
+ candidates.delete_if { |x| x == nil }
+ candidates.uniq!
+ candidates.sort!
+end
+RUBYEOF
+endfunction
+
+call s:DefRuby()
+" vim: set et ts=4:
diff --git a/runtime/colors/morning.vim b/runtime/colors/morning.vim
index 5b175877f..f1ab84141 100644
--- a/runtime/colors/morning.vim
+++ b/runtime/colors/morning.vim
@@ -1,6 +1,6 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Apr 14
+" Last Change: 2006 Apr 15
" This color scheme uses a light grey background.
@@ -22,7 +22,7 @@ hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
-hi Visual term=reverse ctermbg=grey guibg=grey90
+hi Visual term=reverse ctermbg=grey guibg=grey80
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE
diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim
index 474dafeec..b73ab61fd 100644
--- a/runtime/compiler/eruby.vim
+++ b/runtime/compiler/eruby.vim
@@ -1,10 +1,10 @@
" Vim compiler file
-" Language: eRuby
-" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
-" ----------------------------------------------------------------------------
+" Language: eRuby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")
finish
diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim
index d34b37e8f..971621e8c 100644
--- a/runtime/compiler/ruby.vim
+++ b/runtime/compiler/ruby.vim
@@ -1,10 +1,11 @@
" Vim compiler file
-" Language: Ruby
-" Function: Syntax check and/or error reporting
-" Maintainer: Tim Hammerquist <timh at rubyforge.org>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
+" Language: Ruby
+" Function: Syntax check and/or error reporting
+" Maintainer: Tim Hammerquist <timh at rubyforge.org>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Changelog:
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b69fa3642..f06866b61 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 14
+*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1597,6 +1597,8 @@ getpos( {expr}) List position of cursor, mark, etc.
getqflist() List list of quickfix items
getreg( [{regname} [, 1]]) String contents of register
getregtype( [{regname}]) String type of register
+gettabwinvar( {tabnr}, {winnr}, {name})
+ any {name} in {winnr} in tab page {tabnr}
getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
getwinvar( {nr}, {varname}) any variable {varname} in window {nr}
@@ -1702,6 +1704,8 @@ setloclist( {nr}, {list}[, {action}])
setpos( {expr}, {list}) none set the {expr} position to {list}
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
+settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window
+ {winnr} in tab page {tabnr} to {val}
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
simplify( {filename}) String simplify filename as much as possible
sort( {list} [, {func}]) List sort {list}, using {func} to compare
@@ -2865,6 +2869,20 @@ getregtype([{regname}]) *getregtype()*
<CTRL-V> is one character with value 0x16.
If {regname} is not specified, |v:register| is used.
+gettabwinvar({tabnr}, {winnr}, {varname}) *gettabwinvar()*
+ Get the value of an option or local window variable {varname}
+ in window {winnr} in tab page {tabnr}.
+ Tabs are numbered starting with one. For the current tabpage
+ use |getwinvar()|.
+ When {winnr} is zero the current window is used.
+ This also works for a global option, buffer-local option and
+ window-local option, but it doesn't work for a global variable
+ or buffer-local variable.
+ Note that the name without "w:" must be used.
+ Examples: >
+ :let list_is_on = gettabwinvar(1, 2, '&list')
+ :echo "myvar = " . gettabwinvar(3, 1, 'myvar')
+
*getwinposx()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. The result will be
@@ -2875,14 +2893,8 @@ getwinposy() The result is a Number, which is the Y coordinate in pixels of
the top of the GUI Vim window. The result will be -1 if the
information is not available.
-getwinvar({nr}, {varname}) *getwinvar()*
- The result is the value of option or local window variable
- {varname} in window {nr}. When {nr} is zero the current
- window is used.
- This also works for a global option, buffer-local option and
- window-local option, but it doesn't work for a global variable
- or buffer-local variable.
- Note that the name without "w:" must be used.
+getwinvar({winnr}, {varname}) *getwinvar()*
+ Like |gettabwinvar()| for the current tabpage.
Examples: >
:let list_is_on = getwinvar(2, '&list')
:echo "myvar = " . getwinvar(1, 'myvar')
@@ -4359,17 +4371,28 @@ setreg({regname}, {value} [,{options}])
nothing: >
:call setreg('a', '', 'al')
-setwinvar({nr}, {varname}, {val}) *setwinvar()*
- Set option or local variable {varname} in window {nr} to
- {val}. When {nr} is zero the current window is used.
+settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
+ Set option or local variable {varname} in window {winnr} to
+ {val}.
+ Tabs are numbered starting with one. For the current tabpage
+ use |setwinvar()|.
+ When {winnr} is zero the current window is used.
This also works for a global or local buffer option, but it
doesn't work for a global or local buffer variable.
For a local buffer option the global value is unchanged.
Note that the variable name without "w:" must be used.
+ Vim briefly goes to the tab page {tabnr}, this may trigger
+ TabLeave and TabEnter autocommands.
+ Examples: >
+ :call settabwinvar(1, 1, "&list", 0)
+ :call settabwinvar(3, 2, "myvar", "foobar")
+< This function is not available in the |sandbox|.
+
+setwinvar({nr}, {varname}, {val}) *setwinvar()*
+ Like |settabwinvar()| for the current tab page.
Examples: >
:call setwinvar(1, "&list", 0)
:call setwinvar(2, "myvar", "foobar")
-< This function is not available in the |sandbox|.
simplify({filename}) *simplify()*
Simplify the file name as much as possible without changing
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 5acac75b2..3ee117eb8 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4976,6 +4976,8 @@ dos32 os_msdos.txt /*dos32*
dosbatch.vim syntax.txt /*dosbatch.vim*
double-click term.txt /*double-click*
download intro.txt /*download*
+doxygen-syntax syntax.txt /*doxygen-syntax*
+doxygen.vim syntax.txt /*doxygen.vim*
dp diff.txt /*dp*
drag-n-drop gui.txt /*drag-n-drop*
drag-n-drop-win32 gui_w32.txt /*drag-n-drop-win32*
@@ -5482,6 +5484,7 @@ getreg() eval.txt /*getreg()*
getregtype() eval.txt /*getregtype()*
getscript getscript.txt /*getscript*
getscript.txt getscript.txt /*getscript.txt*
+gettabwinvar() eval.txt /*gettabwinvar()*
getwinposx() eval.txt /*getwinposx()*
getwinposy() eval.txt /*getwinposy()*
getwinvar() eval.txt /*getwinvar()*
@@ -6788,6 +6791,7 @@ setloclist() eval.txt /*setloclist()*
setpos() eval.txt /*setpos()*
setqflist() eval.txt /*setqflist()*
setreg() eval.txt /*setreg()*
+settabwinvar() eval.txt /*settabwinvar()*
setting-guifont gui.txt /*setting-guifont*
setting-guitablabel tabpage.txt /*setting-guitablabel*
setting-tabline tabpage.txt /*setting-tabline*
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 38e0621b0..966337329 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 7.0d. Last change: 2006 Apr 09
+*usr_41.txt* For Vim version 7.0d. Last change: 2006 Apr 15
VIM USER MANUAL - by Bram Moolenaar
@@ -652,8 +652,10 @@ Variables:
function() get a Funcref for a function name
getbufvar() get a variable value from a specific buffer
setbufvar() set a variable in a specific buffer
- getwinvar() get a variable value from a specific window
+ getwinvar() get a variable from specific window
+ gettabwinvar() get a variable from specific window & tab page
setwinvar() set a variable in a specific window
+ settabwinvar() set a variable in a specific window & tab page
garbagecollect() possibly free memory
Cursor and mark position:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index e84573a31..26463a8be 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Apr 12
+" Last Change: 2006 Apr 15
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1653,6 +1653,12 @@ au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig
" OpenSSH server configuration
au BufNewFile,BufRead sshd_config setf sshdconfig
+" Stata
+au BufNewFile,BufRead *.ado,*.class,*.do,*.imata,*.mata setf stata
+
+" SMCL
+au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl
+
" Stored Procedures
au BufNewFile,BufRead *.stp setf stp
diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim
index d256831bf..6d8b4eafd 100644
--- a/runtime/ftplugin/eruby.vim
+++ b/runtime/ftplugin/eruby.vim
@@ -1,10 +1,10 @@
" Vim filetype plugin
-" Language: eRuby
-" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
-" ----------------------------------------------------------------------------
+" Language: eRuby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim
index 8ce7f12ac..40d1c5540 100644
--- a/runtime/ftplugin/ruby.vim
+++ b/runtime/ftplugin/ruby.vim
@@ -1,9 +1,10 @@
" Vim filetype plugin
-" Language: Ruby
-" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
+" Language: Ruby
+" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Original matchit support thanks to Ned Konz. See his ftplugin/ruby.vim at
@@ -51,7 +52,10 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
setlocal suffixesadd=.rb
-setlocal omnifunc=rubycomplete#Complete
+
+if version >= 700
+ setlocal omnifunc=rubycomplete#Complete
+endif
" TODO:
"setlocal define=^\\s*def
diff --git a/runtime/indent/eruby.vim b/runtime/indent/eruby.vim
index b62a0245f..ab950b659 100644
--- a/runtime/indent/eruby.vim
+++ b/runtime/indent/eruby.vim
@@ -1,10 +1,10 @@
" Vim indent file
-" Language: Ruby
-" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
-" ----------------------------------------------------------------------------
+" Language: Ruby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -12,3 +12,5 @@ if exists("b:did_indent")
endif
runtime! indent/html.vim
+
+" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 1bda52100..d9da7cc41 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -420,11 +420,13 @@ an 50.100.520 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
an 50.100.530 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
an 50.100.540 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
an 50.100.550 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
-an 50.100.560 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
-an 50.100.570 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
-an 50.100.580 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
-an 50.100.590 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers")<CR>
-an 50.100.600 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl")<CR>
+an 50.100.560 &Syntax.Sh-S.Stata.SMCL :cal SetSyn("smcl")<CR>
+an 50.100.570 &Syntax.Sh-S.Stata.Stata :cal SetSyn("stata")<CR>
+an 50.100.580 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
+an 50.100.590 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
+an 50.100.600 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
+an 50.100.610 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers")<CR>
+an 50.100.620 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl")<CR>
an 50.110.100 &Syntax.TUV.TADS :cal SetSyn("tads")<CR>
an 50.110.110 &Syntax.TUV.Tags :cal SetSyn("tags")<CR>
an 50.110.120 &Syntax.TUV.TAK.TAK\ compare :cal SetSyn("takcmp")<CR>
diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim
new file mode 100644
index 000000000..c77b89eb9
--- /dev/null
+++ b/runtime/syntax/doxygen.vim
@@ -0,0 +1,557 @@
+" DoxyGen syntax hilighting extension for c/c++/idl/java
+" Language: doxygen on top of c, cpp, idl, java
+" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au>
+" Author: Michael Geddes
+" Last Change: 12 December 2005
+" Version: 1.15
+"
+" Copyright 2004 Michael Geddes
+" Please feel free to use, modify & distribute all or part of this script,
+" providing this copyright message remains.
+" I would appreciate being acknowledged in any derived scripts, and would
+" appreciate and welcome any updates, modifications or suggestions.
+
+" NOTE: Comments welcome!
+"
+" There are two variables that control the syntax hilighting produced by this
+" script:
+" doxygen_enhanced_colour - Use the (non-standard) original colours designed for this hilighting.
+" doxygen_my_rendering - Disable the HTML bold/italic/underline rendering.
+"
+" A brief description without '.' or '!' will cause the end comment
+" character to be marked as an error. You can define the colour of this using
+" the highlight doxygenErrorComment.
+" A \link without an \endlink will cause an error hilight on the end-comment.
+" This is defined by doxygenLinkError
+"
+" The variable g:doxygen_codeword_font can be set to the guifont for marking \c
+" words - a 'typewriter' like font normally. Spaces must be escaped. It can
+" also be set to any hilight attribute. Alternatively, a hilight for doxygenCodeWord
+" can be used to override it.
+"
+" By default, hilighting is done assumng you have the JAVADOC_AUTOBRIEF
+" setting tunred on in your Doxygen configuration. If you don't, you
+" can set the variable g:doxygen_javadoc_autobrief to 0 to have the
+" hilighting more accurately reflect the way Doxygen will interpret your
+" comments.
+"
+" Special thanks to: Wu Yongwei, Toby Allsopp
+"
+
+if exists('b:suppress_doxygen')
+ unlet b:suppress_doxygen
+ finish
+endif
+
+if exists('b:current_syntax') && b:current_syntax =~ 'doxygen' && !exists('doxygen_debug_script')
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Start of Doxygen syntax hilighting:
+"
+
+" C/C++ Style line comments
+syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend
+syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2
+syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl
+syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial
+
+" Single line brief followed by multiline comment.
+syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend
+" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
+syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl
+
+" Skip empty lines at the start for when comments start on the 2nd/3rd line.
+syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl
+syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl
+syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl
+
+" Match the Starting pattern (effectively creating the start of a BNF)
+if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
+ syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
+else
+ syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
+endif
+syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite
+
+" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
+syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
+
+" Match the first sentence as a brief comment
+if ! exists('g:doxygen_end_punctuation')
+ let g:doxygen_end_punctuation='[.]'
+endif
+exe 'syn region doxygenBrief contained start=+[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipnl nextgroup=doxygenBody'
+
+syn match doxygenBriefEndComment +\*/+ contained
+
+exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup keepend'
+
+syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipwhite keepend
+
+" Match a '<' for applying a comment to the previous element.
+syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenSpecial,doxygenStartSkip skipwhite
+syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite
+
+" These are anti-doxygen comments. If there are more than two asterisks or 3 '/'s
+" then turn the comments back into normal C comments.
+syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cCommentString,cCharacter,cNumbersCom,cSpaceError
+syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError
+
+" Special commands at the start of the area: starting with '@' or '\'
+syn region doxygenStartSpecial contained start=+[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=doxygenSpecial nextgroup=doxygenSkipComment skipnl keepend
+syn match doxygenSkipComment contained +^\s*\*/\@!+ nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenPage skipwhite
+
+"syn region doxygenBodyBit contained start=+$+
+
+" The main body of a doxygen comment.
+syn region doxygenBody contained start=+.\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup
+
+" These allow the skipping of comment continuation '*' characters.
+syn match doxygenContinueComment contained +^\s*\*/\@!\s*+
+
+" Catch a Brief comment without punctuation - flag it as an error but
+" make sure the end comment is picked up also.
+syn match doxygenErrorComment contained +\*/+
+
+
+" Skip empty lines at the start for when comments start on the 2nd/3rd line.
+if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
+ syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
+ syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
+else
+ syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
+ syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
+endif
+
+" Match an [@\]brief so that it moves to body-mode.
+"
+"
+" syn match doxygenBriefLine contained
+syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite
+syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained
+
+
+" Create the single word matching special identifiers.
+
+fun! s:DxyCreateSmallSpecial( kword, name )
+
+ let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+'
+ exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word'
+ exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial keepend'
+endfun
+call s:DxyCreateSmallSpecial('p', 'Code')
+call s:DxyCreateSmallSpecial('c', 'Code')
+call s:DxyCreateSmallSpecial('b', 'Bold')
+call s:DxyCreateSmallSpecial('e', 'Emphasised')
+call s:DxyCreateSmallSpecial('em', 'Emphasised')
+call s:DxyCreateSmallSpecial('a', 'Argument')
+call s:DxyCreateSmallSpecial('ref', 'Ref')
+delfun s:DxyCreateSmallSpecial
+
+syn match doxygenSmallSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\>\|\<link\>\|f\$\|[$\\&<>#]\)\@=+ nextgroup=doxygenOtherLink,doxygenHyperLink,doxygenHashLink,doxygenFormula,doxygenSymbol,doxygenSpecial.*Word
+
+" Now for special characters
+syn match doxygenSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
+" doxygenOtherLink,doxygenSymbol,doxygenFormula,doxygenErrorSpecial,doxygenSpecial.*Word
+"
+syn match doxygenGroupDefine contained +@\@<=[{}]+
+syn match doxygenGroupDefineSpecial contained +@\ze[{}]+
+
+syn match doxygenErrorSpecial contained +\s+
+
+" Match Parmaters and retvals (hilighting the first word as special).
+syn match doxygenParamDirection contained +\[\(\<in\>\|\<out\>\|,\)\+\]+ nextgroup=doxygenParamName skipwhite
+syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite
+syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
+syn keyword doxygenRetval contained retval throw exception nextgroup=doxygenParamName skipwhite
+
+" Match one line identifiers.
+syn keyword doxygenOther contained addindex anchor
+\ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer
+\ example htmlonly image include ingroup internal latexonly line
+\ overload relates relatesalso sa skip skipline
+\ until verbinclude version addtogroup htmlinclude copydoc dotfile
+\ xmlonly endxmlonly
+\ nextgroup=doxygenSpecialOnelineDesc
+
+syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment
+syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+
+
+syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment
+syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+
+
+let b:doxygen_syntax_save=b:current_syntax
+unlet b:current_syntax
+syn include @Dotx syntax/dot.vim
+let b:current_syntax=b:doxygen_syntax_save
+unlet b:doxygen_syntax_save
+syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@Dotx
+syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+
+
+" Match single line identifiers.
+syn keyword doxygenBOther contained class enum file fn mainpage interface
+\ namespace struct typedef union var def name
+\ nextgroup=doxygenSpecialTypeOnelineDesc
+
+syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine
+syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc
+
+syn keyword doxygenOther contained arg author date deprecated li return see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
+syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc
+syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc
+syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc
+
+" Handle \link, \endlink, hilighting the link-to and the link text bits separately.
+syn region doxygenOtherLink matchgroup=doxygenOther start=+link+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial
+syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+
+
+syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
+syn match doxygenLinkRest +[^*@\\]\|\*/\@!\|[@\\]\(endlink\>\)\@!+ contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
+syn match doxygenContinueLinkComment contained +^\s*\*\=[^/]+me=e-1 nextgroup=doxygenLinkRest
+syn match doxygenLinkError "\*/" contained
+" #Link hilighting.
+syn match doxygenHashLink /\([a-zA-Z_][0-9a-zA-Z_]*\)\?#\(\.[0-9a-zA-Z_]\@=\|[a-zA-Z0-9_]\+\|::\|()\)\+/ contained contains=doxygenHashSpecial
+syn match doxygenHashSpecial /#/ contained
+syn match doxygenHyperLink /\(\s\|^\s*\*\?\)\@<=\(http\|https\|ftp\):\/\/[-0-9a-zA-Z_?&=+#%/.!':;@]\+/ contained
+
+" Handle \page. This does not use doxygenBrief.
+syn match doxygenPage "[\\@]page\>"me=s+1 contained skipwhite nextgroup=doxygenPagePage
+syn keyword doxygenPagePage page contained skipwhite nextgroup=doxygenPageIdent
+syn region doxygenPageDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenBody
+syn match doxygenPageIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenPageDesc
+
+" Handle section
+syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent
+syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment
+syn match doxygenSpecialIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc
+
+" Does the one-line description for the one-line type identifiers.
+syn region doxygenSpecialTypeOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
+syn region doxygenSpecialOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
+
+" Handle the multiline description for the multiline type identifiers.
+" Continue until an 'empty' line (can contain a '*' continuation) or until the
+" next whole-line @ command \ command.
+syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([pcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup skipwhite keepend
+syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite
+
+" Handle special cases 'bold' and 'group'
+syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading
+syn keyword doxygenBriefWord contained brief nextgroup=doxygenBriefLine skipwhite
+syn match doxygenSpecialHeading +.\++ contained skipwhite
+syn keyword doxygenGroup contained group nextgroup=doxygenGroupName skipwhite
+syn keyword doxygenGroupName contained +\k\++ nextgroup=doxygenSpecialOnelineDesc skipwhite
+
+" Handle special symbol identifiers @$, @\, @$ etc
+syn match doxygenSymbol contained +[$\\&<>#]+
+
+" Simplistic handling of formula regions
+syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\$+ end=+[@\\]f\$+ contains=doxygenFormulaSpecial,doxygenFormulaOperator
+syn match doxygenFormulaSpecial contained +[@\\]\(f[^$]\|[^f]\)+me=s+1 nextgroup=doxygenFormulaKeyword,doxygenFormulaEscaped
+syn match doxygenFormulaEscaped contained "."
+syn match doxygenFormulaKeyword contained "[a-z]\+"
+syn match doxygenFormulaOperator contained +[_^]+
+
+syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\[+ end=+[@\\]f]+ contains=doxygenFormulaSpecial,doxygenFormulaOperator,doxygenAtom
+syn region doxygenAtom contained transparent matchgroup=doxygenFormulaOperator start=+{+ end=+}+ contains=doxygenAtom,doxygenFormulaSpecial,doxygenFormulaOperator
+
+" Add TODO hilighting.
+syn keyword doxygenTODO contained TODO README XXX FIXME
+
+" Supported HTML subset. Not perfect, but okay.
+syn case ignore
+syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar
+syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite
+syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite
+syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite
+syn match doxygenHtmlExpr contained +"\(\\.\|[^"]\)*"\|'\(\\.\|[^']\)*'+ nextgroup=doxygenHtmlVar skipwhite
+syn case match
+syn match doxygenHtmlSpecial contained "&\(copy\|quot\|[AEIOUYaeiouy]uml\|[AEIOUYaeiouy]acute\|[AEIOUaeiouy]grave\|[AEIOUaeiouy]circ\|[ANOano]tilde\|szlig\|[Aa]ring\|nbsp\|gt\|lt\|amp\);"
+
+syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink
+
+syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment
+" Html Support
+syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop
+hi link doxygenHtmlLink Underlined
+
+syn region doxygenHtmlBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
+syn region doxygenHtmlBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
+syn region doxygenHtmlBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
+syn region doxygenHtmlBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
+syn region doxygenHtmlBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
+syn region doxygenHtmlBoldUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
+syn region doxygenHtmlBoldUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
+syn region doxygenHtmlBoldItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
+
+syn region doxygenHtmlUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBold,doxygenHtmlUnderlineItalic
+syn region doxygenHtmlUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
+syn region doxygenHtmlUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
+syn region doxygenHtmlUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,htmUnderlineItalicBold
+syn region doxygenHtmlUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,htmUnderlineItalicBold
+syn region doxygenHtmlUnderlineItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
+syn region doxygenHtmlUnderlineItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
+syn region doxygenHtmlUnderlineBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
+syn region doxygenHtmlUnderlineBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
+
+syn region doxygenHtmlItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBold,doxygenHtmlItalicUnderline
+syn region doxygenHtmlItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
+syn region doxygenHtmlItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
+syn region doxygenHtmlItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
+syn region doxygenHtmlItalicBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop
+syn region doxygenHtmlItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicUnderlineBold
+syn region doxygenHtmlItalicUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
+syn region doxygenHtmlItalicUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
+
+syn region doxygenHtmlCode contained start="\c<code\>" end="\c</code>"me=e-7 contains=@doxygenHtmlTop
+
+" Prevent the doxygen contained matches from leaking into the c groups.
+syn cluster cParenGroup add=doxygen.*
+syn cluster cParenGroup remove=doxygenComment,doxygenCommentL
+syn cluster cPreProcGroup add=doxygen.*
+syn cluster cMultiGroup add=doxygen.*
+syn cluster rcParenGroup add=doxygen.*
+syn cluster rcParenGroup remove=doxygenComment,doxygenCommentL
+syn cluster rcGroup add=doxygen.*
+
+" Trick to force special doxygen hilighting if the background changes (need to
+" syn clear first)
+if exists("did_doxygen_syntax_inits")
+ if did_doxygen_syntax_inits != &background && synIDattr(highlightID('doxygen_Dummy'), 'fg', 'gui')==''
+ command -nargs=+ SynColor hi <args>
+ unlet did_doxygen_syntax_inits
+ endif
+else
+ command -nargs=+ SynColor hi def <args>
+endif
+
+if !exists("did_doxygen_syntax_inits")
+ command -nargs=+ SynLink hi def link <args>
+ let did_doxygen_syntax_inits = &background
+ hi doxygen_Dummy guifg=black
+
+ fun! s:Doxygen_Hilights_Base()
+ SynLink doxygenHtmlSpecial Special
+ SynLink doxygenHtmlVar Type
+ SynLink doxygenHtmlExpr String
+
+ SynLink doxygenSmallSpecial SpecialChar
+
+ SynLink doxygenSpecialCodeWord doxygenSmallSpecial
+ SynLink doxygenSpecialBoldWord doxygenSmallSpecial
+ SynLink doxygenSpecialEmphasisedWord doxygenSmallSpecial
+ SynLink doxygenSpecialArgumentWord doxygenSmallSpecial
+
+ " SynColor doxygenFormulaKeyword cterm=bold ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
+ SynLink doxygenFormulaKeyword Keyword
+ "SynColor doxygenFormulaEscaped ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
+ SynLink doxygenFormulaEscaped Special
+ SynLink doxygenFormulaOperator Operator
+ SynLink doxygenFormula Statement
+ SynLink doxygenSymbol Constant
+ SynLink doxygenSpecial Special
+ SynLink doxygenFormulaSpecial Special
+ "SynColor doxygenFormulaSpecial ctermfg=DarkBlue guifg=DarkBlue
+ endfun
+ call s:Doxygen_Hilights_Base()
+
+ fun! s:Doxygen_Hilights()
+ " Pick a sensible default for 'codeword'.
+ let font=''
+ if exists('g:doxygen_codeword_font')
+ if g:doxygen_codeword_font !~ '\<\k\+='
+ let font='font='.g:doxygen_codeword_font
+ else
+ let font=g:doxygen_codeword_font
+ endif
+ else
+ " Try and pick a font (only some platforms have been tested).
+ if has('gui_running')
+ if has('gui_gtk2')
+ if &guifont == ''
+ let font="font='FreeSerif 12'"
+ else
+ let font="font='".substitute(&guifont, '^.\{-}\([0-9]\+\)$', 'FreeSerif \1','')."'"
+ endif
+
+ elseif has('gui_win32') || has('gui_win16') || has('gui_win95')
+ if &guifont == ''
+ let font='font=Lucida_Console:h10'
+ else
+ let font='font='.substitute(&guifont, '^[^:]*', 'Lucida_Console','')
+ endif
+ elseif has('gui_athena') || has('gui_gtk') || &guifont=~'^\(-[^-]\+\)\{14}'
+ if &guifont == ''
+ let font='font=-b&h-lucidatypewriter-medium-r-normal-*-*-140-*-*-m-*-iso8859-1'
+ else
+ " let font='font='.substitute(&guifont,'^\(-[^-]\+\)\{7}-\([0-9]\+\).*', '-b\&h-lucidatypewriter-medium-r-normal-*-*-\2-*-*-m-*-iso8859-1','')
+ " The above line works, but it is hard to expect the combination of
+ " the two fonts will look good.
+ endif
+ elseif has('gui_kde')
+ " let font='font=Bitstream\ Vera\ Sans\ Mono/12/-1/5/50/0/0/0/0/0'
+ endif
+ endif
+ endif
+ if font=='' | let font='gui=bold' | endif
+ exe 'SynColor doxygenCodeWord term=bold cterm=bold '.font
+ if (exists('g:doxygen_enhanced_color') && g:doxygen_enhanced_color) || (exists('g:doxygen_enhanced_colour') && g:doxygen_enhanced_colour)
+ if &background=='light'
+ SynColor doxygenComment ctermfg=DarkRed guifg=DarkRed
+ SynColor doxygenBrief cterm=bold ctermfg=Cyan guifg=DarkBlue gui=bold
+ SynColor doxygenBody ctermfg=DarkBlue guifg=DarkBlue
+ SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=DarkRed guifg=firebrick3 gui=bold
+ SynColor doxygenBOther cterm=bold ctermfg=DarkMagenta guifg=#aa50aa gui=bold
+ SynColor doxygenParam ctermfg=DarkGray guifg=#aa50aa
+ SynColor doxygenParamName cterm=italic ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=italic,bold
+ SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=DarkCyan guifg=DodgerBlue3 gui=bold
+ SynColor doxygenSpecialHeading cterm=bold ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=bold
+ SynColor doxygenPrev ctermfg=DarkGreen guifg=DarkGreen
+ else
+ SynColor doxygenComment ctermfg=LightRed guifg=LightRed
+ SynColor doxygenBrief cterm=bold ctermfg=Cyan ctermbg=darkgrey guifg=LightBlue gui=Bold,Italic
+ SynColor doxygenBody ctermfg=Cyan guifg=LightBlue
+ SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=Red guifg=firebrick3 gui=bold
+ SynColor doxygenBOther cterm=bold ctermfg=Magenta guifg=#aa50aa gui=bold
+ SynColor doxygenParam ctermfg=LightGray guifg=LightGray
+ SynColor doxygenParamName cterm=italic ctermfg=LightBlue guifg=LightBlue gui=italic,bold
+ SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=LightCyan guifg=LightCyan gui=bold
+ SynColor doxygenSpecialHeading cterm=bold ctermfg=LightBlue guifg=LightBlue gui=bold
+ SynColor doxygenPrev ctermfg=LightGreen guifg=LightGreen
+ endif
+ else
+ SynLink doxygenComment SpecialComment
+ SynLink doxygenBrief Statement
+ SynLink doxygenBody Comment
+ SynLink doxygenSpecialTypeOnelineDesc Statement
+ SynLink doxygenBOther Constant
+ SynLink doxygenParam SpecialComment
+ SynLink doxygenParamName Underlined
+ SynLink doxygenSpecialOnelineDesc Statement
+ SynLink doxygenSpecialHeading Statement
+ SynLink doxygenPrev SpecialComment
+ endif
+ endfun
+ call s:Doxygen_Hilights()
+ " This is still a proposal, but won't do any harm.
+ au Syntax UserColor_reset nested call s:Doxygen_Hilights_Base()
+ au Syntax UserColor_{on,reset,enable} nested call s:Doxygen_Hilights()
+
+ SynLink doxygenBody Comment
+ SynLink doxygenTODO Todo
+ SynLink doxygenOtherTODO Todo
+ SynLink doxygenOtherWARN Todo
+ SynLink doxygenOtherBUG Todo
+
+ SynLink doxygenErrorSpecial Error
+ SynLink doxygenErrorEnd Error
+ SynLink doxygenErrorComment Error
+ SynLink doxygenLinkError Error
+ SynLink doxygenBriefSpecial doxygenSpecial
+ SynLink doxygenHashSpecial doxygenSpecial
+ SynLink doxygenGroupDefineSpecial doxygenSpecial
+ SynLink doxygenEndlinkSpecial doxygenSpecial
+ SynLink doxygenCodeRegionSpecial doxygenSpecial
+ SynLink doxygenVerbatimRegionSpecial doxygenSpecial
+ SynLink doxygenGroupDefine doxygenParam
+
+ SynLink doxygenSpecialMultilineDesc doxygenSpecialOnelineDesc
+ SynLink doxygenFormulaEnds doxygenSpecial
+ SynLink doxygenBold doxygenParam
+ SynLink doxygenBriefWord doxygenParam
+ SynLink doxygenRetval doxygenParam
+ SynLink doxygenOther doxygenParam
+ SynLink doxygenStart doxygenComment
+ SynLink doxygenStart2 doxygenStart
+ SynLink doxygenComment2 doxygenComment
+ SynLink doxygenCommentL doxygenComment
+ SynLink doxygenContinueComment doxygenComment
+ SynLink doxygenSpecialContinueComment doxygenComment
+ SynLink doxygenSkipComment doxygenComment
+ SynLink doxygenEndComment doxygenComment
+ SynLink doxygenStartL doxygenComment
+ SynLink doxygenBriefEndComment doxygenComment
+ SynLink doxygenPrevL doxygenPrev
+ SynLink doxygenBriefL doxygenBrief
+ SynLink doxygenBriefLine doxygenBrief
+ SynLink doxygenHeaderLine doxygenSpecialHeading
+ SynLink doxygenStartSkip doxygenContinueComment
+ SynLink doxygenLinkWord doxygenParamName
+ SynLink doxygenLinkRest doxygenSpecialMultilineDesc
+ SynLink doxygenHyperLink doxygenLinkWord
+ SynLink doxygenHashLink doxygenLinkWord
+
+ SynLink doxygenPage doxygenSpecial
+ SynLink doxygenPagePage doxygenBOther
+ SynLink doxygenPageIdent doxygenParamName
+ SynLink doxygenPageDesc doxygenSpecialTypeOnelineDesc
+
+ SynLink doxygenSpecialIdent doxygenPageIdent
+ SynLink doxygenSpecialSectionDesc doxygenSpecialMultilineDesc
+
+ SynLink doxygenSpecialRefWord doxygenOther
+ SynLink doxygenRefWord doxygenPageIdent
+ SynLink doxygenContinueLinkComment doxygenComment
+
+ SynLink doxygenHtmlCh Function
+ SynLink doxygenHtmlCmd Statement
+ SynLink doxygenHtmlBoldItalicUnderline doxygenHtmlBoldUnderlineItalic
+ SynLink doxygenHtmlUnderlineBold doxygenHtmlBoldUnderline
+ SynLink doxygenHtmlUnderlineItalicBold doxygenHtmlBoldUnderlineItalic
+ SynLink doxygenHtmlUnderlineBoldItalic doxygenHtmlBoldUnderlineItalic
+ SynLink doxygenHtmlItalicUnderline doxygenHtmlUnderlineItalic
+ SynLink doxygenHtmlItalicBold doxygenHtmlBoldItalic
+ SynLink doxygenHtmlItalicBoldUnderline doxygenHtmlBoldUnderlineItalic
+ SynLink doxygenHtmlItalicUnderlineBold doxygenHtmlBoldUnderlineItalic
+ SynLink doxygenHtmlLink Underlined
+
+ SynLink doxygenParamDirection StorageClass
+
+
+ if !exists("doxygen_my_rendering") && !exists("html_my_rendering")
+ SynColor doxygenBoldWord term=bold cterm=bold gui=bold
+ SynColor doxygenEmphasisedWord term=italic cterm=italic gui=italic
+ SynLink doxygenArgumentWord doxygenEmphasisedWord
+ SynLink doxygenHtmlCode doxygenCodeWord
+ SynLink doxygenHtmlBold doxygenBoldWord
+ SynColor doxygenHtmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
+ SynColor doxygenHtmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
+ SynColor doxygenHtmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
+ SynColor doxygenHtmlUnderline term=underline cterm=underline gui=underline
+ SynColor doxygenHtmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
+ SynColor doxygenHtmlItalic term=italic cterm=italic gui=italic
+ endif
+ delcommand SynLink
+ delcommand SynColor
+endif
+
+if &syntax=='idl'
+ syn cluster idlCommentable add=doxygenComment,doxygenCommentL
+endif
+
+"syn sync clear
+"syn sync maxlines=500
+"syn sync minlines=50
+if v:version >= 600
+syn sync match doxygenComment groupthere cComment "/\@<!/\*"
+syn sync match doxygenSyncComment grouphere doxygenComment "/\@<!/\*[*!]"
+else
+syn sync match doxygencComment groupthere cComment "/\*"
+syn sync match doxygenSyncComment grouphere doxygenComment "/\*[*!]"
+endif
+"syn sync match doxygenSyncComment grouphere doxygenComment "/\*[*!]" contains=doxygenStart,doxygenTODO keepend
+syn sync match doxygenSyncEndComment groupthere NONE "\*/"
+
+if !exists('b:current_syntax')
+ let b:current_syntax = "doxygen"
+else
+ let b:current_syntax = b:current_syntax.'+doxygen'
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+" vim:et sw=2 sts=2
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
index c3cc435cf..971417c39 100644
--- a/runtime/syntax/eruby.vim
+++ b/runtime/syntax/eruby.vim
@@ -1,10 +1,10 @@
" Vim syntax file
-" Language: eRuby
-" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
-" ----------------------------------------------------------------------------
+" Language: eRuby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim
index bdd6e2e74..94434aed3 100644
--- a/runtime/syntax/ruby.vim
+++ b/runtime/syntax/ruby.vim
@@ -1,9 +1,10 @@
" Vim syntax file
-" Language: Ruby
-" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
-" Info: $Id$
-" URL: http://vim-ruby.rubyforge.org
-" Anon CVS: See above site
+" Language: Ruby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Info: $Id$
+" URL: http://vim-ruby.rubyforge.org
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Previous Maintainer: Mirko Nasato
diff --git a/runtime/syntax/smcl.vim b/runtime/syntax/smcl.vim
new file mode 100644
index 000000000..e95cecbda
--- /dev/null
+++ b/runtime/syntax/smcl.vim
@@ -0,0 +1,308 @@
+" stata_smcl.vim -- Vim syntax file for smcl files.
+" Language: SMCL -- Stata Markup and Control Language
+" Maintainer: Jeff Pitblado <jpitblado@stata.com>
+" Last Change: 14apr2006
+" Version: 1.1.1
+" Location: http://www.stata.com/users/jpitblado/files/vimfiles/syntax/stata_smcl.vim
+
+" Log:
+" 20mar2003 updated the match definition for cmdab
+" 14apr2006 'syntax clear' only under version control
+" check for 'b:current_syntax', removed 'did_smcl_syntax_inits'
+
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syntax case match
+
+syn keyword smclCCLword current_date contained
+syn keyword smclCCLword current_time contained
+syn keyword smclCCLword rmsg_time contained
+syn keyword smclCCLword stata_version contained
+syn keyword smclCCLword version contained
+syn keyword smclCCLword born_date contained
+syn keyword smclCCLword flavor contained
+syn keyword smclCCLword SE contained
+syn keyword smclCCLword mode contained
+syn keyword smclCCLword console contained
+syn keyword smclCCLword os contained
+syn keyword smclCCLword osdtl contained
+syn keyword smclCCLword machine_type contained
+syn keyword smclCCLword byteorder contained
+syn keyword smclCCLword sysdir_stata contained
+syn keyword smclCCLword sysdir_updates contained
+syn keyword smclCCLword sysdir_base contained
+syn keyword smclCCLword sysdir_site contained
+syn keyword smclCCLword sysdir_plus contained
+syn keyword smclCCLword sysdir_personal contained
+syn keyword smclCCLword sysdir_oldplace contained
+syn keyword smclCCLword adopath contained
+syn keyword smclCCLword pwd contained
+syn keyword smclCCLword dirsep contained
+syn keyword smclCCLword max_N_theory contained
+syn keyword smclCCLword max_N_current contained
+syn keyword smclCCLword max_k_theory contained
+syn keyword smclCCLword max_k_current contained
+syn keyword smclCCLword max_width_theory contained
+syn keyword smclCCLword max_width_current contained
+syn keyword smclCCLword max_matsize contained
+syn keyword smclCCLword min_matsize contained
+syn keyword smclCCLword max_macrolen contained
+syn keyword smclCCLword macrolen contained
+syn keyword smclCCLword max_cmdlen contained
+syn keyword smclCCLword cmdlen contained
+syn keyword smclCCLword namelen contained
+syn keyword smclCCLword mindouble contained
+syn keyword smclCCLword maxdouble contained
+syn keyword smclCCLword epsdouble contained
+syn keyword smclCCLword minfloat contained
+syn keyword smclCCLword maxfloat contained
+syn keyword smclCCLword epsfloat contained
+syn keyword smclCCLword minlong contained
+syn keyword smclCCLword maxlong contained
+syn keyword smclCCLword minint contained
+syn keyword smclCCLword maxint contained
+syn keyword smclCCLword minbyte contained
+syn keyword smclCCLword maxbyte contained
+syn keyword smclCCLword maxstrvarlen contained
+syn keyword smclCCLword memory contained
+syn keyword smclCCLword maxvar contained
+syn keyword smclCCLword matsize contained
+syn keyword smclCCLword N contained
+syn keyword smclCCLword k contained
+syn keyword smclCCLword width contained
+syn keyword smclCCLword changed contained
+syn keyword smclCCLword filename contained
+syn keyword smclCCLword filedate contained
+syn keyword smclCCLword more contained
+syn keyword smclCCLword rmsg contained
+syn keyword smclCCLword dp contained
+syn keyword smclCCLword linesize contained
+syn keyword smclCCLword pagesize contained
+syn keyword smclCCLword logtype contained
+syn keyword smclCCLword linegap contained
+syn keyword smclCCLword scrollbufsize contained
+syn keyword smclCCLword varlabelpos contained
+syn keyword smclCCLword reventries contained
+syn keyword smclCCLword graphics contained
+syn keyword smclCCLword scheme contained
+syn keyword smclCCLword printcolor contained
+syn keyword smclCCLword adosize contained
+syn keyword smclCCLword maxdb contained
+syn keyword smclCCLword virtual contained
+syn keyword smclCCLword checksum contained
+syn keyword smclCCLword timeout1 contained
+syn keyword smclCCLword timeout2 contained
+syn keyword smclCCLword httpproxy contained
+syn keyword smclCCLword h_current contained
+syn keyword smclCCLword max_matsize contained
+syn keyword smclCCLword min_matsize contained
+syn keyword smclCCLword max_macrolen contained
+syn keyword smclCCLword macrolen contained
+syn keyword smclCCLword max_cmdlen contained
+syn keyword smclCCLword cmdlen contained
+syn keyword smclCCLword namelen contained
+syn keyword smclCCLword mindouble contained
+syn keyword smclCCLword maxdouble contained
+syn keyword smclCCLword epsdouble contained
+syn keyword smclCCLword minfloat contained
+syn keyword smclCCLword maxfloat contained
+syn keyword smclCCLword epsfloat contained
+syn keyword smclCCLword minlong contained
+syn keyword smclCCLword maxlong contained
+syn keyword smclCCLword minint contained
+syn keyword smclCCLword maxint contained
+syn keyword smclCCLword minbyte contained
+syn keyword smclCCLword maxbyte contained
+syn keyword smclCCLword maxstrvarlen contained
+syn keyword smclCCLword memory contained
+syn keyword smclCCLword maxvar contained
+syn keyword smclCCLword matsize contained
+syn keyword smclCCLword N contained
+syn keyword smclCCLword k contained
+syn keyword smclCCLword width contained
+syn keyword smclCCLword changed contained
+syn keyword smclCCLword filename contained
+syn keyword smclCCLword filedate contained
+syn keyword smclCCLword more contained
+syn keyword smclCCLword rmsg contained
+syn keyword smclCCLword dp contained
+syn keyword smclCCLword linesize contained
+syn keyword smclCCLword pagesize contained
+syn keyword smclCCLword logtype contained
+syn keyword smclCCLword linegap contained
+syn keyword smclCCLword scrollbufsize contained
+syn keyword smclCCLword varlabelpos contained
+syn keyword smclCCLword reventries contained
+syn keyword smclCCLword graphics contained
+syn keyword smclCCLword scheme contained
+syn keyword smclCCLword printcolor contained
+syn keyword smclCCLword adosize contained
+syn keyword smclCCLword maxdb contained
+syn keyword smclCCLword virtual contained
+syn keyword smclCCLword checksum contained
+syn keyword smclCCLword timeout1 contained
+syn keyword smclCCLword timeout2 contained
+syn keyword smclCCLword httpproxy contained
+syn keyword smclCCLword httpproxyhost contained
+syn keyword smclCCLword httpproxyport contained
+syn keyword smclCCLword httpproxyauth contained
+syn keyword smclCCLword httpproxyuser contained
+syn keyword smclCCLword httpproxypw contained
+syn keyword smclCCLword trace contained
+syn keyword smclCCLword tracedepth contained
+syn keyword smclCCLword tracesep contained
+syn keyword smclCCLword traceindent contained
+syn keyword smclCCLword traceexapnd contained
+syn keyword smclCCLword tracenumber contained
+syn keyword smclCCLword type contained
+syn keyword smclCCLword level contained
+syn keyword smclCCLword seed contained
+syn keyword smclCCLword searchdefault contained
+syn keyword smclCCLword pi contained
+syn keyword smclCCLword rc contained
+
+" Directive for the contant and current-value class
+syn region smclCCL start=/{ccl / end=/}/ oneline contains=smclCCLword
+
+" The order of the following syntax definitions is roughly that of the on-line
+" documentation for smcl in Stata, from within Stata see help smcl.
+
+" Format directives for line and paragraph modes
+syn match smclFormat /{smcl}/
+syn match smclFormat /{sf\(\|:[^}]\+\)}/
+syn match smclFormat /{it\(\|:[^}]\+\)}/
+syn match smclFormat /{bf\(\|:[^}]\+\)}/
+syn match smclFormat /{inp\(\|:[^}]\+\)}/
+syn match smclFormat /{input\(\|:[^}]\+\)}/
+syn match smclFormat /{err\(\|:[^}]\+\)}/
+syn match smclFormat /{error\(\|:[^}]\+\)}/
+syn match smclFormat /{res\(\|:[^}]\+\)}/
+syn match smclFormat /{result\(\|:[^}]\+\)}/
+syn match smclFormat /{txt\(\|:[^}]\+\)}/
+syn match smclFormat /{text\(\|:[^}]\+\)}/
+syn match smclFormat /{com\(\|:[^}]\+\)}/
+syn match smclFormat /{cmd\(\|:[^}]\+\)}/
+syn match smclFormat /{cmdab:[^:}]\+:[^:}()]*\(\|:\|:(\|:()\)}/
+syn match smclFormat /{hi\(\|:[^}]\+\)}/
+syn match smclFormat /{hilite\(\|:[^}]\+\)}/
+syn match smclFormat /{ul \(on\|off\)}/
+syn match smclFormat /{ul:[^}]\+}/
+syn match smclFormat /{hline\(\| \d\+\| -\d\+\|:[^}]\+\)}/
+syn match smclFormat /{dup \d\+:[^}]\+}/
+syn match smclFormat /{c [^}]\+}/
+syn match smclFormat /{char [^}]\+}/
+syn match smclFormat /{reset}/
+
+" Formatting directives for line mode
+syn match smclFormat /{title:[^}]\+}/
+syn match smclFormat /{center:[^}]\+}/
+syn match smclFormat /{centre:[^}]\+}/
+syn match smclFormat /{center \d\+:[^}]\+}/
+syn match smclFormat /{centre \d\+:[^}]\+}/
+syn match smclFormat /{right:[^}]\+}/
+syn match smclFormat /{lalign \d\+:[^}]\+}/
+syn match smclFormat /{ralign \d\+:[^}]\+}/
+syn match smclFormat /{\.\.\.}/
+syn match smclFormat /{col \d\+}/
+syn match smclFormat /{space \d\+}/
+syn match smclFormat /{tab}/
+
+" Formatting directives for paragraph mode
+syn match smclFormat /{bind:[^}]\+}/
+syn match smclFormat /{break}/
+
+syn match smclFormat /{p}/
+syn match smclFormat /{p \d\+}/
+syn match smclFormat /{p \d\+ \d\+}/
+syn match smclFormat /{p \d\+ \d\+ \d\+}/
+syn match smclFormat /{pstd}/
+syn match smclFormat /{psee}/
+syn match smclFormat /{phang\(\|2\|3\)}/
+syn match smclFormat /{pmore\(\|2\|3\)}/
+syn match smclFormat /{pin\(\|2\|3\)}/
+syn match smclFormat /{p_end}/
+
+syn match smclFormat /{opt \w\+\(\|:\w\+\)\(\|([^)}]*)\)}/
+
+syn match smclFormat /{opth \w*\(\|:\w\+\)(\w*)}/
+syn match smclFormat /{opth "\w\+\((\w\+:[^)}]\+)\)"}/
+syn match smclFormat /{opth \w\+:\w\+(\w\+:[^)}]\+)}/
+
+syn match smclFormat /{dlgtab\s*\(\|\d\+\|\d\+\s\+\d\+\):[^}]\+}/
+
+syn match smclFormat /{p2colset\s\+\d\+\s\+\d\+\s\+\d\+\s\+\d\+}/
+syn match smclFormat /{p2col\s\+:[^{}]*}.*{p_end}/
+syn match smclFormat /{p2col\s\+:{[^{}]*}}.*{p_end}/
+syn match smclFormat /{p2coldent\s*:[^{}]*}.*{p_end}/
+syn match smclFormat /{p2coldent\s*:{[^{}]*}}.*{p_end}/
+syn match smclFormat /{p2line\s*\(\|\d\+\s\+\d\+\)}/
+syn match smclFormat /{p2colreset}/
+
+syn match smclFormat /{synoptset\s\+\d\+\s\+\w\+}/
+syn match smclFormat /{synopt\s*:[^{}]*}.*{p_end}/
+syn match smclFormat /{synopt\s*:{[^{}]*}}.*{p_end}/
+syn match smclFormat /{syntab\s*:[^{}]*}/
+syn match smclFormat /{synopthdr}/
+syn match smclFormat /{synoptline}/
+
+" Link directive for line and paragraph modes
+syn match smclLink /{help [^}]\+}/
+syn match smclLink /{helpb [^}]\+}/
+syn match smclLink /{help_d:[^}]\+}/
+syn match smclLink /{search [^}]\+}/
+syn match smclLink /{search_d:[^}]\+}/
+syn match smclLink /{browse [^}]\+}/
+syn match smclLink /{view [^}]\+}/
+syn match smclLink /{view_d:[^}]\+}/
+syn match smclLink /{news:[^}]\+}/
+syn match smclLink /{net [^}]\+}/
+syn match smclLink /{net_d:[^}]\+}/
+syn match smclLink /{netfrom_d:[^}]\+}/
+syn match smclLink /{ado [^}]\+}/
+syn match smclLink /{ado_d:[^}]\+}/
+syn match smclLink /{update [^}]\+}/
+syn match smclLink /{update_d:[^}]\+}/
+syn match smclLink /{dialog [^}]\+}/
+syn match smclLink /{back:[^}]\+}/
+syn match smclLink /{clearmore:[^}]\+}/
+syn match smclLink /{stata [^}]\+}/
+
+syn match smclLink /{newvar\(\|:[^}]\+\)}/
+syn match smclLink /{var\(\|:[^}]\+\)}/
+syn match smclLink /{varname\(\|:[^}]\+\)}/
+syn match smclLink /{vars\(\|:[^}]\+\)}/
+syn match smclLink /{varlist\(\|:[^}]\+\)}/
+syn match smclLink /{depvar\(\|:[^}]\+\)}/
+syn match smclLink /{depvars\(\|:[^}]\+\)}/
+syn match smclLink /{depvarlist\(\|:[^}]\+\)}/
+syn match smclLink /{indepvars\(\|:[^}]\+\)}/
+
+syn match smclLink /{dtype}/
+syn match smclLink /{ifin}/
+syn match smclLink /{weight}/
+
+" Comment
+syn region smclComment start=/{\*/ end=/}/ oneline
+
+" Strings
+syn region smclString matchgroup=Nothing start=/"/ end=/"/ oneline
+syn region smclEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=smclEString
+
+" assign highlight groups
+
+hi def link smclEString smclString
+
+hi def link smclCCLword Statement
+hi def link smclCCL Type
+hi def link smclFormat Statement
+hi def link smclLink Underlined
+hi def link smclComment Comment
+hi def link smclString String
+
+let b:current_syntax = "stata_smcl"
+
+" vim: ts=8
diff --git a/runtime/syntax/stata.vim b/runtime/syntax/stata.vim
new file mode 100644
index 000000000..49955cc3b
--- /dev/null
+++ b/runtime/syntax/stata.vim
@@ -0,0 +1,449 @@
+" stata.vim -- Vim syntax file for Stata do, ado, and class files.
+" Language: Stata and/or Mata
+" Maintainer: Jeff Pitblado <jpitblado@stata.com>
+" Last Change: 14apr2006
+" Version: 1.1.1
+" Location: http://www.stata.com/users/jpitblado/files/vimfiles/syntax/stata.vim
+
+" Log:
+" 14apr2006 renamed syntax groups st* to stata*
+" 'syntax clear' only under version control
+" check for 'b:current_syntax', removed 'did_stat_syntax_inits'
+
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syntax case match
+
+" comments - single line
+" note that the triple slash continuing line comment comes free
+syn region stataStarComment start=/^\s*\*/ end=/$/ contains=stataComment oneline
+syn region stataSlashComment start="\s//" end=/$/ contains=stataComment oneline
+syn region stataSlashComment start="^//" end=/$/ contains=stataComment oneline
+" comments - multiple line
+syn region stataComment start="/\*" end="\*/" contains=stataComment
+
+" global macros - simple case
+syn match stataGlobal /\$\a\w*/
+" global macros - general case
+syn region stataGlobal start=/\${/ end=/}/ oneline contains=@stataMacroGroup
+" local macros - general case
+syn region stataLocal start=/`/ end=/'/ oneline contains=@stataMacroGroup
+
+" numeric formats
+syn match stataFormat /%-\=\d\+\.\d\+[efg]c\=/
+" numeric hex format
+syn match stataFormat /%-\=21x/
+" string format
+syn match stataFormat /%\(\|-\|\~\)\d\+s/
+
+" Statements
+syn keyword stataConditional else if
+syn keyword stataRepeat foreach
+syn keyword stataRepeat forv[alues]
+syn keyword stataRepeat while
+
+" Common programming commands
+syn keyword stataCommand about
+syn keyword stataCommand adopath
+syn keyword stataCommand adoupdate
+syn keyword stataCommand assert
+syn keyword stataCommand break
+syn keyword stataCommand by
+syn keyword stataCommand cap[ture]
+syn keyword stataCommand cd
+syn keyword stataCommand chdir
+syn keyword stataCommand checksum
+syn keyword stataCommand class
+syn keyword stataCommand classutil
+syn keyword stataCommand compress
+syn keyword stataCommand conf[irm]
+syn keyword stataCommand conren
+syn keyword stataCommand continue
+syn keyword stataCommand cou[nt]
+syn keyword stataCommand cscript
+syn keyword stataCommand cscript_log
+syn keyword stataCommand #delimit
+syn keyword stataCommand d[escribe]
+syn keyword stataCommand dir
+syn keyword stataCommand discard
+syn keyword stataCommand di[splay]
+syn keyword stataCommand do
+syn keyword stataCommand doedit
+syn keyword stataCommand drop
+syn keyword stataCommand edit
+syn keyword stataCommand end
+syn keyword stataCommand erase
+syn keyword stataCommand eret[urn]
+syn keyword stataCommand err[or]
+syn keyword stataCommand e[xit]
+syn keyword stataCommand expand
+syn keyword stataCommand expandcl
+syn keyword stataCommand file
+syn keyword stataCommand findfile
+syn keyword stataCommand format
+syn keyword stataCommand g[enerate]
+syn keyword stataCommand gettoken
+syn keyword stataCommand gl[obal]
+syn keyword stataCommand help
+syn keyword stataCommand hexdump
+syn keyword stataCommand include
+syn keyword stataCommand infile
+syn keyword stataCommand infix
+syn keyword stataCommand input
+syn keyword stataCommand insheet
+syn keyword stataCommand joinby
+syn keyword stataCommand la[bel]
+syn keyword stataCommand levelsof
+syn keyword stataCommand list
+syn keyword stataCommand loc[al]
+syn keyword stataCommand log
+syn keyword stataCommand ma[cro]
+syn keyword stataCommand mark
+syn keyword stataCommand markout
+syn keyword stataCommand marksample
+syn keyword stataCommand mata
+syn keyword stataCommand matrix
+syn keyword stataCommand memory
+syn keyword stataCommand merge
+syn keyword stataCommand mkdir
+syn keyword stataCommand more
+syn keyword stataCommand net
+syn keyword stataCommand nobreak
+syn keyword stataCommand n[oisily]
+syn keyword stataCommand note[s]
+syn keyword stataCommand numlist
+syn keyword stataCommand outfile
+syn keyword stataCommand outsheet
+syn keyword stataCommand _parse
+syn keyword stataCommand pause
+syn keyword stataCommand plugin
+syn keyword stataCommand post
+syn keyword stataCommand postclose
+syn keyword stataCommand postfile
+syn keyword stataCommand preserve
+syn keyword stataCommand print
+syn keyword stataCommand printer
+syn keyword stataCommand profiler
+syn keyword stataCommand pr[ogram]
+syn keyword stataCommand q[uery]
+syn keyword stataCommand qui[etly]
+syn keyword stataCommand rcof
+syn keyword stataCommand reg[ress]
+syn keyword stataCommand rename
+syn keyword stataCommand repeat
+syn keyword stataCommand replace
+syn keyword stataCommand reshape
+syn keyword stataCommand ret[urn]
+syn keyword stataCommand _rmcoll
+syn keyword stataCommand _rmcoll
+syn keyword stataCommand _rmcollright
+syn keyword stataCommand rmdir
+syn keyword stataCommand _robust
+syn keyword stataCommand save
+syn keyword stataCommand sca[lar]
+syn keyword stataCommand search
+syn keyword stataCommand serset
+syn keyword stataCommand set
+syn keyword stataCommand shell
+syn keyword stataCommand sleep
+syn keyword stataCommand sort
+syn keyword stataCommand split
+syn keyword stataCommand sret[urn]
+syn keyword stataCommand ssc
+syn keyword stataCommand su[mmarize]
+syn keyword stataCommand syntax
+syn keyword stataCommand sysdescribe
+syn keyword stataCommand sysdir
+syn keyword stataCommand sysuse
+syn keyword stataCommand token[ize]
+syn keyword stataCommand translate
+syn keyword stataCommand type
+syn keyword stataCommand unab
+syn keyword stataCommand unabcmd
+syn keyword stataCommand update
+syn keyword stataCommand use
+syn keyword stataCommand vers[ion]
+syn keyword stataCommand view
+syn keyword stataCommand viewsource
+syn keyword stataCommand webdescribe
+syn keyword stataCommand webseek
+syn keyword stataCommand webuse
+syn keyword stataCommand which
+syn keyword stataCommand who
+syn keyword stataCommand window
+
+" Literals
+syn match stataQuote /"/
+syn region stataEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=@stataMacroGroup,stataQuote,stataString,stataEString
+syn region stataString matchgroup=Nothing start=/"/ end=/"/ oneline contains=@stataMacroGroup
+
+" define clusters
+syn cluster stataFuncGroup contains=@stataMacroGroup,stataFunc,stataString,stataEstring
+syn cluster stataMacroGroup contains=stataGlobal,stataLocal
+syn cluster stataParenGroup contains=stataParenError,stataBracketError,stataBraceError,stataSpecial,stataFormat
+
+" Stata functions
+" Math
+syn region stataFunc matchgroup=Function start=/abs(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/acos(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/asin(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/atan(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/atan2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/atanh(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ceil(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/cloglog(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/comb(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/cos(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/digamma(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/exp(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/floor(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/int(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invcloglog(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invlogit(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ln(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lnfact(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lnfactorial(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lngamma(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/log(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/log10(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/logit(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/max(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mod(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/reldif(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/round(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/sign(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/sin(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/sqrt(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/sum(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/tan(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/tanh(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/trigamma(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/trunc(/ end=/)/ contains=@stataFuncGroup
+" Probability distriubtions and density functions
+syn region stataFunc matchgroup=Function start=/betaden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/Binomial(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/binorm(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/binormal(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/chi2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/chi2tail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dgammapda(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dgammapdada(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dgammapdadx(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dgammapdx(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dgammapdxdx(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/F(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/Fden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/Ftail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/gammaden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/gammap(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ibeta(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invbinomial(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invchi2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invchi2tail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invF(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invgammap(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invnchi2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invnorm(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invnormal(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invttail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lnnormal(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lnnormalden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nbetaden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nchi2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nFden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nFtail(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nibeta(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/norm(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/normal(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/normalden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/normden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/npnchi2(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/tden(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ttail(/ end=/)/ contains=@stataFuncGroup
+" Random numbers
+syn region stataFunc matchgroup=Function start=/uniform(/ end=/)/ contains=@stataFuncGroup
+" String
+syn region stataFunc matchgroup=Function start=/abbrev(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/hchar(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/indexnot(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/itrim(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/length(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/lower(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ltrim(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/plural(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/proper(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/real(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/regexm(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/regexr(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/regexs(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/reverse(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/rtrim(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/string(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/strlen(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/strmatch(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/strpos(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/subinstr(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/subinword(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/substr(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/trim(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/upper(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/word(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/wordcount(/ end=/)/ contains=@stataFuncGroup
+" Programming
+syn region stataFunc matchgroup=Function start=/autocode(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/byteorder(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/c(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/_caller(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/chop(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/clip(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/cond(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/e(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/epsdouble(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/epsfloat(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/float(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/inlist(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/inrange(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/irecode(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/matrix(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/maxbyte(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/maxdouble(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/maxfloat(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/maxint(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/maxlong(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mi(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/minbyte(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mindouble(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/minfloat(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/minint(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/minlong(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/missing(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/r(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/recode(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/replay(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/return(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/s(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/scalar(/ end=/)/ contains=@stataFuncGroup
+" Date
+syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/date(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/day(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dow(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/doy(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/halfyear(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mdy(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/month(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/quarter(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/week(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/year(/ end=/)/ contains=@stataFuncGroup
+" Time-series
+syn region stataFunc matchgroup=Function start=/daily(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/halfyearly(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/monthly(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/quarterly(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/weekly(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/yearly(/ end=/)/ contains=@stataFuncGroup
+"
+syn region stataFunc matchgroup=Function start=/yh(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/ym(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/yq(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/yw(/ end=/)/ contains=@stataFuncGroup
+"
+syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/h(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/m(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/q(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/w(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/y(/ end=/)/ contains=@stataFuncGroup
+"
+syn region stataFunc matchgroup=Function start=/dofd(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dofh(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dofm(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dofq(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dofw(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/dofy(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/hofd(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mofd(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/qofd(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/wofd(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/yofd(/ end=/)/ contains=@stataFuncGroup
+"
+syn region stataFunc matchgroup=Function start=/tin(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/twithin(/ end=/)/ contains=@stataFuncGroup
+" Matrix
+syn region stataFunc matchgroup=Function start=/colnumb(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/colsof(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/det(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/diag0cnt(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/el(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/issymmetric(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/matmissing(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/mreldif(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/rownumb(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/rowsof(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/trace(/ end=/)/ contains=@stataFuncGroup
+"
+syn region stataFunc matchgroup=Function start=/cholsky(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/corr(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/diag(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/get(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/hadamard(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/I(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/inv(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/invsym(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/J(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/matuniform(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/nullmat(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/sweep(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/vec(/ end=/)/ contains=@stataFuncGroup
+syn region stataFunc matchgroup=Function start=/vecdiag(/ end=/)/ contains=@stataFuncGroup
+
+" Errors to catch
+" taken from $VIMRUNTIME/syntax/c.vim
+" catch errors caused by wrong parenthesis, braces and brackets
+syn region stataParen transparent start=/(/ end=/)/ contains=ALLBUT,@stataParenGroup,stataErrInBracket,stataErrInBrace
+syn region stataBracket transparent start=/\[/ end=/]/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBrace
+syn region stataBrace transparent start=/{/ end=/}/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBracket
+syn match stataParenError /[\])}]/
+syn match stataBracketError /]/
+syn match stataBraceError /}/
+syn match stataErrInParen contained /[\]{}]/
+syn match stataErrInBracket contained /[){}]/
+syn match stataErrInBrace contained /[)\]]/
+
+" assign highlight groups
+hi def link stataBraceError stataError
+hi def link stataBracketError stataError
+hi def link stataErrInBrace stataError
+hi def link stataErrInBracket stataError
+hi def link stataErrInParen stataError
+hi def link stataEString stataString
+hi def link stataFormat stataSpecial
+hi def link stataGlobal stataMacro
+hi def link stataLocal stataMacro
+hi def link stataParenError stataError
+hi def link stataSlashComment stataComment
+hi def link stataStarComment stataComment
+
+hi def link stataCommand Define
+hi def link stataComment Comment
+hi def link stataConditional Conditional
+hi def link stataError Error
+hi def link stataFunc None
+hi def link stataMacro Define
+hi def link stataRepeat Repeat
+hi def link stataSpecial SpecialChar
+hi def link stataString String
+
+let b:current_syntax = "stata"
+
+" vim: ts=8