Skip to content
Snippets Groups Projects
Commit c6249bb2 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

updated for version 7.0d05

parent 01a347a1
No related branches found
No related tags found
No related merge requests found
Showing
with 1737 additions and 68 deletions
" 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:
" 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
......
" 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
......
" 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:
......
*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
......
......@@ -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*
......
*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:
......
" 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
......
" 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"))
......
" 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
......
" 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:
......@@ -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>
......
This diff is collapsed.
" 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
......
" 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
......
" 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
This diff is collapsed.
......@@ -3997,13 +3997,15 @@ addstar(fname, len, context)
vim_strncpy(retval, fname, len);
/*
* Don't add a star to ~, ~user, $var or `cmd`.
* Don't add a star to *, ~, ~user, $var or `cmd`.
* * would become **, which walks the whole tree.
* ~ would be at the start of the file name, but not the tail.
* $ could be anywhere in the tail.
* ` could be anywhere in the file name.
*/
tail = gettail(retval);
if ((*retval != '~' || tail != retval)
&& (len == 0 || retval[len - 1] != '*')
&& vim_strchr(tail, '$') == NULL
&& vim_strchr(retval, '`') == NULL)
retval[len++] = '*';
......
......@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70d"
#define VIM_VERSION_SHORT "7.0d"
#define VIM_VERSION_MEDIUM "7.0d04 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14, compiled "
#define VIM_VERSION_MEDIUM "7.0d05 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d05 BETA (2006 Apr 15)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d05 BETA (2006 Apr 15, compiled "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment