Compare commits

...

65 Commits

Author SHA1 Message Date
Bram Moolenaar
3d0a603fa9 updated for version 7.0195 2006-02-09 23:54:54 +00:00
Bram Moolenaar
754b56089f updated for version 7.0195 2006-02-09 23:53:20 +00:00
Bram Moolenaar
cf0c554e3f updated for version 7.0195 2006-02-09 23:48:02 +00:00
Bram Moolenaar
8b6144bdfe updated for version 7.0194 2006-02-08 09:20:24 +00:00
Bram Moolenaar
9f2c6e1deb updated for version 7.0193 2006-02-04 22:45:44 +00:00
Bram Moolenaar
a65576059f updated for version 7.0193 2006-02-04 22:43:20 +00:00
Bram Moolenaar
41cabdadc2 updated for version 7.0193 2006-02-04 22:38:56 +00:00
Bram Moolenaar
a37420f46f updated for version 7.0193 2006-02-04 22:37:47 +00:00
Bram Moolenaar
0e5bd96f84 updated for version 7.0192 2006-02-04 00:59:56 +00:00
Bram Moolenaar
986920760e updated for version 7.0192 2006-02-04 00:57:42 +00:00
Bram Moolenaar
49315f65c9 updated for version 7.0192 2006-02-04 00:54:59 +00:00
Bram Moolenaar
1ef15e30a0 updated for version 7.0191 2006-02-01 21:56:25 +00:00
Bram Moolenaar
afeb4fa8a7 updated for version 7.0191 2006-02-01 21:51:12 +00:00
Bram Moolenaar
b8a7b560b1 updated for version 7.0191 2006-02-01 21:47:16 +00:00
Bram Moolenaar
280f126ef0 updated for version 7.0189 2006-01-30 00:14:18 +00:00
Bram Moolenaar
17c7c01170 updated for version 7.0188 2006-01-26 22:25:15 +00:00
Bram Moolenaar
51156d5a87 updated for version 7.0188 2006-01-26 22:17:47 +00:00
Bram Moolenaar
6ab5b84db4 updated for version 7.0188 2006-01-26 22:16:34 +00:00
Bram Moolenaar
d12f5c17be updated for version 7.0187 2006-01-25 22:10:52 +00:00
Bram Moolenaar
28c258fd24 updated for version 7.0187 2006-01-25 22:02:51 +00:00
Bram Moolenaar
7df351eb8a updated for version 7.0186 2006-01-23 22:30:28 +00:00
Bram Moolenaar
09df3127f4 updated for version 7.0186 2006-01-23 22:23:09 +00:00
Bram Moolenaar
33aec765bd updated for version 7.0185 2006-01-22 23:30:12 +00:00
Bram Moolenaar
71fe80dddd updated for version 7.0185 2006-01-22 23:25:56 +00:00
Bram Moolenaar
66fa271a25 updated for version 7.0185 2006-01-22 23:22:22 +00:00
Bram Moolenaar
0ac9379acf updated for version 7.0184 2006-01-21 22:16:51 +00:00
Bram Moolenaar
c716c306e9 updated for version 7.0184 2006-01-21 22:12:51 +00:00
Bram Moolenaar
b1b715d1fb updated for version 7.0184 2006-01-21 22:09:43 +00:00
Bram Moolenaar
b71eaaeaa8 updated for version 7.0183 2006-01-20 23:10:18 +00:00
Bram Moolenaar
2d3f489e09 updated for version 7.0183 2006-01-20 23:02:51 +00:00
Bram Moolenaar
8ada17c4d9 updated for version 7.0182 2006-01-19 22:16:24 +00:00
Bram Moolenaar
05a7bb363b updated for version 7.0182 2006-01-19 22:09:32 +00:00
Bram Moolenaar
c32840f267 updated for version 7.0181 2006-01-14 21:23:38 +00:00
Bram Moolenaar
04dbce064e updated for version 7.0181 2006-01-14 21:20:41 +00:00
Bram Moolenaar
316059c019 updated for version 7.0181 2006-01-14 21:18:42 +00:00
Bram Moolenaar
ea8bd73212 updated for version 7.0181 2006-01-14 21:15:59 +00:00
Bram Moolenaar
a40ceaf88a updated for version 7.0180 2006-01-13 22:35:40 +00:00
Bram Moolenaar
4770d09abd updated for version 7.0179 2006-01-12 23:22:24 +00:00
Bram Moolenaar
1cbe5f739d updated for version 7.0178 2005-12-29 22:51:09 +00:00
Bram Moolenaar
c7486e034e updated for version 7.0178 2005-12-29 22:48:26 +00:00
Bram Moolenaar
86e01085a1 updated for version 7.0178 2005-12-29 22:45:34 +00:00
Bram Moolenaar
371baa928d updated for version 7.0178 2005-12-29 22:43:53 +00:00
Bram Moolenaar
ebefac63f3 updated for version 7.0177 2005-12-28 22:39:57 +00:00
Bram Moolenaar
cc984263d7 updated for version 7.0176 2005-12-23 22:19:46 +00:00
Bram Moolenaar
0ce33f34a4 updated for version 7.0176 2005-12-23 22:16:03 +00:00
Bram Moolenaar
8fa0445c4f updated for version 7.0176 2005-12-23 22:13:51 +00:00
Bram Moolenaar
5c2f050d91 updated for version 7.0176 2005-12-23 22:11:04 +00:00
Bram Moolenaar
f4cd3e8074 updated for version 7.0175 2005-12-22 22:47:02 +00:00
Bram Moolenaar
bb1004ee56 updated for version 7.0174 2005-12-19 22:15:59 +00:00
Bram Moolenaar
a9b1e74b5d updated for version 7.0174 2005-12-19 22:14:58 +00:00
Bram Moolenaar
195d6357b4 updated for version 7.0174 2005-12-19 22:08:24 +00:00
Bram Moolenaar
46b8015066 updated for version 7.0174 2005-12-19 22:06:56 +00:00
Bram Moolenaar
e3226be91a updated for version 7.0173 2005-12-18 22:10:00 +00:00
Bram Moolenaar
d35f9711d4 updated for version 7.0173 2005-12-18 22:02:33 +00:00
Bram Moolenaar
da1b1a7357 updated for version 7.0173 2005-12-18 21:59:16 +00:00
Bram Moolenaar
3b18181f28 updated for version 7.0172 2005-12-17 22:10:02 +00:00
Bram Moolenaar
acf534595b updated for version 7.0172 2005-12-17 22:06:52 +00:00
Bram Moolenaar
97d29a1ace updated for version 7.0172 2005-12-17 22:02:57 +00:00
Bram Moolenaar
146522e760 updated for version 7.0171 2005-12-16 21:55:46 +00:00
Bram Moolenaar
83c465c705 updated for version 7.0171 2005-12-16 21:53:56 +00:00
Bram Moolenaar
12033fb4bf updated for version 7.0171 2005-12-16 21:49:31 +00:00
Bram Moolenaar
bca84a12bd updated for version 7.0170 2005-12-14 22:08:35 +00:00
Bram Moolenaar
38f1825274 updated for version 7.0170 2005-12-14 22:04:43 +00:00
Bram Moolenaar
61da4986dd updated for version 7.0170 2005-12-14 22:02:18 +00:00
Bram Moolenaar
6496966ad1 updated for version 7.0170 2005-12-14 21:59:55 +00:00
192 changed files with 14614 additions and 4321 deletions

View File

@@ -77,6 +77,7 @@ SRC_ALL = \
src/testdir/*.in \
src/testdir/test[0-9]*.ok \
src/testdir/test49.vim \
src/testdir/test60.vim \
src/proto.h \
src/proto/buffer.pro \
src/proto/charset.pro \
@@ -683,6 +684,9 @@ LANG_GEN_BIN = \
runtime/spell/en.ascii.spl \
runtime/spell/en.latin1.spl \
runtime/spell/en.utf-8.spl \
runtime/spell/en.ascii.sug \
runtime/spell/en.latin1.sug \
runtime/spell/en.utf-8.sug \
# all files for lang archive
LANG_SRC = \

View File

@@ -1,13 +1,13 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Oct 06
" Last Change: 2006 Feb 06
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including "." and "->".
" Locate the start of the item, including ".", "->" and "[...]".
let line = getline('.')
let start = col('.') - 1
let lastword = -1
@@ -24,6 +24,21 @@ function! ccomplete#Complete(findstart, base)
let lastword = start
endif
let start -= 2
elseif line[start - 1] == ']'
" Skip over [...].
let n = 0
let start -= 1
while start > 0
let start -= 1
if line[start] == '['
if n == 0
break
endif
let n -= 1
elseif line[start] == ']' " nested []
let n += 1
endif
endwhile
else
break
endif
@@ -43,20 +58,53 @@ function! ccomplete#Complete(findstart, base)
let base = s:prepended . a:base
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
endif
" Split item in words, keep empty word after "." or "->".
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
let items = split(base, '\.\|->', 1)
if len(items) <= 1
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
" We can't use split, because we need to skip nested [...].
let items = []
let s = 0
while 1
let e = match(base, '\.\|->\|\[', s)
if e < 0
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s))
endif
break
endif
" Only one part, no "." or "->": complete from tags file.
" When local completion is wanted CTRL-N would have been used.
return map(taglist('^' . base), 'v:val["name"]')
endif
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s, e - s))
endif
if base[e] == '.'
let s = e + 1 " skip over '.'
elseif base[e] == '-'
let s = e + 2 " skip over '->'
else
" Skip over [...].
let n = 0
let s = e
let e += 1
while e < len(base)
if base[e] == ']'
if n == 0
break
endif
let n -= 1
elseif base[e] == '[' " nested [...]
let n += 1
endif
let e += 1
endwhile
let e += 1
call add(items, strpart(base, s, e - s))
let s = e
endif
endwhile
" Find the variable items[0].
" 1. in current function (like with "gd")
@@ -68,7 +116,33 @@ function! ccomplete#Complete(findstart, base)
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
if len(items) == 1
" Completing one word and it's a local variable: May add '[', '.' or
" '->'.
let match = items[0]
if match(line, match . '\s*\[') > 0
let match .= '['
else
let res = s:Nextitem(strpart(line, 0, col), [''], 0)
if len(res) > 0
" There are members, thus add "." or "->".
if match(line, '\*[ \t(]*' . match . '\>') > 0
let match .= '->'
else
let match .= '.'
endif
endif
endif
let res = [{'match': match, 'tagline' : ''}]
else
" Completing "var.", "var.something", etc.
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0)
endif
endif
if len(items) == 1
" Only one part, no "." or "->": complete from tags file.
call extend(res, map(taglist('^' . base), 's:Tag2item(v:val)'))
endif
if len(res) == 0
@@ -87,8 +161,8 @@ function! ccomplete#Complete(findstart, base)
if diclist[i]['kind'] == 'v'
let line = diclist[i]['cmd']
if line[0] == '/' && line[1] == '^'
let col = match(line, items[0])
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:]))
let col = match(line, '\<' . items[0] . '\>')
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0))
endif
endif
endfor
@@ -99,27 +173,77 @@ function! ccomplete#Complete(findstart, base)
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0)
endif
" If the one and only match was what's already there and it is a composite
" type, add a "." or "->".
if len(res) == 1 && res[0]['match'] == items[-1] && len(s:SearchMembers(res, [''])) > 0
" If the last item(s) are [...] they need to be added to the matches.
let last = len(items) - 1
let brackets = ''
while last >= 0
if items[last][0] != '['
break
endif
let brackets = items[last] . brackets
let last -= 1
endwhile
return map(res, 's:Tagline2item(v:val, brackets)')
endfunc
function! s:GetAddition(line, match, memarg, bracket)
" Guess if the item is an array.
if a:bracket && match(a:line, a:match . '\s*\[') > 0
return '['
endif
" Check if the item has members.
if len(s:SearchMembers(a:memarg, [''])) > 0
" If there is a '*' before the name use "->".
if match(res[0]['tagline'], '\*\s*' . res[0]['match']) > 0
let res[0]['match'] .= '->'
if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0
return '->'
else
let res[0]['match'] .= '.'
return '.'
endif
endif
return ''
endfunction
" Turn the tag info "val" into an item for completion.
" "val" is is an item in the list returned by taglist().
" If it is a variable we may add "." or "->". Don't do it for other types,
" such as a typedef, by not including the info that s:GetAddition() uses.
function! s:Tag2item(val)
let x = substitute(a:val['cmd'], '^/^', '', '')
let x = substitute(x, '$/$', '', '')
let x = substitute(x, a:val['name'], '@@', '')
if has_key(a:val, "kind")
if a:val["kind"] == 'v'
return {'match': a:val['name'], 'tagline': "\t" . a:val['cmd'], 'dict': a:val, 'extra': x}
endif
if a:val["kind"] == 'f'
return {'match': a:val['name'] . '(', 'tagline': "", 'extra': x}
endif
endif
return {'match': a:val['name'], 'tagline': '', 'extra': x}
endfunction
" Turn a match item "val" into an item for completion.
" "val['match']" is the matching item.
" "val['tagline']" is the tagline in which the last part was found.
function! s:Tagline2item(val, brackets)
let word = a:val['match'] . a:brackets . s:GetAddition(a:val['tagline'], a:val['match'], [a:val], a:brackets == '')
if has_key(a:val, 'extra')
return {'word': word, 'menu': a:val['extra']}
endif
return {'word': word, 'menu': substitute(a:val['tagline'], word, '@@', '')}
endfunction
return map(res, 'v:val["match"]')
endfunc
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" When resolving typedefs "depth" is used to avoid infinite recursion.
" Return the list of matches.
function! s:Nextitem(lead, items)
function! s:Nextitem(lead, items, depth)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
@@ -135,7 +259,7 @@ function! s:Nextitem(lead, items)
endif
" TODO: add more reserved words
if index(['int', 'float', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
continue
endif
@@ -172,9 +296,9 @@ function! s:Nextitem(lead, items)
if name != ''
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items))
endif
else
elseif a:depth < 10
" Could be "typedef other_T some_T".
call extend(res, s:Nextitem(cmdtokens[0], a:items))
call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1))
endif
endif
endif
@@ -188,6 +312,7 @@ function! s:Nextitem(lead, items)
endfunction
" Search for members of structure "typename" in tags files.
" Return a list with resulting matches.
" Each match is a dictionary with "match" and "tagline" entries.
function! s:StructMembers(typename, items)
@@ -218,14 +343,21 @@ function! s:StructMembers(typename, items)
endfor
if len(matches) > 0
" No further items, return the result.
if len(a:items) == 1
return matches
endif
" Skip over [...] items
let idx = 1
while 1
if idx >= len(a:items)
return matches " No further items, return the result.
endif
if a:items[idx][0] != '['
break
endif
let idx += 1
endwhile
" More items following. For each of the possible members find the
" matching following members.
return s:SearchMembers(matches, a:items[1:])
return s:SearchMembers(matches, a:items[idx :])
endif
" Failed to find anything.
@@ -236,19 +368,29 @@ endfunction
function! s:SearchMembers(matches, items)
let res = []
for i in range(len(a:matches))
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e > 0
" Use typename field
let name = matchstr(line, '[^\t]*', e)
call extend(res, s:StructMembers(name, a:items))
let typename = ''
if has_key(a:matches[i], 'dict')
if has_key(a:matches[i].dict, 'typename')
let typename = a:matches[i].dict['typename']
endif
let line = "\t" . a:matches[i].dict['cmd']
else
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e > 0
" Use typename field
let typename = matchstr(line, '[^\t]*', e)
endif
endif
if typename != ''
call extend(res, s:StructMembers(typename, a:items))
else
" Use the search command (the declaration itself).
let s = match(line, '\t\zs/^')
if s > 0
let e = match(line, a:matches[i]['match'], s)
let e = match(line, '\<' . a:matches[i]['match'] . '\>', s)
if e > 0
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items))
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0))
endif
endif
endif

View File

@@ -1,27 +1,30 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Now 20
" Last Change: 2006 Feb 6
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
let start -= 1
endwhile
" Handling of entities {{{
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
" }}}
" Handling of <style> tag {{{
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
let curpos = line('.')
if stylestart <= curpos && styleend >= curpos
if stylestart <= curline && styleend >= curline
let start = col('.') - 1
let b:csscompl = 1
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
@@ -29,9 +32,80 @@ function! htmlcomplete#CompleteTags(findstart, base)
endwhile
endif
endif
if !exists("b:csscompl")
" }}}
" Handling of <script> tag {{{
let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
let scriptend = searchpair('<script\>', '', '<\/script\>', "nW")
if scriptstart != 0 && scriptend != 0
if scriptstart <= curline && scriptend >= curline
let start = col('.') - 1
let b:jscompl = 1
let b:jsrange = [scriptstart, scriptend]
while start >= 0 && line[start - 1] =~ '\w'
let start -= 1
endwhile
" We are inside of <script> tag. But we should also get contents
" of all linked external files and (secondary, less probably) other <script> tags
" This logic could possible be done in separate function - may be
" reused in events scripting (also with option could be reused for
" CSS
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
call cursor(l,c)
unlet! l c
endif
endif
" }}}
if !exists("b:csscompl") && !exists("b:jscompl")
let b:compl_context = getline('.')[0:(compl_begin)]
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines.
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline)
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$'
" Normal tag line, no need for completion at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Return proper start for on-events. Without that beginning of
" completion will be badly reported
if b:compl_context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
let start = col('.') - 1
while start >= 0 && line[start - 1] =~ '\w'
let start -= 1
endwhile
endif
else
let b:compl_context = getline('.')[0:compl_begin]
endif
@@ -42,13 +116,24 @@ function! htmlcomplete#CompleteTags(findstart, base)
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
unlet! b:compl_context
" Check if we should do CSS completion inside of <style> tag
" or JS completion inside of <script> tag
if exists("b:csscompl")
unlet! b:csscompl
let context = b:compl_context
unlet! b:compl_context
return csscomplete#CompleteCSS(0, context)
elseif exists("b:jscompl")
unlet! b:jscompl
return javascriptcomplete#CompleteJS(0, a:base)
else
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '.\zs.*')
endif
" Make entities completion
unlet! b:compl_context
" Entities completion {{{
if exists("b:entitiescompl")
unlet! b:entitiescompl
@@ -58,20 +143,36 @@ function! htmlcomplete#CompleteTags(findstart, base)
let entities = g:xmldata_xhtml10s['vimxmlentities']
for m in entities
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
if len(a:base) == 1
for m in entities
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in entities
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res + res2
endif
return res
endif
" }}}
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action - with one exception: <style> span { bo
if context =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, context)
elseif context =~ 'script[^>]\{-}>[^<]\{-}$'
let b:jsrange = [line('.'), search('<\/script\>', 'nW')]
return javascriptcomplete#CompleteJS(0, context)
else
return []
endif
@@ -84,13 +185,11 @@ function! htmlcomplete#CompleteTags(findstart, base)
\ "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"]
let focus = ["accesskey", "tabindex", "onfocus", "onblur"]
let coregroup = coreattrs + i18n + events
" find tags matching with "context"
" If context contains > it means we are already outside of tag and we
" should abandon action
" If context contains white space it is attribute.
" It could be also value of attribute...
" We have to get first word to offer
" proper completions
" It can be also value of attribute.
" We have to get first word to offer proper completions
if context == ''
let tag = ''
else
@@ -102,11 +201,12 @@ function! htmlcomplete#CompleteTags(findstart, base)
" 1. Events attributes
if context =~ '\s'
" Sort out style, class, and on* cases
if context =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
if context =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~? "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
" Id, class completion {{{
if context =~? "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~? "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "class"
elseif context =~ "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
@@ -269,17 +369,59 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
elseif context =~ "style\\s*=\\s*[\"'][^\"']*$"
elseif context =~? "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
let stripbase = matchstr(context, ".*\\(on[a-z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" }}}
" Complete on-events {{{
if context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
" We have to:
" 1. Find external files
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
" 2. Find at least one <script> tag
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
" 3. Proper call for javascriptcomplete#CompleteJS
call cursor(l,c)
let js_context = matchstr(a:base, '\w\+$')
let js_shortcontext = substitute(a:base, js_context.'$', '', '')
let b:compl_context = context
let b:jsrange = [l, l]
unlet! l c
"return map(javascriptcomplete#CompleteJS(0, js_context), 'js_shortcontext.v:val')
return javascriptcomplete#CompleteJS(0, js_context)
endif
" }}}
let stripbase = matchstr(context, ".*\\(on[a-zA-Z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" Now we have context stripped from all chars up to style/class.
" It may fail with some strange style value combinations.
if stripbase !~ "[\"']"
return []
endif
endif
" Value of attribute completion {{{
" If attr contains =\s*[\"'] we catched value of attribute
if attr =~ "=\s*[\"']"
" Let do attribute specific completion
@@ -355,6 +497,8 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
endif
" }}}
" Attribute completion {{{
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
if tag =~ '^\(abbr\|acronym\|address\|b\|bdo\|big\|caption\|cite\|code\|dd\|dfn\|div\|dl\|dt\|em\|fieldset\|h\d\|hr\|i\|kbd\|li\|noscript\|ol\|p\|samp\|small\|span\|strong\|sub\|sup\|tt\|ul\|var\)$'
@@ -448,7 +592,8 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
endif
" Close tag
" }}}
" Close tag {{{
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
@@ -456,10 +601,20 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
if opentag == ''
" Hack for sometimes failing GetLastOpenTag.
" As far as I tested fail isn't GLOT fault but problem
" of invalid document - not properly closed tags and other mish-mash.
" If returns empty string assume <body>. Safe bet.
let opentag = 'body'
endif
" }}}
" Load data {{{
if !exists("g:xmldata_xhtml10s")
runtime! autoload/xml/xhtml10s.vim
endif
" }}}
" Tag completion {{{
let tags = g:xmldata_xhtml10s[opentag][0]
@@ -473,5 +628,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
" }}}
endif
endfunction
" vim:set foldmethod=marker:

View File

@@ -0,0 +1,596 @@
" Vim completion script
" Language: Java Script
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Feb 6
function! javascriptcomplete#CompleteJS(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
" Bit risky but JS is rather limited language and local chars shouldn't
" fint way into names
while start >= 0 && line[start - 1] =~ '\w'
let start -= 1
endwhile
let b:compl_context = getline('.')[0:compl_begin]
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
" Shortcontext is context without a:base, useful for checking if we are
" looking for objects and for what objects we are looking for
let context = b:compl_context
let shortcontext = substitute(context, a:base.'$', '', '')
unlet! b:compl_context
if exists("b:jsrange")
let file = getline(b:jsrange[0],b:jsrange[1])
unlet! b:jsrange
if len(b:js_extfiles) > 0
let file = b:js_extfiles + file
endif
else
let file = getline(1, '$')
endif
" Completion of properties, methods, etc. {{{
if shortcontext =~ '\.$'
" Complete methods and properties for objects
" DOM separate
let doms = ['style.']
" Arrays
let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype']
let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift',
\ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf',
\ 'watch', 'unwatch']
call map(arraymeth, 'v:val."("')
let arrays = arrayprop + arraymeth
" Boolean - complete subset of array values
" properties - constructor, prototype
" methods - toSource, toString, valueOf
" Date
" properties - constructor, prototype
let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds',
\ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset',
\ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds',
\ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
\ 'getYear', 'parse', 'parse',
\ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds',
\ 'setMinutes', 'setMonth', 'setSeconds',
\ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds',
\ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime',
\ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString',
\ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch']
call map(datemeth, 'v:val."("')
let dates = datemeth
" Function
let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length',
\ 'arity', 'constructor', 'length', 'prototype']
let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf']
call map(funcmeth, 'v:val."("')
let funcs = funcprop + funcmeth
" Math
let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT']
let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor',
\ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan',
\ 'watch', 'unwatch']
call map(mathmeth, 'v:val."("')
let maths = mathprop + mathmeth
" Number
let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY',
\ 'constructor', 'prototype']
let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf',
\ 'watch', 'unwatch']
call map(numbmeth, 'v:val."("')
let numbs = numbprop + numbmeth
" Object
let objeprop = ['constructor', 'prototype']
let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf']
call map(objemeth, 'v:val."("')
let objes = objeprop + objemeth
" RegExp
let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
let regemeth = ['exec', 'test', 'toSource', 'toString', 'watch', 'unwatch']
call map(regemeth, 'v:val."("')
let reges = regeprop + regemeth
" String
let striprop = ['constructor', 'length', 'prototype']
let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat',
\ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics',
\ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small',
\ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase',
\ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch']
call map(strimeth, 'v:val."("')
let stris = striprop + strimeth
" User created properties
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\w"')
let juser_props1 = join(user_props1, ' ')
let user_props1 = split(juser_props1, '\zethis\.')
unlet! juser_props1
call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\w\\+\\ze")')
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\w"')
let juser_props2 = join(user_props2, ' ')
let user_props2 = split(juser_props2, '\zeprototype\.')
unlet! juser_props2
call map(user_props2, 'matchstr(v:val, "prototype\\.\\zs\\w\\+\\ze")')
let user_props = user_props1 + user_props2
" HTML DOM properties
" Anchors - anchor.
let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML',
\ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus']
let anchmeth = ['blur', 'focus']
call map(anchmeth, 'v:val."("')
let anths = anchprop + anchmeth
" Area - area.
let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id',
\ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target']
let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver']
call map(areameth, 'v:val."("')
let areas = areaprop + areameth
" Base - base.
let baseprop = ['href', 'id', 'target']
let bases = baseprop
" Body - body.
let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop',
\ 'text', 'vLink']
let bodys = bodyprop
" Document - document.
let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
call map(documeth, 'v:val."("')
let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild',
\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType',
\ 'nodeValue', 'ownerDocument', 'parentNode', 'previousSibling']
let docuxmeth = ['createAttribute', 'createCDATASection',
\ 'createComment', 'createDocument', 'createDocumentFragment',
\ 'createElement', 'createEntityReference', 'createProcessingInstruction',
\ 'createTextNode']
call map(docuxmeth, 'v:val."("')
let docus = docuprop + docuxprop + documeth + docuxmeth
" Form - form.
let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length',
\ 'method', 'name', 'tabIndex', 'target']
let formmeth = ['reset', 'submit', 'onReset', 'onSubmit']
call map(formmeth, 'v:val."("')
let forms = formprop + formmeth
" Frame - frame.
let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'noResize', 'scrolling', 'src']
let frammeth = ['blur', 'focus']
call map(frammeth, 'v:val."("')
let frams = framprop + frammeth
" Frameset - frameset.
let fsetprop = ['cols', 'id', 'rows']
let fsetmeth = ['blur', 'focus']
call map(fsetmeth, 'v:val."("')
let fsets = fsetprop + fsetmeth
" History - history.
let histprop = ['length']
let histmeth = ['back', 'forward', 'go']
call map(histmeth, 'v:val."("')
let hists = histprop + histmeth
" Iframe - iframe.
let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'scrolling', 'src', 'width']
let ifras = ifraprop
" Image - image.
let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
\ 'lowSrc', 'name', 'src', 'useMap', 'vspace', 'width']
let imagmeth = ['onAbort', 'onError', 'onLoad']
call map(imagmeth, 'v:val."("')
let imags = histprop + imagmeth
" Button - accessible only by other properties
let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(buttmeth, 'v:val."("')
let butts = buttprop + buttmeth
" Checkbox - accessible only by other properties
let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(checmeth, 'v:val."("')
let checs = checprop + checmeth
" File upload - accessible only by other properties
let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(filemeth, 'v:val."("')
let files = fileprop + filemeth
" Hidden - accessible only by other properties
let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value']
let hidds = hiddprop
" Password - accessible only by other properties
let passprop = ['accept', 'accessKey', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex',
\ 'type', 'value']
let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp']
call map(passmeth, 'v:val."("')
let passs = passprop + passmeth
" Radio - accessible only by other properties
let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(radimeth, 'v:val."("')
let radis = radiprop + radimeth
" Reset - accessible only by other properties
let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(resemeth, 'v:val."("')
let reses = reseprop + resemeth
" Submit - accessible only by other properties
let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart']
call map(submmeth, 'v:val."("')
let subms = submprop + submmeth
" Text - accessible only by other properties
let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly',
\ 'size', 'tabIndex', 'type', 'value']
let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp', 'onSelect']
call map(textmeth, 'v:val."("')
let texts = textprop + textmeth
" Link - link.
let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media',
\ 'rel', 'rev', 'target', 'type']
let linkmeth = ['onLoad']
call map(linkmeth, 'v:val."("')
let links = linkprop + linkmeth
" Location - location.
let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol',
\ 'search']
let locameth = ['assign', 'reload', 'replace']
call map(locameth, 'v:val."("')
let locas = locaprop + locameth
" Meta - meta.
let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme']
let metas = metaprop
" Navigator - navigator.
let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled',
\ 'platform', 'userAgent']
let navimeth = ['javaEnabled', 'taintEnabled']
call map(navimeth, 'v:val."("')
let navis = naviprop + navimeth
" Object - object.
let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data',
\ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex',
\ 'type', 'useMap', 'vspace', 'width']
let objes = objeprop
" Option - accessible only by other properties
let optiprop = ['defaultSelected',
\ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value']
let optis = optiprop
" Screen - screen.
let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width']
let scres = screprop
" Select - accessible only by other properties
let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name',
\ 'selectedIndex', 'size', 'tabIndex', 'type', 'value']
let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus']
call map(selemeth, 'v:val."("')
let seles = seleprop + selemeth
" Style - style.
let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
\ 'backgroundPosition', 'backgroundRepeat',
\ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop',
\ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor',
\ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle',
\ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth',
\ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom',
\ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth',
\ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom',
\ 'paddingLeft', 'paddingRight', 'paddingTop',
\ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content',
\ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction',
\ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight',
\ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility',
\ 'width',
\ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType',
\ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex',
\ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside',
\ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout',
\ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
\ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes',
\ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition',
\ 'unicodeBidi', 'whiteSpace', 'wordSpacing']
let styls = stylprop
" Table - table.
let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding',
\ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width']
let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow',
\ 'deleteTFoot', 'deleteTHead', 'insertRow']
call map(tablmeth, 'v:val."("')
let tabls = tablprop + tablmeth
" Table data - TableData.
let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff',
\ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width']
let tdats = tdatprop
" Table row - TableRow.
let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex',
\ 'vAlign']
let trowmeth = ['deleteCell', 'insertCell']
call map(trowmeth, 'v:val."("')
let trows = trowprop + trowmeth
" Textarea - accessible only by other properties
let tareprop = ['accessKey', 'cols', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
\ 'tabIndex', 'type', 'value', 'selectionStart', 'selectionEnd']
let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus']
call map(taremeth, 'v:val."("')
let tares = tareprop + taremeth
" Window - window.
let windprop = ['frames', 'closed', 'defaultStatus', 'encodeURI', 'event', 'history',
\ 'length', 'location', 'name', 'onload', 'opener', 'parent', 'screen', 'self',
\ 'status', 'top', 'XMLHttpRequest', 'ActiveXObject']
let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus',
\ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval',
\ 'setTimeout']
call map(windmeth, 'v:val."("')
let winds = windprop + windmeth
" XMLHttpRequest - access by new xxx()
let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
\ 'status', 'statusText', 'parseError']
let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open',
\ 'send', 'setRequestHeader']
call map(xmlhmeth, 'v:val."("')
let xmlhs = xmlhprop + xmlhmeth
" XML DOM
" Attributes - element.attributes[x].
let xdomattrprop = ['name', 'specified', 'value']
" Element - anyelement.
let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName']
let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode',
\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize',
\ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild',
\ 'setAttribute', 'setAttributeNode']
call map(xdomelemmeth, 'v:val."("')
let xdomelems = xdomelemprop + xdomelemmeth
" Node - anynode.
let xdomnodeprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling']
let xdomnodemeth = ['appendChild', 'cloneNode',
\ 'hasChildNodes', 'insertBefore', 'removeChild', 'replaceChild']
call map(xdomnodemeth, 'v:val."("')
let xdomnodes = xdomnodeprop + xdomnodemeth
" NodeList
let xdomnliss = ['length', 'item(']
" Error - parseError.
let xdomerror = ['errorCode', 'reason', 'line', 'linepos', 'srcText', 'url', 'filepos']
" Find object type declaration to reduce number of suggestions. {{{
" 1. Get object name
" 2. Find object declaration line
" 3. General declaration follows "= new Type" syntax, additional else
" for regexp "= /re/"
" 4. Make correction for Microsoft.XMLHTTP ActiveXObject
" 5. Repeat for external files
let object = matchstr(shortcontext, '\zs\w\+\ze\(\[.\{-}\]\)\?\.$')
if len(object) > 0
let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
if decl_line > 0
let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\w\+\ze')
if object_type == 'ActiveXObject' && matchstr(getline(decl_line), object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let decl_line = search('var\s*'.object.'\s*=\s*\/', 'bn')
if decl_line > 0
let object_type = 'RegExp'
endif
endif
" We didn't find var declaration in current file but we may have
" something in external files.
if decl_line == 0 && exists("b:js_extfiles")
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "'.object.'.\\{-}=\\s*new\\s*"')
if len(dext_line) > 0
let object_type = matchstr(dext_line[-1], object.'.\{-}=\s*new\s*\zs\w\+\ze')
if object_type == 'ActiveXObject' && matchstr(dext_line[-1], object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "var\s*'.object.'\\s*=\\s*\\/"')
if len(dext_line) > 0
let object_type = 'RegExp'
endif
endif
endif
endif
" }}}
if !exists('object_type')
let object_type = ''
endif
if object_type == 'Date'
let values = dates
elseif object_type == 'Image'
let values = imags
elseif object_type == 'Array'
let values = arrays
elseif object_type == 'Boolean'
" TODO: a bit more than real boolean
let values = arrays
elseif object_type == 'XMLHttpRequest'
let values = xmlhs
elseif object_type == 'String'
let values = stris
elseif object_type == 'RegExp'
let values = reges
elseif object_type == 'Math'
let values = maths
endif
if !exists('values')
" List of properties
if shortcontext =~ 'Math\.$'
let values = maths
elseif shortcontext =~ 'anchors\(\[.\{-}\]\)\?\.$'
let values = anths
elseif shortcontext =~ 'area\.$'
let values = areas
elseif shortcontext =~ 'base\.$'
let values = bases
elseif shortcontext =~ 'body\.$'
let values = bodys
elseif shortcontext =~ 'document\.$'
let values = docus
elseif shortcontext =~ 'forms\(\[.\{-}\]\)\?\.$'
let values = forms
elseif shortcontext =~ 'frameset\.$'
let values = fsets
elseif shortcontext =~ 'history\.$'
let values = hists
elseif shortcontext =~ 'iframe\.$'
let values = ifras
elseif shortcontext =~ 'images\(\[.\{-}\]\)\?\.$'
let values = imags
elseif shortcontext =~ 'links\(\[.\{-}\]\)\?\.$'
let values = links
elseif shortcontext =~ 'location\.$'
let values = locas
elseif shortcontext =~ 'meta\.$'
let values = metas
elseif shortcontext =~ 'navigator\.$'
let values = navis
elseif shortcontext =~ 'object\.$'
let values = objes
elseif shortcontext =~ 'screen\.$'
let values = scres
elseif shortcontext =~ 'style\.$'
let values = styls
elseif shortcontext =~ 'table\.$'
let values = tabls
elseif shortcontext =~ 'TableData\.$'
let values = tdats
elseif shortcontext =~ 'TableRow\.$'
let values = trows
elseif shortcontext =~ 'window\.$'
let values = winds
elseif shortcontext =~ 'parseError\.$'
let values = xdomerror
elseif shortcontext =~ 'attributes\[\d\+\]\.$'
let values = xdomattrprop
else
let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris
let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists
let values += ifras + imags + links + locas + metas + navis + objes + scres
let values += tabls + trows + tares + winds
let values += xdomnodes + xdomnliss + xdomelems
endif
endif
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
unlet! values
return res + res2
endif
" }}}
" Get variables data.
let variables = filter(copy(file), 'v:val =~ "var\\s"')
call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")')
call map(variables, 'substitute(v:val, ";\\|$", ",", "g")')
let vars = []
" This loop (and next one) is necessary to get variable names from
" constructs like: var var1, var2, var3 = "something";
for i in range(len(variables))
let comma_separated = split(variables[i], ',\s*')
call map(comma_separated, 'matchstr(v:val, "\\w\\+")')
let vars += comma_separated
endfor
let variables = sort(vars)
unlet! vars
" Add "no var" variables.
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\w\\+\\s*="')
let u_vars = []
for i in range(len(undeclared_variables))
let split_equal = split(undeclared_variables[i], '\s*=')
call map(split_equal, 'matchstr(v:val, "\\w\\+$")')
let u_vars += split_equal
endfor
let variables += sort(u_vars)
unlet! u_vars
" Get functions
let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
let arguments = copy(functions)
call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\w\\+")')
call map(functions, 'v:val."("')
let functions = sort(functions)
" Get functions arguments
call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")')
let jargs = join(arguments, ',')
let jargs = substitute(jargs, '\s', '', 'g')
let arguments = split(jargs, ',')
let arguments = sort(arguments)
" Built-in functions
let builtin = ['alert(', 'confirm(']
" Top-level HTML DOM objects
let htmldom = ['document', 'anchor', 'area', 'base', 'body', 'document', 'event', 'form', 'frame', 'frameset', 'history', 'iframe', 'image', 'input', 'link', 'location', 'meta', 'navigator', 'object', 'option', 'screen', 'select', 'table', 'tableData', 'tableHeader', 'tableRow', 'textarea', 'window']
call map(htmldom, 'v:val."."')
" Top-level properties
let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
\ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat',
\ 'parseInt', 'String', 'undefined', 'escape', 'unescape']
" Keywords
let keywords = ["Array", "Boolean", "Date", "Function", "Math", "Number", "Object", "RegExp", "String", "XMLHttpRequest", "ActiveXObject", "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double ", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in ", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super ", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"]
let values = variables + functions + htmldom + arguments + builtin + properties + keywords
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
return res + res2
endfunction
" vim:set foldmethod=marker:

View File

@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION
" Date: Nov 28, 2005
" Version: 76
" Date: Jan 30, 2006
" Version: 78
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v76"
let g:loaded_netrw = "v78"
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish
@@ -32,8 +32,12 @@ let s:keepcpo= &cpo
set cpo&vim
" call Decho("doing autoload/netrw.vim")
" ======================
" Netrw Variables: {{{1
" ======================
" ---------------------------------------------------------------------
" Default values for netrw's global protocol variables {{{1
" Default values for netrw's global protocol variables {{{2
if !exists("g:netrw_dav_cmd")
let g:netrw_dav_cmd = "cadaver"
endif
@@ -84,14 +88,17 @@ if has("win32") || has("win95") || has("win64") || has("win16")
endif
" ---------------------------------------------------------------------
" Default values for netrw's global variables {{{1
" Default values - a-c ---------- {{{2
" Default values for netrw's global variables {{{2
" Default values - a-c ---------- {{{3
if !exists("g:netrw_alto")
let g:netrw_alto= 0
endif
if !exists("g:netrw_altv")
let g:netrw_altv= 0
endif
if !exists("g:netrw_browse_split")
let g:netrw_browse_split= 0
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell == "bash"
@@ -103,7 +110,7 @@ if !exists("g:netrw_cygwin")
let g:netrw_cygwin= 0
endif
endif
" Default values - d-f ---------- {{{2
" Default values - d-f ---------- {{{3
if !exists("g:NETRW_DIRHIST_CNT")
let g:NETRW_DIRHIST_CNT= 0
endif
@@ -123,7 +130,7 @@ endif
if !exists("g:netrw_ftpmode")
let g:netrw_ftpmode= "binary"
endif
" Default values - h-lh ---------- {{{2
" Default values - h-lh ---------- {{{3
if !exists("g:netrw_hide")
let g:netrw_hide= 1
endif
@@ -142,7 +149,7 @@ endif
if !exists("g:netrw_list_hide")
let g:netrw_list_hide= ""
endif
" Default values - lh-lz ---------- {{{2
" Default values - lh-lz ---------- {{{3
if !exists("g:netrw_local_mkdir")
let g:netrw_local_mkdir= "mkdir"
endif
@@ -159,7 +166,7 @@ endif
if g:netrw_longlist == 1
let g:netrw_list_cmd= g:netrw_list_cmd." -l"
endif
" Default values - m-r ---------- {{{2
" Default values - m-r ---------- {{{3
if !exists("g:netrw_maxfilenamelen")
let g:netrw_maxfilenamelen= 32
endif
@@ -178,7 +185,7 @@ endif
if !exists("g:netrw_rmf_cmd")
let g:netrw_rmf_cmd = g:netrw_ssh_cmd." HOSTNAME rm -f"
endif
" Default values - s ---------- {{{2
" Default values - s ---------- {{{3
if exists("g:netrw_silent") && g:netrw_silent != 0
let g:netrw_silentxfer= "silent "
else
@@ -198,7 +205,7 @@ endif
if !exists("g:netrw_ssh_browse_reject")
let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
endif
" Default values - t-w ---------- {{{2
" Default values - t-w ---------- {{{3
if !exists("g:netrw_timefmt")
let g:netrw_timefmt= "%c"
endif
@@ -209,7 +216,7 @@ if !exists("g:netrw_winsize")
let g:netrw_winsize= ""
endif
" ---------------------------------------------------------------------
" Default values for netrw's script variables: {{{1
" Default values for netrw's script variables: {{{2
if !exists("s:netrw_cd_escape")
if has("win32") || has("win95") || has("win64") || has("win16")
let s:netrw_cd_escape="#% "
@@ -230,8 +237,12 @@ endif
" files read by network transfer aren't appropriately highlighted.
"let g:decho_bufenter = 1 "Decho
" ==============================
" Netrw Utility Functions: {{{1
" ==============================
" ------------------------------------------------------------------------
" NetSavePosn: saves position of cursor on screen {{{1
" NetSavePosn: saves position of cursor on screen {{{2
fun! netrw#NetSavePosn()
" call Dfunc("NetSavePosn()")
" Save current line and column
@@ -248,7 +259,7 @@ fun! netrw#NetSavePosn()
endfun
" ------------------------------------------------------------------------
" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{1
" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{2
fun! netrw#NetRestorePosn()
" call Dfunc("NetRestorePosn() winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline)
let eikeep= &ei
@@ -275,15 +286,19 @@ fun! netrw#NetRestorePosn()
" call Dret("NetRestorePosn")
endfun
" ===============================
" Netrw Transfer Functions: {{{1
" ===============================
" ------------------------------------------------------------------------
" NetRead: responsible for reading a file over the net {{{1
" NetRead: responsible for reading a file over the net {{{2
fun! netrw#NetRead(...)
" call Dfunc("NetRead(a:1<".a:1.">)")
" save options
call s:NetOptionSave()
" Special Exception: if a file is named "0r", then
" Special Exception: if a file is named "0r", then {{{3
" "0r" will be used to read the
" following files instead of "r"
if a:0 == 0
@@ -297,7 +312,7 @@ fun! netrw#NetRead(...)
let ichoice = 1
endif
" get name of a temporary file and set up shell-quoting character
" get name of a temporary file and set up shell-quoting character {{{3
let tmpfile= tempname()
let tmpfile= substitute(tmpfile,'\','/','ge')
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
@@ -377,7 +392,7 @@ fun! netrw#NetRead(...)
let tmpfile = fnamemodify(tmpfile,':t')
endif
" Determine method of read (ftp, rcp, etc)
" Determine method of read (ftp, rcp, etc) {{{3
call s:NetMethod(choice)
" Check if NetBrowse() should be handling this request
@@ -389,21 +404,21 @@ fun! netrw#NetRead(...)
endif
" use filename's suffix for the temporary file
if b:netrw_fname =~ '\.[^./]\+'
let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)','\1','e')
if b:netrw_fname =~ '\.[^./]\+$'
let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)$','\1','e')
let tmpfile= substitute(tmpfile,"$",suffix,'e')
" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix)")
" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">")
endif
" ============
" Perform Read
" ============
" Perform Protocol-Based Read {{{3
" ===========================
if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
echo "(netrw) Processing your read request..."
endif
".........................................
" rcp: NetRead Method #1
" rcp: NetRead Method #1 {{{3
if b:netrw_method == 1 " read with rcp
" call Decho("read via rcp (method #1)")
" ER: noting done with g:netrw_uid yet?
@@ -430,7 +445,7 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" ftp + <.netrc>: NetRead Method #2
" ftp + <.netrc>: NetRead Method #2 {{{3
elseif b:netrw_method == 2 " read with ftp + <.netrc>
" call Decho("read via ftp+.netrc (method #2)")
let netrw_fname= b:netrw_fname
@@ -460,7 +475,7 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" ftp + machine,id,passwd,filename: NetRead Method #3
" ftp + machine,id,passwd,filename: NetRead Method #3 {{{3
elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname
" Construct execution string (four lines) which will be passed through filter
" call Decho("read via ftp+mipf (method #3)")
@@ -512,7 +527,7 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" scp: NetRead Method #4
" scp: NetRead Method #4 {{{3
elseif b:netrw_method == 4 " read with scp
" call Decho("read via scp (method #4)")
if exists("g:netrw_port") && g:netrw_port != ""
@@ -522,17 +537,18 @@ fun! netrw#NetRead(...)
endif
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile
else
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".tmpfile
endif
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
elseif b:netrw_method == 5 " read with http (wget)
" http: NetRead Method #5 (wget) {{{3
elseif b:netrw_method == 5
" call Decho("read via http (method #5)")
if g:netrw_http_cmd == ""
if !exists("g:netrw_quiet")
@@ -564,8 +580,8 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" cadaver: NetRead Method #6
elseif b:netrw_method == 6 " read with cadaver
" cadaver: NetRead Method #6 {{{3
elseif b:netrw_method == 6
" call Decho("read via cadaver (method #6)")
" Construct execution string (four lines) which will be passed through filter
@@ -596,8 +612,8 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" rsync: NetRead Method #7
elseif b:netrw_method == 7 " read with rsync
" rsync: NetRead Method #7 {{{3
elseif b:netrw_method == 7
" call Decho("read via rsync (method #7)")
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
@@ -611,9 +627,9 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" fetch: NetRead Method #8
" fetch: NetRead Method #8 {{{3
" fetch://[user@]host[:http]/path
elseif b:netrw_method == 8 " read with fetch
elseif b:netrw_method == 8
if g:netrw_fetch_cmd == ""
if !exists("g:netrw_quiet")
echohl Error | echo "***netrw*** fetch command not available" | echohl None
@@ -640,8 +656,8 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
" sftp: NetRead Method #9
elseif b:netrw_method == 9 " read with sftp
" sftp: NetRead Method #9 {{{3
elseif b:netrw_method == 9
" call Decho("read via sftp (method #4)")
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
@@ -656,12 +672,13 @@ fun! netrw#NetRead(...)
let b:netrw_lastfile = choice
".........................................
else " Complain
" Complain {{{3
else
echo "***warning*** unable to comply with your request<" . choice . ">"
endif
endwhile
" cleanup
" cleanup {{{3
" call Decho("cleanup")
if exists("b:netrw_method")
unlet b:netrw_method
@@ -673,7 +690,7 @@ fun! netrw#NetRead(...)
endfun
" ------------------------------------------------------------------------
" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{1
" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
fun! s:NetGetFile(readcmd, tfile, method)
" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
@@ -715,13 +732,14 @@ fun! s:NetGetFile(readcmd, tfile, method)
elseif rfile =~ '\.tar$'
call tar#Browse(tfile)
else
" call Decho("edit temporary file")
e
endif
" rename buffer back to remote filename
keepalt exe "file ".rfile
keepalt exe "file ".escape(rfile,' ')
filetype detect
" call Dredir("ls!","renamed buffer back to remote filename<".rfile.">")
" call Dredir("ls!","renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">")
let line1 = 1
let line2 = line("$")
@@ -764,7 +782,7 @@ fun! s:NetGetFile(readcmd, tfile, method)
endfun
" ------------------------------------------------------------------------
" NetWrite: responsible for writing a file over the net {{{1
" NetWrite: responsible for writing a file over the net {{{2
fun! netrw#NetWrite(...) range
" call Dfunc("NetWrite(a:0=".a:0.")")
@@ -772,7 +790,7 @@ fun! netrw#NetWrite(...) range
let mod= 0
call s:NetOptionSave()
" Get Temporary Filename
" Get Temporary Filename {{{3
let tmpfile= tempname()
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
echohl Error | echo "***netrw*** your ".substitute(tmpfile,'[^/]\+$','','e')." directory is missing!"
@@ -800,6 +818,7 @@ fun! netrw#NetWrite(...) range
while ichoice <= a:0
" Process arguments: {{{3
" attempt to repeat with previous host-file-etc
if exists("b:netrw_lastfile") && a:0 == 0
" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
@@ -860,19 +879,19 @@ fun! netrw#NetWrite(...) range
let tmpfile = fnamemodify(tmpfile,':t')
endif
" Determine method of read (ftp, rcp, etc)
" Determine method of read (ftp, rcp, etc) {{{3
call s:NetMethod(choice)
" =============
" Perform Write
" =============
" Perform Protocol-Based Write {{{3
" ============================
if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
echo "(netrw) Processing your write request..."
endif
".........................................
" rcp: NetWrite Method #1
if b:netrw_method == 1 " write with rcp
" rcp: NetWrite Method #1 {{{3
if b:netrw_method == 1
" call Decho("write via rcp (method #1)")
if s:netrw_has_nt_rcp == 1
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
@@ -892,8 +911,8 @@ fun! netrw#NetWrite(...) range
let b:netrw_lastfile = choice
".........................................
" ftp + <.netrc>: NetWrite Method #2
elseif b:netrw_method == 2 " write with ftp + <.netrc>
" ftp + <.netrc>: NetWrite Method #2 {{{3
elseif b:netrw_method == 2
let netrw_fname = b:netrw_fname
new
setlocal ff=unix
@@ -920,8 +939,8 @@ fun! netrw#NetWrite(...) range
let b:netrw_lastfile = choice
".........................................
" ftp + machine, id, passwd, filename: NetWrite Method #3
elseif b:netrw_method == 3 " write with ftp + machine, id, passwd, and fname
" ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3
elseif b:netrw_method == 3
let netrw_fname= b:netrw_fname
new
setlocal ff=unix
@@ -964,8 +983,8 @@ fun! netrw#NetWrite(...) range
bd!
".........................................
" scp: NetWrite Method #4
elseif b:netrw_method == 4 " write with scp
" scp: NetWrite Method #4 {{{3
elseif b:netrw_method == 4
if exists("g:netrw_port") && g:netrw_port != ""
let useport= " -P ".g:netrw_port
else
@@ -973,16 +992,16 @@ fun! netrw#NetWrite(...) range
endif
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
else
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
endif
let b:netrw_lastfile = choice
".........................................
" http: NetWrite Method #5
" http: NetWrite Method #5 {{{3
elseif b:netrw_method == 5
if !exists("g:netrw_quiet")
echohl Error | echo "***netrw*** currently <netrw.vim> does not support writing using http:" | echohl None
@@ -990,8 +1009,8 @@ fun! netrw#NetWrite(...) range
endif
".........................................
" dav: NetWrite Method #6
elseif b:netrw_method == 6 " write with cadaver
" dav: NetWrite Method #6 (cadaver) {{{3
elseif b:netrw_method == 6
" call Decho("write via cadaver (method #6)")
" Construct execution string (four lines) which will be passed through filter
@@ -1020,8 +1039,8 @@ fun! netrw#NetWrite(...) range
let b:netrw_lastfile = choice
".........................................
" rsync: NetWrite Method #7
elseif b:netrw_method == 7 " write with rsync
" rsync: NetWrite Method #7 {{{3
elseif b:netrw_method == 7
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
@@ -1033,8 +1052,8 @@ fun! netrw#NetWrite(...) range
let b:netrw_lastfile = choice
".........................................
" scp: NetWrite Method #9
elseif b:netrw_method == 9 " write with sftp
" sftp: NetWrite Method #9 {{{3
elseif b:netrw_method == 9
let netrw_fname= b:netrw_fname
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
let uid_machine = g:netrw_uid .'@'. g:netrw_machine
@@ -1051,12 +1070,13 @@ fun! netrw#NetWrite(...) range
let b:netrw_lastfile= choice
".........................................
else " Complain
" Complain {{{3
else
echo "***warning*** unable to comply with your request<" . choice . ">"
endif
endwhile
" cleanup
" cleanup {{{3
" call Decho("cleanup")
let result=delete(tmpfile)
call s:NetOptionRestore()
@@ -1072,6 +1092,7 @@ endfun
" Remote Directory Browsing Support: {{{1
" ===========================================
" ---------------------------------------------------------------------
" NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2
" of the contents of a remote directory. It is assumed that the
" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted
@@ -1235,10 +1256,10 @@ fun! s:NetBrowse(dirname)
" call Decho("exe file ".escape(bufname,s:netrw_cd_escape))
exe 'file '.escape(bufname,s:netrw_cd_escape)
" call Decho("renaming file to bufname<".bufname.">")
setlocal bh=hide bt=nofile nobl nonu
setlocal bh=hide bt=nofile nobl nonu noswf
" save current directory on directory history list
call <SID>NetBookmarkDir(3,expand("%"))
call s:NetBookmarkDir(3,expand("%"))
" set up buffer-local mappings
" call Decho("set up buffer-local mappings")
@@ -1256,6 +1277,7 @@ fun! s:NetBrowse(dirname)
nnoremap <buffer> <silent> i :call <SID>NetLongList(0)<cr>
nnoremap <buffer> <silent> o :call <SID>NetSplit(0)<cr>
nnoremap <buffer> <silent> O :call <SID>NetObtain()<cr>
nnoremap <buffer> <silent> P :call <SID>NetPrevWinOpen(0)<cr>
nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,expand("%"))<cr>
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
@@ -1263,7 +1285,7 @@ fun! s:NetBrowse(dirname)
nnoremap <buffer> <silent> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
nnoremap <buffer> <silent> v :call <SID>NetSplit(1)<cr>
nnoremap <buffer> <silent> x :call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
nnoremap <buffer> <silent> x :call netrw#NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
nnoremap <buffer> <silent> <2-leftmouse> :call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
exe 'nnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
exe 'vnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
@@ -1446,6 +1468,13 @@ fun! s:NetBrowseChgDir(dirname,newdir)
if newdir !~ '[\/]$'
" handling a file
let dirname= dirname.newdir
if g:netrw_browse_split == 1
new
wincmd _
elseif g:netrw_browse_split == 2
rightb vert new
wincmd |
endif
" call Decho("handling a file: dirname<".dirname.">")
elseif newdir == './'
@@ -1479,7 +1508,7 @@ fun! s:NetBrowseChgDir(dirname,newdir)
endfun
" ---------------------------------------------------------------------
" NetGetWord: it gets the directory named under the cursor
" NetGetWord: it gets the directory named under the cursor {{{2
fun! s:NetGetWord()
" call Dfunc("NetGetWord() line#".line("."))
call s:UseBufWinVars()
@@ -1651,7 +1680,7 @@ fun! s:NetBrowseRm(usrhost,path) range
" refresh the directory
let curline= line(".")-1
" call Decho("refresh the directory")
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
exe curline
" call Dret("NetBrowseRm")
@@ -1692,7 +1721,7 @@ fun! s:NetBrowseRename(usrhost,path) range
" refresh the directory
let curline= line(".")
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
exe "keepjumps ".curline
" call Dret("NetBrowseRename")
endfun
@@ -1721,29 +1750,29 @@ endfun
" =2 : local and o
" =3 : local and v
fun! s:NetSplit(mode)
" call Dfunc("NetSplit(mode=".a:mode.")")
" call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
call s:SaveWinVars()
if a:mode == 0
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
call s:CopyWinVars()
exe "norm! 0"
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
elseif a:mode ==1
exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
call s:CopyWinVars()
exe "norm! 0"
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
elseif a:mode ==2
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
call s:CopyWinVars()
exe "norm! 0"
call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
else
exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
call s:CopyWinVars()
exe "norm! 0"
call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
endif
" call Dret("NetSplit")
@@ -1752,8 +1781,8 @@ endfun
" ---------------------------------------------------------------------
" NetBrowseX: allows users to write custom functions to operate on {{{2
" files given their extension. Passes 0=local, 1=remote
fun! s:NetBrowseX(fname,remote)
" call Dfunc("NetBrowseX(".a:fname." remote=".a:remote.")")
fun! netrw#NetBrowseX(fname,remote)
" call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")")
" set up the filename
" (lower case the extension, make a local copy of a remote file)
@@ -1764,6 +1793,23 @@ fun! s:NetBrowseX(fname,remote)
let fname= escape(a:fname,"%#")
" call Decho("fname<".fname."> after escape()")
" seems kde systems often have gnome-open due to dependencies, even though
" gnome-open's subsidiary display tools are largely absent. Kde systems
" usually have "kicker" running, though... (tnx Mikolaj Machowski)
if !exists("s:haskicker")
if has("unix")
let v:shell_error=0
silent! let s:haskicker= system('ps -e') =~ 'kicker'
if v:shell_error
let s:haskicker = 0
let v:shell_error = 0
endif
else
let s:haskicker= 0
endif
" call Decho("setting s:haskicker=".s:haskicker)
endif
if a:remote == 1
" create a local copy
let fname= tempname().".".exten
@@ -1777,24 +1823,37 @@ fun! s:NetBrowseX(fname,remote)
" set up redirection
if &srr =~ "%s"
let redir= substitute(&srr,"%s","/dev/null"."")
let redir= substitute(&srr,"%s","/dev/null","")
else
let redir= &srr . "/dev/null"
endif
" call Decho("redir:".redir.":")
if exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer)
if g:netrw_browsex_viewer == '-'
call netrwFileHandlers#Init()
if exten != "" && exists("*netrwFileHandlers#NFH_".exten)
" call Decho("let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")')
exe "let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")'
endif
else
" call Decho("exe silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."' ".redir)
exe "silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."'".redir
let ret= v:shell_error
endif
" execute the file handler
if has("win32") || has("win64")
elseif has("win32") || has("win64")
" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"')
exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"'
let ret= v:shell_error
elseif has("unix") && executable("gnome-open")
elseif has("unix") && executable("gnome-open") && !s:haskicker
" call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
exe "silent !gnome-open '".escape(fname,'%#')."'".redir
let ret= v:shell_error
elseif has("unix") && executable("kfmclient")
elseif has("unix") && executable("kfmclient") && s:haskicker
" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
let ret= v:shell_error
@@ -1969,7 +2028,7 @@ fun! s:NetHideEdit(islocal)
if a:islocal == 0
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
else
silent call s:NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
silent call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
endif
" call Dret("NetHideEdit")
@@ -1989,7 +2048,7 @@ fun! s:NetSortSequence(mode)
if a:mode == 0
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
else
silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
endif
" call Dret("NetSortSequence")
@@ -2025,9 +2084,9 @@ fun! s:NetLongList(mode)
" refresh the listing
if a:mode == 0
silent call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),"./"))
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),"./"))
else
silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
endif
" keep cursor on the filename
@@ -2434,6 +2493,82 @@ fun! s:NetObtain()
" call Dret("NetObtain")
endfun
" ---------------------------------------------------------------------
" NetPrevWinOpen: opoen file/directory in previous window. {{{2
" If there's only one window, then the window will first be split.
fun! s:NetPrevWinOpen(islocal)
" call Dfunc("NetPrevWinOpen(islocal=".a:islocal.")")
" get last window number and the word currently under the cursor
let lastwinnr = winnr("$")
let curword = s:NetGetWord()
let curdir = b:netrw_curdir
" call Decho("lastwinnr=".lastwinnr." curword<".curword.">")
let didsplit = 0
if lastwinnr == 1
" if only one window, open a new one first
" call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")")
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
let didsplit = 1
else
wincmd p
" if the previous window's buffer has been changed (is modified),
" and it doesn't appear in any other extant window, then ask the
" user if s/he wants to abandon modifications therein.
let bnr = winbufnr(0)
let bnrcnt = 0
if &mod
windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif
" call Decho("bnr=".bnr." bnrcnt=".bnrcnt)
if bnrcnt == 1
let bufname= bufname(winbufnr(winnr()))
let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel")
if choice == 1
" Yes -- write file & then browse
let v:errmsg= ""
silent w
if v:errmsg != ""
echohl Error | echo "***netrw*** "unable to write <".bufname.">!" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
if didsplit
q
else
wincmd p
endif
" call Dret("NetPrevWinOpen : unable to write <".bufname.">")
return
endif
elseif choice == 2
" No -- don't worry about changed file, just browse anyway
set nomod
echohl WarningMsg | echo "***netrw*** ".bufname." changes abandoned" | echohl None
else
" Cancel -- don't do this
if didsplit
q
else
wincmd p
endif
" call Dret("NetPrevWinOpen : cancelled")
return
endif
endif
endif
endif
if a:islocal
call s:LocalBrowse(s:LocalBrowseChgDir(curdir,curword))
else
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),curword))
endif
" call Dret("NetPrevWinOpen")
endfun
" ==========================================
" Local Directory Browsing Support: {{{1
" ==========================================
@@ -2445,7 +2580,7 @@ fun! s:LocalBrowse(dirname)
" the BufEnter event causes triggering when attempts to write to
" the DBG buffer are made.
if isdirectory(a:dirname)
call netrw#DirBrowse(a:dirname)
silent! call netrw#DirBrowse(a:dirname)
endif
" not a directory, ignore it
endfun
@@ -2462,6 +2597,7 @@ fun! netrw#DirBrowse(dirname)
" call Dret("DirBrowse")
return
endif
call s:NetOptionSave()
if v:version < 603
@@ -2550,10 +2686,13 @@ fun! netrw#DirBrowse(dirname)
endif
" change the name of the buffer to reflect the b:netrw_curdir
" Hmm. When another vim is open to the same directory, I get
" a "Press ENTER" ... ok, setting "noswf" avoids it.
" call Decho('exe silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape))
exe 'silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape)
" make this buffer not-a-file, modifiable, not line-numbered, etc
setlocal bh=hide bt=nofile nobl ma nonu
setlocal bh=hide bt=nofile nobl ma nonu noswf
keepalt silent! %d
" ---------------------------
@@ -2563,7 +2702,7 @@ fun! netrw#DirBrowse(dirname)
endif
" save current directory on directory history list
call <SID>NetBookmarkDir(3,b:netrw_curdir)
call s:NetBookmarkDir(3,b:netrw_curdir)
" set up all the maps
" call Decho("Setting up local browser maps")
@@ -2584,6 +2723,7 @@ fun! netrw#DirBrowse(dirname)
nnoremap <buffer> <silent> o :call <SID>NetSplit(2)<cr>
nnoremap <buffer> <silent> O :call <SID>LocalObtain()<cr>
nnoremap <buffer> <silent> p :call <SID>LocalPreview(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),1))<cr>
nnoremap <buffer> <silent> P :call <SID>NetPrevWinOpen(1)<cr>
nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,b:netrw_curdir)<cr>
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'),1)<cr>
nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
@@ -2591,7 +2731,7 @@ fun! netrw#DirBrowse(dirname)
nnoremap <buffer> <silent> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
nnoremap <buffer> <silent> v :call <SID>NetSplit(3)<cr>
nnoremap <buffer> <silent> x :call <SID>NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
nnoremap <buffer> <silent> x :call netrw#NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
nnoremap <buffer> <silent> <2-leftmouse> :call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
@@ -2784,7 +2924,7 @@ fun! s:LocalBrowseList()
let ft = strpart("000000000000000000",1,18-strlen(t)).t
" call Decho("exe keepjumps put ='".ft.'/'.filename."'")
let ftpfile= ft.'/'.pfile
keepjumps put=ftpfile
keepjumps silent! put=ftpfile
elseif g:netrw_sort_by =~ "^s"
" sort by size (handles file sizes up to 1 quintillion bytes, US)
@@ -2793,12 +2933,12 @@ fun! s:LocalBrowseList()
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
" call Decho("exe keepjumps put ='".fsz.'/'.filename."'")
let fszpfile= fsz.'/'.pfile
keepjumps put =fszpfile
keepjumps silent! put =fszpfile
else
" sort by name
" call Decho("exe keepjumps put ='".pfile."'")
keepjumps put=pfile
keepjumps silent! put=pfile
endif
endwhile
@@ -2833,6 +2973,13 @@ fun! s:LocalBrowseChgDir(dirname,newdir,...)
if a:0 < 1
" call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape.">")
" call Decho("about to edit<".escape(dirname,s:netrw_cd_escape).">")
if g:netrw_browse_split == 1
new
wincmd _
elseif g:netrw_browse_split == 2
rightb vert new
wincmd |
endif
exe "e! ".escape(dirname,s:netrw_cd_escape)
set ma nomod
endif
@@ -3063,7 +3210,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
" if dosplit or file has been modified
if a:dosplit || &modified
call <SID>SaveWinVars()
call s:SaveWinVars()
if a:style == 0 " Explore, Sexplore
exe g:netrw_winsize."wincmd s"
@@ -3275,7 +3422,7 @@ fun! s:NetGetcwd(doesc)
endfun
" ---------------------------------------------------------------------
" NetMethod: determine method of transfer {{{1
" NetMethod: determine method of transfer {{{2
" method == 1: rcp
" 2: ftp + <.netrc>
" 3: ftp + machine, id, password, and [path]filename
@@ -3475,7 +3622,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
endfun
" ------------------------------------------------------------------------
" NetUserPass: set username and password for subsequent ftp transfer {{{1
" NetUserPass: set username and password for subsequent ftp transfer {{{2
" Usage: :call NetUserPass() -- will prompt for userid and password
" :call NetUserPass("uid") -- will prompt for password
" :call NetUserPass("uid","password") -- sets global userid and password
@@ -3506,7 +3653,7 @@ fun! NetUserPass(...)
endfun
" ------------------------------------------------------------------------
" NetOptionSave: save options and set to "standard" form {{{1
" NetOptionSave: save options and set to "standard" form {{{2
fun! s:NetOptionSave()
" call Dfunc("NetOptionSave()")
if !exists("w:netoptionsave")
@@ -3550,7 +3697,7 @@ fun! s:NetOptionSave()
endfun
" ------------------------------------------------------------------------
" NetOptionRestore: restore options {{{1
" NetOptionRestore: restore options {{{2
fun! s:NetOptionRestore()
" call Dfunc("NetOptionRestore()")
if !exists("w:netoptionsave")
@@ -3591,7 +3738,7 @@ fun! s:NetOptionRestore()
endfun
" ------------------------------------------------------------------------
" NetReadFixup: this sort of function is typically written by the user {{{1
" NetReadFixup: this sort of function is typically written by the user {{{2
" to handle extra junk that their system's ftp dumps
" into the transfer. This function is provided as an
" example and as a fix for a Windows 95 problem: in my
@@ -3609,7 +3756,7 @@ if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
endif
" ---------------------------------------------------------------------
" NetSort: Piet Delport's BISort2() function, modified to take a range {{{1
" NetSort: Piet Delport's BISort2() function, modified to take a range {{{2
if v:version < 700
fun! s:NetSort() range
" " call Dfunc("NetSort()")
@@ -3654,7 +3801,7 @@ if v:version < 700
endif
" ---------------------------------------------------------------------
" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{1
" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
" What this function does is to compute a priority for the patterns
" in the g:netrw_sort_sequence. It applies a substitute to any
" "files" that satisfy each pattern, putting the priority / in
@@ -3711,7 +3858,7 @@ fun! s:SetSort()
endfun
" ---------------------------------------------------------------------
" SaveWinVars: (used by Explore()) {{{1
" SaveWinVars: (used by Explore()) {{{2
fun! s:SaveWinVars()
" call Dfunc("SaveWinVars()")
if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif
@@ -3727,7 +3874,7 @@ fun! s:SaveWinVars()
endfun
" ---------------------------------------------------------------------
" CopyWinVars: (used by Explore()) {{{1
" CopyWinVars: (used by Explore()) {{{2
fun! s:CopyWinVars()
" call Dfunc("CopyWinVars()")
if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif
@@ -3743,7 +3890,7 @@ fun! s:CopyWinVars()
endfun
" ---------------------------------------------------------------------
" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{2
" To allow separate windows to have their own activities, such as
" Explore **/pattern, several variables have been made window-oriented.
" However, when the user splits a browser window (ex: ctrl-w s), these
@@ -3765,7 +3912,7 @@ fun! s:SetBufWinVars()
endfun
" ---------------------------------------------------------------------
" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{1
" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{2
" Matching function to BufferWinVars()
fun! s:UseBufWinVars()
" call Dfunc("UseBufWinVars()")
@@ -3783,7 +3930,7 @@ fun! s:UseBufWinVars()
endfun
" ---------------------------------------------------------------------
" RFC2396: converts %xx into characters
" RFC2396: converts %xx into characters {{{2
fun! netrw#RFC2396(fname)
" call Dfunc("RFC2396(fname<".a:fname.">)")
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
@@ -3792,7 +3939,7 @@ fun! netrw#RFC2396(fname)
endfun
" ------------------------------------------------------------------------
" Settings Restoration: {{{1
" Settings Restoration: {{{2
let &cpo= s:keepcpo
unlet s:keepcpo

View File

@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Oct 12, 2005
" Date: Jan 26, 2006
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 4
" Version: 6a ASTRO-ONLY
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v4"
let g:loaded_netrwSettings = "v6a"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
@@ -56,10 +56,10 @@ fun! netrwSettings#NetrwSettings()
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: (by Charles E. Campbell, Jr.)'
put ='+ --------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
put ='+ Press ? with cursor atop any line for help '
put ='+ ---------------------------------------------'
put ='+ --------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
@@ -89,6 +89,12 @@ fun! netrwSettings#NetrwSettings()
put ='+ Netrw Browser Control'
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = 'let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd

View File

@@ -0,0 +1,351 @@
"pycomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin
" Version: 0.3
" Last Updated: 23 January 2006
"
" v0.3 Changes:
" added top level def parsing
" for safety, call returns are not evaluated
" handful of parsing changes
" trailing ( and . characters
" argument completion on open parens
" stop parsing at current line - ++performance, local var resolution
"
" TODO
" RExec subclass
" Code cleanup + make class
" use internal dict, not globals()
if !has('python')
echo "Error: Required vim compiled with +python"
finish
endif
function! pycomplete#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 "python get_completions('" . a:base . "')"
return g:pycomplete_completions
endif
endfunction
function! s:DefPython()
python << PYTHONEOF
import vim, sys, types
import __builtin__
import tokenize, keyword, cStringIO
LOCALDEFS = \
['LOCALDEFS', 'clean_up','eval_source_code', \
'get_completions', '__builtin__', '__builtins__', \
'dbg', '__name__', 'vim', 'sys', 'parse_to_end', \
'parse_statement', 'tokenize', 'keyword', 'cStringIO', \
'debug_level', 'safe_eval', '_ctor', 'get_arguments', \
'strip_calls', 'types', 'parse_block']
def dbg(level,msg):
debug_level = 1
try:
debug_level = vim.eval("g:pycomplete_debug_level")
except:
pass
if level <= debug_level: print(msg)
def strip_calls(stmt):
parsed=''
level = 0
for c in stmt:
if c in ['[','(']:
level += 1
elif c in [')',']']:
level -= 1
elif level == 0:
parsed += c
##dbg(10,"stripped: %s" % parsed)
return parsed
def get_completions(base):
stmt = vim.eval('expand("<cWORD>")')
#dbg(1,"statement: %s - %s" % (stmt, base))
stmt = stmt+base
eval_source_code()
try:
ridx = stmt.rfind('.')
if stmt[-1] == '(':
match = ""
stmt = strip_calls(stmt[:len(stmt)-1])
all = get_arguments(eval(stmt))
elif ridx == -1:
match = stmt
all = globals() + __builtin__.__dict__
else:
match = stmt[ridx+1:]
stmt = strip_calls(stmt[:ridx])
all = eval(stmt).__dict__
#dbg(15,"completions for: %s, match=%s" % (stmt,match))
completions = []
if type(all) == types.DictType:
for m in all:
if m.find('_') != 0 and m.find(match) == 0 and \
m not in LOCALDEFS:
#dbg(25,"matched... %s, %s" % (m, m.find(match)))
typestr = str(all[m])
if "function" in typestr: m += '('
elif "method" in typestr: m += '('
elif "module" in typestr: m += '.'
elif "class" in typestr: m += '('
completions.append(m)
completions.sort()
else:
completions.append(all)
#dbg(10,"all completions: %s" % completions)
vim.command("let g:pycomplete_completions = %s" % completions)
except:
vim.command("let g:pycomplete_completions = []")
#dbg(1,"exception: %s" % sys.exc_info()[1])
clean_up()
def get_arguments(func_obj):
def _ctor(obj):
try:
return class_ob.__init__.im_func
except AttributeError:
for base in class_ob.__bases__:
rc = _find_constructor(base)
if rc is not None: return rc
return None
arg_offset = 1
if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj)
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
else: arg_offset = 0
#dbg(20,"%s, offset=%s" % (str(func_obj), arg_offset))
arg_text = ''
if type(func_obj) in [types.FunctionType, types.LambdaType]:
try:
cd = func_obj.func_code
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
defaults = func_obj.func_defaults or []
defaults = list(map(lambda name: "=%s" % name, defaults))
defaults = [""] * (len(real_args)-len(defaults)) + defaults
items = map(lambda a,d: a+d, real_args, defaults)
if func_obj.func_code.co_flags & 0x4:
items.append("...")
if func_obj.func_code.co_flags & 0x8:
items.append("***")
arg_text = ", ".join(items) + ')'
except:
#dbg(1,"exception: %s" % sys.exc_info()[1])
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
# this works for alot of C modules that are part of the
# standard library
doc = getattr(func_obj, '__doc__', '')
if doc:
doc = doc.lstrip()
pos = doc.find('\n')
if pos > 0:
sigline = doc[:pos]
lidx = sigline.find('(')
ridx = sigline.find(')')
retidx = sigline.find('->')
ret = sigline[retidx+2:].strip()
if lidx > 0 and ridx > 0:
arg_text = sigline[lidx+1:ridx] + ')'
if len(ret) > 0: arg_text += ' #returns %s' % ret
#dbg(15,"argument completion: %s" % arg_text)
return arg_text
def parse_to_end(gen):
stmt=''
level = 0
for type, str, begin, end, line in gen:
if line == vim.eval('getline(\'.\')'): break
elif str == '\\': continue
elif str == ';':
break
elif type == tokenize.NEWLINE and level == 0:
break
elif str in ['[','(']:
level += 1
elif str in [')',']']:
level -= 1
elif level == 0:
stmt += str
#dbg(10,"current statement: %s" % stmt)
return stmt
def parse_block(gen):
lines = []
level = 0
for type, str, begin, end, line in gen:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif type == tokenize.INDENT:
level += 1
elif type == tokenize.DEDENT:
level -= 1
if level == 0: break;
else:
stmt = parse_statement(gen,str)
if len(stmt) > 0: lines.append(stmt)
return lines
def parse_statement(gen,curstr=''):
var = curstr
type, str, begin, end, line = gen.next()
if str == '=':
type, str, begin, end, line = gen.next()
if type == tokenize.NEWLINE:
return ''
elif type == tokenize.STRING or str == 'str':
return '%s = str' % var
elif str == '[' or str == 'list':
return '%s= list' % var
elif str == '{' or str == 'dict':
return '%s = dict' % var
elif type == tokenize.NUMBER:
return '%s = 0' % var
elif str == 'Set':
return '%s = Set' % var
elif str == 'open' or str == 'file':
return '%s = file' % var
else:
inst = str + parse_to_end(gen)
if len(inst) > 0:
#dbg(5,"found [%s = %s]" % (var, inst))
return '%s = %s' % (var, inst)
return ''
def eval_source_code():
LINE=vim.eval('getline(\'.\')')
s = cStringIO.StringIO('\n'.join(vim.current.buffer[:]) + '\n')
g = tokenize.generate_tokens(s.readline)
stmts = []
lineNo = 0
try:
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif begin[0] == lineNo: continue
#junk
elif type == tokenize.INDENT or \
type == tokenize.DEDENT or \
type == tokenize.ERRORTOKEN or \
type == tokenize.ENDMARKER or \
type == tokenize.NEWLINE or \
type == tokenize.COMMENT:
continue
#import statement
elif str == 'import':
import_stmt=parse_to_end(g)
if len(import_stmt) > 0:
#dbg(5,"found [import %s]" % import_stmt)
stmts.append("import %s" % import_stmt)
#import from statement
elif str == 'from':
type, str, begin, end, line = g.next()
mod = str
type, str, begin, end, line = g.next()
if str != "import": break
from_stmt=parse_to_end(g)
if len(from_stmt) > 0:
#dbg(5,"found [from %s import %s]" % (mod, from_stmt))
stmts.append("from %s import %s" % (mod, from_stmt))
#def statement
elif str == 'def':
funcstr = ''
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif str == ':':
stmts += parse_block(g)
break
funcstr += str
if len(funcstr) > 0:
#dbg(5,"found [def %s]" % funcstr)
stmts.append("def %s:\n pass" % funcstr)
#class declaration
elif str == 'class':
type, str, begin, end, line = g.next()
classname = str
#dbg(5,"found [class %s]" % classname)
level = 0
members = []
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif type == tokenize.INDENT:
level += 1
elif type == tokenize.DEDENT:
level -= 1
if level == 0: break;
elif str == 'def':
memberstr = ''
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif str == ':':
stmts += parse_block(g)
break
memberstr += str
#dbg(5," member [%s]" % memberstr)
members.append(memberstr)
classstr = 'class %s:' % classname
for m in members:
classstr += ("\n def %s:\n pass" % m)
stmts.append("%s\n" % classstr)
elif keyword.iskeyword(str) or str in globals():
#dbg(5,"keyword = %s" % str)
lineNo = begin[0]
else:
assign = parse_statement(g,str)
if len(assign) > 0: stmts.append(assign)
for s in stmts:
try:
#dbg(15,"evaluating: %s\n" % s)
exec(s) in globals()
except:
#dbg(1,"exception: %s" % sys.exc_info()[1])
pass
except:
#dbg(1,"exception: %s" % sys.exc_info()[1])
pass
def clean_up():
for o in globals().keys():
if o not in LOCALDEFS:
try:
exec('del %s' % o) in globals()
except: pass
sys.path.extend(['.','..'])
PYTHONEOF
endfunction
let g:pycomplete_debug_level = 0
call s:DefPython()
" vim: set et ts=4:

View File

@@ -0,0 +1,111 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
" This function is used for the spellfile plugin.
function! spellfile#LoadFile(lang)
" If the netrw plugin isn't loaded we silently skip everything.
if !exists(":Nread")
if &verbose
echomsg 'spellfile#LoadFile(): Nread command is not available.'
endif
return
endif
" If the URL changes we try all files again.
if s:spellfile_URL != g:spellfile_URL
let s:donedict = {}
let s:spellfile_URL = g:spellfile_URL
endif
" I will say this only once!
if has_key(s:donedict, a:lang . &enc)
if &verbose
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
endif
return
endif
let s:donedict[a:lang . &enc] = 1
" Find spell directories we can write in.
let dirlist = []
let dirchoices = '&Cancel'
for dir in split(globpath(&rtp, 'spell'), "\n")
if filewritable(dir) == 2
call add(dirlist, dir)
let dirchoices .= "\n&" . len(dirlist)
endif
endfor
if len(dirlist) == 0
if &verbose
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
endif
return
endif
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
let msg .= "\nDo you want me to try downloading it?"
if confirm(msg, "&Yes\n&No", 2) == 1
let enc = &encoding
if enc == 'iso-8859-15'
let enc = 'latin1'
endif
let fname = a:lang . '.' . enc . '.spl'
" Split the window, read the file into a new buffer.
new
setlocal bin
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one.
g/^/d
let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed'
bwipe!
return
endif
endif
" Delete the empty first line and mark the file unmodified.
1d
set nomod
let msg = "In which directory do you want to write the file:"
for i in range(len(dirlist))
let msg .= "\n" . (i + 1) . '. ' . dirlist[i]
endfor
let dirchoice = confirm(msg, dirchoices) - 2
if dirchoice >= 0
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
" Also download the .sug file, if the user wants to.
let msg = "Do you want me to try getting the .sug file?\n"
let msg .= "This will improve making suggestions for spelling mistakes,\n"
let msg .= "but it uses quite a bit of memory."
if confirm(msg, "&No\n&Yes") == 2
g/^/d
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMsug'
echo 'Sorry, downloading failed'
else
1d
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
endif
set nomod
endif
endif
bwipe
endif
endfunc

View File

@@ -0,0 +1,179 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 1.0
" Last Change: Sun Jan 08 2006 10:17:51 PM
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
setlocal ofu=syntaxcomplete#Complete
endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 1
" This script will build a completion list based on the syntax
" elements defined by the files in $VIMRUNTIME/syntax.
let s:syn_remove_words = 'match,matchgroup=,contains,'.
\ 'links to,start=,end=,nextgroup='
let s:cache_name = []
let s:cache_list = []
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w'
let start -= 1
elseif line[start - 1] =~ '\.'
" The user must be specifying a column name
if lastword == -1
let lastword = start
endif
let start -= 1
let b:sql_compl_type = 'column'
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
endif
let base = s:prepended . a:base
let list_idx = index(s:cache_name, &filetype, 0, &ignorecase)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = s:SyntaxList()
let s:cache_name = add( s:cache_name, &filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
" Return list of matches.
if base =~ '\w'
let compstr = join(compl_list, ' ')
let compstr = substitute(compstr, '\<\%('.base.'\)\@!\w\+\s*', '', 'g')
let compl_list = split(compstr, '\s\+')
endif
return compl_list
endfunc
function! s:SyntaxList()
let saveL = @l
" Loop through all the syntax groupnames, and build a
" syntax file which contains these names. This can
" work generically for any filetype that does not already
" have a plugin defined.
" This ASSUMES the syntax groupname BEGINS with the name
" of the filetype. From my casual viewing of the vim7\sytax
" directory.
redir @l
silent! exec 'syntax list '
redir END
let syntax_groups = @l
let @l = saveL
if syntax_groups =~ 'E28'
\ || syntax_groups =~ 'E411'
\ || syntax_groups =~ 'E415'
\ || syntax_groups =~ 'No sytax items'
return -1
endif
" Abort names - match, links to, matchgroup=, start=, contains=, contained,
" cluster=, nextgroup=, end=
let next_group_regex = '\n' .
\ '\zs'.&filetype.'\w\+\ze'.
\ '\s\+xxx\s\+'.
\ '\<\('.
\ substitute(s:syn_remove_words, ',', '\\|', 'g').
\ '\)\@!'
let syn_list = ''
let index = 0
let index = match(syntax_groups, next_group_regex, index)
while index > 0
let group_name = matchstr( syntax_groups, '\w\+', index )
let extra_syn_list = s:SyntaxGroupItems(group_name)
let syn_list = syn_list . extra_syn_list . "\n"
let index = index + strlen(group_name)
let index = match(syntax_groups, next_group_regex, index)
endwhile
return sort(split(syn_list))
endfunction
function! s:SyntaxGroupItems( group_name )
let saveL = @l
" Generate (based on the syntax highlight rules) a list of
" the Statements, functions, keywords and so on available
" If this needs updating, the syntax\sql.vim file should be
" updated
redir @l
silent! exec 'syntax list ' . a:group_name
redir END
if @l !~ 'E28'
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
" Tried to remove all lines that do not begin with contained
" but this does not work in all cases since you can have
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute( syn_list, '\<\('.
\ substitute(
\ escape( s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g').
\ '\).\{-}\%($\|'."\n".'\)'
\ , "\n", 'g' )
" Now strip off the newline + blank space + contained
let syn_list = substitute( syn_list, '\%(^\|\n\)\@<=\s*\<\('.
\ 'contained\)'
\ , "", 'g' )
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
else
let syn_list = ''
endif
let @l = saveL
return syn_list
endfunction

View File

@@ -1,7 +1,7 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Nov 28, 2005
" Version: 5
" Date: Dec 24, 2005
" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
"
@@ -24,7 +24,7 @@ set cpo&vim
if exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v5"
let g:loaded_tar= "v7"
" ---------------------------------------------------------------------
" Default Settings: {{{1
@@ -93,7 +93,7 @@ fun! tar#Browse(tarfile)
else
exe "silent r! tar -".g:tar_browseoptions." '".a:tarfile."'"
endif
%g@/$@d
silent %g@/$@d
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
@@ -146,7 +146,7 @@ fun! tar#Read(fname,mode)
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
elseif a:fname =~# '\.bz2$'
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'")
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
else
@@ -242,16 +242,20 @@ fun! tar#Write(fname)
" call Decho("tarfile<".tarfile."> fname<".fname.">")
let dirpath = substitute(fname,'/[^/]\+$','','e')
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
endif
call mkdir(dirpath,"p")
endif
if tarfile !~ '/'
let tarfile= curdir.'/'.tarfile
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
call mkdir(dirpath,"p")
exe "w! ".fname
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
endif

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Nov 22
" Last Change: 2006 Feb 6
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
@@ -54,6 +54,7 @@ endfunction
function! xmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let curline = line('.')
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
@@ -69,11 +70,32 @@ function! xmlcomplete#CompleteTags(findstart, base)
endif
let b:compl_context = getline('.')[0:(compl_begin)]
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines. Up to
" 10?
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline)
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$'
" Normal tag line, no need for completion at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Make sure we will have only current namespace
unlet! b:xml_namespace
let b:xml_namespace = matchstr(b:compl_context, '^\k*\ze:')
let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:')
if b:xml_namespace == ''
let b:xml_namespace = 'DEFAULT'
endif
@@ -89,7 +111,10 @@ function! xmlcomplete#CompleteTags(findstart, base)
let res = []
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '^<\zs.*')
unlet! b:compl_context
" Make entities completion
@@ -111,13 +136,24 @@ function! xmlcomplete#CompleteTags(findstart, base)
let values = intent + values
endif
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
if len(a:base) == 1
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in values
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res
return res + res2
endif
endif
if context =~ '>'
@@ -265,6 +301,9 @@ function! xmlcomplete#CompleteTags(findstart, base)
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
let opentag = substitute(opentag, '^\k*:', '', '')
if opentag == ''
return []
endif
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
let context = substitute(context, '^\k*:', '', '')
@@ -357,11 +396,11 @@ return ''
endfunction
function! s:InComment()
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment'
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment\|String'
endfunction
function! s:InCommentAt(line, col)
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment'
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment\|String'
endfunction
function! s:SetKeywords()

View File

@@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Nov 28, 2005
" Version: 5
" Date: Dec 21, 2005
" Version: 6
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@ if exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v5"
let g:loaded_zip= "v6"
" ----------------
" Functions: {{{1
@@ -198,16 +198,21 @@ fun! zip#Write(fname)
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
let dirpath = substitute(fname,'/[^/]\+$','','e')
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
endif
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
let zipfile= curdir.'/'.zipfile
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
call mkdir(dirpath,"p")
exe "w! ".fname
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
endif

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Dec 11
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -273,10 +273,14 @@ Name triggered by ~
|FileChangedRO| before making the first change to a read-only file
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|FocusGained| Vim got input focus
|FocusLost| Vim lost input focus
|CursorHold| the user doesn't press a key for a while
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
|WinEnter| after entering another window
|WinLeave| before leaving a window
@@ -330,7 +334,7 @@ BufEnter After entering a buffer. Useful for setting
*BufFilePost*
BufFilePost After changing the name of the current buffer
with the ":file" or ":saveas" command.
*BufReadCmd*
*BufFilePre*
BufFilePre Before changing the name of the current buffer
with the ":file" or ":saveas" command.
*BufHidden*
@@ -368,10 +372,10 @@ BufRead or BufReadPost When starting to edit a new buffer, after
This does NOT work for ":r file". Not used
when the file doesn't exist. Also used after
successfully recovering a file.
*BufReadPre* *E200* *E201*
*BufReadCmd*
BufReadCmd Before starting to edit a new buffer. Should
read the file into the buffer. |Cmd-event|
*BufFilePre*
*BufReadPre* *E200* *E201*
BufReadPre When starting to edit a new buffer, before
reading the file into the buffer. Not used
if the file doesn't exist.
@@ -439,6 +443,7 @@ CmdwinLeave Before leaving the command-line window.
|cmdwin-char|
*ColorScheme*
ColorScheme After loading a color scheme. |:colorscheme|
*CursorHold*
CursorHold When the user doesn't press a key for the time
specified with 'updatetime'. Not re-triggered
@@ -447,6 +452,8 @@ CursorHold When the user doesn't press a key for the time
make some coffee. :) See |CursorHold-example|
for previewing tags.
This event is only triggered in Normal mode.
While recording the CursorHold event is not
triggered. |q|
Note: Interactive commands cannot be used for
this event. There is no hit-enter prompt,
the screen is updated directly (when needed).
@@ -457,6 +464,18 @@ CursorHold When the user doesn't press a key for the time
:let &ro = &ro
< {only on Amiga, Unix, Win32, MSDOS and all GUI
versions}
*CursorHoldI*
CursorHoldI Just like CursorHold, but in Insert mode.
*CursorMoved*
CursorMoved After the cursor was moved in Normal mode.
Not triggered when there is typeahead or when
an operator is pending.
Careful: Don't do anything that the user does
not expect or that is slow.
*CursorMovedI*
CursorMovedI After the cursor was moved in Insert mode.
Otherwise the same as CursorMoved.
*EncodingChanged*
EncodingChanged Fires off after the 'encoding' option has been
changed. Useful to set up fonts, for example.
@@ -617,11 +636,12 @@ MenuPopup Just before showing the popup menu (under the
c Commmand line
*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:grep|, |:grepadd|, |:vimgrep|,
|:vimgrepadd|). The pattern is matched against
the command being run. When |:grep| is used
but 'grepprg' is set to "internal" it still
matches "grep".
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|:vimgrepadd|, |:vimgrepadd|). The pattern is
matched against the command being run. When
|:grep| is used but 'grepprg' is set to
"internal" it still matches "grep".
This command cannot be used to set the
'makeprg' and 'grepprg' variables.
If this command causes an error, the quickfix
@@ -641,6 +661,11 @@ RemoteReply When a reply from a Vim that functions as
*SessionLoadPost*
SessionLoadPost After loading the session file created using
the |:mksession| command.
*SpellFileMissing*
SpellFileMissing When trying to load a spell checking file and
it can't be found. <amatch> is the language,
'encoding' also matters. See
|spell-SpellFileMissing|.
*StdinReadPost*
StdinReadPost After reading from the stdin into the buffer,
before executing the modelines. Only used

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2005 Dec 10
*change.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -503,6 +503,8 @@ comment (starting with '"') after the ":!" command.
temporary file and then reads the file into the
buffer. Vim uses the 'shellredir' option to redirect
the filter output to the temporary file.
However, if the 'shelltemp' option is off then pipes
are used when possible (on Unix).
When the 'R' flag is included in 'cpoptions' marks in
the filtered lines are deleted, unless the
|:keepmarks| command is used. Example: >

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Nov 21
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,7 +153,9 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
*c_CTRL-R_=*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
(doesn't work at the expression prompt)
(doesn't work at the expression prompt; some
things such as changing the buffer or current
window are not allowed to avoid side effects)
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
@@ -197,6 +199,8 @@ CTRL-\ e {expr} *c_CTRL-\_e*
The cursor position is unchanged, except when the cursor was
at the end of the line, then it stays at the end.
|setcmdpos()| can be used to set the cursor position.
The |sandbox| is used for evaluating the expression to avoid
nasty side effects.
Example: >
:cmap <F7> <C-\>eAppendSome()<CR>
:func AppendSome()
@@ -692,6 +696,12 @@ output.
==============================================================================
6. Ex special characters *cmdline-special*
Note: These are special characters in the executed command line. If you want
to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
function expand() |expand()|.
@@ -736,7 +746,7 @@ Note: these are typed literally, they are not special keys!
<amatch> when executing autocommands, is replaced with the match for
which this autocommand was executed. It differs from
<afile> only when the file name isn't used to match with
(for FileType and Syntax events).
(for FileType, Syntax and SpellFileMissing events).
<sfile> when executing a ":source" command, is replaced with the
file name of the sourced file;
when executing a function, is replaced with

View File

@@ -1,4 +1,4 @@
*debug.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
*debug.txt* For Vim version 7.0aa. Last change: 2005 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7,6 +7,7 @@
Debugging Vim *debug-vim*
This is for debugging Vim itself, when it doesn't work properly.
For debugging Vim scripts, functions, etc. see |debug-scripts|
1. Location of a crash, using gcc and gdb |debug-gcc|
2. Windows Bug Reporting |debug-win32|
@@ -61,9 +62,9 @@ This includes the WinDbg debugger.
If you have Visual Studio, use that instead of the VC Toolkit
and WinDbg.
(No idea what to do if your binary was built with the Borland or Cygwin
compilers. Sorry.)
For other compilers, you should always use the corresponding debugger: TD for
a Vim executable compiled with the Borland compiler; gdb (see above
|debug-gcc|) for the Cygwin and MinGW compilers.
=========================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -382,8 +382,8 @@ checking engine in Vim, for various reasons:
them separately from Vim. That's mostly not impossible, but a drawback.
- Performance: A few tests showed that it's possible to check spelling on the
fly (while redrawing), just like syntax highlighting. But the mechanisms
used by other code are much slower. Myspell uses a simplistic hashtable,
for example.
used by other code are much slower. Myspell uses a hashtable, for example.
The affix compression that most spell checkers use makes it slower too.
- For using an external program like aspell a communication mechanism would
have to be setup. That's complicated to do in a portable way (Unix-only
would be relatively simple, but that's not good enough). And performance
@@ -399,14 +399,88 @@ checking engine in Vim, for various reasons:
another program or library would be acceptable. But the word lists probably
differ, the suggestions may be wrong words.
Spelling suggestions *develop-spell-suggestions*
For making suggestions there are two basic mechanisms:
1. Try changing the bad word a little bit and check for a match with a good
word. Or go through the list of good words, change them a little bit and
check for a match with the bad word. The changes are deleting a character,
inserting a character, swapping two characters, etc.
2. Perform soundfolding on both the bad word and the good words and then find
matches, possibly with a few changes like with the first mechanism.
The first is good for finding typing mistakes. After experimenting with
hashtables and looking at solutions from other spell checkers the conclusion
was that a trie (a kind of tree structure) is ideal for this. Both for
reducing memory use and being able to try sensible changes. For example, when
inserting a character only characters that lead to good words need to be
tried. Other mechanisms (with hashtables) need to try all possible letters at
every position in the word. Also, a hashtable has the requirement that word
boundaries are identified separately, while a trie does not require this.
That makes the mechanism a lot simpler.
Soundfolding is useful when someone knows how the words sounds but doesn't
know how it is spelled. For example, the word "dictionary" might be written
as "daktonerie". The number of changes that the first method would need to
try is very big, it's hard to find the good word that way. After soundfolding
the words become "tktnr" and "tkxnry", these differ by only two letters.
To find words by their soundfolded equivalent (soundalike word) we need a list
of all soundfolded words. A few experiments have been done to find out what
the best method is. Alternatives:
1. Do the sound folding on the fly when looking for suggestions. This means
walking through the trie of good words, soundfolding each word and
checking how different it is from the bad word. This is very efficient for
memory use, but takes a long time. On a fast PC it takes a couple of
seconds for English, which can be acceptable for interactive use. But for
some languages it takes more than ten seconds (e.g., German, Catalan),
which is unacceptable slow. For batch processing (automatic corrections)
it's to slow for all languages.
2. Use a trie for the soundfolded words, so that searching can be done just
like how it works without soundfolding. This requires remembering a list
of good words for each soundfolded word. This makes finding matches very
fast but requires quite a lot of memory, in the order of 1 to 10 Mbyte.
For some languages more than the original word list.
3. Like the second alternative, but reduce the amount of memory by using affix
compression and store only the soundfolded basic word. This is what Aspell
does. Disadvantage is that affixes need to be stripped from the bad word
before soundfolding it, which means that mistakes at the start and/or end
of the word will cause the mechanism to fail. Also, this becomes slow when
the bad word is quite different from the good word.
The choice made is to use the second mechanism and use a separate file. This
way a user with sufficient memory can get very good suggestions while a user
who is short of memory or just wants the spell checking and no suggestions
doesn't use so much memory.
Word frequency
For sorting suggestions it helps to know which words are common. In theory we
could store a word frequency with the word in the dictionary. However, this
requires storing a count per word. That degrades word tree compression a lot.
And maintaining the word frequency for all languages will be a heavy task.
Also, it would be nice to prefer words that are already in the text. This way
the words that appear in the specific text are preferred for suggestions.
What has been implemented is to count words that have been seen during
displaying. A hashtable is used to quickly find the word count. The count is
initialized from words listed in COMMON items in the affix file, so that it
also works when starting a new file.
This isn't ideal, because the longer Vim is running the higher the counts
become. But in practice it is a noticable improvement over not using the word
count.
==============================================================================
4. Assumptions *design-assumptions*
Size of variables:
char 8 bit signed
char_u 8 bit unsigned
int 16, 32 or 64 bit signed
unsigned 16, 32 or 64 bit unsigned
int 32 or 64 bit signed (16 might be possible with limited features)
unsigned 32 or 64 bit unsigned (16 as with ints)
long 32 or 64 bit signed, can hold a pointer
Note that some compilers cannot handle long lines or strings. The C89

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0aa. Last change: 2005 Sep 21
*diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -345,8 +345,8 @@ get an error message. Possible causes:
- The 'shell' and associated options are not set correctly. Try if filtering
works with a command like ":!sort".
- You are using 'diffexpr' and it doesn't work.
If it's not clear what the problem is set the 'verbose' option to see more
messages.
If it's not clear what the problem is set the 'verbose' option to one or more
to see more messages.
The self-installing Vim includes a diff program. If you don't have it you
might want to download a diff.exe. For example from

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
*editing.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -155,11 +155,14 @@ Technical: On the Amiga you can use 30 characters for a file name. But on an
When you started editing without giving a file name, "No File" is displayed in
messages. If the ":write" command is used with a file name argument, the file
name for the current file is set to that file name. This only happens when
the 'F' flag is included in 'cpoptions' (by default it is included). This is
useful when entering text in an empty buffer and then writing it to a file.
If 'cpoptions' contains the 'f' flag (by default it is NOT included) the file
name is set for the ":read file" command. This is useful when starting Vim
without an argument and then doing ":read file" to start editing a file.
the 'F' flag is included in 'cpoptions' (by default it is included) |cpo-F|.
This is useful when entering text in an empty buffer and then writing it to a
file. If 'cpoptions' contains the 'f' flag (by default it is NOT included)
|cpo-f| the file name is set for the ":read file" command. This is useful
when starting Vim without an argument and then doing ":read file" to start
editing a file.
When the file name was set and 'filetype' is empty the filetype detection
autocommands will be triggered.
*not-edited*
Because the file name was set without really starting to edit that file, you
are protected from overwriting that file. This is done by setting the
@@ -874,6 +877,8 @@ used, for example, when the write fails and you want to try again later with
the filename of the current buffer to {file}. The
previous name is used for the alternate file name.
The [!] is needed to overwrite an existing file.
When 'filetype' is empty filetype detection is done
with the new name, before the file is written.
{not in Vi}
*:up* *:update*

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -28,6 +28,7 @@ done, the features in this document are not available. See |+eval| and
9. Examples |eval-examples|
10. No +eval feature |no-eval-feature|
11. The sandbox |eval-sandbox|
12. Textlock |textlock|
{Vi does not have any of these commands}
@@ -1419,7 +1420,7 @@ v:swapchoice |SwapExists| autocommands can set this to the selected choice
no SwapExists autocommand. The default is empty.
*v:swapcommand* *swapcommand-variable*
v:swapcommand Normal mode ommand to be executed after a file has been
v:swapcommand Normal mode command to be executed after a file has been
opened. Can be used for a |SwapExists| autocommand to have
another Vim open the file and jump to the right place. For
example, when jumping to a tag the value is ":tag tagname\r".
@@ -1561,6 +1562,7 @@ getftime( {fname}) Number last modification time of file
getftype( {fname}) String description of type of file {fname}
getline( {lnum}) String line {lnum} of current buffer
getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr}) List list of location list items
getqflist() List list of quickfix items
getreg( [{regname} [, 1]]) String contents of register
getregtype( [{regname}]) String type of register
@@ -1651,7 +1653,9 @@ serverlist() String get a list of available servers
setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
setcmdpos( {pos}) Number set cursor position in command-line
setline( {lnum}, {line}) Number set line {lnum} to {line}
setqflist( {list}[, {action}]) Number set list of quickfix items using {list}
setloclist( {nr}, {list}[, {action}])
Number modify location list using {list}
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
simplify( {filename}) String simplify filename as much as possible
@@ -1890,8 +1894,8 @@ char2nr({expr}) *char2nr()*
char2nr(" ") returns 32
char2nr("ABC") returns 65
< The current 'encoding' is used. Example for "utf-8": >
char2nr("<EFBFBD>") returns 225
char2nr("<EFBFBD>"[0]) returns 195
char2nr("?") returns 225
char2nr("?"[0]) returns 195
< nr2char() does the opposite.
cindent({lnum}) *cindent()*
@@ -2200,6 +2204,14 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
literally and compared to the
autocommand patterns character by
character)
#group autocommand group exists
#group#event autocommand defined for this group and
event.
#group#event#pattern
autocommand defined for this group,
event and pattern.
##event autocommand for this event is
supported.
For checking for a supported feature use |has()|.
Examples: >
@@ -2209,8 +2221,12 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
exists("*s:MyFunc")
exists("bufcount")
exists(":Make")
exists("#CursorHold");
exists("#CursorHold")
exists("#BufReadPre#*.gz")
exists("#filetypeindent")
exists("#filetypeindent#FileType")
exists("#filetypeindent#FileType#*")
exists("##ColorScheme")
< There must be no space between the symbol (&/$/*/#) and the
name.
Note that the argument must be a string, not the name of the
@@ -2355,9 +2371,11 @@ filter({expr}, {string}) *filter()*
The operation is done in-place. If you want a List or
Dictionary to remain unmodified make a copy first: >
:let l = filter(copy(mylist), '& =~ "KEEP"')
:let l = filter(copy(mylist), 'v:val =~ "KEEP"')
< Returns {expr}, the List or Dictionary that was filtered.
When an error is encountered while evaluating {string} no
further items in {expr} are processed.
finddir({name}[, {path}[, {count}]]) *finddir()*
@@ -2680,6 +2698,12 @@ getline({lnum} [, {end}])
:let end = search("^$") - 1
:let lines = getline(start, end)
getloclist({nr}) *getloclist()*
Returns a list with all the entries in the location list for
window {nr}. When {nr} is zero the current window is used.
For a location list window, the displayed location list is
returned. For an invalid window number {nr}, an empty list is
returned. Otherwise, same as getqflist().
getqflist() *getqflist()*
Returns a list with all the current quickfix errors. Each
@@ -3242,12 +3266,14 @@ map({expr}, {string}) *map()*
:let tlist = map(copy(mylist), ' & . "\t"')
< Returns {expr}, the List or Dictionary that was filtered.
When an error is encountered while evaluating {string} no
further items in {expr} are processed.
maparg({name}[, {mode}]) *maparg()*
Return the rhs of mapping {name} in mode {mode}. When there
is no mapping for {name}, an empty String is returned.
These characters can be used for {mode}:
{mode} can be one of these strings:
"n" Normal
"v" Visual
"o" Operator-pending
@@ -3255,12 +3281,16 @@ maparg({name}[, {mode}]) *maparg()*
"c" Cmd-line
"l" langmap |language-mapping|
"" Normal, Visual and Operator-pending
When {mode} is omitted, the modes from "" are used.
When {mode} is omitted, the modes for "" are used.
The {name} can have special key names, like in the ":map"
command. The returned String has special characters
translated like in the output of the ":map" command listing.
The mappings local to the current buffer are checked first,
then the global mappings.
This function can be used to map a key even when it's already
mapped, and have it do the original mapping too. Sketch: >
exe 'nnoremap <Tab> ==' . maparg('<Tab>', 'n')
mapcheck({name}[, {mode}]) *mapcheck()*
Check if there is a mapping that matches with {name} in mode
@@ -3448,7 +3478,8 @@ printf({fmt}, {expr1} ...) *printf()*
Often used items are:
%s string
%6s string right-aligned in 6 characters
%6s string right-aligned in 6 bytes
%.9s string truncated to 9 bytes
%c single byte
%d decimal number
%5d decimal number padded with spaces to 5 characters
@@ -3456,7 +3487,7 @@ printf({fmt}, {expr1} ...) *printf()*
%04x hex number padded with zeros to at least 4 characters
%X hex number using upper case letters
%o octal number
%% the % character
%% the % character itself
Conversion specifications start with '%' and end with the
conversion type. All other characters are copied unchanged to
@@ -3502,11 +3533,10 @@ printf({fmt}, {expr1} ...) *printf()*
field-width
An optional decimal digit string specifying a minimum
field width. If the converted value has fewer
characters than the field width, it will be padded
with spaces on the left (or right, if the
left-adjustment flag has been given) to fill out the
field width.
field width. If the converted value has fewer bytes
than the field width, it will be padded with spaces on
the left (or right, if the left-adjustment flag has
been given) to fill out the field width.
.precision
An optional precision, in the form of a period '.'
@@ -3514,8 +3544,7 @@ printf({fmt}, {expr1} ...) *printf()*
string is omitted, the precision is taken as zero.
This gives the minimum number of digits to appear for
d, o, x, and X conversions, or the maximum number of
characters to be printed from a string for s
conversions.
bytes to be printed from a string for s conversions.
type
A character that specifies the type of conversion to
@@ -3954,12 +3983,18 @@ setline({lnum}, {line}) *setline()*
:endfor
< Note: The '[ and '] marks are not set.
setloclist({nr}, {list} [, {action}]) *setloclist()*
Create or replace or add to the location list for window {nr}.
When {nr} is zero the current window is used. For a location
list window, the displayed location list is modified. For an
invalid window number {nr}, -1 is returned.
Otherwise, same as setqflist().
setqflist({list} [, {action}]) *setqflist()*
Creates a quickfix list using the items in {list}. Each item
in {list} is a dictionary. Non-dictionary items in {list} are
ignored. Each dictionary item can contain the following
entries:
Create or replace or add to the quickfix list using the items
in {list}. Each item in {list} is a dictionary.
Non-dictionary items in {list} are ignored. Each dictionary
item can contain the following entries:
filename name of a file
lnum line number in the file
@@ -4369,6 +4404,10 @@ system({expr} [, {input}]) *system()* *E677*
The resulting error code can be found in |v:shell_error|.
This function will fail in |restricted-mode|.
Note that any wrong value in the options mentioned above may
make the function fail. It has also been reported to fail
when using a security agent application.
Unlike ":!cmd" there is no automatic check for changed files.
Use |:checktime| to force a check.
@@ -4377,16 +4416,16 @@ taglist({expr}) *taglist()*
Returns a list of tags matching the regular expression {expr}.
Each list item is a dictionary with at least the following
entries:
name name of the tag.
filename name of the file where the tag is
name Name of the tag.
filename Name of the file where the tag is
defined.
cmd Ex command used to locate the tag in
the file.
kind type of the tag. The value for this
kind Type of the tag. The value for this
entry depends on the language specific
kind values generated by the ctags
tool.
static a file specific tag. Refer to
static A file specific tag. Refer to
|static-tag| for more information.
The "kind" entry is only available when using Exuberant ctags
generated tags file. More entries may be present, depending
@@ -4610,7 +4649,7 @@ all_builtin_terms Compiled with all builtin terminals enabled.
amiga Amiga version of Vim.
arabic Compiled with Arabic support |Arabic|.
arp Compiled with ARP support (Amiga).
autocmd Compiled with autocommands support.
autocmd Compiled with autocommand support. |autocommand|
balloon_eval Compiled with |balloon-eval| support.
balloon_multiline GUI supports multiline balloons.
beos BeOS version of Vim.
@@ -4866,14 +4905,15 @@ See |:verbose-cmd| for more information.
When the [abort] argument is added, the function will
abort as soon as an error is detected.
The last used search pattern and the redo command "."
will not be changed by the function.
When the [dict] argument is added, the function must
be invoked through an entry in a Dictionary. The
local variable "self" will then be set to the
dictionary. See |Dictionary-function|.
The last used search pattern and the redo command "."
will not be changed by the function.
*:endf* *:endfunction* *E126* *E193*
:endf[unction] The end of a function definition. Must be on a line
by its own, without other commands.
@@ -6792,7 +6832,7 @@ The 'foldexpr', 'includeexpr', 'indentexpr', 'statusline' and 'foldtext'
options are evaluated in a sandbox. This means that you are protected from
these expressions having nasty side effects. This gives some safety for when
these options are set from a modeline. It is also used when the command from
a tags file is executed.
a tags file is executed and for CTRL-R = in the command line.
The sandbox is also used for the |:sandbox| command.
These items are not allowed in the sandbox:
@@ -6802,6 +6842,7 @@ These items are not allowed in the sandbox:
- executing a shell command
- reading or writing a file
- jumping to another buffer or editing a file
- executing Python, Perl, etc. commands
This is not guaranteed 100% secure, but it should block most attacks.
*:san* *:sandbox*
@@ -6809,5 +6850,33 @@ This is not guaranteed 100% secure, but it should block most attacks.
option that may have been set from a modeline, e.g.
'foldexpr'.
*sandbox-option*
A few options contain an expression. When this expression is evaluated it may
have to be done in the sandbox to avoid trouble. But the sandbox is
restrictive, thus this only happens when the option was set from an insecure
location. Insecure in this context are:
- sourcing a .vimrc or .exrc in the current directlry
- while executing in the sandbox
- value coming from a modeline
Note that when in the sandbox and saving an option value and restoring it, the
option will still be marked as it was set in the sandbox.
==============================================================================
12. Textlock *textlock*
In a few situations it is not allowed to change the text in the buffer, jump
to another window and some other things that might confuse or break what Vim
is currently doing. This mostly applies to things that happen when Vim is
actually doing something else. For example, evaluating the 'balloonexpr' may
happen any moment the mouse cursor is resting at some position.
This is not allowed when the textlock is active:
- changing the buffer text
- jumping to another buffer or window
- editing another file
- closing a window or quitting Vim
- etc.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2005 May 08
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
VIM REFERENCE MANUAL by Sergey Khorev
@@ -10,6 +10,7 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme*
2. Examples |mzscheme-examples|
3. Threads |mzscheme-threads|
4. The Vim access procedures |mzscheme-vim|
5. Dynamic loading |mzscheme-dynamic|
{Vi does not have any of these commands}
@@ -243,5 +244,23 @@ Windows *mzscheme-window*
a pair (linenr . column).
(set-cursor (line . col) [window]) Set cursor position.
==============================================================================
5. Dynamic loading *mzscheme-dynamic*
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
output then includes |+mzscheme/dyn|.
This means that Vim will search for the MzScheme DLL files only when needed.
When you don't use the MzScheme interface you don't need them, thus you can
use Vim without these DLL files.
To use the MzScheme interface the MzScheme DLLs must be in your search path.
In a console window type "path" to see what directories are used.
The names of the DLLs must match the MzScheme version Vim was compiled with.
For MzScheme version 209 they will be "libmzsch209_000.dll" and
"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for
"libmzsch\d\d\d_\d\d\d\.dll\c".
======================================================================
vim:tw=78:ts=8:sts=4:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_pyth.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
VIM REFERENCE MANUAL by Paul Moore
@@ -131,14 +131,24 @@ vim.command(str) *python-command*
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
evaluator (see |expression|). Returns the expression result as a
string.
evaluator (see |expression|). Returns the expression result as:
- a string if the Vim expression evaluates to a string or number
- a list if the Vim expression evaluates to a Vim list
- a dictionary if the Vim expression evaluates to a Vim dictionary
Dictionaries and lists are recursively expanded.
Examples: >
:py text_width = vim.eval("&tw")
:py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to
# a number.
:py tagList = vim.eval('taglist("eval_expr")')
< The latter will return a python list of python dicts, for instance:
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
Error object of the "vim" module
vim.error *python-error*

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -760,7 +760,7 @@ tag char note action in Normal mode ~
cursor on first non-blank
|z.| z. redraw, cursor line to center of window,
cursor on first non-blank
|z=| z= make spelling suggestions
|z=| z= give spelling suggestions
|zA| zA open a closed fold or close an open fold
recursively
|zC| zC close folds recursively
@@ -1069,7 +1069,9 @@ The commands are sorted on the non-optional part of their name.
|:cNfile| :cNf[ile] go to last error in previous file
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
|:caddfile| :cad[dfile] add error message to current quickfix list
|:caddbuffer| :caddb[uffer] add errors from buffer
|:caddexpr| :cad[dexpr] add errors from expr
|:caddfile| :caddf[ile] add error message to current quickfix list
|:call| :cal[l] call a function
|:catch| :cat[ch] part of a :try command
|:cbuffer| :cb[uffer] parse error messages and jump to first error
@@ -1212,23 +1214,55 @@ The commands are sorted on the non-optional part of their name.
|:keepalt| :keepa[lt] following command keeps the alternate file
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|:lNext| :lN[ext] go to previous entry in location list
|:lNfile| :lNf[ile] go to last entry in previous file
|:list| :l[ist] print lines
|:laddexpr| :lad[dexpr] add locations from expr
|:laddbuffer| :laddb[uffer] add locations from buffer
|:laddfile| :laddf[ile] add locations to current location list
|:last| :la[st] go to the last file in the argument list
|:language| :lan[guage] set the language (locale)
|:lbuffer| :lb[uffer] parse locations and jump to first location
|:lcd| :lc[d] change directory locally
|:lchdir| :lch[dir] change directory locally
|:lclose| :lcl[ose] close location window
|:left| :le[ft] left align lines
|:leftabove| :lefta[bove] make split window appear left or above
|:let| :let assign a value to a variable or option
|:lexpr| :lex[pr] read locations from expr and jump to first
|:lfile| :lf[ile] read file with locations and jump to first
|:lfirst| :lfir[st] go to the specified location, default first one
|:lgetfile| :lg[etfile] read file with locations
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|:ll| :ll go to specific location
|:llast| :lla[st] go to the specified location, default last one
|:llist| :lli[st] list all locations
|:lmake| :lmak[e] execute external command 'makeprg' and parse
error messages
|:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode
|:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode
|:lnext| :lne[xt] go to next location
|:lnewer| :lnew[er] go to newer location list
|:lnfile| :lnf[ile] go to first location in next file
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|:loadview| :lo[adview] load view for current window from a file
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|:lockvar| :lockv[ar] lock variables
|:lolder| :lol[der] go to older location list
|:lopen| :lope[n] open location window
|:lprevious| :lp[revious] go to previous location
|:lpfile| :lpf[ile] go to last location in previous file
|:lrewind| :lr[ewind] go to the specified location, default first one
|:ls| :ls list all buffers
|:ltag| :lt[ag] jump to tag and add matching tags to the
location list
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|:lvimgrep| :lv[imgrep] search for pattern in files
|:lvimgrepadd| :lvimgrepa[dd] like :vimgrep, but append to current list
|:lwindow| :lw[indow] open or close location window
|:move| :m[ove] move lines
|:mark| :ma[rk] set a mark
|:make| :mak[e] execute external command 'makeprg' and parse
@@ -1354,7 +1388,7 @@ The commands are sorted on the non-optional part of their name.
buffer list
|:scriptnames| :scrip[tnames] list names of all sourced Vim scripts
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|:scscope| :scs[cope] split window and execute cscope command
|:scscope| :scs[cope] split window and execute cscope command
|:set| :se[t] show or set options
|:setfiletype| :setf[iletype] set 'filetype', unless it was set already
|:setglobal| :setg[lobal] show global values of options
@@ -1388,6 +1422,7 @@ The commands are sorted on the non-optional part of their name.
|:stop| :st[op] suspend the editor or escape to a shell
|:stag| :sta[g] split window and jump to a tag
|:startinsert| :star[tinsert] start Insert mode
|:startgreplace| :startg[replace] start Virtual Replace mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -354,7 +354,7 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
<MouseUp> scroll three lines up *i_<MouseUp>*
<S-MouseUp> scroll a full page up *i_<S-MouseUp>*
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
-----------------------------------------------------------------------
@@ -871,8 +871,8 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
User defined completion *compl-function*
Completion is done by a function that can be defined by the user with the
'completefunc' option. See the 'completefunc' help for how the function
is called and an example.
'completefunc' option. See below for how the function is called and an
example |complete-functions|.
*i_CTRL-X_CTRL-U*
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
@@ -890,7 +890,7 @@ Omni completion *compl-omni*
Completion is done by a function that can be defined by the user with the
'omnifunc' option. This is to be used for filetype-specific completion.
See the 'completefunc' help for how the function is called and an example.
See below for how the function is called and an example |complete-functions|.
For remarks about specific filetypes see |compl-omni-filetypes|.
*i_CTRL-X_CTRL-O*
@@ -952,8 +952,118 @@ CTRL-P Find previous match for words that start with the
other contexts unless a double CTRL-X is used.
INSERT COMPLETION POPUP MENU *ins-completion-menu*
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
This applies to 'completefunc' and 'omnifunc'.
The function is called in two different ways:
- First the function is called to find the start of the text to be completed.
- Later the function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
The function must return the column where the completion starts. It must be a
number between zero and the cursor column "col('.')". This involves looking
at the characters just before the cursor and including those characters that
could be part of the completed item. The text between this column and the
cursor column will be replaced with the matches. Return -1 if no completion
can be done.
On the second invocation the arguments are:
a:findstart 0
a:base the text with which matches should match; the text that was
located in the first call (can be empty)
The function must return a List with the matching words. These matches
usually include the "a:base" text. When there are no matches return an empty
List.
Each list item can either be a string or a Dictionary. When it is a string it
is used as the completion. When it is a Dictionary it can contain these
items:
word the completion, mandatory
menu extra text for the popup menu
info more information about the item
kind single letter indicating the type of completion
All of these must be a string. If an item does not meet these requirements
then an error message is given and further items in the list are not used.
You can mix string and Dictionary items in the returned list.
The "menu" item is used in the popup menu and may be truncated, thus it should
be relatively short. The "info" item can be longer, it may be displayed in a
balloon.
The "kind" item uses a single letter to indicate the kind of completion. This
may be used to show the completion differently (different color or icon).
Currently these types can be used:
v variable
f function or method
c composite (struct, object)
When searching for matches takes some time call |complete_add()| to add each
match to the total list. These matches should then not appear in the returned
list! Call |complete_check()| now and then to allow the user to press a key
while still searching for matches. Stop searching when it returns non-zero.
The function is allowed to move the cursor, it is restored afterwards. This
option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
let res = []
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call add(res, m)
endif
endfor
return res
endif
endfun
set completefunc=CompleteMonths
<
The same, but now pretending searching for matches is slow: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call complete_add(m)
endif
sleep 300m " simulate searching for next match
if complete_check()
break
endif
endfor
return []
endif
endfun
set completefunc=CompleteMonths
<
INSERT COMPLETION POPUP MENU *ins-completion-menu*
*popupmenu-completion*
Vim can display the matches in a simplistic popup menu.
The menu is used when:
@@ -962,9 +1072,16 @@ The menu is used when:
- There are at least two matches.
While the menu is displayed these keys have a special meaning:
<CR> and <Enter>: Accept the currently selected match
<Up>: Select the previous match, as if CTRL-P was used
<Down>: Select the next match, as if CTRL-N was used
<CR> and <Enter> Accept the currently selected match
<Up> Select the previous match, as if CTRL-P was used
<Down> Select the next match, as if CTRL-N was used
<PageUp> Select a match several entries back
<PageDown> Select a match several entries further
<BS> and CTRL-H Delete one character, find the matches for the shorter word
before the cursor. This may find more matches.
CTRL-L Add one character from the current match, may reduce the
number of matches. Does not work after selecting one of the
matches with CTRL-N, <Up>, etc.
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|
@@ -983,6 +1100,8 @@ because it adds extra information that is needed for completion. You can find
it here: http://ctags.sourceforge.net/
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at:
http://georgevreilly.com/vim/ctags.html
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
@@ -1008,20 +1127,20 @@ When the same structure name appears in multiple places all possible members
are included.
CSS *ft-css-omni*
CSS *ft-css-omni*
Complete properties and their appropriate values according to CSS 2.1
specification.
(X)HTML *ft-html-omni*
*ft-xhtml-omni*
HTML and XHTML *ft-html-omni*
*ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
It is designed to support writing of XHTML 1.0 Strict files but will
also works for other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggest
- after "<" complete tag name depending on context (no div suggestion
inside of an a tag)
- inside of tag complete proper attributes (no width attribute for an
a tag)
@@ -1030,15 +1149,74 @@ also works for other versions of HTML. Features:
- complete names of entities
- complete values of "class" and "id" attributes with data obtained from
style tag and included CSS files
- when completing "style" attribute or working inside of "style" tag
- when completing value of "style" attribute or working inside of "style" tag
switch to |ft-css-omni| completion
- when completing values of events attributes or working inside of "script" tag
switch to |ft-javascript-omni| completion
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
- this is time needed for loading of data file.
Note: Completion may fail in badly formatted documents. In such case try to
run |:make| command to detect formatting problems.
XML *ft-xml-omni*
JAVASCRIPT *ft-javascript-omni*
Completion of most elements of JavaScript language and DOM elements.
Complete:
- variables
- function name
- function arguments
- properties of variables trying to detect type of variable
- complete DOM objects and properties depending on context
- keywords of language
Completion works in separate JavaScript files (&ft==javascript), inside of
<script> tag of (X)HTML and in values of event attributes (including scanning
of external files.
DOM compatibility
At the moment (beginning of 2006) there are two main browsers - MS Internet
Explorer and Mozilla Firefox. These two applications are covering over 90% of
market. Theoretically standards are created by W3C organisation
(http://www.w3c.org) but they are not always followed/implemented.
IE FF W3C Omni completion ~
+/- +/- + + ~
+ + - + ~
+ - - - ~
- + - - ~
Regardless from state of implementation in browsers but if element is defined
in standards, completion plugin will place element in suggestion list. When
both major engines implemented element, even if this is not in standards it
will be suggested. All other elements are not placed in suggestion list.
SYNTAX *ft-syntax-omni*
This uses the current syntax highlighting for completion. It can be used for
any filetype and provides a minimal language-sensitive completion.
To enable code completion do: >
source $VIMRUNTIME/autoload/syntaxcomplete.vim
You can automate this by placing this in your vimrc (after any ":filetype"
command): >
autocmd Filetype *
\ if exists('&ofu') && &ofu == "" |
\ source $VIMRUNTIME/autoload/syntaxcomplete.vim |
\ endif
The above will set completion to this script only if a proper one does not
already exist for that filetype.
XML *ft-xml-omni*
Vim 7 provides mechanism to context aware completion of XML files. It depends
on special |xml-omni-datafile| and two commands: |:XMLns| and |:XMLent|.
@@ -1054,7 +1232,7 @@ Features are:
with "<!ENTITY" declarations
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Format of XML data file *xml-omni-datafile*
Format of XML data file *xml-omni-datafile*
Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim)
@@ -1103,7 +1281,7 @@ xsl.vim for example.
Commands
:XMLns {name} [{namespace}] *:XMLns*
:XMLns {name} [{namespace}] *:XMLns*
Vim has to know which data file should be used and with which namespace. For
loading of data file and connecting data with prope namespace use |:XMLns|
@@ -1116,24 +1294,24 @@ to use XML completion in .xsl files: >
:XMLns xsl xsl
:XMLent {name} *:XMLent*
:XMLent {name} *:XMLent*
By default entities will be completed from data file of default
namespace. XMLent command should be used in case when there is no
default namespace: >
:XMLent xhtml10s
:XMLent xhtml10s
Usage
While used in situation (after declarations from previous part, | is
cursor position): >
<|
<|
Will complete to appropriate XHTML tag, and in this situation: >
<xsl:|
<xsl:|
Will complete to appropriate XSL tag.
@@ -1141,7 +1319,7 @@ File xmlcomplete.vim provides through |autoload| mechanism
GetLastOpenTag function which can be used in XML files to get name of
last open tag with (b:unaryTagsStack has to be defined): >
:echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
:echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
@@ -1273,6 +1451,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
the function or script is finished.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
*:startgreplace*
:startg[replace][!] Just like |:startreplace|, but use Virtual Replace
mode, like with |gR|.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
==============================================================================

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*map.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -191,6 +191,8 @@ already exists which is equal.
Example of what will fail: >
:map ,w /[#&!]<CR>
:map <buffer> <unique> ,w /[.,;]<CR>
If you want to map a key and then have it do what it was originally mapped to,
have a look at |maparg()|.
"<buffer>", "<silent>", "<script>" and "<unique>" can be used in any order.
They must appear right after the command, before any other arguments.
@@ -596,7 +598,7 @@ always work. But in a terminal Vim gets a sequence of bytes and has to figure
out whether ALT was pressed or not.
By default Vim assumes that pressing the ALT key sets the 8th bit of a typed
character. Most decent terminals work that way, such as xterm, aterm and
character. Most decent terminals can work that way, such as xterm, aterm and
rxvt. If your <A-k> mappings don't work it might be that the terminal is
prefixing the character with an ESC character. But you can just as well type
ESC before a character, thus Vim doesn't know what happened (except for
@@ -604,8 +606,9 @@ checking the delay between characters, which is not reliable).
As of this writing, some mainstream terminals like gnome-terminal and konsole
use the ESC prefix. There doesn't appear a way to have them use the 8th bit
instead. Xterm, aterm and rxvt should work well by default, unless you tweak
resources like "metaSendsEscape", "eightBitInput" and "eightBitOutput".
instead. Xterm should work well by default. Aterm and rxvt should work well
when started with the "--meta8" argument. You can also tweak resources like
"metaSendsEscape", "eightBitInput" and "eightBitOutput".
On the Linux console, this behavior can be toggled with the "setmetamode"
command. Bear in mind that not using an ESC prefix could get you in trouble
@@ -638,7 +641,7 @@ you must create mapping that first sets the 'operatorfunc' option and then
invoke the |g@| operator. After the user types the {motion} command the
specified function will be called.
*g@*
*g@* *E774* *E775*
g@{motion} Call the function set by the 'operatorfunc' option.
The '[ mark is positioned at the start of the text
moved over by {motion}, the '] mark on the last
@@ -945,11 +948,10 @@ local function or uses a local mapping.
Otherwise, using "<SID>" outside of a script context is an error.
If you need to get the script number to use in a complicated script, you can
use this trick: >
:map <SID>xx <SID>xx
:let s:sid = maparg("<SID>xx")
:unmap <SID>xx
And remove the trailing "xx".
use this function: >
function s:SID()
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
endfun
The "<SNR>" will be shown when listing functions and mappings. This is useful
to find out what they are defined to.

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2005 Oct 10
*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -19,7 +19,8 @@ The ":messages" command can be used to view previously given messages. This
is especially useful when messages have been overwritten or truncated. This
depends on the 'shortmess' option.
The number of remembered messages is fixed at 20.
The number of remembered messages is fixed at 20 for the tiny version and 100
for other versions.
*g<*
The "g<" command can be used to see the last page of previous command output.

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*motion.txt* For Vim version 7.0aa. Last change: 2006 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -386,10 +386,11 @@ These commands move over words or WORDS.
*word*
A word consists of a sequence of letters, digits and underscores, or a
sequence of other non-blank characters, separated with white space (spaces,
tabs, <EOL>). This can be changed with the 'iskeyword' option.
tabs, <EOL>). This can be changed with the 'iskeyword' option. An empty line
is also considered to be a word.
*WORD*
A WORD consists of a sequence of non-blank characters, separated with white
space. An empty line is also considered to be a word and a WORD.
space. An empty line is also considered to be a WORD.
A sequence of folded lines is counted for one word of a single character.
"w" and "W", "e" and "E" move to the start/end of the first word or WORD after

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
*netbeans.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
VIM REFERENCE MANUAL by Gordon Prieur
@@ -179,6 +179,7 @@ These messages are specific for NetBeans:
Region is guarded, cannot modify
NetBeans defines guarded areas in the text, which you cannot
change.
Also sets the current buffer, if necessary.
*E656*
NetBeans disallows writes of unmodified buffers
@@ -485,8 +486,10 @@ setContentType
Not implemented.
setDot off Make the buffer the current buffer and set the cursor at the
specified position. If there are folds they are opened to
make the cursor line visible.
specified position. If the buffer is open in another window
than make that window the current window.
If there are folds they are opened to make the cursor line
visible.
In version 2.1 "lnum/col" can be used instead of "off".
setExitDelay seconds
@@ -566,6 +569,7 @@ stopDocumentListen
unguard off len
Opposite of "guard", remove guarding for a text area.
Also sets the current buffer, if necessary.
version Not implemented.
@@ -612,6 +616,7 @@ insert off text
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
remove off length
Delete "length" bytes of text at position "off". Both
@@ -620,6 +625,7 @@ remove off length
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
If there are no changed files or the user does not cancel the

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -162,6 +162,11 @@ include the "|" in the option value, use "\|" instead. This example sets the
This sets the 'titlestring' option to "hi" and 'iconstring' to "there": >
:set titlestring=hi|set iconstring=there
Similarly, the double quote character starts a comment. To include the '"' in
the option value, use '\"' instead. This example sets the 'titlestring'
option to 'hi "there"': >
:set titlestring=hi\ \"there\"
For MS-DOS and WIN32 backslashes in file names are mostly not removed. More
precise: For options that expect a file name (those where environment
variables are expanded) a backslash before a normal file name character is not
@@ -1037,6 +1042,12 @@ A jump table for the options with a short description can be found at |Q_op|.
Vim does not try to send a message to an external debugger (Netbeans
or Sun Workshop).
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'balloonexpr' |textlock|.
To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline")
<
@@ -1172,6 +1183,7 @@ A jump table for the options with a short description can be found at |Q_op|.
autocommands. {not available when compiled without the
|+autocmd| feature}
quickfix quickfix buffer, contains list of errors |:cwindow|
or list of locations |:lwindow|
help help buffer (you are not supposed to set this
manually)
@@ -1180,8 +1192,9 @@ A jump table for the options with a short description can be found at |Q_op|.
Be careful with changing this option, it can have many side effects!
A "quickfix" buffer is only used for the error list. This value is
set by the |:cwindow| command and you are not supposed to change it.
A "quickfix" buffer is only used for the error list and the location
list. This value is set by the |:cwindow| and |:lwindow| commands and
you are not supposed to change it.
"nofile" and "nowrite" buffers are similar:
both: The buffer is not to be written to disk, ":w" doesn't
@@ -1598,92 +1611,11 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{not available when compiled without the +eval
or +insert_expand feature}
This option specifies a function to be used for CTRL-X CTRL-U
completion. |i_CTRL-X_CTRL-U|
This option specifies a function to be used for Insert mode completion
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
See |complete-functions| for an explanation of how the function is
invoked and what it should return.
The function will be invoked with two arguments. First the function
is called to find the start of the text to be completed. Secondly the
function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
The function must return the column of where the completion starts.
It must be a number between zero and the cursor column "col('.')".
This involves looking at the characters just before the cursor and
including those characters that could be part of the completed item.
The text between this column and the cursor column will be replaced
with the matches. Return -1 if no completion can be done.
On the second invocation the arguments are:
a:findstart 0
a:base the text with which matches should match, what was
located in the first call (can be empty)
The function must return a List with the matching words. These
matches usually include the "a:base" text. When there are no matches
return an empty List.
When searching for matches takes some time call |complete_add()| to
add each match to the total list. These matches should then not
appear in the returned list! Call |complete_check()| now and then to
allow the user to press a key while still searching for matches. Stop
searching when it returns non-zero.
The function may move the cursor, it is restored afterwards.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
let res = []
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call add(res, m)
endif
endfor
return res
endif
endfun
set completefunc=CompleteMonths
<
The same, but now pretending searching for matches is slow: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call complete_add(m)
endif
sleep 300m " simulate searching for next match
if complete_check()
break
endif
endfor
return []
endif
endfun
set completefunc=CompleteMonths
<
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu")
@@ -1982,11 +1914,11 @@ A jump table for the options with a short description can be found at |Q_op|.
C-indenting.
*cpo--*
- When included, a vertical movement command fails when
it would above the first line or below the last line.
Without it the cursor moves to the first or last line,
unless it already was in that line.
it would go above the first line or below the last
line. Without it the cursor moves to the first or
last line, unless it already was in that line.
Applies to the commands "-", "k", CTRL-P, "+", "j",
CTRL-N and CTRL-J.
CTRL-N, CTRL-J and ":1234".
*cpo-+*
+ When included, a ":write file" command will reset the
'modified' flag of the buffer, even though the buffer
@@ -2771,8 +2703,13 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding|
or |+eval| feature}
The expression used for when 'foldmethod' is "expr". It is evaluated
for each line to obtain its fold level. See |fold-expr|. Also see
|eval-sandbox|.
for each line to obtain its fold level. See |fold-expr|.
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'foldexpr' |textlock|.
*'foldignore'* *'fdi'*
'foldignore' 'fdi' string (default: "#")
@@ -2904,6 +2841,12 @@ A jump table for the options with a short description can be found at |Q_op|.
An expression which is used to specify the text displayed for a closed
fold. See |fold-foldtext|.
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'foldtext' |textlock|.
*'formatoptions'* *'fo'*
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
local to buffer
@@ -3000,7 +2943,8 @@ A jump table for the options with a short description can be found at |Q_op|.
also work well with a single file: >
:set grepprg=grep\ -nH
< Special value: When 'grepprg' is set to "internal" the |:grep| command
works like |:vimgrep| and |:grepadd| like |:vimgrepadd|.
works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like
|:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|.
See also the section |:make_makeprg|, since most of the comments there
apply equally to 'grepprg'.
For Win32, the default is "findstr /n" if "findstr.exe" can be found,
@@ -3696,11 +3640,17 @@ A jump table for the options with a short description can be found at |Q_op|.
option to a file name. Mostly useful to change "." to "/" for Java: >
:set includeexpr=substitute(v:fname,'\\.','/','g')
< The "v:fname" variable will be set to the file name that was detected.
Evaluated in the |sandbox|.
Also used for the |gf| command if an unmodified file name can't be
found. Allows doing "gf" on the name after an 'include' statement.
Also used for |<cfile>|.
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'includeexpr' |textlock|.
*'incsearch'* *'is'* *'noincsearch'* *'nois'*
'incsearch' 'is' boolean (default off)
global
@@ -3746,9 +3696,16 @@ A jump table for the options with a short description can be found at |Q_op|.
:set indentexpr=GetMyIndent()
< Error messages will be suppressed, unless the 'debug' option contains
"msg".
See |indent-expression|. Also see |eval-sandbox|.
See |indent-expression|.
NOTE: This option is made empty when 'compatible' is set.
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'indentexpr' |textlock|.
*'indentkeys'* *'indk'*
'indentkeys' 'indk' string (default "0{,0},:,0#,!^F,o,O,e")
local to buffer
@@ -4597,12 +4554,12 @@ A jump table for the options with a short description can be found at |Q_op|.
This defines what bases Vim will consider for numbers when using the
CTRL-A and CTRL-X commands for adding to and subtracting from a number
respectively; see |CTRL-A| for more info on these commands.
alpha if included, single alphabetical characters will be
alpha If included, single alphabetical characters will be
incremented or decremented. This is useful for a list with a
letter index a), b), etc.
octal if included, numbers that start with a zero will be considered
octal If included, numbers that start with a zero will be considered
to be octal. Example: Using CTRL-A on "007" results in "010".
hex if included, numbers starting with "0x" or "0X" will be
hex If included, numbers starting with "0x" or "0X" will be
considered to be hexadecimal. Example: Using CTRL-X on
"0x100" results in "0x0ff".
Numbers which simply begin with a digit in the range 1-9 are always
@@ -4644,10 +4601,10 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{not available when compiled without the +eval
or +insert_expand feature}
This option specifies a function to be used for CTRL-X CTRL-O
completion. |i_CTRL-X_CTRL-O|
For the use of the function see 'completefunc'.
This option specifies a function to be used for Insert mode omni
completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
See |complete-functions| for an explanation of how the function is
invoked and what it should return.
*'operatorfunc'* *'opfunc'*
@@ -5136,6 +5093,7 @@ A jump table for the options with a short description can be found at |Q_op|.
menu.vim GUI menus |menu.vim|
plugin/ plugin scripts |write-plugin|
print/ files for printing |postscript-print-encoding|
spell/ spell checking files |spell|
syntax/ syntax files |mysyntaxfile|
tutor/ files for vimtutor |tutor|
@@ -5768,11 +5726,12 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
When on, a <Tab> in front of a line inserts blanks according to
'shiftwidth'. 'tabstop' is used in other places. A <BS> will delete
a 'shiftwidth' worth of space at the start of the line.
When off a <Tab> always inserts blanks according to 'tabstop'.
'shiftwidth' is only used for shifting text left or right
|shift-left-right|.
'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
<BS> will delete a 'shiftwidth' worth of space at the start of the
line.
When off, a <Tab> always inserts blanks according to 'tabstop' or
'softtabstop'. 'shiftwidth' is only used for shifting text left or
right |shift-left-right|.
What gets inserted (a Tab or spaces) depends on the 'expandtab'
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
number of spaces is minimized by using <Tab>s.
@@ -5877,9 +5836,14 @@ A jump table for the options with a short description can be found at |Q_op|.
files twice.
How the related spell files are found is explained here: |spell-load|.
If the |spellfile.vim| plugin is active and you use a language name
for which Vim cannot find the .spl file in 'runtimepath' the plugin
will ask you if you want to download the file.
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
up to the first comma, dot or underscore. See |set-spc-auto|.
up to the first comma, dot or underscore.
Also see |set-spc-auto|.
*'spellsuggest'* *'sps'*
@@ -6051,6 +6015,7 @@ A jump table for the options with a short description can be found at |Q_op|.
a S Argument list status as in default title. ({current} of {max})
Empty if the argument file count is zero or one.
{ NF Evaluate expression between '{' and '}' and substitute result.
Note that there is no '%' before the closing '}'.
( - Start of item group. Can be used for setting the width and
alignment of a section. Must be followed by %) somewhere.
) - End of item group. No width fields allowed.
@@ -6084,7 +6049,13 @@ A jump table for the options with a short description can be found at |Q_op|.
temporarily to that of the window (and buffer) whose statusline is
currently being drawn. The expression will evaluate in this context.
The variable "actual_curbuf" is set to the 'bufnr()' number of the
real current buffer. The expression is evaluated in the |sandbox|.
real current buffer.
The 'statusline' option may be evaluated in the |sandbox|, see
|sandbox-option|.
It is not allowed to change text or jump to another window while
evaluating 'statusline' |textlock|.
If the statusline is not updated when you want it (e.g., after setting
a variable that's used in an expression), you can force an update by

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Sep 12
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -256,9 +256,13 @@ switched off by setting the 's' flag in the 'shortmess' option. The highlight
method 'w' is used for this message (default: standout).
*search-range*
You cannot limit the search command "/" to a certain range of lines. A trick
to do this anyway is to use the ":substitute" command with the 'c' flag.
Example: >
You can limit the search command "/" to a certain range of lines by including
\%>l items. For example, to match the word "limit" below line 199 and above
line 300: >
/\%>199l\%<300llimit
Also see |/\%>l|.
Another way is to use the ":substitute" command with the 'c' flag. Example: >
:.,300s/Pattern//gc
This command will search from the cursor position until line 300 for
"Pattern". At the match, you will be asked to type a character. Type 'q' to
@@ -390,7 +394,9 @@ More explanation and examples below, follow the links.
|/\ze| \ze \ze anything, sets end of match
|/\%^| \%^ \%^ beginning of file |/zero-width| *E71*
|/\%$| \%$ \%$ end of file |/zero-width|
|/\%V| \%V \%V inside Visual area |/zero-width|
|/\%#| \%# \%# cursor position |/zero-width|
|/\%'m| \%'m \%'m mark m position |/zero-width|
|/\%l| \%23l \%23l in line 23 |/zero-width|
|/\%c| \%23c \%23c in column 23 |/zero-width|
|/\%v| \%23v \%23v in virtual column 23 |/zero-width|
@@ -784,6 +790,11 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
position after the first "VIM".
Searching from the end of the file backwards is easier!
*/\%V*
\%V Match inside the Visual area. When Visual mode has already been
stopped match in the area that |gv| would reselect.
Only works for the current buffer.
*/\%#* *cursor-position*
\%# Matches with the cursor position. Only works when matching in a
buffer displayed in a window. {not in Vi}
@@ -798,10 +809,24 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
*/\%'m* */\%<'m* */\%>'m*
\%'m Matches with the position of mark m.
\%<'m Matches before the position of mark m.
\%>'m Matches after the position of mark m.
Example, to highlight the text from mark 's to 'e: >
/.\%>'s.*\%<'e..
< Note that two dots are required to include mark 'e in the match. That
is because "\%<'e" matches at the character before the 'e mark, and
since it's a |/zero-width| match it doesn't include that character.
{not in Vi}
WARNING: When the mark is moved after the pattern was used, the result
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l*
\%23l Matches in a specific line.
\%<23l Matches above a specific line.
\%>23l Matches below a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
These three can be used to match specific lines in a buffer. The "23"
can be any line number. The first line is 1. {not in Vi}
WARNING: When inserting or deleting lines Vim does not automatically

View File

@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.0. Last change: Nov 28, 2005
*pi_netrw.txt* For Vim version 7.0. Last change: Jan 27, 2006
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -10,7 +10,8 @@
==============================================================================
0. Contents *netrw-contents*
1. Netrw Reference......................................|netrw-ref|
1. Starting With Netrw.................................|netrw-start|
2. Netrw Reference......................................|netrw-ref|
CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
READING............................................|netrw-read|
WRITING............................................|netrw-write|
@@ -18,14 +19,14 @@
CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
VARIABLES..........................................|netrw-variables|
PATHS..............................................|netrw-path|
2. Network-Oriented File Transfer.......................|netrw-xfer|
3. Network-Oriented File Transfer.......................|netrw-xfer|
NETRC..............................................|netrw-netrc|
PASSWORD...........................................|netrw-passwd|
3. Activation...........................................|netrw-activate|
4. Transparent File Transfer............................|netrw-transparent|
5. Ex Commands..........................................|netrw-ex|
6. Variables and Options................................|netrw-var|
7. Directory Browsing...................................|netrw-browse| {{{1
4. Activation...........................................|netrw-activate|
5. Transparent File Transfer............................|netrw-transparent|
6. Ex Commands..........................................|netrw-ex|
7. Variables and Options................................|netrw-var|
8. Directory Browsing...................................|netrw-browse| {{{1
Maps...............................................|netrw-maps|
Exploring..........................................|netrw-explore-cmds|
Quick Reference Commands Table.....................|netrw-browse-cmds|
@@ -41,7 +42,7 @@
Deleting Files Or Directories......................|netrw-delete|
Renaming Files Or Directories......................|netrw-move|
Hiding Files Or Directories........................|netrw-a|
Edit File Or Directory Hiding List.................|netrw-h|
Edit File Or Directory Hiding List.................|netrw-ctrl-h|
Browsing With A Horizontally Split Window..........|netrw-o|
Preview Window.....................................|netrw-p|
Selecting Sorting Style............................|netrw-s|
@@ -56,19 +57,19 @@
Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB|
Listing Bookmarks And History......................|netrw-q|
Improving Directory Browsing.......................|netrw-listhack| }}}1
8. Problems and Fixes...................................|netrw-problems|
9. Debugging............................................|netrw-debug|
10. History..............................................|netrw-history|
11. Credits..............................................|netrw-credits|
9. Problems and Fixes...................................|netrw-problems|
10. Debugging............................................|netrw-debug|
11. History..............................................|netrw-history|
12. Credits..............................................|netrw-credits|
The Netrw plugin is generally sourced automatically as it is a
|standard-plugin|. That said, to make use of netrw, one must
have plugins available which can be done with the following
two lines in your <.vimrc>:
two lines in your <.vimrc>: >
set nocp " 'compatible' is not set
filetype plugin on " plugins are enabled
<
You can avoid loading this plugin by setting the "loaded_netrw" variable
in your <.vimrc> file: >
@@ -77,14 +78,66 @@ in your <.vimrc> file: >
{Vi does not have any of this}
==============================================================================
1. Netrw Reference *netrw-ref*
1. Starting With Netrw *netrw-start*
Netrw makes reading, writing, and browsing over a network connection easy!
First, make sure that you have plugins enabled, so you'll need to have at
least the following in your <.vimrc>: (or see |netrw-activate|) >
set nocp " 'compatible' is not set
filetype plugin on " plugins are enabled
<
(see |'cp'| and |:filetype-plugin-on|)
Netrw supports "transparent" editing of files on other machines using urls
(see |netrw-transparent|). As an example of this, let's assume you have an
account on some other machine; try >
vim scp://hostname/path/to/file
<
if you have an ssh connection. Want to make ssh/scp easier to use? Check
out |netrw-listhack|!
What if you have ftp, not ssh/scp? That's easy, too; try >
vim ftp://hostname/path/to/file
<
Want to make ftp simpler to use? See if your ftp supports a file called
<.netrc> -- typically it goes in your home directory, has read/write
permissions for only the user to read (ie. not group, world, other, etc),
and has lines resembling >
machine HOSTNAME login USERID password "PASSWORD"
machine HOSTNAME login USERID password "PASSWORD"
...
default login USERID password "PASSWORD"
<
How about browsing -- ie. you just want to look around before editing a
file. For browsing on your current host, just "edit" a directory: >
vim .
vim /home/userid/path
<
For browsing on a remote host, "edit" a directory (but make sure that
the directory name is followed by a "/"): >
vim scp://hostname/
vim ftp://hostname/path/to/dir/
<
See |netrw-browse| for more!
There's more protocols supported than scp and ftp, too: see the next
section, |netrw-externapp|.
==============================================================================
2. Netrw Reference *netrw-ref*
CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp*
Protocol Variable Default Value
-------- ---------------- -------------
dav: *g:netrw_dav_cmd* = "cadaver"
fetch: *g:netrw_fetch_cmd* = "fetch -o"
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
ftp: *g:netrw_ftp_cmd* = "ftp"
http: *g:netrw_http_cmd* = "fetch -o" if fetch is available
http: g:netrw_http_cmd = "wget -q -O" If wget is available
@@ -191,7 +244,7 @@ file using root-relative paths, use the full path:
<
==============================================================================
2. Network-Oriented File Transfer *netrw-xfer*
3. Network-Oriented File Transfer *netrw-xfer*
Network-oriented file transfer under Vim is implemented by a VimL-based script
(<netrw.vim>) using plugin techniques. It currently supports both reading and
@@ -337,7 +390,7 @@ However, |netrw-listhack| can help with this problem.
==============================================================================
3. Activation *netrw-activate*
4. Activation *netrw-activate*
Network-oriented file transfers are available by default whenever
|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
@@ -351,7 +404,7 @@ up vim. I suggest that, at a minimum, you have at least the following in your
<
==============================================================================
4. Transparent File Transfer *netrw-transparent*
5. Transparent File Transfer *netrw-transparent*
Transparent file transfers occur whenever a regular file read or write
(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
@@ -365,7 +418,7 @@ See |netrw-activate| for more on how to encourage your vim to use plugins
such as netrw.
==============================================================================
5. Ex Commands *netrw-ex*
6. Ex Commands *netrw-ex*
The usual read/write commands are supported. There are also a couple of
additional commands available.
@@ -403,7 +456,7 @@ additional commands available.
==============================================================================
6. Variables and Options *netrw-options* *netrw-var*
7. Variables and Options *netrw-options* *netrw-var*
The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
behavior. These variables typically may be set in the user's <.vimrc> file:
@@ -476,10 +529,10 @@ variables listed below, and may be modified by the user.
transformed however they wish
by NetReadFixup()
g:netrw_dav_cmd variable ="cadaver"
g:netrw_fetch_cmd variable ="fetch -o"
g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
g:netrw_ftp_cmd variable ="ftp"
g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
g:netrw_http_cmd variable ="wget -O" if wget is executable
g:netrw_http_cmd variable ="fetch -o" if fetch is available
g:netrw_http_cmd variable ="wget -O" else if wget is available
g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
g:netrw_rcp_cmd variable ="rcp"
g:netrw_rsync_cmd variable ="rsync -a"
@@ -488,9 +541,10 @@ variables listed below, and may be modified by the user.
-------------------------------------------------------------------------
<
*netrw-ftp*
The first two options both help with certain ftp's that give trouble
otherwise. In order to best understand how to use these options if ftp is
giving you troubles, a bit of discussion follows on how netrw does ftp reads.
The first two options (netrw_ftp and NetReadFixup) both help with certain
ftp's that give trouble otherwise. In order to best understand how to use
these options if ftp is giving you troubles, a bit of discussion follows on
how netrw does ftp reads.
The g:netrw_..._cmd variables specify the external program to use handle the
associated protocol (rcp, ftp, etc), plus any options.
@@ -572,7 +626,7 @@ itself:
>
==============================================================================
7. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
8. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
MAPS *netrw-maps*
?................Help.......................................|netrw-help|
@@ -585,7 +639,7 @@ MAPS *netrw-maps*
c................Make Browsing Directory The Current Dir....|netrw-c|
d................Make A New Directory.......................|netrw-d|
D................Deleting Files or Directories..............|netrw-D|
<c-h>............Edit File/Directory Hiding List............|netrw-h|
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
i................Long Listing...............................|netrw-i|
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
o................Browsing with a Horizontal Split...........|netrw-o|
@@ -615,27 +669,38 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
Command Explanation
------- -----------
< ? Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
d Make a directory
D Netrw will attempt to remove the file(s)/directory(ies)
R Netrw will attempt to rename the file(s)/directory(ies)
- Makes Netrw go up one directory
a Toggles between normal display,
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
c Make current browsing directory the current directory
<c-h> Edit file hiding list
i Toggles between long and short listing
<c-l> Causes Netrw to refresh the directory listing
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
- Makes Netrw go up one directory |netrw--|
a Toggles between normal display, |netrw-a|
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
b bookmark current directory; use Nb if compact listing
in use |netrw-b|
B go to previous bookmarked directory; use Nb if compact
listing is in use |netrw-B|
c Make current browsing directory the current directory |netrw-c|
d Make a directory |netrw-d|
D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D|
<c-h> Edit file hiding list |netrw-ctrl-h|
i Toggles between long and short listing |netrw-i|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
Nb Same as b, but always available |netrw-Nb|
NB Same as B, but always available |netrw-NB|
o Enter the file/directory under the cursor in a new browser
window. A horizontal split is used.
p Preview the file
r Reverse sorting order
s Select sorting style: by name, time, or file size
window. A horizontal split is used. |netrw-o|
O Obtain a file specified by cursor |netrw-O|
p Preview the file |netrw-p|
P Browse in the previously used window |netrw-P|
r Reverse sorting order |netrw-r|
R Rename the designed file(s)/directory(ies) |netrw-R|
s Select sorting style: by name, time, or file size |netrw-s|
S Specify suffix priority for name-sorting |netrw-S|
u Change to recently-visited directory |netrw-u|
U Change to subsequently-visited directory |netrw-U|
v Enter the file/directory under the cursor in a new browser
window. A vertical split is used.
x Apply a function to a file.
window. A vertical split is used. |netrw-v|
x Apply a function to a file. (special browsers) |netrw-x|
NETRW BROWSER VARIABLES *netrw-browse-var*
>
@@ -650,6 +715,19 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
by setting this variable (see |netrw-v|)
default: =0
*g:netrw_browse_split* when browsing, <cr> will open the file by:
=0: re-using the same window
=1: horizontally splitting the window first
=2: vertically splitting the window first
*g:netrw_browsex_viewer* specify user's preference for a viewer: >
"kfmclient exec"
"gnome-open"
< If >
"-"
< is used, then netrwFileHandler() will look for
a script/function to handle the given
extension. (see |netrw_filehandler|).
<
*g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
that can show up as "directories" and "files"
in the listing. This pattern is used to
@@ -866,6 +944,11 @@ protocol given in the original read request.
or more spaces embedded in it, or any trailing spaces, then you'll need to
use the "thin" format to select it.
The |g:netrw_browse_split| option, which is zero by default, may be used to
cause the opening of files to be done in a new window. The splitting will
be done horizontally if the option is one and vertically if the option is
two.
OBTAINING A FILE *netrw-O*
@@ -921,7 +1004,7 @@ directory. Attempts to make a local directory that already exists (as either
a file or a directory) will be detected, reported on, and ignored.
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del*
Deleting/removing files and directories involves moving the cursor to the
file/directory to be deleted and pressing "D". Directories must be empty
@@ -971,7 +1054,7 @@ ways: ignore it, hide files which match, and show only those files which
match. The "a" map allows the user to cycle about these three ways.
The g:netrw_list_hide variable holds a comma delimited list of patterns (ex.
\.obj) which specify the hiding list. (also see |netrw-h|) To set the hiding
\.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the hiding
list, use the <c-h> map. As an example, to hide files which begin with a ".",
one may use the <c-h> map to set the hiding list to '^\..*' (or one may put
let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the "a"
@@ -979,7 +1062,7 @@ key to show all files, hide matching files, or to show only the matching
files.
EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide*
EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide*
The "<ctrl-h>" map brings up a requestor allowing the user to change the
file/directory hiding list. The hiding list consists of one or more patterns
@@ -1009,6 +1092,20 @@ One may use a preview window (currently only for local browsing) by using the
"p" key when the cursor is atop the desired filename to be previewed.
PREVIOUS WINDOW *netrw-P* *netrw-prvwin*
To edit a file or directory in the previously used window (see :he |CTRL-W_P|),
press a "P". If there's only one window, then the one window will be
horizontally split (above/below splitting is controlled by |g:netrw_alto|,
and its initial size is controlled by |g:netrw_winsize|).
If there's more than one window, the previous window will be re-used on
the selected file/directory. If the previous window's associated buffer
has been modified, and there's only one window with that buffer, then
the user will be asked if s/he wishes to save the buffer first (yes,
no, or cancel).
SELECTING SORTING STYLE *netrw-s* *netrw-sort*
One may select the sorting style by name, time, or (file) size. The "s" map
@@ -1068,15 +1165,30 @@ window and cursor at the right, have
in your <.vimrc>.
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* *gx*
One may "enter" a file with a special handler, thereby firing up a browser or
other application, for example, on a file by hitting the "x" key. The special
handler varies:
Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
best seen with a special handler (ie. a tool provided with your computer).
Netrw allows one to invoke such special handlers by: >
* when Exploring, hit the "x" key
* when editing, hit gx with the cursor atop the special filename
<
Netrw determines which special handler by the following method:
* if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
view files. Examples of useful settings (place into your <.vimrc>): >
:let g:netrw_browsex_viewer= "kfmclient exec"
< or >
:let g:netrw_browsex_viewer= "gnome-open"
<
If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
invoked first (see |netrw_filehandler|).
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
* for KDE (with kfmclient): kfmclient is used.
* for Gnome (with gnome-open): gnome-open is used.
* for KDE (with kfmclient): kfmclient is used.
* otherwise the netrwFileHandler plugin is used.
The file's suffix is used by these various approaches to determine an
@@ -1084,6 +1196,7 @@ appropriate application to use to "handle" these files. Such things as
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
*.eps) can be handled.
*netrw_filehandler*
The netrwFileHandler applies a user-defined function to a file, based on its
extension. Of course, the handler function must exist for it to be called!
>
@@ -1093,10 +1206,12 @@ extension. Of course, the handler function must exist for it to be called!
See the <plugin/netrwFileHandlers.vim> for an example of how to handle an html
file with mozilla.
One may write custom netrwFileHandlers; please look at the
plugin/netrwFileHandlers.vim script for examples. If its likely to be
generally useful, please feel free to forward a copy to me for future
inclusion in the distribution.
One may write custom netrwFileHandlers; please look at the >
plugin/netrwFileHandlers.vim
script for examples. If its likely to be generally useful, please feel free
to forward a copy to me for future inclusion in the distribution.
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
@@ -1168,7 +1283,7 @@ help on what each of the variables do.
==============================================================================
8. Problems and Fixes *netrw-problems*
9. Problems and Fixes *netrw-problems*
(This section is likely to grow as I get feedback)
(also see |netrw-debug|)
@@ -1233,7 +1348,7 @@ help on what each of the variables do.
==============================================================================
9. Debugging *netrw-debug*
10. Debugging *netrw-debug*
The <netrw.vim> script is typically available as:
>
@@ -1282,8 +1397,23 @@ which is loaded automatically at startup (assuming :set nocp).
NdrOchip at ScampbellPfamily.AbizM - NOSPAM
==============================================================================
10. History *netrw-history*
11. History *netrw-history* {{{1
v78: * progress has been made on allowing spaces inside directory
names for remote work (reading, writing, browsing). (scp)
v77: * Mikolaj Machowski fixed a bug in a substitute command
* g:netrw_browsex_viewer implemented
* Mikolaj Machowski pointed out that gnome-open is often
executable under KDE systems, although it is effectively
not functional. NetBrowseX now looks for "kicker" as
a running process to determine if KDE is actually the
really running.
* Explorer's O functionality was inadvertently left out.
Netrw now does the same thing, but with the "P" key.
* added g:netrw_browse_split option
* fixed a bug where the directory contained a "." but
the file didn't (was treating the dirname from "."
onwards as a suffix)
v76: * "directory is missing" error message now restores echo
highlighting
v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
@@ -1475,7 +1605,7 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
11. Credits *netrw-credits*
11. Credits *netrw-credits* {{{1
Vim editor by Bram Moolenaar (Thanks, Bram!)
dav support by C Campbell

View File

@@ -1,9 +1,9 @@
*tar.txt* Tar File Interface Nov 22, 2005
*tar.txt* Tar File Interface Dec 21, 2005
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: The GPL (gnu public license) applies to *tar-copyright*
tarPlugin.vim, and tar.txt.
tarPlugin.vim, and pi_tar.txt.
No warranty, express or implied. Use At-Your-Own-Risk.
==============================================================================
@@ -23,6 +23,8 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright*
==============================================================================
3. History *tar-history*
v6 Dec 21, 2005 * writing to files not in directories caused problems -
fixed (pointed out by Christian Robinson)
v5 Nov 22, 2005 * report option workaround installed
v3 Sep 16, 2005 * handles writing files in an archive back to the
archive

View File

@@ -1,4 +1,4 @@
*zip.txt* Zip File Interface Nov 22, 2005
*zip.txt* Zip File Interface Nov 28, 2005
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
@@ -6,10 +6,11 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
Permission is hereby granted to use and distribute this code,
with or without modifications, provided that this copyright
notice is copied with it. Like anything else that's free,
zip.vim and zipPlugin.vim are provided *as is* and comes with no
warranty of any kind, either expressed or implied. By using this
plugin, you agree that in no event will the copyright holder be
liable for any damages resulting from the use of this software.
zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is*
and it comes with no warranty of any kind, either expressed or
implied. By using this plugin, you agree that in no event will
the copyright holder be liable for any damages resulting from
the use of this software.
==============================================================================
1. Contents *zip* *zip-contents*
@@ -28,6 +29,8 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
==============================================================================
3. History *zip-history*
v6 Dec 21, 2005 * writing to files not in directories caused problems -
fixed (pointed out by Christian Robinson)
v5 Nov 22, 2005 * report option workaround installed
v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Sep 27
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -42,7 +42,19 @@ easy way to do this is with the |:make| command (see below). The
'errorformat' option should be set to match the error messages from your
compiler (see |errorformat| below).
The following quickfix commands can be used:
*location-list* *E776*
A location list is similar to a quickfix list and contains a list of positions
in files. A location list is associated with a window and each window can
have a separate location list. A location list can be associated with only
one window. The location list is independent of the quickfix list.
When a window with a location list is split, the new window gets a copy of the
location list. When there are no references to a location list, the location
list is destroyed.
The following quickfix commands can be used. The location list commands are
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
command with 'l'.
*:cc*
:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
@@ -56,18 +68,32 @@ The following quickfix commands can be used:
The 'switchbuf' settings are respected when jumping
to a buffer.
*:ll*
:ll[!] [nr] Same as ":cc", except the location list for the
current window is used instead of the quickfix list.
*:cn* *:cnext* *E553*
:[count]cn[ext][!] Display the [count] next error in the list that
includes a file name. If there are no file names at
all, go to the [count] next error. See |:cc| for
[!] and 'switchbuf'.
*:lne* *:lnext*
:[count]lne[xt][!] Same as ":cnext", except the location list for the
current window is used instead of the quickfix list.
:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
:[count]cp[revious][!] Display the [count] previous error in the list that
includes a file name. If there are no file names at
all, go to the [count] previous error. See |:cc| for
[!] and 'switchbuf'.
:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
list for the current window is used instead of the
quickfix list.
*:cnf* *:cnfile*
:[count]cnf[ile][!] Display the first error in the [count] next file in
the list that includes a file name. If there are no
@@ -75,6 +101,10 @@ The following quickfix commands can be used:
the [count] next error. See |:cc| for [!] and
'switchbuf'.
*:lnf* *:lnfile*
:[count]lnf[ile][!] Same as ":cnfile", except the location list for the
current window is used instead of the quickfix list.
:[count]cNf[ile][!] *:cpf* *:cpfile* *:cNf* *:cNfile*
:[count]cpf[ile][!] Display the last error in the [count] previous file in
the list that includes a file name. If there are no
@@ -82,17 +112,34 @@ The following quickfix commands can be used:
the [count] previous error. See |:cc| for [!] and
'switchbuf'.
:[count]lNf[ile][!] *:lpf* *:lpfile* *:lNf* *:lNfile*
:[count]lpf[ile][!] Same as ":cNfile" and ":cpfile", except the location
list for the current window is used instead of the
quickfix list.
*:crewind* *:cr*
:cr[ewind][!] [nr] Display error [nr]. If [nr] is omitted, the FIRST
error is displayed. See |:cc|.
*:lrewind* *:lr*
:lr[ewind][!] [nr] Same as ":crewind", except the location list for the
current window is used instead of the quickfix list.
*:cfirst* *:cfir*
:cfir[st][!] [nr] Same as ":crewind".
*:lfirst* *:lfir*
:lfir[st][!] [nr] Same as ":lrewind".
*:clast* *:cla*
:cla[st][!] [nr] Display error [nr]. If [nr] is omitted, the LAST
error is displayed. See |:cc|.
*:llast* *:lla*
:lla[st][!] [nr] Same as ":clast", except the location list for the
current window is used instead of the quickfix list.
*:cq* *:cquit*
:cq[uit] Quit Vim with an error code, so that the compiler
will not compile the same file again.
@@ -105,16 +152,31 @@ The following quickfix commands can be used:
name of the errorfile, the 'errorfile' option will
be set to [errorfile]. See |:cc| for [!].
*:cg* *:cgetfile*
:cg[etfile][!] [errorfile]
*:lf* *:lfile*
:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
current window is used instead of the quickfix list.
You can not use the -q command-line option to set
the location list.
:cg[etfile][!] [errorfile] *:cg* *:cgetfile*
Read the error file. Just like ":cfile" but don't
jump to the first error.
*:cad* *:caddfile*
:cad[dfile] [errorfile] Read the error file and add the errors from the
:lg[etfile][!] [errorfile] *:lg* *:lgetfile*
Same as ":cgetfile", except the location list for the
current window is used instead of the quickfix list.
*:caddf* *:caddfile*
:caddf[ile] [errorfile] Read the error file and add the errors from the
errorfile to the current quickfix list. If a quickfix
list is not present, then a new list is created.
*:laddf* *:laddfile*
:laddf[ile] [errorfile] Same as ":caddfile", except the location list for the
current window is used instead of the quickfix list.
*:cb* *:cbuffer* *E681*
:cb[uffer] [bufnr] Read the error list from the current buffer.
When [bufnr] is given it must be the number of a
@@ -123,19 +185,52 @@ The following quickfix commands can be used:
A range can be specified for the lines to be used.
Otherwise all lines in the buffer are used.
*:cex* *:cexpr*
:cex[pr][!] {expr} Create a quickfix list using the result of {expr}.
If {expr} is a String, then each new-line terminated
line in the String is processed using 'errorformat'
and the result is added to the quickfix list.
If {expr} is a List, then each String item in the list
is processed and added to the quickfix list.
Non String items in the List are ignored. See |:cc|
*:lb* *:lbuffer*
:lb[uffer] [bufnr] Same as ":cbuffer", except the location list for the
current window is used instead of the quickfix list.
*:caddb* *:caddbuffer*
:caddb[uffer] [bufnr] Read the error list from the current buffer and add
the errors to the current quickfix list. If a
quickfix list is not present, then a new list is
created. Otherwise, same as ":cbuffer".
*:laddb* *:laddbuffer*
:laddb[uffer] [bufnr] Same as ":caddbuffer", except the location list for
the current window is used instead of the quickfix
list.
*:cex* *:cexpr* *E777*
:cex[pr][!] {expr} Create a quickfix list using the result of {expr} and
jump to the first error. If {expr} is a String, then
each new-line terminated line in the String is
processed using 'errorformat' and the result is added
to the quickfix list. If {expr} is a List, then each
String item in the list is processed and added to the
quickfix list. Non String items in the List are
ignored. See |:cc|
for [!].
Examples: >
:cexpr system('grep -n xyz *')
:cexpr getline(1, '$')
<
*:lex* *:lexpr*
:lex[pr][!] {expr} Same as ":cexpr", except the location list for the
current window is used instead of the quickfix list.
*:cad* *:caddexpr*
:cad[dexpr][!] {expr} Evaluate {expr} and add the resulting lines to the
current quickfix list. If a quickfix list is not
present, then a new list is created. The current
cursor position will not be changed. See |:cexpr| for
more information.
Example: >
:g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
<
*:lad* *:laddexpr*
:lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the
current window is used instead of the quickfix list.
*:cl* *:clist*
:cl[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|.
@@ -148,6 +243,15 @@ The following quickfix commands can be used:
:cl[ist]! [from] [, [to]]
List all errors.
*:lli* *:llist*
:lli[st] [from] [, [to]]
Same as ":clist", except the location list for the
current window is used instead of the quickfix list.
:lli[st]! [from] [, [to]]
List all the entries in the location list for the
current window.
If you insert or delete lines, mostly the correct error location is still
found because hidden marks are used. Sometimes, when the mark has been
deleted for some reason, the message "line changed" is shown to warn you that
@@ -172,14 +276,28 @@ on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
the current window. It is not possible to open a
second quickfix window.
*:lop* *:lopen*
:lop[en] [height] Open a window to show the location list for the
current window. Works only when the location list for
the current window is present. You can have more than
one location window opened at a time. Otherwise, it
acts the same as ":copen".
*:ccl* *:cclose*
:ccl[ose] Close the quickfix window.
*:lcl* *:lclose*
:lcl[ose] Close the window showing the location list for the
current window.
*:cw* *:cwindow*
:cw[indow] [height] Open the quickfix window when there are recognized
errors. If the window is already open and there are
no recognized errors, close the window.
*:lw* *:lwindow*
:lw[indow] [height] Same as ":cwindow", except use the window showing the
location list for the current window.
Normally the quickfix window is at the bottom of the screen. If there are
vertical splits, it's at the bottom of the rightmost column of windows. To
@@ -204,14 +322,17 @@ You can use CTRL-W <Enter> to open a new window and jump to the error there.
When the quickfix window has been filled, two autocommand events are
triggered. First the 'filetype' option is set to "qf", which triggers the
FileType event. Then the BufReadPost event is triggered. This can be used to
perform some action on the listed errors. Example: >
au BufReadPost quickfix setlocal nomodifiable
\ | silent g/^/s//\=line(".")." "/
\ | setlocal modifiable
FileType event. Then the BufReadPost event is triggered, using "quickfix" for
the buffer name. This can be used to perform some action on the listed
errors. Example: >
au BufReadPost quickfix setlocal modifiable
\ | silent exe 'g/^/s//\=line(".")." "/'
\ | setlocal nomodifiable
This prepends the line number to each line. Note the use of "\=" in the
substitute string of the ":s" command, which is used to evaluate an
expression.
The BufWinEnter event is also triggered, again using "quickfix" for the buffer
name.
Note: Making changes in the quickfix window has no effect on the list of
errors. 'modifiable' is off to avoid making changes. If you delete or insert
@@ -220,6 +341,29 @@ If you really want to do this, you could write the contents of the quickfix
window to a file and use ":cfile" to have it parsed and used as the new error
list.
*location-list-window*
The location list window displays the entries in a location list. When you
open a location list window, it is created below the current window and
displays the location list for the current window. The location list window
is similar to the quickfix window, except that you can have more than one
location list window open at a time. When you use a location list command in
this window, the displayed location list is used.
When you select a file from the location list window, the following steps are
used to find a window to edit the file:
1. If a window with the location list displayed in the location list window is
present, then the file is opened in that window.
2. If the above step fails and if the file is already opened in another
window, then that window is used.
3. If the above step fails then an existing window showing a buffer with
'buftype' not set is used.
4. If the above step fails, then the file is edited in a new window.
In all of the above cases, if the location list for the selected window is not
yet set, then it is set to the location list displayed in the location list
window.
=============================================================================
3. Using more than one list of errors *quickfix-error-lists*
@@ -233,11 +377,19 @@ lists. They set one of the existing error lists as the current one.
this [count] times. When already at the oldest error
list, an error message is given.
*:lolder* *:lol*
:lol[der] [count] Same as ":colder", except use the location list for
the current window instead of the quickfix list.
*:cnewer* *:cnew* *E381*
:cnew[er] [count] Go to newer error list. When [count] is given, do
this [count] times. When already at the newest error
list, an error message is given.
*:lnewer* *:lnew*
:lnew[er] [count] Same as ":cnewer", except use the location list for
the current window instead of the quickfix list.
When adding a new error list, it becomes the current list.
When ":colder" has been used and ":make" or ":grep" is used to add a new error
@@ -271,6 +423,11 @@ lists, use ":cnewer 99" first.
This command does not accept a comment, any "
characters are considered part of the arguments.
*:lmak* *:lmake*
:lmak[e][!] [arguments]
Same as ":make", except the location list for the
current window is used instead of the quickfix list.
The ":make" command executes the command given with the 'makeprg' option.
This is done by passing the command to the shell given with the 'shell'
option. This works almost like typing
@@ -362,6 +519,12 @@ advantages are:
Example: >
:vimgrep Error *.c
<
*:lv* *:lvimgrep*
:lv[imgrep][!] /{pattern}/[g][j] {file} ...
:lv[imgrep][!] {pattern} {file} ...
Same as ":vimgrep", except the location list for the
current window is used instead of the quickfix list.
*:vimgrepa* *:vimgrepadd*
:vimgrepa[dd][!] /{pattern}/[g][j] {file} ...
:vimgrepa[dd][!] {pattern} {file} ...
@@ -369,6 +532,12 @@ advantages are:
of errors the matches are appended to the current
list.
*:lvimgrepa* *:lvimgrepadd*
:lvimgrepa[dd][!] /{pattern}/[g][j] {file} ...
:lvimgrepa[dd][!] {pattern} {file} ...
Same as ":vimgrepadd", except the location list for
the current window is used instead of the quickfix
list.
5.2 External grep
@@ -384,6 +553,11 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
When 'grepprg' is "internal" this works like
|:vimgrep|. Note that the pattern needs to be
enclosed in separator characters then.
*:lgr* *:lgrep*
:lgr[ep][!] [arguments] Same as ":grep", except the location list for the
current window is used instead of the quickfix list.
*:grepa* *:grepadd*
:grepa[dd][!] [arguments]
Just like ":grep", but instead of making a new list of
@@ -397,6 +571,11 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
":grepadd" jumps to the first error, which is not
allowed with |:bufdo|.
*:lgrepa* *:lgrepadd*
:lgrepa[dd][!] [arguments]
Same as ":grepadd", except the location list for the
current window is used instead of the quickfix list.
5.3 Setting up external grep
If you have a standard "grep" program installed, the :grep command may work

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -211,6 +211,8 @@ N is used to indicate an optional count that can be given before the command.
|:ts| :ts[elect][!] [tag] List matching tags and select one to jump to
|:tjump| :tj[ump][!] [tag] Jump to tag [tag] or select from list when
there are multiple matches
|:ltag| :lt[ag][!] [tag] Jump to tag [tag] and add matching tags to the
location list.
|:tags| :tags Print tag list
|CTRL-T| N CTRL-T Jump back from Nth older tag in tag list
@@ -938,7 +940,9 @@ Short explanation of each option: *option-list*
|:clist| :cl list all errors
|:cfile| :cf read errors from the file 'errorfile'
|:cgetfile| :cg like :cfile but don't jump to the first error
|:caddfile| :cad add errors from the error file to the current
|:caddfile| :caddf add errors from the error file to the current
quickfix list
|:caddexpr| :cad add errors from an expression to the current
quickfix list
|:cbuffer| :cb read errors from text in a buffer
|:cexpr| :cex read errors from an expression

View File

@@ -1,4 +1,4 @@
*scroll.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*scroll.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,31 +153,39 @@ to the closest character that is on the screen. The value of 'sidescroll' is
not used.
z<Right> or *zl* *z<Right>*
zl Scroll the screen [count] characters to the left.
This only works when 'wrap' is off. {not in Vi}
zl Move the view on the text [count] characters to the
right, thus scroll the text [count] characters to the
left. This only works when 'wrap' is off. {not in
Vi}
z<Left> or *zh* *z<Left>*
zh Scroll the screen [count] characters to the right.
This only works when 'wrap' is off. {not in Vi}
zh Move the view on the text [count] characters to the
left, thus scroll the text [count] characters to the
right. This only works when 'wrap' is off. {not in
Vi}
*zL*
zL Scroll the screen half a screenwidth to the left.
This only works when 'wrap' is off. {not in Vi}
zL Move the view on the text half a screenwidth to the
right, thus scroll the text half a screenwidth to the
left. This only works when 'wrap' is off. {not in
Vi}
*zH*
zH Scroll the screen half a screenwidth to the right.
This only works when 'wrap' is off. {not in Vi}
zH Move the view on the text half a screenwidth to the
left, thus scroll the text half a screenwidth to the
right. This only works when 'wrap' is off. {not in
Vi}
For the following two commands the cursor is not moved in the text, only the
text scrolls on the screen.
*zs*
zs Scroll the screen horizontally to position the cursor
zs Scroll the text horizontally to position the cursor
at the start (left side) of the screen. This only
works when 'wrap' is off. {not in Vi}
*ze*
ze Scroll the screen horizontally to position the cursor
ze Scroll the text horizontally to position the cursor
at the end (right side) of the screen. This only
works when 'wrap' is off. {not in Vi}

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Dec 09
*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,8 +129,10 @@ z= For the word under/after the cursor suggest correctly
spelled words. This also works to find alternatives
for a word that is not highlighted as a bad word,
e.g., when the word after it is bad.
The results are sorted on similarity to the word
under/after the cursor.
In Visual mode the highlighted text is taken as the
word to be replaced.
The results are sorted on similarity to the word being
replaced.
This may take a long time. Hit CTRL-C when you get
bored.
@@ -172,6 +174,12 @@ When there is a line break right after a sentence the highlighting of the next
line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for
how it can be set automatically when 'spelllang' is set.
Vim counts the number of times a good word is encountered. This is used to
sort the suggestions: words that have been seen before get a small bonus,
words that have been seen often get a bigger bonus. The COMMON item in the
affix file can be used to define common words, so that this mechanism also
works in a new or short file |spell-COMMON|.
==============================================================================
2. Remarks on spell checking *spell-remarks*
@@ -253,6 +261,10 @@ Only the first file is loaded, the one that is first in 'runtimepath'. If
this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
All the ones that are found are used.
If no spell file is found the |SpellFileMissing| autocommand event is
triggered. This may trigger the |spellfile.vim| plugin to offer you
downloading the spell file.
Additionally, the files related to the names in 'spellfile' are loaded. These
are the files that |zg| and |zw| add good and wrong words to.
@@ -296,7 +308,12 @@ A spell file might not be available in the current 'encoding'. See
|spell-mkspell| about how to create a spell file. Converting a spell file
with "iconv" will NOT work!
*E758* *E759*
*spell-sug-file* *E781*
If there is a file with exactly the same name as the ".spl" file but ending in
".sug", that file will be used for giving better suggestions. It isn't loaded
before suggestions are made to reduce memory use.
*E758* *E759* *E778* *E779* *E780* *E782*
When loading a spell file Vim checks that it is properly formatted. If you
get an error the file may be truncated, modified or intended for another Vim
version.
@@ -531,6 +548,11 @@ used spelling files, use this command:
Note: For some languages the result may be enormous,
causing Vim to run out of memory.
:spelld[ump]! Like ":spelldump" and include the word count. This is
the number of times the word was found while
updating the screen. Words that are in COMMON items
get a starting count of 10.
The format of the word list is used |spell-wordlist-format|. You should be
able to read it with ":mkspell" to generate one .spl file that includes all
the words.
@@ -542,6 +564,48 @@ for the current region are included and no "/regions" line is generated.
Comment lines with the name of the .spl file are used as a header above the
words that were generated from that .spl file.
SPELL FILE MISSING *spell-SpellFileMissing* *spellfile.vim*
If the spell file for the language you are using is not available, you will
get an error message. But if the "spellfile.vim" plugin is active it will
offer you to download the spell file. Just follow the instructions, it will
ask you where to write the file.
The plugin has a default place where to look for spell files, on the Vim ftp
server. If you want to use another location or another protocol, set the
g:spellfile_URL variable to the directory that holds the spell files. The
|netrw| plugin is used for getting the file, look there for the speficic
syntax of the URL. Example: >
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
You may need to escape special characters.
The plugin will only ask about downloading a language once. If you want to
try again anyway restart Vim, or set g:spellfile_URL to another value (e.g.,
prepend a space).
To avoid using the "spellfile.vim" plugin do this in your vimrc file: >
let loaded_spellfile_plugin = 1
Instead of using the plugin you can define a |SpellFileMissing| autocommand to
handle the missing file yourself. You can use it like this: >
:au SpellFileMissing * call Download_spell_file(expand('<amatch>'))
Thus the <amatch> item contains the name of the language. Another important
value is 'encoding', since every encoding has its own spell file. With two
exceptions:
- For ISO-8859-15 (latin9) the name "latin1" is used (the encodings only
differ in characters not used in dictionary words).
- The name "ascii" may also be used for some languages where the words use
only ASCII letters for most of the words.
The default "spellfile.vim" plugin uses this autocommand, if you define your
autocommand afterwars you may want to use ":au! SpellFileMissing" to overrule
it. If you define your autocommand before the plugin is loaded it will notice
this and not do anything.
==============================================================================
4. Spell file format *spell-file-format*
@@ -569,13 +633,16 @@ Additionally the following items are recognized:
- Empty and blank lines are ignored.
# comment ~
- Lines starting with a # are ignored (comment lines).
/encoding=utf-8 ~
- A line starting with "/encoding=", before any word, specifies the encoding
of the file. After the second '=' comes an encoding name. This tells Vim
to setup conversion from the specified encoding to 'encoding'. Thus you can
use one word list for several target encodings.
/regions=usca ~
- A line starting with "/regions=" specifies the region names that are
supported. Each region name must be two ASCII letters. The first one is
region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca".
@@ -583,7 +650,8 @@ Additionally the following items are recognized:
list!
- Other lines starting with '/' are reserved for future use. The ones that
are not recognized are ignored (but you do get a warning message).
are not recognized are ignored. You do get a warning message, so that you
know something won't work.
- A "/" may follow the word with the following items:
= Case must match exactly.
@@ -608,17 +676,18 @@ accepted. This is different from a word with mixed case that is automatically
marked as keep-case, those words may appear in all upper-case letters.
FORMAT WITH AFFIX COMPRESSION
FORMAT WITH .AFF and .DIC FILES
There are two files: the basic word list and an affix file. The affixes are
There are two files: the basic word list and an affix file. The affix file
specifies settings for the language and can contain affixes. The affixes are
used to modify the basic words to get the full word list. This significantly
reduces the number of words, especially for a language like Polish. This is
called affix compression.
The basic word list and the affix file are combined and turned into a binary
spell file. All the preprocessing has been done, thus this file loads fast.
The binary spell file format is described in the source code (src/spell.c).
But only developers need to know about it.
The basic word list and the affix file are combined with the ":mkspell"
command and results in a binary spell file. All the preprocessing has been
done, thus this file loads fast. The binary spell file format is described in
the source code (src/spell.c). But only developers need to know about it.
The preprocessing also allows us to take the Myspell language files and modify
them before the Vim word list is made. The tools for this can be found in the
@@ -630,39 +699,47 @@ here:
http://lingucomponent.openoffice.org/affix.readme ~
Note that affixes are case sensitive, this isn't obvious from the description.
Vim does not use the TRY item, it is ignored. For making suggestions the
possible characters in the words are used.
Vim supports quite a few extras. They are described below |spell-affix-vim|.
Attempts have been made to keep this compatible with other spell checkers, so
that the same files can be used.
that the same files can often be used. One other project that offers more
than Myspell is Hunspell ( http://hunspell.sf.net ).
WORD LIST FORMAT *spell-dic-format*
A very short example, with line numbers:
A short example, with line numbers:
1 1234
2 aan
3 Als
4 Etten-Leur
5 et al.
6 's-Gravenhage
7 's-Gravenhaags
8 bedel/P
9 kado/1
10 cadeau/2
11 TCP,IP
1 1234 ~
2 aan ~
3 Als ~
4 Etten-Leur ~
5 et al. ~
6 's-Gravenhage ~
7 's-Gravenhaags ~
8 # word that differs between regions ~
9 kado/1 ~
10 cadeau/2 ~
11 TCP,IP ~
12 /the S affix may add a 's' ~
13 bedel/S ~
The first line contains the number of words. Vim ignores it, but you do get
an error message if it's not there. *E760*
What follows is one word per line. There should be no white space before or
after the word. After the word there is an optional slash and flags. Most of
these flags are letters that indicate the affixes that can be used with this
word. These are specified with SFX and PFX lines in the .aff file. See the
Myspell documentation. Vim allows using other flag types with the FLAG item
in the affix file |spell-FLAG|.
What follows is one word per line. White space at the end of the line is
ignored, all other white space matters. The encoding is specified in the
affix file |spell-SET|.
Comment lines start with '#' or '/'. See the example lines 8 and 12. Note
that putting a comment after a word is NOT allowed:
someword # comment that causes an error! ~
After the word there is an optional slash and flags. Most of these flags are
letters that indicate the affixes that can be used with this word. These are
specified with SFX and PFX lines in the .aff file, see |spell-SFX| and
|spell-PFX|. Vim allows using other flag types with the FLAG item in the
affix file |spell-FLAG|.
When the word only has lower-case letters it will also match with the word
starting with an upper-case letter.
@@ -672,7 +749,7 @@ is required at this position. The same word with a lower-case letter at this
position will not match. When some of the other letters are upper-case it will
not match either.
The word with all upper-case characters will always be OK.
The word with all upper-case characters will always be OK,
word list matches does not match ~
als als Als ALS ALs AlS aLs aLS
@@ -680,49 +757,60 @@ The word with all upper-case characters will always be OK.
ALS ALS als Als ALs AlS aLs aLS
AlS AlS ALS als Als ALs aLs aLS
The KEP affix ID can be used to specifically match a word with identical case
only, see below |spell-KEP|.
The KEEPCASE affix ID can be used to specifically match a word with identical
case only, see below |spell-KEEPCASE|.
Note in line 5 to 7 that non-word characters are used. You can include
any character in a word. When checking the text a word still only matches
when it appears with a non-word character before and after it. For Myspell a
word starting with a non-word character probably won't work.
Note: in line 5 to 7 non-word characters are used. You can include any
character in a word. When checking the text a word still only matches when it
appears with a non-word character before and after it. For Myspell a word
starting with a non-word character probably won't work.
In line 12 the word "TCP/IP" is defined. Since the slash has a special
meaning the comma is used instead. This is defined with the SLASH item in the
affix file, see |spell-SLASH|. Note that without this SLASH item the
word will be "TCP,IP".
affix file, see |spell-SLASH|. Note that without this SLASH item the word
will be "TCP,IP".
*spell-affix-vim*
A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
affix file. This has the meaning that case matters. This can be used if the
word does not have the first letter in upper case at the start of a sentence.
Example (assuming that = was used for KEP):
word list matches does not match ~
's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
AFFIX FILE FORMAT *spell-aff-format* *spell-affix-vim*
The flag can also be used to avoid that the word matches when it is in all
upper-case letters.
*spell-affix-comment*
Comment lines in the .aff file start with a '#':
# comment line ~
With some items it's also possible to put a comment after it, but this isn't
supported in general.
ENCODING *spell-SET*
The affix file can be in any encoding that is supported by "iconv". However,
in some cases the current locale should also be set properly at the time
|:mkspell| is invoked. Adding FOL/LOW/UPP lines removes this requirement
|spell-FOL|.
The encoding should be specified before anything where the encoding matters.
The encoding applies both to the affix file and the dictionary file. It is
done with a SET line:
SET utf-8 ~
The encoding can be different from the value of the 'encoding' option at the
time ":mkspell" is used. Vim will then convert everything to 'encoding' and
generate a spell file for 'encoding'. If some of the used characters to not
fit in 'encoding' you will get an error message.
*spell-affix-mbyte*
The basic word list is normally in an 8-bit encoding, which is mentioned in
the affix file. The affix file must always be in the same encoding as the
word list. This is compatible with Myspell. For Vim the encoding may also be
something else, any encoding that "iconv" supports. The "SET" line must
specify the name of the encoding. When using a multi-byte encoding it's
possible to use more different affixes (but Myspell doesn't support that, thus
you may not want to use it anyway).
When using a multi-byte encoding it's possible to use more different affix
flags. But Myspell doesn't support that, thus you may not want to use it
anyway. For compatibility use an 8-bit encoding.
CHARACTER TABLES
*spell-affix-chars*
When using an 8-bit encoding the affix file should define what characters are
word characters (as specified with ENC). This is because the system where
":mkspell" is used may not support a locale with this encoding and isalpha()
won't work. For example when using "cp1250" on Unix.
word characters. This is because the system where ":mkspell" is used may not
support a locale with this encoding and isalpha() won't work. For example
when using "cp1250" on Unix.
*E761* *E762* *spell-FOL*
*spell-LOW* *spell-UPP*
Three lines in the affix file are needed. Simplistic example:
@@ -774,7 +862,7 @@ the word. This is needed to detect a spelling error such as they'are. That
should be they're, but since "they" and "are" are words themselves that would
go unnoticed.
These characters are defined with MIDWORD in the .aff file:
These characters are defined with MIDWORD in the .aff file. Example:
MIDWORD '- ~
@@ -808,9 +896,58 @@ The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
documentation or the Aspell manual:
http://aspell.net/man-html/Affix-Compression.html).
Note that Myspell ignores any extra text after the relevant info. Vim
requires this text to start with a "#" so that mistakes don't go unnoticed.
Example:
Summary:
SFX L Y 2 ~
SFX L 0 re [^x] ~
SFX L 0 ro x ~
The first line is a header and has four fields:
SFX {flag} {combine} {count}
{flag} The name used for the suffix. Mostly it's a single letter,
but other characters can be used, see |spell-FLAG|.
{combine} Can be 'Y' or 'N'. When 'Y' then the word plus suffix can
also have a prefix. When 'N' then a prefix is not allowed.
{count} The number of lines following. If this is wrong you will get
an error message.
For PFX the fields are exactly the same.
The basic format for the following lines is:
SFX {flag} {strip} {add} {condition}
{flag} Must be the same as the {flag} used in the first line.
{strip} Characters removed from the basic word. There is no check if
the characters are actually there, only the length is used (in
bytes). This better match the {condition}, otherwise strange
things may happen. If the {strip} length is equal to or
longer than the basic word the suffix won't be used.
When {strip} is 0 (zero) then nothing is stripped.
{add} Characters added to the basic word, after removing {strip}.
{condition} A simplistic pattern. Only when this matches with a basic
word will the suffix be used for that word. This is normally
for using one suffix letter with different {add} and {strip}
fields for words with different endings.
When {condition} is a . (dot) there is no condition.
The pattern may contain:
- Literal characters.
- A set of characters in []. [abc] matches a, b and c.
A dash is allowed for a range [a-c], but this is
Vim-specific.
- A set of characters that starts with a ^, meaning the
complement of the specified characters. [^abc] matches any
character but a, b and c.
For PFX the fields are the same, but the {strip}, {add} and {condition} apply
to the start of the word.
Note: Myspell ignores any extra text after the relevant info. Vim requires
this text to start with a "#" so that mistakes don't go unnoticed. Example:
SFX F 0 in [^i]n # Spion > Spionin ~
SFX F 0 nen in # Bauerin > Bauerinnen ~
@@ -826,16 +963,49 @@ Myspell that use this feature apparently have this flag. Example:
SFX a 0 en . ~
SFX a 0 on . ~
AFFIX FLAGS *spell-affix-flags*
This is a feature that comes from Hunspell: The affix may specify flags. This
works similar to flags specified on a basic word. The flags apply to the
basic word plus the affix. Example:
SFX S Y 1 ~
SFX S 0 s . ~
SFX A Y 1 ~
SFX A 0 able/S . ~
When the dictionary file contains "drink/AS" then these words are possible:
drink
drinks uses S suffix
drinkable uses A suffix
drinkables uses A suffix and then S suffix
Generally the flags of the suffix are added to the flags of the basic word,
both are used for the word plus suffix. But the flags of the basic word are
only used once for affixes, except that both one prefix and one suffix can be
used when both support combining.
Specifically, the affix flags can be used for:
- Affixes on affixes, as in the example above.
- Making the word with the affix rare, by using the |spell-RARE| flag.
- Exclude the word with the affix from compounding, by using the
|spell-COMPOUNDFORBIDFLAG| flag.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
OLD STUFF
*spell-affix-rare*
An extra item for Vim is the "rare" flag. It must come after the other
fields, before a comment. When used then all words that use the affix will be
marked as rare words. Example:
marked as rare words. Examples:
PFX F 0 nene . rare ~
SFX F 0 oin n rare # hardly ever used ~
However, if the word also appears as a good word in another way it won't be
marked as rare.
However, if the word also appears as a good word in another way (e.g., in
another region) it won't be marked as rare.
*spell-affix-nocomp*
Another extra item for Vim is the "nocomp" flag. It must come after the other
@@ -852,6 +1022,7 @@ Example:
util/ac ~
This allows for "wordutil" and "wordutils" but not "wordutilize".
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
*spell-PFXPOSTPONE*
When an affix file has very many prefixes that apply to many words it's not
@@ -872,34 +1043,38 @@ word to start with an upper case letter.
WORDS WITH A SLASH *spell-SLASH*
The slash is used in the .dic file to separate the basic word from the affix
letters that can be used. Unfortunately, this means you cannot use a slash in
a word. Thus "TCP/IP" cannot be a word. To work around that you can define a
replacement character for the slash. Example:
SLASH , ~
Now you can use "TCP,IP" to add the word "TCP/IP".
Of course, the letter used should itself not appear in any word! The letter
must be ASCII, thus a single byte.
letters and other flags. Unfortunately, this means you cannot use a slash in
a word. Thus "TCP/IP" is not a word but "TCP with the flags "IP". To include
a slash in the word put a backslash before it: "TCP\/IP". In the rare case
you want to use a backslash inside a word you need to use two backslashes.
Any other use of the backslash is reserved for future expansion.
KEEP-CASE WORDS *spell-KEP*
KEEP-CASE WORDS *spell-KEEPCASE*
In the affix file a KEP line can be used to define the affix name used for
keep-case words. Example:
In the affix file a KEEPCASE line can be used to define the affix name used
for keep-case words. Example:
KEP = ~
KEEPCASE = ~
See above for an example |spell-affix-vim|.
This flag is not supported by Myspell. It has the meaning that case matters.
This can be used if the word does not have the first letter in upper case at
the start of a sentence. Example:
word list matches does not match ~
's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
The flag can also be used to avoid that the word matches when it is in all
upper-case letters.
RARE WORDS *spell-RAR*
RARE WORDS *spell-RARE*
In the affix file a RAR line can be used to define the affix name used for
In the affix file a RARE line can be used to define the affix name used for
rare words. Example:
RAR ? ~
RARE ? ~
Rare words are highlighted differently from bad words. This is to be used for
words that are correct for the language, but are hardly ever used and could be
@@ -922,18 +1097,15 @@ This can be used to exclude words that would otherwise be good. For example
Once a word has been marked as bad it won't be undone by encountering the same
word as good.
The flag also applies to the word with affixes, thus this can be used to mark
a whole bunch of related words as bad.
*spell-NEEDAFFIX*
The NEEDAFFIX flag is used to require that a word is used with an affix. The
word itself is not a good word. Example:
word itself is not a good word (unless there is an empty affix). Example:
NEEDAFFIX + ~
*spell-NEEDCOMPOUND*
The NEEDCOMPOUND flag is used to require that a word is used as part of a
compound word The word itself is not a good word. Example:
NEEDCOMPOUND & ~
COMPOUND WORDS *spell-compound*
@@ -944,8 +1116,8 @@ call this character a flag here. Obviously these flags must be different from
any affix IDs used.
*spell-COMPOUNDFLAG*
The Myspell compatible method uses one flag, specified with COMPOUNDFLAG.
All words with this flag combine in any order. This means there is no control
The Myspell compatible method uses one flag, specified with COMPOUNDFLAG. All
words with this flag combine in any order. This means there is no control
over which word comes first. Example:
COMPOUNDFLAG c ~
@@ -1006,6 +1178,12 @@ A specific example: Allow a compound to be made of two words and a dash:
This allows for the word "start-end", but not "startend".
*spell-NEEDCOMPOUND*
The NEEDCOMPOUND flag is used to require that a word is used as part of a
compound word. The word itself is not a good word. Example:
NEEDCOMPOUND & ~
*spell-COMPOUNDMIN*
The minimal character length of a word used for compounding is specified with
COMPOUNDMIN. Example:
@@ -1037,6 +1215,17 @@ If both COMPOUNDMAX and COMPOUNDSYLMAX are defined, a compound word is
accepted if it fits one of the criteria, thus is either made from up to
COMPOUNDMAX words or contains up to COMPOUNDSYLMAX syllables.
*spell-COMPOUNDFORBIDFLAG*
The COMPOUNDFORBIDFLAG specifies a flag that can be used on an affix. It
means that the word plus affix cannot be used in a compound word.
NOT IMPLEMENTED YET.
*spell-COMPOUNDPERMITFLAG*
The COMPOUNDPERMITFLAG specifies a flag that can be used on an affix. It
means that the word plus affix can also be used in a compound word in a way
where the affix ends up halfway the word.
NOT IMPLEMENTED YET.
*spell-SYLLABLE*
The SYLLABLE item defines characters or character sequences that are used to
count the number of syllables in a word. Example:
@@ -1105,6 +1294,30 @@ lists that support this.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*spell-COMMON*
Common words can be specified with the COMMON item. This will give better
suggestions when editing a short file. Example:
COMMON the of to and a in is it you that he was for on are ~
The words must be separated by white space, up to 25 per line.
When multiple regions are specified in a ":mkspell" command the common words
for all regions are combined and used for all regions.
*spell-NOSPLITSUGS*
This item indicates that suggestions for splitting a word will not appear:
NOSPLITSUGS ~
*spell-NOSUGGEST*
The flag specified with NOSUGGEST can be used for words that will not be
suggested. Can be used for obscene words.
NOSUGGEST % ~
NOT IMPLEMENTED YET.
REPLACEMENTS *spell-REP*
In the affix file REP items can be used to define common mistakes. This is
@@ -1118,7 +1331,7 @@ used to make spelling suggestions. The items define the "from" text and the
REP ch k ~
The first line specifies the number of REP lines following. Vim ignores the
number, but it must be there.
number, but it must be there (for compatibility with Myspell).
Don't include simple one-character replacements or swaps. Vim will try these
anyway. You can include whole words if you want to, but you might want to use
@@ -1129,7 +1342,7 @@ You can include a space by using an underscore:
REP the_the the ~
SIMILAR CHARACTERS *spell-MAP*
SIMILAR CHARACTERS *spell-MAP* *E783*
In the affix file MAP items can be used to define letters that are very much
alike. This is mostly used for a letter with different accents. This is used
@@ -1146,6 +1359,21 @@ Each letter must appear in only one of the MAP items. It's a bit more
efficient if the first letter is ASCII or at least one without accents.
.SUG FILE *spell-NOSUGFILE*
When soundfolding is specified in the affix file then ":mkspell" will normally
produce a .sug file next to the .spl file. This file is used to find
suggestions by their sound-a-like form quickly. At the cost of a lot of
memory (the amount depends on the number of words, |:mkspell| will display an
estimate when it's done).
To avoid producing a .sug file use this item in the affix file:
NOSUGFILE ~
Users can simply omit the .sug file if they don't want to use it.
SOUND-A-LIKE *spell-SAL*
In the affix file SAL items can be used to define the sounds-a-like mechanism
@@ -1197,4 +1425,105 @@ You can use the |soundfold()| function to try out the results. Or set the
'verbose' option to see the score in the output of the |z=| command.
UNSUPPORTED ITEMS *spell-affix-not-supported*
These items appear in the affix file of other spell checkers. In Vim they are
ignored, not supported or defined in another way.
ACCENT (Hunspell) *spell-ACCENT*
Use MAP instead. |spell-MAP|
CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE*
Disallow uppercase letters at compound word boundaries.
Not supported.
CHECKCOMPOUNDDUP (Hunspell) *spell-CHECKCOMPOUNDDUP*
Disallow using the same word twice in a compound. Not
supported.
CHECKCOMPOUNDREP (Hunspell) *spell-CHECKCOMPOUNDREP*
Something about using REP items and compound words. Not
supported.
CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
Forbid three identical characters when compounding. Not
supported.
CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN*
Forbid compounding when patterns match. Not supported.
CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
This means a prefix and suffix must be added at the same time.
Instead only specify the suffix, and give the that suffix two
flags: The required prefix and the NEEDAFFIX flag.
|spell-NEEDAFFIX|
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported.
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT*
Flag for words in the dictionary that are already a compound.
Vim doesn't use it.
COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE*
Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE|
|spell-COMPOUNDSYLMAX|
COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX*
Use COMPOUNDMAX instead. |spell-COMPOUNDMAX|
FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
Use BAD instead. |spell-BAD|
HOME (Hunspell) *spell-HOME*
Specifies the website for the language. Not supported.
LANG (Hunspell) *spell-LANG*
This specifies language-specific behavior. This actually
moves part of the language knowledge into the program,
therefore Vim does not support it. Each language property
must be specified separately.
LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
Only needed for mprphological analysis.
MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
Not supported.
NAME (Hunspell) *spell-NAME*
Specifies the name of the language. Not supported.
ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
PSEUDOROOT (Hunspell) *spell-PSEUDOROOT*
Use NEEDAFFIX instead. |spell-NEEDAFFIX|
SUGSWITHDOTS (Hunspell) *spell-SUGSWITHDOTS*
Adds dots to suggestions. Vim doesn't need this.
SYLLABLENUM (Hunspell) *spell-SYLLABLENUM*
Not supported.
TRY (Myspell, Hunspell, others) *spell-TRY*
Vim does not use the TRY item, it is ignored. For making
suggestions the actual characters in the words are used.
VERSION (Hunspell) *spell-VERSION*
Specifies the version for the language. Not supported.
WORDCHARS (Hunspell) *spell-WORDCHARS*
Used to recognize words. Vim doesn't need it, because there
is no need to separate words before checking them (using a
trie instead of a hashtable).
vim:tw=78:sw=4:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2005 Dec 04
*starting.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -799,8 +799,9 @@ accordingly. Vim proceeds in this order:
- The |--noplugin| command line argument is used.
- The "-u NONE" command line argument is used |-u|.
- When Vim was compiled without the |+eval| feature.
Note that using "-c set noloadplugins" doesn't work, because the
commands from the command line have not been executed yet.
Note that using "-c 'set noloadplugins'" doesn't work, because the
commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" |--cmd|.
5. Set 'shellpipe' and 'shellredir'
The 'shellpipe' and 'shellredir' options are set according to the

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1884,6 +1884,13 @@ If you want to fold blocks in if statements, etc. as well set the following: >
:let perl_fold_blocks = 1
To avoid folding packages or subs when perl_fold is let, let the appropriate
variable(s): >
:unlet perl_nofold_packages
:unlet perl_nofold_subs
PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*
@@ -3245,7 +3252,7 @@ A more complicated Example: >
<
abcfoostringbarabc
mmmmmmmmmmm match
ssrrrreee highlight start/region/end ("Foo", "Exa" and "Bar")
sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar")
Leading context *:syn-lc* *:syn-leading* *:syn-context*
@@ -3893,8 +3900,8 @@ guifg={color-name} *highlight-guifg*
guibg={color-name} *highlight-guibg*
guisp={color-name} *highlight-guisp*
These give the foreground (guifg), background (guibg) and special
(guisp) color to use in the GUI. "guisp" is used for underline and
undercurl. There are a few special names:
(guisp) color to use in the GUI. "guisp" is used for undercurl.
There are a few special names:
NONE no color (transparent)
bg use normal background color
background use normal background color

View File

@@ -1089,6 +1089,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+multi_byte_ime various.txt /*+multi_byte_ime*
+multi_lang various.txt /*+multi_lang*
+mzscheme various.txt /*+mzscheme*
+mzscheme/dyn various.txt /*+mzscheme\/dyn*
+netbeans_intg various.txt /*+netbeans_intg*
+ole various.txt /*+ole*
+osfiletype various.txt /*+osfiletype*
@@ -1263,15 +1264,19 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
/\$ pattern.txt /*\/\\$*
/\%# pattern.txt /*\/\\%#*
/\%$ pattern.txt /*\/\\%$*
/\%'m pattern.txt /*\/\\%'m*
/\%( pattern.txt /*\/\\%(*
/\%(\) pattern.txt /*\/\\%(\\)*
/\%<'m pattern.txt /*\/\\%<'m*
/\%<c pattern.txt /*\/\\%<c*
/\%<l pattern.txt /*\/\\%<l*
/\%<v pattern.txt /*\/\\%<v*
/\%>'m pattern.txt /*\/\\%>'m*
/\%>c pattern.txt /*\/\\%>c*
/\%>l pattern.txt /*\/\\%>l*
/\%>v pattern.txt /*\/\\%>v*
/\%U pattern.txt /*\/\\%U*
/\%V pattern.txt /*\/\\%V*
/\%[] pattern.txt /*\/\\%[]*
/\%^ pattern.txt /*\/\\%^*
/\%c pattern.txt /*\/\\%c*
@@ -1783,6 +1788,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:cabc map.txt /*:cabc*
:cabclear map.txt /*:cabclear*
:cad quickfix.txt /*:cad*
:caddb quickfix.txt /*:caddb*
:caddbuffer quickfix.txt /*:caddbuffer*
:caddexpr quickfix.txt /*:caddexpr*
:caddf quickfix.txt /*:caddf*
:caddfile quickfix.txt /*:caddfile*
:cal eval.txt /*:cal*
:call eval.txt /*:call*
@@ -2092,15 +2101,29 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:keepjumps motion.txt /*:keepjumps*
:keepmarks motion.txt /*:keepmarks*
:l various.txt /*:l*
:lN quickfix.txt /*:lN*
:lNext quickfix.txt /*:lNext*
:lNf quickfix.txt /*:lNf*
:lNfile quickfix.txt /*:lNfile*
:la editing.txt /*:la*
:lad quickfix.txt /*:lad*
:laddb quickfix.txt /*:laddb*
:laddbuffer quickfix.txt /*:laddbuffer*
:laddexpr quickfix.txt /*:laddexpr*
:laddf quickfix.txt /*:laddf*
:laddfile quickfix.txt /*:laddfile*
:lan mlang.txt /*:lan*
:lang mlang.txt /*:lang*
:language mlang.txt /*:language*
:last editing.txt /*:last*
:lb quickfix.txt /*:lb*
:lbuffer quickfix.txt /*:lbuffer*
:lc editing.txt /*:lc*
:lcd editing.txt /*:lcd*
:lch editing.txt /*:lch*
:lchdir editing.txt /*:lchdir*
:lcl quickfix.txt /*:lcl*
:lclose quickfix.txt /*:lclose*
:le change.txt /*:le*
:left change.txt /*:left*
:lefta windows.txt /*:lefta*
@@ -2116,13 +2139,40 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:let-star eval.txt /*:let-star*
:let-unpack eval.txt /*:let-unpack*
:let.= eval.txt /*:let.=*
:lex quickfix.txt /*:lex*
:lexpr quickfix.txt /*:lexpr*
:lf quickfix.txt /*:lf*
:lfile quickfix.txt /*:lfile*
:lfir quickfix.txt /*:lfir*
:lfirst quickfix.txt /*:lfirst*
:lg quickfix.txt /*:lg*
:lgetfile quickfix.txt /*:lgetfile*
:lgr quickfix.txt /*:lgr*
:lgrep quickfix.txt /*:lgrep*
:lgrepa quickfix.txt /*:lgrepa*
:lgrepadd quickfix.txt /*:lgrepadd*
:lh various.txt /*:lh*
:lhelpgrep various.txt /*:lhelpgrep*
:list various.txt /*:list*
:ll quickfix.txt /*:ll*
:lla quickfix.txt /*:lla*
:llast quickfix.txt /*:llast*
:lli quickfix.txt /*:lli*
:llist quickfix.txt /*:llist*
:lm map.txt /*:lm*
:lmak quickfix.txt /*:lmak*
:lmake quickfix.txt /*:lmake*
:lmap map.txt /*:lmap*
:lmap_l map.txt /*:lmap_l*
:lmapc map.txt /*:lmapc*
:lmapclear map.txt /*:lmapclear*
:ln map.txt /*:ln*
:lne quickfix.txt /*:lne*
:lnew quickfix.txt /*:lnew*
:lnewer quickfix.txt /*:lnewer*
:lnext quickfix.txt /*:lnext*
:lnf quickfix.txt /*:lnf*
:lnfile quickfix.txt /*:lnfile*
:lnoremap map.txt /*:lnoremap*
:lo starting.txt /*:lo*
:loadk mbyte.txt /*:loadk*
@@ -2132,9 +2182,27 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:lockmarks motion.txt /*:lockmarks*
:lockv eval.txt /*:lockv*
:lockvar eval.txt /*:lockvar*
:lol quickfix.txt /*:lol*
:lolder quickfix.txt /*:lolder*
:lop quickfix.txt /*:lop*
:lopen quickfix.txt /*:lopen*
:lp quickfix.txt /*:lp*
:lpf quickfix.txt /*:lpf*
:lpfile quickfix.txt /*:lpfile*
:lprevious quickfix.txt /*:lprevious*
:lr quickfix.txt /*:lr*
:lrewind quickfix.txt /*:lrewind*
:ls windows.txt /*:ls*
:lt tagsrch.txt /*:lt*
:ltag tagsrch.txt /*:ltag*
:lu map.txt /*:lu*
:lunmap map.txt /*:lunmap*
:lv quickfix.txt /*:lv*
:lvimgrep quickfix.txt /*:lvimgrep*
:lvimgrepa quickfix.txt /*:lvimgrepa*
:lvimgrepadd quickfix.txt /*:lvimgrepadd*
:lw quickfix.txt /*:lw*
:lwindow quickfix.txt /*:lwindow*
:m change.txt /*:m*
:ma motion.txt /*:ma*
:mak quickfix.txt /*:mak*
@@ -2480,6 +2548,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:stag windows.txt /*:stag*
:star repeat.txt /*:star*
:start insert.txt /*:start*
:startgreplace insert.txt /*:startgreplace*
:startinsert insert.txt /*:startinsert*
:startreplace insert.txt /*:startreplace*
:stj tagsrch.txt /*:stj*
@@ -2707,6 +2776,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
<< change.txt /*<<*
<> intro.txt /*<>*
<A- intro.txt /*<A-*
<A-LeftMouse> term.txt /*<A-LeftMouse>*
<A-RightMouse> term.txt /*<A-RightMouse>*
<BS> motion.txt /*<BS>*
<Bar> intro.txt /*<Bar>*
<Bslash> intro.txt /*<Bslash>*
@@ -3786,7 +3857,17 @@ E770 spell.txt /*E770*
E771 spell.txt /*E771*
E772 spell.txt /*E772*
E773 recover.txt /*E773*
E774 map.txt /*E774*
E775 map.txt /*E775*
E776 quickfix.txt /*E776*
E777 quickfix.txt /*E777*
E778 spell.txt /*E778*
E779 spell.txt /*E779*
E78 motion.txt /*E78*
E780 spell.txt /*E780*
E781 spell.txt /*E781*
E782 spell.txt /*E782*
E783 spell.txt /*E783*
E79 message.txt /*E79*
E80 message.txt /*E80*
E800 arabic.txt /*E800*
@@ -3988,6 +4069,7 @@ Select-mode-mapping visual.txt /*Select-mode-mapping*
Session starting.txt /*Session*
SessionLoad-variable starting.txt /*SessionLoad-variable*
SessionLoadPost autocmd.txt /*SessionLoadPost*
SpellFileMissing autocmd.txt /*SpellFileMissing*
StdinReadPost autocmd.txt /*StdinReadPost*
StdinReadPre autocmd.txt /*StdinReadPre*
SwapExists autocmd.txt /*SwapExists*
@@ -4496,6 +4578,7 @@ compl-spelling insert.txt /*compl-spelling*
compl-tag insert.txt /*compl-tag*
compl-vim insert.txt /*compl-vim*
compl-whole-line insert.txt /*compl-whole-line*
complete-functions insert.txt /*complete-functions*
complete_add() eval.txt /*complete_add()*
complete_check() eval.txt /*complete_check()*
complex-change change.txt /*complex-change*
@@ -4678,6 +4761,7 @@ design-not develop.txt /*design-not*
design-speed-size develop.txt /*design-speed-size*
desktop.vim syntax.txt /*desktop.vim*
develop-spell develop.txt /*develop-spell*
develop-spell-suggestions develop.txt /*develop-spell-suggestions*
develop.txt develop.txt /*develop.txt*
development develop.txt /*development*
dh change.txt /*dh*
@@ -5029,6 +5113,7 @@ ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
ft-inform-syntax syntax.txt /*ft-inform-syntax*
ft-java-syntax syntax.txt /*ft-java-syntax*
ft-javascript-omni insert.txt /*ft-javascript-omni*
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax*
@@ -5076,6 +5161,7 @@ ft-spec-plugin filetype.txt /*ft-spec-plugin*
ft-spup-syntax syntax.txt /*ft-spup-syntax*
ft-sql-syntax syntax.txt /*ft-sql-syntax*
ft-sqlinformix-syntax syntax.txt /*ft-sqlinformix-syntax*
ft-syntax-omni insert.txt /*ft-syntax-omni*
ft-tcsh-syntax syntax.txt /*ft-tcsh-syntax*
ft-termcap-syntax syntax.txt /*ft-termcap-syntax*
ft-tex-syntax syntax.txt /*ft-tex-syntax*
@@ -5118,6 +5204,8 @@ g0 motion.txt /*g0*
g8 various.txt /*g8*
g:netrw_alto pi_netrw.txt /*g:netrw_alto*
g:netrw_altv pi_netrw.txt /*g:netrw_altv*
g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split*
g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer*
g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
@@ -5208,6 +5296,7 @@ getfsize() eval.txt /*getfsize()*
getftime() eval.txt /*getftime()*
getftype() eval.txt /*getftype()*
getline() eval.txt /*getline()*
getloclist() eval.txt /*getloclist()*
getqflist() eval.txt /*getqflist()*
getreg() eval.txt /*getreg()*
getregtype() eval.txt /*getregtype()*
@@ -5313,6 +5402,7 @@ gvimrc gui.txt /*gvimrc*
gw change.txt /*gw*
gwgw change.txt /*gwgw*
gww change.txt /*gww*
gx pi_netrw.txt /*gx*
gzip pi_gzip.txt /*gzip*
gzip-autocmd pi_gzip.txt /*gzip-autocmd*
gzip-example autocmd.txt /*gzip-example*
@@ -5332,7 +5422,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
@@ -5708,6 +5797,8 @@ local-variables eval.txt /*local-variables*
locale mbyte.txt /*locale*
locale-name mbyte.txt /*locale-name*
localtime() eval.txt /*localtime()*
location-list quickfix.txt /*location-list*
location-list-window quickfix.txt /*location-list-window*
long-lines version5.txt /*long-lines*
lowercase change.txt /*lowercase*
lpc.vim syntax.txt /*lpc.vim*
@@ -5855,6 +5946,7 @@ mysyntaxfile-replace syntax.txt /*mysyntaxfile-replace*
mzscheme if_mzsch.txt /*mzscheme*
mzscheme-buffer if_mzsch.txt /*mzscheme-buffer*
mzscheme-commands if_mzsch.txt /*mzscheme-commands*
mzscheme-dynamic if_mzsch.txt /*mzscheme-dynamic*
mzscheme-examples if_mzsch.txt /*mzscheme-examples*
mzscheme-sandbox if_mzsch.txt /*mzscheme-sandbox*
mzscheme-threads if_mzsch.txt /*mzscheme-threads*
@@ -5893,6 +5985,7 @@ netrw-D pi_netrw.txt /*netrw-D*
netrw-NB pi_netrw.txt /*netrw-NB*
netrw-Nb pi_netrw.txt /*netrw-Nb*
netrw-O pi_netrw.txt /*netrw-O*
netrw-P pi_netrw.txt /*netrw-P*
netrw-R pi_netrw.txt /*netrw-R*
netrw-S pi_netrw.txt /*netrw-S*
netrw-U pi_netrw.txt /*netrw-U*
@@ -5911,10 +6004,12 @@ netrw-chgup pi_netrw.txt /*netrw-chgup*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-cr pi_netrw.txt /*netrw-cr*
netrw-credits pi_netrw.txt /*netrw-credits*
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
netrw-curdir pi_netrw.txt /*netrw-curdir*
netrw-d pi_netrw.txt /*netrw-d*
netrw-debug pi_netrw.txt /*netrw-debug*
netrw-del pi_netrw.txt /*netrw-del*
netrw-delete pi_netrw.txt /*netrw-delete*
netrw-dir pi_netrw.txt /*netrw-dir*
netrw-dirlist pi_netrw.txt /*netrw-dirlist*
@@ -5927,7 +6022,6 @@ netrw-externapp pi_netrw.txt /*netrw-externapp*
netrw-file pi_netrw.txt /*netrw-file*
netrw-fixup pi_netrw.txt /*netrw-fixup*
netrw-ftp pi_netrw.txt /*netrw-ftp*
netrw-h pi_netrw.txt /*netrw-h*
netrw-handler pi_netrw.txt /*netrw-handler*
netrw-help pi_netrw.txt /*netrw-help*
netrw-hexplore pi_netrw.txt /*netrw-hexplore*
@@ -5958,6 +6052,7 @@ netrw-pexplore pi_netrw.txt /*netrw-pexplore*
netrw-preview pi_netrw.txt /*netrw-preview*
netrw-problems pi_netrw.txt /*netrw-problems*
netrw-protocol pi_netrw.txt /*netrw-protocol*
netrw-prvwin pi_netrw.txt /*netrw-prvwin*
netrw-q pi_netrw.txt /*netrw-q*
netrw-r pi_netrw.txt /*netrw-r*
netrw-read pi_netrw.txt /*netrw-read*
@@ -5970,6 +6065,7 @@ netrw-sexplore pi_netrw.txt /*netrw-sexplore*
netrw-sort pi_netrw.txt /*netrw-sort*
netrw-sortsequence pi_netrw.txt /*netrw-sortsequence*
netrw-starstar pi_netrw.txt /*netrw-starstar*
netrw-start pi_netrw.txt /*netrw-start*
netrw-transparent pi_netrw.txt /*netrw-transparent*
netrw-u pi_netrw.txt /*netrw-u*
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
@@ -5983,6 +6079,7 @@ netrw-write pi_netrw.txt /*netrw-write*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
netrw.vim pi_netrw.txt /*netrw.vim*
netrw_filehandler pi_netrw.txt /*netrw_filehandler*
netterm-mouse options.txt /*netterm-mouse*
network pi_netrw.txt /*network*
new-5 version5.txt /*new-5*
@@ -6020,6 +6117,7 @@ new-indent-flex version6.txt /*new-indent-flex*
new-items-6 version6.txt /*new-items-6*
new-items-7 version7.txt /*new-items-7*
new-line-continuation version5.txt /*new-line-continuation*
new-location-list version7.txt /*new-location-list*
new-manpage-trans version7.txt /*new-manpage-trans*
new-multi-byte version5.txt /*new-multi-byte*
new-multi-lang version6.txt /*new-multi-lang*
@@ -6169,6 +6267,7 @@ pmbfn-option print.txt /*pmbfn-option*
popt-option print.txt /*popt-option*
popup-menu gui.txt /*popup-menu*
popup-menu-added version5.txt /*popup-menu-added*
popupmenu-completion insert.txt /*popupmenu-completion*
ports-5.2 version5.txt /*ports-5.2*
ports-6 version6.txt /*ports-6*
posix vi_diff.txt /*posix*
@@ -6386,6 +6485,7 @@ s:netrw_line pi_netrw.txt /*s:netrw_line*
s:var eval.txt /*s:var*
s<CR> change.txt /*s<CR>*
sandbox eval.txt /*sandbox*
sandbox-option eval.txt /*sandbox-option*
save-file editing.txt /*save-file*
save-settings starting.txt /*save-settings*
scheme.vim syntax.txt /*scheme.vim*
@@ -6434,6 +6534,7 @@ set-spc-auto spell.txt /*set-spc-auto*
setbufvar() eval.txt /*setbufvar()*
setcmdpos() eval.txt /*setcmdpos()*
setline() eval.txt /*setline()*
setloclist() eval.txt /*setloclist()*
setqflist() eval.txt /*setqflist()*
setreg() eval.txt /*setreg()*
setting-guifont gui.txt /*setting-guifont*
@@ -6477,35 +6578,74 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
spell-ACCENT spell.txt /*spell-ACCENT*
spell-BAD spell.txt /*spell-BAD*
spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE*
spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
spell-CMP spell.txt /*spell-CMP*
spell-COMMON spell.txt /*spell-COMMON*
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN*
spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND*
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX*
spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
spell-COMPOUNDROOT spell.txt /*spell-COMPOUNDROOT*
spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE*
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX*
spell-FLAG spell.txt /*spell-FLAG*
spell-FOL spell.txt /*spell-FOL*
spell-KEP spell.txt /*spell-KEP*
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
spell-HOME spell.txt /*spell-HOME*
spell-KEEPCASE spell.txt /*spell-KEEPCASE*
spell-LANG spell.txt /*spell-LANG*
spell-LEMMA_PRESENT spell.txt /*spell-LEMMA_PRESENT*
spell-LOW spell.txt /*spell-LOW*
spell-MAP spell.txt /*spell-MAP*
spell-MAXNGRAMSUGS spell.txt /*spell-MAXNGRAMSUGS*
spell-NAME spell.txt /*spell-NAME*
spell-NEEDAFFIX spell.txt /*spell-NEEDAFFIX*
spell-NEEDCOMPOUND spell.txt /*spell-NEEDCOMPOUND*
spell-NOBREAK spell.txt /*spell-NOBREAK*
spell-NOSPLITSUGS spell.txt /*spell-NOSPLITSUGS*
spell-NOSUGFILE spell.txt /*spell-NOSUGFILE*
spell-NOSUGGEST spell.txt /*spell-NOSUGGEST*
spell-ONLYINCOMPOUND spell.txt /*spell-ONLYINCOMPOUND*
spell-PFX spell.txt /*spell-PFX*
spell-PFXPOSTPONE spell.txt /*spell-PFXPOSTPONE*
spell-RAR spell.txt /*spell-RAR*
spell-PSEUDOROOT spell.txt /*spell-PSEUDOROOT*
spell-RARE spell.txt /*spell-RARE*
spell-REP spell.txt /*spell-REP*
spell-SAL spell.txt /*spell-SAL*
spell-SET spell.txt /*spell-SET*
spell-SFX spell.txt /*spell-SFX*
spell-SLASH spell.txt /*spell-SLASH*
spell-SOFOFROM spell.txt /*spell-SOFOFROM*
spell-SOFOTO spell.txt /*spell-SOFOTO*
spell-SUGSWITHDOTS spell.txt /*spell-SUGSWITHDOTS*
spell-SYLLABLE spell.txt /*spell-SYLLABLE*
spell-SYLLABLENUM spell.txt /*spell-SYLLABLENUM*
spell-SpellFileMissing spell.txt /*spell-SpellFileMissing*
spell-TRY spell.txt /*spell-TRY*
spell-UPP spell.txt /*spell-UPP*
spell-VERSION spell.txt /*spell-VERSION*
spell-WORDCHARS spell.txt /*spell-WORDCHARS*
spell-aff-format spell.txt /*spell-aff-format*
spell-affix-chars spell.txt /*spell-affix-chars*
spell-affix-comment spell.txt /*spell-affix-comment*
spell-affix-flags spell.txt /*spell-affix-flags*
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
spell-affix-nocomp spell.txt /*spell-affix-nocomp*
spell-affix-not-supported spell.txt /*spell-affix-not-supported*
spell-affix-rare spell.txt /*spell-affix-rare*
spell-affix-vim spell.txt /*spell-affix-vim*
spell-compound spell.txt /*spell-compound*
@@ -6519,11 +6659,13 @@ spell-mkspell spell.txt /*spell-mkspell*
spell-quickstart spell.txt /*spell-quickstart*
spell-remarks spell.txt /*spell-remarks*
spell-russian spell.txt /*spell-russian*
spell-sug-file spell.txt /*spell-sug-file*
spell-syntax spell.txt /*spell-syntax*
spell-wordlist-format spell.txt /*spell-wordlist-format*
spell-yiddish spell.txt /*spell-yiddish*
spell.txt spell.txt /*spell.txt*
spellbadword() eval.txt /*spellbadword()*
spellfile.vim spell.txt /*spellfile.vim*
spellsuggest() eval.txt /*spellsuggest()*
split() eval.txt /*split()*
splitfind windows.txt /*splitfind*
@@ -6777,6 +6919,7 @@ tag-highlight syntax.txt /*tag-highlight*
tag-matchlist tagsrch.txt /*tag-matchlist*
tag-old-static tagsrch.txt /*tag-old-static*
tag-overloaded version5.txt /*tag-overloaded*
tag-preview tagsrch.txt /*tag-preview*
tag-priority tagsrch.txt /*tag-priority*
tag-regexp tagsrch.txt /*tag-regexp*
tag-search tagsrch.txt /*tag-search*
@@ -6872,6 +7015,7 @@ tex-style syntax.txt /*tex-style*
tex.vim syntax.txt /*tex.vim*
text-objects motion.txt /*text-objects*
text-objects-changed version5.txt /*text-objects-changed*
textlock eval.txt /*textlock*
tf.vim syntax.txt /*tf.vim*
this_session-variable eval.txt /*this_session-variable*
throw-catch eval.txt /*throw-catch*

View File

@@ -257,6 +257,17 @@ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag".
:tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. {not
in Vi}
*:lt* *:ltag*
:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new
location list for the current window. [ident] can be
a regexp pattern, see |tag-regexp|. When [ident] is
not given, the last tag name from the tag stack is
used. The search pattern to locate the tag line is
prefixed with "\V" to escape all the special
characters (very nomagic). The location list showing
the matching tags is independent of the tag stack.
See |tag-!| for [!].
{not in Vi}
When there is no other message, Vim shows which matching tag has been jumped
to, and the number of matching tags: >
@@ -275,6 +286,7 @@ skipped and the next matching tag is used. Vim reports this, to notify you of
missing files. When the end of the list of matches has been reached, an error
message is given.
*tag-preview*
The tag match list can also be used in the preview window. The commands are
the same as above, with a "p" prepended.
{not available when compiled without the |+quickfix| feature}

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
*term.txt* For Vim version 7.0aa. Last change: 2005 Dec 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -684,6 +684,7 @@ event position selection change action ~
<MiddleMouse> yes if not active no put
<MiddleMouse> yes if active no yank and put
<RightMouse> yes start or extend yes
<A-RightMouse> yes start or extend blockw. yes *<A-RightMouse>*
<S-RightMouse> yes no change yes "#" (2) *<S-RightMouse>*
<C-RightMouse> no no change no "CTRL-T"
<RightDrag> yes extend no *<RightDrag>*
@@ -699,6 +700,7 @@ event position selection change action ~
<LeftRelease> yes start or extend (1) no like CTRL-O (1)
<MiddleMouse> no (cannot be active) no put register
<RightMouse> yes start or extend yes like CTRL-O
<A-RightMouse> yes start or extend blockw. yes
<S-RightMouse> yes (cannot be active) yes "CTRL-O#" (2)
<C-RightMouse> no (cannot be active) no "CTRL-O CTRL-T"
@@ -713,12 +715,14 @@ Normal Mode:
event position selection change action ~
cursor window ~
<S-LeftMouse> yes start or extend (1) no
<A-LeftMouse> yes start or extend blockw. no *<A-LeftMouse>*
<RightMouse> no popup menu no
Insert or Replace Mode:
event position selection change action ~
cursor window ~
<S-LeftMouse> yes start or extend (1) no like CTRL-O (1)
<A-LeftMouse> yes start or extend blockw. no
<RightMouse> no popup menu no
(1) only if mouse pointer moved since press
@@ -744,6 +748,12 @@ Visual area to be extended. When 'mousemodel' is "popup", the left button has
to be used while keeping the shift key pressed. When clicking in a window
which is editing another buffer, the Visual or Select mode is stopped.
In Normal, Visual and Select mode clicking the right mouse button with the alt
key pressed causes the Visual area to become blockwise. When 'mousemodel is
"popup" the left button has to be used with the alt key. Note that this won't
work on systems where the window manager uses the mouse when the alt key is
pressed (it may move the window).
*double-click*
Double, triple and quadruple clicks are supported when the GUI is active,
for MS-DOS and Win32, and for an xterm (if the gettimeofday() function is

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,53 +30,71 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
ml_get error with specific vimrc and lots of plugins. (Tomi Mickelsson)
Crash with X command server (Ciaran McCreesh).
Win32: preserve the hidden attribute of the viminfo file.
Add ":lcscope" to use location list instead of quickfix list.
Add ":startgreplace" to do "gR", like ":startreplace" does "R".
Alt-mousekey is currently ignored. Use it for Visual/select block?
When 'delcombine' is set in Select mode before a character with a combining
char the combining char is deleted when it shouldn't. (Tony Mechelynck, Nov
27)
ccomplete:
- When an option is set: In completion mode and the user types (identifier)
characters, advance to the first match instead of removing the popup menu.
If there is no match remove the selection. (Yegappan Lakshmanan)
ccomplete / omnicomplete:
When editing compl_leader <CR> should accept the current match.
Somehow select another match without changing the compl_leader, so that you
can use CTRL-L next? Perhaps with <S-Up> and <S-Down>?
- Flickering because of syntax highlighting redrawing further lines.
- Complete the longest common match instead of the first match?
For all kinds of completions? Configurable?
- !_TAG_FILE_FORMAT and it's ilk are listed in the global completions
- When completing something that is a structure, add the "." or "->".
Do this when "longest" is in 'completeopt'.
Pressing CTRL-N or CTRL-P will get the whole match, as before.
Need to postpone inserting anything until all matches have been found.
Then add a completion item with the longest common string (after what was
typed), if there is one.
- For C add tag "kind" field to each match?
- Finding out if an item has members (to add '.' or '->') requires a grep in
the tags files, that is very slow. Is there another solution? At least
stop at the first match.
- When a typedef or struct is local to a file only use it in that file?
- Window resize when poup is displayed
- page-up / page-down
- Special mappings for when the popup menu is visible? Would allow for making
a specific selection (e.g, methods vs variables).
spelling:
- Use KEEPCASE instead of "KEP". It applies to the word including affixes
Hunspell also uses it.
- Hunspell has NOSUGGEST flag (use for obscene words?)
- Check out Hunspell 1.1.2.
- Also use the spelling dictionary for dictionary completion.
When 'dictionary' is empty and/or when "kspell" is in 'complete'.
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
After deleting a word with "zw" and some timestamp difference perhaps?
Store it as spell/cleanadd.vim.
- suggestion for "KG" to "kg" when it's keepcase.
- Using KEEPCASE flag still allows all-upper word, docs say it doesn't.
Don't allow it, because there is no other way to do this.
- Implement NOSUGGEST flag (used for obscene words).
- Implement NOSPLITSUGS.
- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE?
Hunspell now uses COMPOUND with a count.
- Check out Hunspell 1.1.3.
what does MAXNGRAMSUGS do?
See announcement (Nemeth, 5 jan)
is COMPLEXPREFIXES necessary now that we have flags for affixes?
- Look into hungarian dictionary:
http://magyarispell.sourceforge.net/rc3-beta2.zip
- Support breakpoint character <20> 0xb7 and ignore it?
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
- Support flags on a suffix. Used for second level affixes, rare and
nocomp. The flags may also be used for compounding. Default is an OR
mechanism with the flags of the word. Adding "compset" on the affixes
means the compound flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
support both).
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- Implement COMPOUNDFORBIDFLAG.
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to use
same wordlist for hyphenation.
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
- Finding suggestions with sound folding is slow. Somehow store the
sound-folded words and link to the words it comes from?
- Also use the spelling dictionary for dictionary completion.
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
- Add a command like "zg" that selects one of the files 'spellfile'.
Support saving and restoring session for X windows? It should work to do
":mksession" and use "-S fname" for the restart command. The
gui_x11_wm_protocol_handler() already takes care of the rest.
global_event_filter() for GTK.
In diff mode deleting lines is very slow. E.g., when diffing two .po files
and then sourcing po/cleaup.vim.
- Add a "zug" command that undoes "zg"? Deletes the good word instead of
adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio
Colombo)
7 Add plugins for formatting. Should be able to make a choice depending on
the language of a file (English/Korean/Japanese/etc.).
@@ -85,6 +103,15 @@ and then sourcing po/cleaup.vim.
Edward L. Fox explains how it should be done for most Asian languages. (2005
Nov 24)
An error in a function uses a line number that doesn't take line continuation
into account. (Mikolaj Machowski) Store line count in an extra array?
Is it possible to keep the command-line window open? Would actually work like
closing it, executing the command and re-opening it (at the same position).
":keepundo": add change to existing undo chain, so that one "u" undoes them
all. (Gautam Iyer)
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
@@ -97,9 +124,12 @@ Mac unicode patch (Da Woon Jung):
Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1)
Also add search???() function that returns list with lnum and col.
Win32: Use the free downloadable compiler 7.1. Figure out how to do debugging
(with Agide?) and describe it. (George Reilly)
Win32: Use the free downloadable compiler 7.1 (2003). Figure out how to do
debugging (with Agide?) and describe it. (George Reilly)
Try out using the free MS compiler and debugger, using Make_mvc.mak.
Try using Visual C++ Express 2005. (Ilya Bobir Dec 20)
Disadvantage: Annoying warning messages, requires ..._NO_DEPRECATE, this
is not a standard compiler.
Win32: Check that installer puts menu items in "all users" dir when possible,
not administrator dir.
@@ -127,13 +157,15 @@ escape special characters ";&<>(){}". (Adri Verhoef)
Are there more commands where v:swapcommand can be set to something useful?
Put autocommand event names in a hashtable for faster lookup?
Awaiting response:
- Win32: tearoff menu window should have a scrollbar when it's taller than
the screen.
- mblen(NULL, 0) also in Vim 6.3?
PLANNED FOR VERSION 7.0:
CONSIDERED FOR VERSION 7.0:
- Omni completion: Understands the programming language and finds matches
that make sense. Esp. members of classes/structs.
@@ -213,6 +245,8 @@ PLANNED FOR VERSION 7.0:
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
- Pre-expand abbreviations, show which abbrevs would match?
- Provide a function to popup the menu, so that an insert mode mapping can
start it (with a specific selection).
- UNDO TREE: keep all states of the text, don't delete undo info.
When making a change, instead of clearing any future undo (thus redo)
@@ -243,13 +277,15 @@ PLANNED FOR VERSION 7.0:
Then add GUI Tabs for some systems.
Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
Simple patch for GTK by Luis M (nov 7).
Don't forget to provide an "X" to close a tab.
Don't forget to provide an "X" to close the current tab.
Implementation: keep the list of windows as-is. When switching to another
tab make the buffers in the current windows hidden, save the window
layout, buildup the other window layout and fill with buffers.
Need to be able to search the windows in inactive tabs, e.g. for the
quickfix window.
Use "1gt" - "99gt" to switch to a tab?
Also hidden tabs? Useful for messing with a temp buffer without changing
the window layout.
- EMBEDDING: Make it possible to run Vim inside a window of another program.
For Xwindows this can be done with XReparentWindow().
For GTK Neil Bird has a patch to use Vim like a widget.
@@ -282,6 +318,7 @@ PLANNED FOR VERSION 7.0:
8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
Add the 'maxcombining' option to set the nr. of composing characters.
At the same time support more colors (use two bytes when necessary).
8 "ga" should show all composing characters, also if there are more than 2.
8 Searching for a composing character by itself should work. Perhaps "."
with a composing char should work too.
- Add a few more things to 'diffopt': "horizontal", "vertical",
@@ -369,25 +406,6 @@ Also place vimtutor.bat in %windir%?
Add gui_mch_browsedir() for Motif, Mac OS/X.
Add extra list of file locations. A bit like the quickfix list, but there is
one per window. Can be used with:
:ltag list of matching tags, like :tselect
Commands to use the location list:
:lnext next location
:lprevious :lNext previous location
:lnfile location in next file
:lNfile :lpfile location in previous file
:lrewind :lfirst first location
:llast last location
:ll [N] go to location N (current one if N omitted)
:lwindow open window with locations (separate from quickfix window)
:lopen open window with locations
:lclose close window with locations
:llist list locations
:lfile read locations from file using 'errorformat'
:lgetfile idem, don't jump to first one
:lbuffer idem, from current buffer.
HTML indenting can be slow, find out why. Any way to do some kind of
profiling for Vim script? At least add a function to get the current time in
usec. reltime([start, [end]])
@@ -408,6 +426,11 @@ Add more tests for all new functionality in Vim 7. Especially new functions.
Updated Ruby interface. (Ryan Paul)
'errorformat' docs are a bit unclear. Suggestions by Charles Campbell (2006
Jan 6)
Add a flag to check for a match with the next item first? Helps for
continuation lines that may contain just about anything.
Awaiting updated patches:
--- awaiting updated patch ---
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
@@ -1391,6 +1414,10 @@ User Friendlier:
7 When Vim detects a file is being edited elsewhere and it's a gvim session
of the same user it should offer a "Raise" button, so that the other gvim
window can be displayed. (Eduard)
8 Support saving and restoring session for X windows? It should work to do
":mksession" and use "-S fname" for the restart command. The
gui_x11_wm_protocol_handler() already takes care of the rest.
global_event_filter() for GTK.
Spell checking:
@@ -1399,12 +1426,8 @@ Spell checking:
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file?
- COMPOUNDMAX -> COMPOUNDWORDMAX?
- Support flags on a suffix. Used for second level affixes. The flags may
also be used for compounding. Default is an OR mechanism with the flags
of the word. Adding "compset" on the affixes means the compound flags of
the word are not used. Instead of "SFX a 0 add/FLAGS ." we could use "SFX
a 0 add . /FLAGS" (or support both).
- NEEDCOMPOUND also used for affix? Or use "needcomp" after affix?
- NEEDCOMPOUND also used for affix? Or is this called ONLYINCOMPOUND now?
Or is ONLYINCOMPOUND only for inside a compound, not at start or end?
- Do we need a flag for the rule that when compounding is done the following
word doesn't have a capital after a word character, even for Onecap words?
- New hunspell home page: http://hunspell.sourceforge.net/
@@ -1429,8 +1452,8 @@ Spell checking:
- Add flags to count extra syllables in a word. SYLLABLEADD1 SYLLABLEADD2,
etc.? Or make it possible to specify the syllable count of a word
directly, e.g., after another slash: /abc/3
- MORPHO item in affix file: ignore morphological fields after word and
affix.
- MORPHO item in affix file: ignore TAB and morphological field after
word/flags and affix.
- Implement multiple flags for compound words and CMP item?
Await comments from other spell checking authors.
- Also see tklspell: http://tkltrans.sourceforge.net/
@@ -1491,8 +1514,8 @@ Folding:
- 'foldmethod' "textobject": fold on sections and paragraph text objects.
- Add 'hidecomment' option: don't display comments in /* */ and after //.
Or is the conceal patch from Vince Negri a more generic solution?
- "zu": undo change in manual fold. "zU" redo change in manual fold. How to
implement this?
- "zuf": undo change in manual fold. "zUf" redo change in manual fold. How
to implement this?
- "zJ" command: add the line or fold below the fold in the fold under the
cursor.
- 'foldmethod' "syntax": "fold=3": set fold level for a region.
@@ -1529,7 +1552,6 @@ Multi-byte characters:
8 Should add test for using various commands with multi-byte characters.
8 'infercase' doesn't work with multi-byte characters.
8 toupper() function doesn't handle byte count changes.
8 "ga" should show all composing characters, also if there are more than 2.
7 When searching, should order of composing characters be ignored?
8 Should implement 'delcombine' for command line editing.
8 Detect overlong UTF-8 sequences and handle them like illegal bytes.
@@ -1862,8 +1884,6 @@ Robustness:
Performance:
7 For strings up to 3 bytes don't allocate memory, use v_list itself as a
character array. Use VAR_SSTRING (short string).
8 Loading plugins takes startup time. Only load the part that is used to
trigger the rest, and load the rest when it's needed?
8 Turn b_syn_ic and b_syn_containedin into b_syn_flags.
9 Loading menu.vim still takes quite a bit of time. How to make it faster?
8 in_id_list() takes much time for syntax highlighting. Cache the result?
@@ -2074,14 +2094,10 @@ Shared libraries:
Tags:
8 Add a function that returns the line in the tags file for a matching tag.
Can be used to extract more info (class name, inheritance, etc.) (Rico
Hendriks)
7 Count before CTRL-]: jump to N'th match
8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.
8 When output of ":tselect" is long, getting the more-prompt, should be able
to type the tag number directly.
7 Add a tag-select window. Works like ":cwindow". (Michal Malecki)
7 Add the possibility to use the "-t {tag}" argument multiple times. Open a
window for each tag.
7 Make output of ":tselect" a bit nicer. Use highlighting?
@@ -2242,30 +2258,25 @@ Autocommands:
8 Add ScriptReadCmd event: used to load remote Vim scripts, e.g.
"vim -u http://mach/path/vimrc".
7 Add TagJump event: do something after jumping to a tag.
8 Add "TagJumpFile" autocommand: When jumping to another file for a tag.
Can be used to open "main.c.gz" when "main.c" isn't found.
8 Use another option than 'updatetime' for the CursorHold event. The two
things are unrelated for the user (but the implementation is more
difficult).
8 Also trigger CursorHold in Insert mode?
7 Add autocommand event for when a buffer cannot be abandoned. So that user
can define the action taking (autowrite, dialog, fail) based on the kind
of file. (Yakov Lerner) Or is BufLeave sufficient?
8 Can't use ":normal" in CursorHold autocommands. Make the CursorHold event
insert a special key code, and call the autocommand functions from a
higher level, so that vgetc() isn't used recursively.
8 Autocommands should not change registers. And marks? And the jumplist?
And anything else?
8 Add an event like CursorHold that is triggered repeatedly, not just once
after typing something.
7 Add autocommand event for when a buffer cannot be abandoned. So that the
user can define the action taking (autowrite, dialog, fail) based on the
kind of file. (Yakov Lerner) Or is BufLeave sufficient?
8 Autocommand for when modified files have been found, when getting input
focus again (e.g., FileChangedFocus).
Check when: getting focus, jumping to another buffer, ...
8 Autocommands should not change registers. And marks? And the jumplist?
And anything else? Add a command to save and restore these things.
8 Add autocommands, user functions and user commands to ":mkvimrc".
8 Add "TagJumpFile" autocommand: When jumping to another file for a tag.
Can be used to open "main.c.gz" when "main.c" isn't found.
6 Add KeymapChanged event, so that the effects of a different keymap can be
handled (e.g., other font) (Ron Aaron)
7 Add a way to skip an autocommand if going from one *.c file to another *.c
file.
7 When trying to open a directory, don't load the file but trigger an
autocommand event OpenDirectory.
7 When trying to open a directory, trigger an OpenDirectory event.
7 Add file type in front of file pattern: <d> for directory, <l> for link,
<x> for executable, etc. <&xxx> for Risc OS. With commas to separate
alternatives. The autocommand is only executed when both the file type
@@ -2282,7 +2293,6 @@ Autocommands:
- Add events to autocommands:
Error - When an error happens
NormalEnter - Entering Normal mode
InsertEnter - Entering Insert mode
ReplaceEnter - Entering Replace mode
CmdEnter - Entering Cmdline mode
VisualEnter - Entering Visual mode
@@ -2314,8 +2324,7 @@ Autocommands:
that marks can be updated. HierAssist has patch to add
BufChangePre, BufChangePost and RevertBuf. (Shah)
WinResized - When a window has been resized
- Add autocommand to be executed every so many seconds? For writing the
file now and then ('autosave').
- Write the file now and then ('autosave'):
*'autosave'* *'as'* *'noautosave'* *'noas'*
'autosave' 'aw' number (default 0)
Automatically write the current buffer to file N seconds after the
@@ -2820,8 +2829,9 @@ Incsearch:
Searching:
7 Add "g/" and "gb" to search for a pattern in the Visually selected text?
8 Add "g/" and "gb" to search for a pattern in the Visually selected text?
"g?" is already used for rot13.
Can use "g/" in Normal mode, uses the '< to '> area.
8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands
for "go recursive here" and \@( \) marks the recursive part.
Perl does it this way:
@@ -3293,8 +3303,7 @@ Various improvements:
next <li>, ]< to next </li>, [< to previous </li>.
8 Add ":rename" command: rename the file of the current buffer and rename
the buffer. Buffer may be modified.
- Perhaps ":cexpr" could read errors from a list?
Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
Govindachar)
6 In the quickfix window statusline add the command used to get the list of
errors, e.g. ":make foo", ":grep something *.c".
@@ -3358,6 +3367,7 @@ Various improvements:
8 Add "g^E" and "g^Y", to scroll a screen-full line up and down.
6 Add ":timer" command, to set a command to be executed at a certain
interval, or once after some time has elapsed. (Aaron)
Perhaps an autocommand event like CursorHold is better?
8 Add ":confirm" handling in open_exfile(), for when file already exists.
8 When quitting with changed files, make the dialog list the changed file
and allow "write all", "discard all", "write some". The last one would
@@ -3765,6 +3775,8 @@ Far future and "big" extensions:
are reflected in each Vim immediately. Could work with local files but
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
When using "do" or ":diffget" in a buffer with changes in every line an extra
empty line would appear.
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
vim: set fo+=n :

View File

@@ -747,6 +747,7 @@ Various:
exists() check if a variable, function, etc. exists
has() check if a feature is supported in Vim
getqflist() list of quickfix errors
getloclist() list of location list items
cscope_connection() check if a cscope connection exists
did_filetype() check if a FileType autocommand was used
eventhandler() check if invoked by an event handler
@@ -758,7 +759,8 @@ Various:
libcallnr() idem, returning a number
getreg() get contents of a register
getregtype() get type of a register
setqflist() create a quickfix list
setqflist() modify a quickfix list
setloclist() modify a location list
setreg() set contents and type of a register
taglist() get list of matching tags

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -321,6 +321,7 @@ B *+multi_byte* Korean and other languages |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
m *+netbeans_intg* |netbeans|
m *+ole* Win32 GUI only: |ole-interface|
*+osfiletype* Support for the 'osfiletype' option and filetype
@@ -647,6 +648,15 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
compresses the help files).
{not in Vi}
*:lh* *:lhelpgrep*
:lh[elpgrep] {pattern}[@xx]
Same as ":helpgrep", except the location list is used
instead of the quickfix list. If the help window is
already opened, then the location list for that window
is used. Otherwise, a new help window is opened and
the location list for that window is set. The
location list for the current window is not changed.
*:exu* *:exusage*
:exu[sage] Show help on Ex commands. Added to simulate the Nvi
command. {not in Vi}

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,7 @@ POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Remote file explorer |new-netrw-explore|
Define an operator |new-define-operator|
Location list |new-location-list|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -154,6 +155,9 @@ expr". "-=" and ".=" works in a similar way.
With the |:profile| command you can find out where your function or script
wastes its time.
In the Python interface vim.eval() also handles Dictionaries and Lists.
|python-eval| (G. Sumner Hayes)
Spell checking *new-spell*
--------------
@@ -188,8 +192,8 @@ Omni completion *new-omni-completion*
This could also be called "intellisense", but that is a trademark. It is a
smart kind of completion. The text in front of the cursor is inspected to
figure out what could be following. This considers struct and class members,
unions, etc.
figure out what could be following. This may suggest struct and class
members, system functions, etc.
Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
@@ -197,8 +201,11 @@ The 'omnifunc' option is set by filetype plugins to define the function that
figures out the completion.
Currently supported languages:
C |ft-c-omni|
XHTML |ft-html-omni|
C |ft-c-omni|
(X)HTML with CSS |ft-html-omni|
JavaScript |ft-javascript-omni|
any language wih syntax highligting |ft-syntax-omni|
XML |ft-xml-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
@@ -354,6 +361,16 @@ through the |g@| operator.
See |:map-operator| for the explanation and an example.
Location list *new-location-list*
-------------
The support for a per-window quickfix list (location list) is added. The
location list can be displayed in a location window (similar to the quickfix
window). You can open more than one location list window. A set of commands
similar to the quickfix commands are added to browse the location list.
(Yegappan Lakshmanan)
Various new items *new-items-7*
-----------------
@@ -367,6 +384,9 @@ CTRL-W <Enter> In the quickfix window: opens a new window to show the
|at| and |it| text objects select a block of text between HTML or XML tags.
<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos")
<A-RightMouse> ('mousemodel' "extend")
Make a blockwise selection. |<A-LeftMouse>|
Insert mode commands: ~
@@ -407,6 +427,7 @@ Ex commands: ~
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:startreplace| Start Replace mode. (Charles Campbell)
|:startgreplace| Start Virtual Replace mode.
|:0file| Removes the name of the buffer. (Charles Campbell)
@@ -431,6 +452,43 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:cexpr| Read error messages from a Vim expression (Yegappan
Lakshmanan).
|:caddexpr| Add error messages from a Vim expression to an
existing quickfix list. (Yegappan Lakshmanan).
|:caddbuffer| Add errors from the current buffer to the quickfix
list.
|:ltag| Jump to a tag and add matching tags to a location list.
|:lmake| Like |:make| but use the location list.
|:lgrep| Like |:grep| but use the location list.
|:lgrepadd| Like |:grepadd| but use the location list.
|:lvimgrep| Like |:vimgrep| but use the location list.
|:lvimgrepadd| Like |:vimgrepadd| but use the location list.
|:lhelpgrep| Like |:helpgrep| but use the location list.
|:lfile| Like |:cfile| but use the location list.
|:lgetfile| Like |:cgetfile| but use the location list.
|:laddfile| Like |:caddfile| but use the location list.
|:lbuffer| Like |:cbuffer| but use the location list.
|:laddbuffer| Like |:caddbuffer| but use the location list.
|:lexpr| Like |:cexpr| but use the location list.
|:laddexpr| Like |:caddexpr| but use the location list.
|:ll| Like |:cc| but use the location list.
|:llist| Like |:clist| but use the location list.
|:lnext| Like |:cnext| but use the location list.
|:lprev| Like |:cprev| but use the location list.
|:lNext| Like |:cNext| but use the location list.
|:lfirst| Like |:cfirst| but use the location list.
|:lrewind| Like |:crewind| but use the location list.
|:llast| Like |:clast| but use the location list.
|:lnfile| Like |:cnfile| but use the location list.
|:lpfile| Like |:cpfile| but use the location list.
|:lNfile| Like |:cNfile| but use the location list.
|:lolder| Like |:colder| but use the location list.
|:lnewer| Like |:cnewer| but use the location list.
|:lwindow| Like |:cwindow| but use the location list.
|:lopen| Like |:copen| but use the location list.
|:lclose| Like |:cclose| but use the location list.
Ex command modifiers: ~
|:keepalt| Do not change the alternate file.
@@ -463,6 +521,7 @@ New and extended functions: ~
|count()| count nr of times a value is in a List or Dictionary
|deepcopy()| make a full copy of a List or Dictionary
|empty()| check if List or Dictionary is empty
|getloclist()| list of location list items (Yegappan Lakshmanan)
|getqflist()| list of quickfix errors (Yegappan Lakshmanan)
|extend()| append one List to another or add items from one
Dictionary to another
@@ -498,7 +557,8 @@ New and extended functions: ~
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|reverse()| reverse the order of a List
|searchdecl()| search for declaration of variable
|setqflist()| create a quickfix list (Yegappan Lakshmanan)
|setloclist()| modify a location list (Yegappan Lakshmanan)
|setqflist()| modify a quickfix list (Yegappan Lakshmanan)
|sort()| sort a List
|soundfold()| get the sound-a-like equivalent of a word
|split()| split a String into a List
@@ -526,6 +586,12 @@ New autocommand events: ~
|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
|SpellFileMissing| when a spell file can't be found
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
New items in search patterns: ~
|/\%d| \%d123 search for character with decimal number
@@ -539,9 +605,15 @@ New items in search patterns: ~
|/\%U| \%U1234abcd search for character with 8 pos. hex number
|/\]| [\U1234abcd] idem, in a colletion
(The above partly by Ciaran McCreesh)
|/[[=| [[=a=]] an equivalence class (only for latin1 characters)
|/[[.| [[.a.]] a collation element (only works with single char)
|/\%'m| \%'m match at mark m
|/\%<'m| \%<'m match before mark m
|/\%>'m| \%>'m match after mark m
|/\%V| \%V match in Visual area
Nesting |/multi| items no longer is an error when an empty match is possible.
It is now possible to use \{0}, it matches the preceding atom zero times. Not
@@ -570,6 +642,8 @@ Moved all the indent settings from the filetype plugin to the indent file.
Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
different value.
VHDL indent file (Gerald Lai)
New Keymaps: ~
@@ -641,6 +715,8 @@ is already being edited by another Vim instance, the |SwapExists| event has
been added. The |v:swapname|, |v:swapchoice| and |v:swapcommand| variables
can be used, for example to use the |client-server| functionality to bring the
other Vim to the foreground.
When starting Vim with a "-t tag" argument, there is an existing swapfile and
the user selects "quit" or "abort" then exit Vim.
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -657,6 +733,15 @@ iterative mechanism. This avoids out-of-stack errors. State is stored in
allocated memory, running out of memory can always be detected. Allows
matching more complex things, but Vim may seem to hang while doing that.
Previously some options were always evaluated in the |sandbox|. Now that only
happens when the option was set from a modeline or in secure mode. Applies to
'balloonexpr', 'foldexpr', 'foldtext' and 'includeexpr'. (Sumner Hayes)
Some commands and expressions could have nasty side effects, such as using
CTRL-R = while editing a search pattern and the expression invokes a function
that jumps to another window. The |textlock| has been added to prevent this
from happening.
":breakadd here" and ":breakdel here" can be used to set or delete a
breakpoint at the cursor.
@@ -902,6 +987,23 @@ When starting to edit a new file and the directory for the file doesn't exist
then Vim will report "[New DIRECTORY]" instead of "[New File] to give the user
a hint that something might be wrong.
Win32: Preserve the hidden attribute of the viminfo file.
In Insert mode CTRL-A didn't keep the last inserted text when using CTRL-O and
then a cursor key. Now keep the previously inserted text if nothing is
inserted after the CTRL-O. Allows using CTRL-O commands to move the cursor
without losing the last inserted text.
The exists() function now supports checking for autocmd group definition
and for supported autocommand events. (Yegappan Lakshmanan)
Allow using ":global" in the sandbox, it doesn't do anything harmful by
itself.
":saveas asdf.c" will set 'filetype' to c when it's empty. Also for ":w
asdf.c" when it sets the filename for the buffer.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -1475,4 +1577,109 @@ Unix: When filtering text with an external command Vim would still read input,
causing text typed for the command (e.g., a password) to be eaten and echoed.
Don't read input when the terminal is in cooked mode.
The Cygwin version of xxd used CR/LF line separators. (Corinna Vinschen)
Unix: When filtering text through a shell command some resulting text may be
dropped. Now after detecting that the child has exited try reading some more
of its output.
When inside input(), using "CTRL-R =" and the expression throws an exception
the command line was not abandoned but it wasn't used either. Now abandon
typing the command line.
'delcombine' was also used in Visual and Select mode and for commands like
"cl". That was illogical and has been disabled.
When recording while a CursorHold autocommand was defined special keys would
appear in the register. Now the CursorHold event is not triggered while
recording.
Unix: the src/configure script used ${srcdir-.}, not all shells understand
that. Use ${srcdir:-.} instead.
When editing file "a" which is a symlink to file "b" that doesn't exist,
writing file "a" to create "b" and then ":split b" resulted in two buffers on
the same file with two different swapfile names. Now set the inode in the
buffer when creating a new file.
When 'esckeys' is not set don't send the xterm code to request the version
string, because it may cause trouble in Insert mode.
When evaluating an expression for CTRL-R = on the command line it was possible
to call a function that opens a new window, resulting in errors for
incremental search, and many other nasty things were possible. Now use the
|textlock| to disallow changing the buffer or jumping to another window
to protect from unexpected behavior. Same for CTRL-\ e.
"d(" deleted the character under the cursor, while the documentation specified
an exclusive motion. Vi also doesn't delete the character under the cursor.
Shift-Insert in Insert mode could put the cursor before the last character
when it just fits in the window. In coladvance() don't stop at the window
edge when filling with spaces and when in Insert mode. In mswin.vim avoid
getting a beep from the "l" command.
Win32 GUI: When Alt-F4 is used to close the window and Cancel is selected in
the dialog then Vim would insert <M-F4> in the text. Now it's ignored.
When ":silent! {cmd}" caused the swap file dialog, which isn't displayed,
there would still be a hit-enter prompt.
Requesting the termresponse (|t_RV|) early may cause problems with "-c"
arguments that invoke an external command or even "-c quit". Postpone it
until after executing "-c" arguments.
When typing in Insert mode so that a new line is started, using CTRL-G u to
break undo and start a new change, then joining the lines with <BS> caused
undo info to be missing. Now reset the insertion start point.
Syntax HL: When a region start match has a matchgroup and an offset that
happens to be after the end of the line then it continued in the next line and
stopped at the region end match, making the region continue after that.
Now check for the column being past the end of the line in syn_add_end_off().
When changing a file, setting 'swapfile' off and then on again, making another
change and killing Vim, then some blocks may be missing from the swapfile.
When 'swapfile' is switched back on mark all blocks in the swapfile as dirty.
Added mf_set_dirty().
Expanding wildcards in a command like ":e aap;<>!" didn't work. Put
backslashes before characters that are special to the shell. (Adri Verhoef)
A CursorHold autocommand would cause a message to be cleared. Don't show the
special key for the event for 'showcmd'.
When expanding a file name for a shell command, as in "!cmd foo<Tab>" or ":r
!cmd foo<Tab>" also escape characters that are special for the shell:
"!;&()<>".
When the name of the buffer was set by a ":r fname" command |cpo-f| no
autocommands were triggered to notify about the change in the buffer list.
In the quickfix buffer 'bufhidden' was set to "delete", which caused closing
the quickfix window to leave an unlisted "No Name" buffer behind every time.
Win32: when using two screens of different size, setting 'lines' to a large
value didn't fill the whole screen. (SungHyun Nam)
Win32 installer: The generated _vimrc contained an absolute path to diff.exe.
After upgrading it becomes invalid. Now use $VIMRUNTIME instead.
The command line was cleared to often when 'showmode' was set and ":silent
normal vy" was used. Don't clear the command line unless the mode was
actually displayed. Added the "mode_displayed" variable.
The "load session" toolbar item could not handle a space or other special
characters in v:this_session.
":set sta ts=8 sw=4 sts=2" deleted 4 spaces halfway a line instead of 2.
In a multi-byte file the foldmarker could be recognized in the trail byte.
(Taro Muraoka)
Pasting with CTRL-V and menu didn't work properly when some commands are
mapped. Use ":normal!" instead of ":normal". (Tony Apuzzo)
Crashed when expanding a file name argument in backticks.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*vi_diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -87,7 +87,9 @@ Length of an expanded string option
Maximum display width Unix and Win32: 1024 characters, otherwise 255
characters
Maximum lhs of a mapping 50 characters.
Number of highlighting different types: 223
Number of different highlighting types: over 30000
Range of a Number variable: -2147483648 to 2147483647 (more on 64 bit
systems)
Information for undo and text in registers is kept in memory, thus when making
(big) changes the amount of (virtual) memory available limits the number of

View File

@@ -1,4 +1,4 @@
*visual.txt* For Vim version 7.0aa. Last change: 2005 Oct 09
*visual.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -258,6 +258,11 @@ operator character: "v{move-around}3>" (move lines 3 indents to the right).
The {move-around} is any sequence of movement commands. Note the difference
with {motion}, which is only ONE movement command.
Another way to operate on the Visual area is using the |/\%V| item in a
pattern. For example, to replace all '(' in the Visual area with '#': >
:%s/\%V(/X/g
==============================================================================
5. Blockwise operators *blockwise-operators*

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -992,9 +992,11 @@ list of buffers. |unlisted-buffer|
Split window and edit buffer for {filename} from the buffer
list. This will also edit a buffer that is not in the buffer
list, without setting the 'buflisted' flag.
Note: If what you want to do is split the buffer, make a copy
under another name, you can do it this way: >
:w foobar | sp #
*:bn* *:bnext* *E87*
:[N]bn[ext][!] [N]
:[N]bn[ext][!] [N] *:bn* *:bnext* *E87*
Go to [N]th next buffer in buffer list. [N] defaults to one.
Wraps around the end of the buffer list.
See |:buffer-!| for [!].
@@ -1089,9 +1091,10 @@ purposes. A few options can be set to change the behavior of a buffer:
A few useful kinds of a buffer:
quickfix Used to contain the error list. See |:cwindow|. This command
sets the 'buftype' option to "quickfix". You are not supposed
to change this! 'swapfile' is off.
quickfix Used to contain the error list or the location list. See
|:cwindow| and |:lwindow|. This command sets the 'buftype'
option to "quickfix". You are not supposed to change this!
'swapfile' is off.
help Contains a help file. Will only be created with the |:help|
command. The flag that indicates a help buffer is internal
@@ -1100,18 +1103,18 @@ help Contains a help file. Will only be created with the |:help|
directory Displays directory contents. Can be used by a file explorer
plugin. The buffer is created with these settings: >
:set buftype=nowrite
:set bufhidden=delete
:set noswapfile
:setlocal buftype=nowrite
:setlocal bufhidden=delete
:setlocal noswapfile
< The buffer name is the name of the directory and is adjusted
when using the |:cd| command.
scratch Contains text that can be discarded at any time. It is kept
when closing the window, it must be deleted explicitly.
Settings: >
:set buftype=nofile
:set bufhidden=hide
:set noswapfile
:setlocal buftype=nofile
:setlocal bufhidden=hide
:setlocal noswapfile
< The buffer name can be used to identify the buffer.
*unlisted-buffer*
@@ -1119,7 +1122,7 @@ unlisted The buffer is not in the buffer list. It is not used for
normal editing, but to show a help file, remember a file name
or marks. The ":bdelete" command will also set this option,
thus it doesn't completely delete the buffer. Settings: >
:set nobuflisted
:setlocal nobuflisted
<
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Nov 23
" Last Change: 2006 Jan 12
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -399,7 +399,7 @@ fun! s:FTent()
setf dtd
endfun
" Clipper (or FoxPro)
" Clipper (or FoxPro; could also be eviews)
au BufNewFile,BufRead *.prg
\ if exists("g:filetype_prg") |
\ exe "setf " . g:filetype_prg |
@@ -606,6 +606,9 @@ au BufNewFile,BufRead *.gpi setf gnuplot
" GrADS scripts
au BufNewFile,BufRead *.gs setf grads
" Gretl
au BufNewFile,BufRead *.gretl setf gretl
" Groovy
au BufNewFile,BufRead *.groovy setf groovy

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: Javascript
" Maintainer: Bram Moolenaar (for now)
" Last Change: 2006 Jan 30
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
if exists('&ofu')
setlocal ofu=javascriptcomplete#CompleteJS
endif

View File

@@ -1,8 +1,8 @@
" Vim settings file
" Language: LambdaProlog (Teyjus)
" Maintainer: Markus Mottl <markus@oefai.at>
" URL: http://www.oefai.at/~markus/vim/ftplugin/lprolog.vim
" Last Change: 2001 Oct 02 - fixed uncommenting bug (MM)
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
" Last Change: 2006 Feb 05
" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
" 2001 Sep 02 - initial release (MM)

View File

@@ -0,0 +1,30 @@
" Vim filetype plugin file
" Language: matlab
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
" Last Changed: 2006 Jan 12
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
if exists("loaded_matchit")
let s:conditionalEnd = '\(([^()]*\)\@!\<end\>\([^()]*)\)\@!'
let b:match_words = '\<if\>\|\<while\>\|\<for\>\|\<switch\>:' .
\ s:conditionalEnd . ',\<if\>:\<elseif\>:\<else\>:' .
\ s:conditionalEnd
endif
setlocal suffixesadd=.m
setlocal suffixes+=.asv
let b:undo_ftplugin = "setlocal suffixesadd< suffixes< "
\ . "| unlet! b:match_words"
let &cpo = s:save_cpo

View File

@@ -4,7 +4,7 @@
" Markus Mottl <markus.mottl@gmail.com>
" Stefano Zacchiroli <zack@bononia.it>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
" Last Change: 2005 Oct 13 - removed GPL; better matchit support (MM, SZ)
" Last Change: 2006 Feb 05
"
" if exists("b:did_ftplugin")
" finish
@@ -377,4 +377,3 @@ let &cpoptions=s:cposet
unlet s:cposet
" vim:sw=2

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Perl
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Change: 2004 Dec 06
" Last Change: 2005 Dec 16
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -27,7 +27,7 @@ endif
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
setlocal include=\\<\\(use\\|require\\)\\>
setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
setlocal define=[^A-Za-z_]

View File

@@ -14,6 +14,8 @@ setlocal suffixesadd=.py
setlocal comments-=:%
setlocal commentstring=#%s
setlocal omnifunc=pycomplete#Complete
set wildignore+=*.pyc
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr>

View File

@@ -2,8 +2,9 @@
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Last Change: 2005 Nobember 21st
" Version: 1.20
" Last Change: 2006 January 15th
" Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php
" Version: 1.23
"
" The change log and all the comments have been removed from this file.
"
@@ -11,14 +12,14 @@
" 2072productions.com at the URI provided above.
"
" If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr
" with an example of code that break the algorithm.
" with an example of code that breaks the algorithm.
"
"
" Thanks a lot for using this script.
"
"
" NOTE: This script must be used with PHP syntax ON and with the php syntax
" script by Lutz Eymers (http://www.isp.de/data/php.vim ) that's the script bundled with Gvim.
" script by Lutz Eymers ( http://www.isp.de/data/php.vim ) that's the script bundled with Vim.
"
"
" In the case you have syntax errors in your script such as end of HereDoc
@@ -69,6 +70,10 @@
if exists("b:did_indent")
finish
endif
@@ -127,7 +132,7 @@ if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUn
endif
if exists("*GetPhpIndent")
finish " XXX
finish " XXX
endif
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
@@ -136,7 +141,13 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
function! GetLastRealCodeLNum(startline) " {{{
let lnum = a:startline
if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1
let lnum = b:GetLastRealCodeLNum_ADD
endif
let old_lnum = lnum
while lnum > 1
@@ -288,7 +299,7 @@ function! IslinePHP (lnum, tofind) " {{{
endfunction " }}}
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\);'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|[|&]\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\|[|&]\)'
let s:autorestoptions = 0
if ! s:autorestoptions
@@ -316,6 +327,8 @@ endfunc
function! GetPhpIndent()
let b:GetLastRealCodeLNum_ADD = 0
let UserIsEditing=0
if b:PHP_oldchangetick != b:changedtick
let b:PHP_oldchangetick = b:changedtick
@@ -361,7 +374,10 @@ function! GetPhpIndent()
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
let synname = IslinePHP (prevnonblank(v:lnum), "")
let synname = ""
if cline !~ '<?.*?>'
let synname = IslinePHP (prevnonblank(v:lnum), "")
endif
if synname!=""
if synname != "phpHereDoc"
@@ -425,6 +441,7 @@ function! GetPhpIndent()
elseif cline =~? '<script\>'
let b:InPHPcode_and_script = 1
let b:GetLastRealCodeLNum_ADD = v:lnum
endif
endif
endif
@@ -453,11 +470,11 @@ function! GetPhpIndent()
endif
endif " }}}
if !b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
" Indent successive // or # comment the same way the first is {{{
if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
if b:PHP_LastIndentedWasComment == 1
@@ -482,9 +499,11 @@ function! GetPhpIndent()
endif
endif
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*'
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
if getline(v:lnum + 1) !~ '^\s*\*'
return -1
endif
let b:PHP_InsideMultilineComment = 1
return -1
endif " }}}
@@ -504,6 +523,7 @@ function! GetPhpIndent()
let s:level = 0
let lnum = GetLastRealCodeLNum(v:lnum - 1)
let last_line = getline(lnum)
let ind = indent(lnum)
let endline= s:endline

442
runtime/indent/vhdl.vim Normal file
View File

@@ -0,0 +1,442 @@
" VHDL indent ('93 syntax)
" Language: VHDL
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
" Version: 1.3
" Last Change: 2006 Jan 31
" URL: http://www.vim.org/scripts/script.php?script_id=1450
" only load this indent file when no other was loaded
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" setup indent options for local VHDL buffer
setlocal indentexpr=GetVHDLindent()
setlocal indentkeys=!^F,o,O,e,0(,0)
setlocal indentkeys+==~if,=~then,=~elsif,=~else
setlocal indentkeys+==~begin,=~is,=~select,=~--
" move around
" keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units"
let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)'
nnoremap <silent><buffer>[[ :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','bW')<CR>
nnoremap <silent><buffer>]] :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','W')<CR>
nnoremap <silent><buffer>[] :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','bW')<CR>
nnoremap <silent><buffer>][ :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','W')<CR>
" constants
" not a comment
let s:NC = '\%(--.*\)\@<!'
" end of string
let s:ES = '\s*\%(--.*\)\=$'
" no "end" keyword in front
let s:NE = '\%(\<end\s\+\)\@<!'
" for matchit plugin
if exists("loaded_matchit")
let b:match_ignorecase = 1
let b:match_words =
\ s:NE.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'.
\ s:NE.'\<case\>:\<when\>:\<end\s\+case\>,'.
\ s:NE.'\<loop\>:\<end\s\+loop\>,'.
\ s:NE.'\<for\>:\<end\s\+for\>,'.
\ s:NE.'\<generate\>:\<end\s\+generate\>,'.
\ s:NE.'\<record\>:\<end\s\+record\>,'.
\ s:NE.'\<units\>:\<end\s\+units\>,'.
\ s:NE.'\<process\>:\<end\s\+process\>,'.
\ s:NE.'\<block\>:\<end\s\+block\>,'.
\ s:NE.'\<function\>:\<end\s\+function\>,'.
\ s:NE.'\<entity\>:\<end\s\+entity\>,'.
\ s:NE.'\<component\>:\<end\s\+component\>,'.
\ s:NE.'\<architecture\>:\<end\s\+architecture\>,'.
\ s:NE.'\<package\>:\<end\s\+package\>,'.
\ s:NE.'\<procedure\>:\<end\s\+procedure\>,'.
\ s:NE.'\<configuration\>:\<end\s\+configuration\>'
endif
" only define indent function once
if exists("*GetVHDLindent")
finish
endif
function GetVHDLindent()
" store current line & string
let curn = v:lnum
let curs = getline(curn)
" find previous line that is not a comment
let prevn = prevnonblank(curn - 1)
let prevs = getline(prevn)
while prevn > 0 && prevs =~ '^\s*--'
let prevn = prevnonblank(prevn - 1)
let prevs = getline(prevn)
endwhile
" default indent starts as previous non-comment line's indent
let ind = prevn > 0 ? indent(prevn) : 0
" backup default
let ind2 = ind
" indent: special; kill string so it would not affect other filters
" keywords: "report" + string
" where: anywhere in current or previous line
let s0 = s:NC.'\<report\>\s*".*"'
if curs =~? s0
let curs = ""
endif
if prevs =~? s0
let prevs = ""
endif
" indent: previous line's comment position, otherwise follow next non-comment line if possible
" keyword: "--"
" where: start of current line
if curs =~ '^\s*--'
let pn = curn - 1
let ps = getline(pn)
if ps =~ '--'
return stridx(ps, '--')
else
" find nextnonblank line that is not a comment
let nn = nextnonblank(curn + 1)
let ns = getline(nn)
while nn > 0 && ns =~ '^\s*--'
let nn = nextnonblank(nn + 1)
let ns = getline(nn)
endwhile
let n = indent(nn)
return n != -1 ? n : ind
endif
endif
" ****************************************************************************************
" indent: align generic variables & port names
" keywords: "generic", "map", "port" + "(", provided current line is part of mapping
" where: anywhere in previous 2 lines
" find following previous non-comment line
let pn = prevnonblank(prevn - 1)
let ps = getline(pn)
while pn > 0 && ps =~ '^\s*--'
let pn = prevnonblank(pn - 1)
let ps = getline(pn)
endwhile
if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(generic\|map\|port\)\>.*\)\@<!\S\+\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(generic\|map\|port\)'.s:ES && prevs =~ '^\s*('))
" align closing ")" with opening "("
if curs =~ '^\s*)'
return stridx(prevs, '(')
endif
let m = matchend(prevs, '(\s*\ze\w')
if m != -1
return m
else
return stridx(prevs, '(') + &sw
endif
endif
" indent: align conditional/select statement
" keywords: variable + "<=" without ";" ending
" where: start of previous line
if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES
return matchend(prevs, '<=\s*\ze.')
endif
" indent: backtrace previous non-comment lines for next smaller or equal size indent
" keywords: "end" + "record", "units"
" where: start of previous line
" keyword: ")"
" where: start of previous line
" keyword: without "<=" + ";" ending
" where: anywhere in previous line
" keyword: "=>" + ")" ending, provided current line does not begin with ")"
" where: anywhere in previous line
" _note_: indent allowed to leave this filter
let m = 0
if prevs =~? '^\s*end\s\+\%(record\|units\)\>'
let m = 3
elseif prevs =~ '^\s*)'
let m = 1
elseif prevs =~ s:NC.'\%(<=.*\)\@<!;'.s:ES || (curs !~ '^\s*)' && prevs =~ s:NC.'=>.*'.s:NC.')'.s:ES)
let m = 2
endif
if m > 0
let pn = prevnonblank(prevn - 1)
let ps = getline(pn)
while pn > 0
let t = indent(pn)
if ps !~ '^\s*--' && t < ind
" make sure one of these is true
" keywords: variable + "<=" without ";" ending
" where: start of previous non-comment line
" keywords: "generic", "map", "port"
" where: anywhere in previous non-comment line
" keyword: "("
" where: start of previous non-comment line
if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES
if ps =~? s:NC.'\<\%(generic\|map\|port\)\>' || ps =~ '^\s*('
let ind = t
endif
break
endif
let ind = t
if m > 1
" find following previous non-comment line
let ppn = prevnonblank(pn - 1)
let pps = getline(ppn)
while ppn > 0 && pps =~ '^\s*--'
let ppn = prevnonblank(ppn - 1)
let pps = getline(ppn)
endwhile
" indent: follow
" keyword: "select"
" where: end of following previous non-comment line
" keyword: "type"
" where: start of following previous non-comment line
if m == 2
let s1 = s:NC.'\<select'.s:ES
if ps !~? s1 && pps =~? s1
let ind = indent(ppn)
endif
elseif m == 3
let s1 = '^\s*type\>'
if ps !~? s1 && pps =~? s1
let ind = indent(ppn)
endif
endif
endif
break
endif
let pn = prevnonblank(pn - 1)
let ps = getline(pn)
endwhile
endif
" indent: follow indent of previous opening statement, otherwise -sw
" keyword: "begin"
" where: anywhere in current line
if curs =~? s:NC.'\<begin\>'
let ind = ind - &sw
" find previous opening statement of
" keywords: "architecture", "block", "entity", "function", "generate", "procedure", "process"
let s2 = s:NC.s:NE.'\<\%(architecture\|block\|entity\|function\|generate\|procedure\|process\)\>'
if curs !~? s2.'.*'.s:NC.'\<begin\>.*'.s:ES && prevs =~? s2
let ind = ind + &sw
endif
return ind
endif
" indent: +sw if previous line is previous opening statement
" keywords: "record", "units"
" where: anywhere in current line
if curs =~? s:NC.s:NE.'\<\%(record\|units\)\>'
" find previous opening statement of
" keyword: "type"
let s3 = s:NC.s:NE.'\<type\>'
if curs !~? s3.'.*'.s:NC.'\<\%(record\|units\)\>.*'.s:ES && prevs =~? s3
let ind = ind + &sw
endif
return ind
endif
" ****************************************************************************************
" indent: 0
" keywords: "architecture", "configuration", "entity", "library", "package"
" where: start of current line
if curs =~? '^\s*\%(architecture\|configuration\|entity\|library\|package\)\>'
return 0
endif
" indent: maintain indent of previous opening statement
" keyword: "is"
" where: start of current line
" find previous opening statement of
" keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type"
if curs =~? '^\s*\<is\>' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>'
return ind2
endif
" indent: maintain indent of previous opening statement
" keyword: "then"
" where: start of current line
" find previous opening statement of
" keywords: "elsif", "if"
if curs =~? '^\s*\<then\>' && prevs =~? s:NC.'\%(\<elsif\>\|'.s:NE.'\<if\>\)'
return ind2
endif
" indent: maintain indent of previous opening statement
" keyword: "generate"
" where: start of current line
" find previous opening statement of
" keywords: "for", "if"
if curs =~? '^\s*\<generate\>' && prevs =~? s:NC.s:NE.'\%(\%(\<wait\s\+\)\@<!\<for\>\|\<if\>\)'
return ind2
endif
" indent: +sw
" keywords: "begin", "block", "loop", "process", "record", "units"
" removed: "case", "elsif", "if", "while"
" where: anywhere in previous line
if prevs =~? s:NC.'\%(\<begin\>\|'.s:NE.'\<\%(block\|loop\|process\|record\|units\)\>\)'
return ind + &sw
endif
" indent: +sw
" keywords: "architecture", "component", "configuration", "entity", "for", "package"
" removed: "when", "with"
" where: start of previous line
if prevs =~? '^\s*\%(architecture\|component\|configuration\|entity\|for\|package\)\>'
return ind + &sw
endif
" indent: +sw
" keyword: "generate", "is", "select", "=>"
" where: end of previous line
if prevs =~? s:NC.'\%(\%('.s:NE.'\<generate\|\<is\|\<select\)\|=>\)'.s:ES
return ind + &sw
endif
" indent: +sw
" keyword: "else"
" where: start of previous line
" keyword: "then"
" where: end of previous line
" _note_: indent allowed to leave this filter
if prevs =~? '^\s*else\>' || prevs =~? s:NC.'\<then'.s:ES
let ind = ind + &sw
endif
" ****************************************************************************************
" indent: -sw
" keywords: "when", provided previous line does not begin with "when"
" where: start of current line
let s4 = '^\s*when\>'
if curs =~? s4
if prevs !~? s4
return ind - &sw
else
return ind2
endif
endif
" indent: -sw
" keywords: "else", "elsif", provided previous line does not contain "then"
" where: start of current line
if curs =~? '^\s*\%(else\|elsif\)\>'
if prevs !~? s:NC.'\<then\>'
return ind - &sw
else
return ind2
endif
endif
" indent: -sw
" keywords: "end" + "if", provided previous line does not begin with "else", not contain "then"
" where: start of current line
if curs =~? '^\s*end\s\+if\>'
if prevs !~? '^\s*else\>' && prevs !~? s:NC.'\<then\>'
return ind - &sw
else
return ind2
endif
endif
" indent: -sw
" keywords: "end" + "function", "procedure", provided previous line does not contain "begin"
" where: start of current line
if curs =~? '^\s*end\s\+\%(function\|procedure\)\>'
if prevs !~? s:NC.'\<begin\>'
return ind - &sw
else
return ind2
endif
endif
" indent: -sw
" keywords: "end" + "block", "for", "generate", "loop", "process", "record", "units"
" where: start of current line
if curs =~? '^\s*end\s\+\%(block\|for\|generate\|loop\|process\|record\|units\)\>'
return ind - &sw
endif
" indent: backtrace previous non-comment lines
" keyword: "end" + "case", "component"
" where: start of current line
let m = 0
if curs =~? '^\s*end\s\+case\>'
let m = 1
elseif curs =~? '^\s*end\s\+component\>'
let m = 2
endif
if m > 0
" find following previous non-comment line
let pn = prevn
let ps = getline(pn)
while pn > 0
if ps !~ '^\s*--'
"indent: -2sw
"keywords: "end" + "case"
"where: start of previous non-comment line
"indent: -sw
"keywords: "when"
"where: start of previous non-comment line
"indent: follow
"keywords: "case"
"where: start of previous non-comment line
if m == 1
if ps =~? '^\s*end\s\+case\>'
return indent(pn) - 2 * &sw
elseif ps =~? '^\s*when\>'
return indent(pn) - &sw
elseif ps =~? '^\s*case\>'
return indent(pn)
endif
"indent: follow
"keyword: "component"
"where: anywhere in previous non-comment line
elseif m == 2
if ps =~? s:NC.s:NE.'\<component\>'
return indent(pn)
endif
endif
endif
let pn = prevnonblank(pn - 1)
let ps = getline(pn)
endwhile
return ind - &sw
endif
" indent: -sw
" keyword: ")"
" where: start of current line
if curs =~ '^\s*)'
return ind - &sw
endif
" indent: 0
" keywords: "end" + "architecture", "configuration", "entity", "package"
" where: start of current line
if curs =~? '^\s*end\s\+\%(architecture\|configuration\|entity\|package\)\>'
return 0
endif
" indent: -sw
" keywords: "end" + identifier
" where: start of current line
if curs =~? '^\s*end\s\+\w\+\>'
return ind - &sw
endif
" ****************************************************************************************
" indent: maintain indent of previous opening statement
" keywords: without "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":="
" where: start of current line
if curs =~? '^\s*\%(\<\%(generic\|map\|port\)\>.*\)\@<!\S\+\s*:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)'
return ind2
endif
" return leftover filtered indent
return ind
endfunction

View File

@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Sko
menutrans Jump\ &back<Tab>^T Sko<EFBFBD>it\ &zp<EFBFBD>t<Tab>^T
menutrans Build\ &Tags\ File &Vytvo<EFBFBD>it\ soubor\ tag<EFBFBD>
menutrans &Spelling &Kontrola\ pravopisu
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
menutrans To\ Next\ error<Tab>]s &Dal<EFBFBD><EFBFBD>\ chyba<Tab>]s
menutrans To\ Previous\ error<Tab>[s &P<EFBFBD>edchoz<EFBFBD>\ chyba<Tab>[s
menutrans Suggest\ Corrections<Tab>z? &N<EFBFBD>vrh\ oprav<Tab>z?
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
menutrans &Find\ More\ Languages Nal<EFBFBD>zt\ dal<EFBFBD><EFBFBD>\ &jazyky
menutrans &Folding &Foldy
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ <20><>dek\ kurzoru<Tab>zv
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &P
menutrans &Older\ List<Tab>:cold Sta&r<EFBFBD><EFBFBD>\ seznam<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew N&ov<EFBFBD>j<EFBFBD><EFBFBD>\ seznam<Tab>:cnew
menutrans Error\ &Window Chybov<EFBFBD>\ o&kno
menutrans SeT\ Compiler Nas&taven<EFBFBD>\ kompil<EFBFBD>toru
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
menutrans &Open<Tab>:copen &Otev<EFBFBD><EFBFBD>t<Tab>:copen
menutrans &Close<Tab>:cclose &Zav<EFBFBD><EFBFBD>t<Tab>:cclose

View File

@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Sko
menutrans Jump\ &back<Tab>^T Sko<EFBFBD>it\ &zp<EFBFBD>t<Tab>^T
menutrans Build\ &Tags\ File &Vytvo<EFBFBD>it\ soubor\ tag<EFBFBD>
menutrans &Spelling &Kontrola\ pravopisu
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
menutrans To\ Next\ error<Tab>]s &Dal<EFBFBD><EFBFBD>\ chyba<Tab>]s
menutrans To\ Previous\ error<Tab>[s &P<EFBFBD>edchoz<EFBFBD>\ chyba<Tab>[s
menutrans Suggest\ Corrections<Tab>z? &N<EFBFBD>vrh\ oprav<Tab>z?
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
menutrans &Find\ More\ Languages Nal<EFBFBD>zt\ dal<EFBFBD><EFBFBD>\ &jazyky
menutrans &Folding &Foldy
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ <20><>dek\ kurzoru<Tab>zv
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &P
menutrans &Older\ List<Tab>:cold Sta&r<EFBFBD><EFBFBD>\ seznam<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew N&ov<EFBFBD>j<EFBFBD><EFBFBD>\ seznam<Tab>:cnew
menutrans Error\ &Window Chybov<EFBFBD>\ o&kno
menutrans SeT\ Compiler Nas&taven<EFBFBD>\ kompil<EFBFBD>toru
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
menutrans &Open<Tab>:copen &Otev<EFBFBD><EFBFBD>t<Tab>:copen
menutrans &Close<Tab>:cclose &Zav<EFBFBD><EFBFBD>t<Tab>:cclose

View File

@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Skocit\ na\ tag<Tab>g^]
menutrans Jump\ &back<Tab>^T Skocit\ &zpet<Tab>^T
menutrans Build\ &Tags\ File &Vytvorit\ soubor\ tagu
menutrans &Spelling &Kontrola\ pravopisu
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
menutrans To\ Next\ error<Tab>]s &Dalsi\ chyba<Tab>]s
menutrans To\ Previous\ error<Tab>[s &Predchozi\ chyba<Tab>[s
menutrans Suggest\ Corrections<Tab>z? &Navrh\ oprav<Tab>z?
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
menutrans &Find\ More\ Languages Nalezt\ dalsi\ &jazyky
menutrans &Folding &Foldy
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ radek\ kurzoru<Tab>zv
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &Predchozi\ chyba<Tab>:cp
menutrans &Older\ List<Tab>:cold Sta&rsi\ seznam<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew N&ovejsi\ seznam<Tab>:cnew
menutrans Error\ &Window Chybove\ o&kno
menutrans SeT\ Compiler Nas&taveni\ kompilatoru
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
menutrans &Open<Tab>:copen &Otevrit<Tab>:copen
menutrans &Close<Tab>:cclose &Zavrit<Tab>:cclose

View File

@@ -2,7 +2,7 @@
"
" Menu Translations: Japanese (EUC-JP)
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
" Last Change: 29-Apr-2004.
" Last Change: 04-Feb-2006.
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -142,7 +142,23 @@ menutrans &Open<Tab>:copen
menutrans &Close<Tab>:cclose <09>Ĥ<EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>:cclose
menutrans &Convert\ to\ HEX<Tab>:%!xxd HEX<EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>(&C)<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r HEX<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>(&R)<Tab>%!xxd\ -r
menutrans &Set\ Compiler <09><><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&S)
menutrans Se&T\ Compiler <09><><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&T)
" Tools.Spelling Menu
menutrans &Spelling <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&S)
menutrans &Spell\ Check\ On <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>ͭ<EFBFBD><EFBFBD>(&S)
menutrans Spell\ Check\ &Off <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>ͭ<EFBFBD><EFBFBD>(&O)
menutrans To\ &Next\ error<Tab>]s <09><><EFBFBD>Υ<EFBFBD><EFBFBD>(&N)<Tab>]s
menutrans To\ &Previous\ error<Tab>[s <09><><EFBFBD>Υ<EFBFBD><EFBFBD>(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z? <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>z?
menutrans &Repeat\ correction<Tab>:spellrepall <09><><EFBFBD><EFBFBD><EFBFBD>򷫤<EFBFBD><F2B7ABA4>֤<EFBFBD>(&R)<Tab>:spellrepall
menutrans Set\ language\ to\ "en" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_au" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_au"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_ca" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_ca"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_gb" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_gb"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_nz" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_nz"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_us" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_us"\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Find\ More\ Languages ¾<>θ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>򸡺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&F)
" Tools.Fold Menu
menutrans &Folding <09>޾<EFBFBD><DEBE><EFBFBD>(&F)

View File

@@ -2,7 +2,7 @@
"
" Menu Translations: Japanese (UTF-8)
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
" Last Change: 29-Apr-2004.
" Last Change: 04-Feb-2006.
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -142,7 +142,23 @@ menutrans &Open<Tab>:copen 開く(&O)<Tab>:copen
menutrans &Close<Tab>:cclose 閉じる(&C)<Tab>:cclose
menutrans &Convert\ to\ HEX<Tab>:%!xxd HEXへ変換(&C)<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r HEXから逆変換(&R)<Tab>%!xxd\ -r
menutrans &Set\ Compiler コンパイラ設定(&S)
menutrans Se&T\ Compiler コンパイラ設定(&T)
" Tools.Spelling Menu
menutrans &Spelling スペリング(&S)
menutrans &Spell\ Check\ On スペルチェック有効(&S)
menutrans Spell\ Check\ &Off スペルチェック有効(&O)
menutrans To\ &Next\ error<Tab>]s 次のエラー(&N)<Tab>]s
menutrans To\ &Previous\ error<Tab>[s 前のエラー(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z? 修正候補(&C)<Tab>z?
menutrans &Repeat\ correction<Tab>:spellrepall 修正を繰り返す(&R)<Tab>:spellrepall
menutrans Set\ language\ to\ "en" 言語を\ "en"\ に設定する
menutrans Set\ language\ to\ "en_au" 言語を\ "en_au"\ に設定する
menutrans Set\ language\ to\ "en_ca" 言語を\ "en_ca"\ に設定する
menutrans Set\ language\ to\ "en_gb" 言語を\ "en_gb"\ に設定する
menutrans Set\ language\ to\ "en_nz" 言語を\ "en_nz"\ に設定する
menutrans Set\ language\ to\ "en_us" 言語を\ "en_us"\ に設定する
menutrans &Find\ More\ Languages 他の言語を検索する(&F)
" Tools.Fold Menu
menutrans &Folding 折畳み(&F)

View File

@@ -2,7 +2,7 @@
"
" Menu Translations: Japanese (CP932)
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
" Last Change: 29-Apr-2004.
" Last Change: 04-Feb-2006.
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -142,7 +142,23 @@ menutrans &Open<Tab>:copen
menutrans &Close<Tab>:cclose <09>‚<EFBFBD><C282><EFBFBD>(&C)<Tab>:cclose
menutrans &Convert\ to\ HEX<Tab>:%!xxd HEX<EFBFBD>֕ϊ<EFBFBD>(&C)<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r HEX<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>ϊ<EFBFBD>(&R)<Tab>%!xxd\ -r
menutrans &Set\ Compiler <09>R<EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>C<EFBFBD><EFBFBD><EFBFBD>ݒ<EFBFBD>(&S)
menutrans Se&T\ Compiler <09>R<EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>C<EFBFBD><EFBFBD><EFBFBD>ݒ<EFBFBD>(&T)
" Tools.Spelling Menu
menutrans &Spelling <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>O(&S)
menutrans &Spell\ Check\ On <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD>L<EFBFBD><EFBFBD>(&S)
menutrans Spell\ Check\ &Off <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD>L<EFBFBD><EFBFBD>(&O)
menutrans To\ &Next\ error<Tab>]s <09><><EFBFBD>̃G<EFBFBD><EFBFBD><EFBFBD>[(&N)<Tab>]s
menutrans To\ &Previous\ error<Tab>[s <09>O<EFBFBD>̃G<EFBFBD><EFBFBD><EFBFBD>[(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z? <09>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>z?
menutrans &Repeat\ correction<Tab>:spellrepall <09>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD>(&R)<Tab>:spellrepall
menutrans Set\ language\ to\ "en" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_au" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_au"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_ca" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_ca"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_gb" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_gb"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_nz" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_nz"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans Set\ language\ to\ "en_us" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ "en_us"\ <20>ɐݒ肷<EFBFBD><EFBFBD>
menutrans &Find\ More\ Languages <09><><EFBFBD>̌<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&F)
" Tools.Fold Menu
menutrans &Folding <09>܏<EFBFBD><DC8F><EFBFBD>(&F)

View File

@@ -1,9 +1,10 @@
" Vim Plugin: Edit the file with an existing Vim if possible
" Maintainer: Bram Moolenaar
" Last Change: 2005 Dec 11
" Last Change: 2005 Dec 15
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
" $VIM/vimfiles/plugin directory.
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
" automatically use the latest version.
" This plugin serves two purposes:
" 1. On startup, if we were invoked with one file name argument and the file
@@ -43,13 +44,15 @@ func s:EditElsewhere(filename)
endif
call remote_expr(servername, "foreground()")
" Make sure the file is visible in a window (not hidden).
" If v:swapcommand exists and is set, send it to the server.
if exists("v:swapcommand")
let c = substitute(v:swapcommand, "'", "''", "g")
call remote_expr(servername, "EditExisting('" . fname_esc . "', '" . c . "')")
else
call remote_expr(servername, "EditExisting('" . fname_esc . "', '')")
if remote_expr(servername, "exists('*EditExisting')")
" Make sure the file is visible in a window (not hidden).
" If v:swapcommand exists and is set, send it to the server.
if exists("v:swapcommand")
let c = substitute(v:swapcommand, "'", "''", "g")
call remote_expr(servername, "EditExisting('" . fname_esc . "', '" . c . "')")
else
call remote_expr(servername, "EditExisting('" . fname_esc . "', '')")
endif
endif
if !(has('vim_starting') && has('gui_running') && has('gui_win32'))

View File

@@ -1,6 +1,6 @@
" Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Dec 01
" Last Change: 2006 Jan 12
" This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
@@ -186,7 +186,9 @@ SynMenu FG.Grub:grub
SynMenu FG.GNU\ Server\ Pages:gsp
SynMenu FG.GNUplot:gnuplot
SynMenu FG.GrADS\ scripts:grads
SynMenu FG.Gretl:gretl
SynMenu FG.Groff:groff
SynMenu FG.Groovy:groovy
SynMenu FG.GTKrc:gtkrc
SynMenu HIJK.Haskell.Haskell:haskell

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Oct 01
" Last Change: 2006 Feb 02
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -140,14 +140,14 @@ if has("virtualedit")
func! <SID>Paste()
let ove = &ve
set ve=all
normal `^
normal! `^
if @+ != ''
normal "+gP
normal! "+gP
endif
let c = col(".")
normal i
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal l
normal! l
endif
let &ve = ove
endfunc
@@ -1034,7 +1034,7 @@ endif
" Select a session to load; default to current session name if present
fun! s:LoadVimSesn()
if strlen(v:this_session) > 0
let name = v:this_session
let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
else
let name = "Session.vim"
endif
@@ -1046,7 +1046,7 @@ fun! s:SaveVimSesn()
if strlen(v:this_session) == 0
let v:this_session = "Session.vim"
endif
execute "browse mksession! " . v:this_session
execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
endfun
endif

View File

@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2004 Jul 27
" Last change: 2006 Feb 02
" bail out if this isn't wanted (mrsvim.vim uses this).
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -47,14 +47,20 @@ if has("virtualedit")
func! <SID>Paste()
let ove = &ve
set ve=all
normal `^
normal! `^
if @+ != ''
normal "+gP
normal! "+gP
endif
let c = col(".")
normal i
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal l
" Avoid a beep when the text ends at the window edge.
let vb_save = &vb
let t_vb_save = &t_vb
set vb t_vb=
normal! l
let &vb = vb_save
let &t_vb = t_vb_save
endif
let &ve = ove
endfunc

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Oct 02
" Last Change: 2006 Jan 13
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -725,6 +725,8 @@ if has("digraphs")
endif
call append("$", "tildeop\tthe \"~\" command behaves like an operator")
call <SID>BinOptionG("top", &top)
call append("$", "operatorfunc\tfunction called for the\"g@\" operator")
call <SID>OptionG("opfunc", &opfunc)
call append("$", "showmatch\tWhen inserting a bracket, briefly jump to its match")
call <SID>BinOptionG("sm", &sm)
call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'")

View File

@@ -35,7 +35,7 @@ set cpo&vim
" Local Browsing: {{{2
augroup FileExplorer
au!
au BufEnter * call s:LocalBrowse(expand("<amatch>"))
au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
augroup END
" Network Browsing Reading Writing: {{{2
@@ -47,10 +47,10 @@ augroup Network
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
endif
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>")
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>")
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'Nread 0r "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
@@ -69,6 +69,12 @@ com! -nargs=? -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
" Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
" Maps:
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
" ---------------------------------------------------------------------
" LocalBrowse: {{{2
fun! s:LocalBrowse(dirname)
@@ -76,7 +82,7 @@ fun! s:LocalBrowse(dirname)
" the BufEnter event causes triggering when attempts to write to
" the DBG buffer are made.
if isdirectory(a:dirname)
call netrw#DirBrowse(a:dirname)
silent! call netrw#DirBrowse(a:dirname)
endif
" not a directory, ignore it
endfun

View File

@@ -0,0 +1,15 @@
" Vim plugin for downloading spell files
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01
" Exit quickly when:
" - this plugin was already loaded
" - when 'compatible' is set
" - some autocommands are already taking care of spell files
if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing")
finish
endif
let loaded_spellfile_plugin = 1
" The function is in the autoload directory.
autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>'))

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2005 Oct 12
" Last change: 2006 Feb 01
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -184,7 +184,7 @@ else
" - "*** " in first line and "--- " in second line (context diff).
" - "# It was generated by makepatch " in the second line (makepatch diff).
" - "Index: <filename>" in the first line (CVS file)
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')

View File

@@ -0,0 +1,22 @@
" Vim script to clean the ll.xxxxx.add files of commented out entries
" Author: Antonio Colombo, Bram Moolenaar
" Last Update: 2006 Jan 19
" Time in seconds after last time an ll.xxxxx.add file was updated
" Default is one hour.
if !exists("g:spell_clean_limit")
let g:spell_clean_limit = 60 * 60
endif
" Loop over all the runtime/spell/*.add files.
for s:fname in split(globpath(&rtp, "spell/*.add"), "\n")
if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit
silent exe "split " . escape(s:fname, ' \')
echo "Processing" s:fname
silent! g/^#/d
silent update
close
endif
endfor
echo "Done"

Binary file not shown.

BIN
runtime/spell/en.ascii.sug Normal file

Binary file not shown.

Binary file not shown.

BIN
runtime/spell/en.latin1.sug Normal file

Binary file not shown.

Binary file not shown.

BIN
runtime/spell/en.utf-8.sug Normal file

Binary file not shown.

View File

@@ -16,8 +16,7 @@ $SPELLDIR/fo.latin1.spl : $FILES
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
$SPELLDIR/fo.utf-8.spl : $FILES
:sys env LANG=fo_FO.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/fo fo_FO" -c q
../README_fo.txt : README_fo_FO.txt Copyright
:cat $source >! $target

View File

@@ -16,8 +16,7 @@ $SPELLDIR/gd.latin1.spl : $FILES
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
$SPELLDIR/gd.utf-8.spl : $FILES
:sys env LANG=gd_GB.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/gd gd_GB" -c q
../README_gd.txt : README_gd_GB.txt
:copy $source $target

View File

@@ -12,11 +12,11 @@ FILES = gl_ES.aff gl_ES.dic
all: $SPELLDIR/gl.latin1.spl $SPELLDIR/gl.utf-8.spl ../README_gl.txt
$SPELLDIR/gl.latin1.spl : $FILES
:sys env LANG=gl_ES.ISO8859-1
:sys env LANG=es_ES.ISO8859-1
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
$SPELLDIR/gl.utf-8.spl : $FILES
:sys env LANG=gl_ES.UTF-8
:sys env LANG=es_ES.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
../README_gl.txt : README_gl_ES.txt

View File

@@ -4,12 +4,11 @@
# aap generate all the .spl files
# aap diff create all the diff files
# "hu" is at the end, because it takes a very long time.
LANG = af am bg ca cs cy da de el en eo es fr fo ga gd gl he hr id it ku
la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
tet th tl tn uk yi zu hu
# "hu" is at the end, because it takes a very long time.
#
# TODO:
# Finnish doesn't work, the dictionary fi_FI.zip file contains hyphenation...

View File

@@ -1,8 +1,8 @@
*** nl_NL.orig.aff Sun Jul 3 18:24:07 2005
--- nl_NL.aff Tue Aug 23 14:03:48 2005
--- nl_NL.aff Thu Dec 29 19:42:56 2005
***************
*** 3,6 ****
--- 3,30 ----
--- 3,31 ----
+ FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
+ LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -13,9 +13,10 @@
+
+ MIDWORD '-
+
+ KEP =
+ RAR ?
+ KEEPCASE =
+ RARE ?
+ BAD !
+ SLASH ,
+
NOSPLITSUGS
@@ -53,7 +54,7 @@
! SFX J 0 je [aeiou][bcdfgkpt]
! SFX J 0 jes [aeiou][bcdfgkpt]
--- 57,76 ----
--- 58,77 ----
SFX J N 18
! SFX J 0 tje [aeiou][aeiou]
! SFX J 0 tjes [aeiou][aeiou]
@@ -79,7 +80,7 @@
REP ubi ibu
! REP croc krok
REP ten than
--- 277,279 ----
--- 278,280 ----
REP ubi ibu
! REP croc krok
REP ten than
@@ -88,7 +89,7 @@
REP capucino cappuccino
! REP celcius Celsius
REP kado cadeau
--- 312,314 ----
--- 313,315 ----
REP capucino cappuccino
! REP celcius Celsius
REP kado cadeau
@@ -101,7 +102,7 @@
REP kommittee comit<69>
! REP kwis quiz
REP kwissen quizzen
--- 318,324 ----
--- 319,325 ----
REP committee comit<69>
! REP komitee comit<69>
! REP komittee comit<69>
@@ -114,7 +115,7 @@
REP copy kopij
! REP pitoresque pittoreske
REP reikweite reikwijdte
--- 326,328 ----
--- 327,329 ----
REP copy kopij
! REP pitoresque pittoreske
REP reikweite reikwijdte
@@ -126,7 +127,7 @@
! REP kontekst context
! REP korrekt correct
REP kritikus criticus
--- 338,343 ----
--- 339,344 ----
REP klup club
! REP wiskid whizzkid
! REP kontakt contact
@@ -135,13 +136,13 @@
REP kritikus criticus
***************
*** 333 ****
--- 357,360 ----
--- 358,361 ----
REP aflassen afgelasten
+ REP svp s.v.p.
+ REP zoz z.o.z.
+
*** nl_NL.orig.dic Sun Jul 3 18:24:07 2005
--- nl_NL.dic Sat Dec 10 20:46:29 2005
--- nl_NL.dic Tue Jan 17 20:39:49 2006
***************
*** 1,3 ****
119937
@@ -187,8 +188,14 @@
! achterwand/N
achterweg/NE
***************
*** 4896,4897 ****
--- 4900,4902 ----
aidsepidemie
+ aidspreventieprogramma
aidspreventieprogramma's
***************
*** 7485,7486 ****
--- 7489,7498 ----
--- 7490,7499 ----
avond/SN
+ 's avonds/=
+ 's middags/=
@@ -201,7 +208,7 @@
avondapp<70>l/S
***************
*** 20681,20682 ****
--- 20693,20695 ----
--- 20694,20696 ----
cytostatica
+ d.m.v.
daad/P
@@ -210,19 +217,19 @@
hartelozer
! hartelust
harten/S
--- 41822,41824 ----
--- 41823,41825 ----
hartelozer
! hartenlust
harten/S
***************
*** 46300,46301 ****
--- 46313,46315 ----
--- 46314,46316 ----
informaticus
+ informatie/S
informatie-uitwisseling
***************
*** 60206,60208 ****
--- 60220,60227 ----
--- 60221,60228 ----
l<>ss
+ m.a.w.
+ m.b.t.
@@ -233,7 +240,7 @@
maag
***************
*** 77996,77997 ****
--- 78015,78017 ----
--- 78016,78018 ----
pluisje
+ pluisjes
pluist/UF
@@ -242,39 +249,39 @@
programmablad
! programmaboekje
programmacode
--- 80330,80332 ----
--- 80331,80333 ----
programmablad
! programmaboekje/S
programmacode
***************
*** 97474,97475 ****
--- 97494,97497 ----
--- 97495,97498 ----
su<73>ciderisico/X
+ s.v.p.
+ z.o.z.
swagger/S
***************
*** 101428,101429 ****
--- 101450,101453 ----
--- 101451,101454 ----
toezichthouder/S
+ toezichthoudersaansprakelijkheidsverzekering
+ toezichthoudersaansprakelijkheidsverzekeringen
toezie/N
***************
*** 103707,103708 ****
--- 103731,103733 ----
--- 103732,103734 ----
t<>te-<2D>-t<>te/S
+ u
uchtend/N
***************
*** 110847,110848 ****
--- 110872,110874 ----
--- 110873,110875 ----
voorjaarscollectie/S
+ voorjaarsconferentie/S
voorjaarsmoeheid
***************
*** 119938 ****
--- 119964,173136 ----
--- 119965,173166 ----
<20>berhaupt
+ Christiaan/X
+ Fred/X
@@ -285,6 +292,7 @@
+ Ren<65>/X
+ Ren<65>e/X
+ Walter/X
+ Verhagen/X
+ # toevoegingen uit de Woordenlijst van 30 mei 1996
+ a capella
+ a fortiori
@@ -445,25 +453,50 @@
+ wishful thinking
+ <20> gogo
+ <20> propos
+ a.s.
+ evt.
+ enz.
+ t,m
+ bijv.
+ t.n.v.
+ m.b.v.
+ et al.
+ Abraham
+ Anita
+ Boudewijn
+ Bram
+ Edwin
+ Erwin
+ Gerard
+ Gert
+ Google
+ Jos
+ Laurens
+ Leon
+ Luc
+ Luuk
+ Gert
+ Marion
+ Jos
+ Boudewijn
+ Abraham
+ Paul
+ Nikon
+ Pentax
+ Minolta
+ Mari<72>lle
+ Jeroen
+ Wytze
+ Oc<4F>
+ Philips
+ Shell
+ KPN
+ FNV
+ CNV
+ NLUUG
+ ICCF
+ aidsvoorlichting
+ # Woorden uit de Woordenlijst Nederlandse Taal - Offici<63>le Spelling 2005
+ # TODO: werkwoord vervoegingen
+ 's anderendaags
+ 't is dief en diefjesmaat
+ 11 julifeest
+ 11 julifeesten
+ 11 juliviering
+ 11 julivieringen
@@ -2432,6 +2465,8 @@
+ a-priorische
+ a.m.
+ a.u.b.
+ blz.
+ e.d.
+ aagje
+ aagjes
+ aaibaar
@@ -53448,3 +53483,4 @@
+ <20>ber-ich
+ <20>bermensch
+ <20>bermenschen
+

View File

@@ -16,8 +16,7 @@ $SPELLDIR/tl.latin1.spl : $FILES
$VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
$SPELLDIR/tl.utf-8.spl : $FILES
:sys env LANG=tl_PH.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/tl tl_PH" -c q
../README_tl.txt : README_tl_PH.txt
:copy $source $target

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Dot
" Filenames: *.dot
" Maintainer: Markus Mottl <markus@oefai.at>
" URL: http://www.oefai.at/~markus/vim/syntax/dot.vim
" Last Change: 2004 Jul 26
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/syntax/dot.vim
" Last Change: 2006 Feb 05
" 2001 May 04 - initial version
" For version 5.x: Clear all syntax items

104
runtime/syntax/eviews.vim Normal file
View File

@@ -0,0 +1,104 @@
" Vim syntax file
" Language: Eviews (http://www.eviews.com)
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
" Last Change: 2006 Jan 11
" Filenames: *.prg
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if version >= 600
setlocal iskeyword=@,48-57,_,.
else
set iskeyword=@,48-57,_,.
endif
syn case match
" Comment
syn match eComment /\'.*/
" Constant
" string enclosed in double quotes
syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
" number with no fractional part or exponent
syn match eNumber /\d\+/
" floating point number with integer and fractional parts and optional exponent
syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
" floating point number with no integer part and optional exponent
syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
" floating point number with no fractional part and optional exponent
syn match eFloat /\d\+[Ee][-+]\=\d\+/
" Identifier
" identifier with leading letter and optional following keyword characters
syn match eIdentifier /\a\k*/
" Eviews Programing Language
syn keyword eProgLang @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop @temppath then @time to @toc wend while include call subroutine endsub and or
" Eviews Objects, Views and Procedures
syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
" Standard Eviews Commands
syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair
" Constant Identifier
syn match eConstant /\!\k*/
" String Identifier
syn match eStringId /%\k*/
" Command Identifier
syn match eCommand /@\k*/
" Special
syn match eDelimiter /[,;:]/
" Error
syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
syn match eError /[)\]}]/
syn match eBraceError /[)}]/ contained
syn match eCurlyError /[)\]]/ contained
syn match eParenError /[\]}]/ contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_r_syn_inits")
if version < 508
let did_r_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink eComment Comment
HiLink eConstant Identifier
HiLink eStringId Identifier
HiLink eCommand Type
HiLink eString String
HiLink eNumber Number
HiLink eBoolean Boolean
HiLink eFloat Float
HiLink eConditional Conditional
HiLink eProgLang Statement
HiLink eOVP Statement
HiLink eStdCmd Statement
HiLink eIdentifier Normal
HiLink eDelimiter Delimiter
HiLink eError Error
HiLink eBraceError Error
HiLink eCurlyError Error
HiLink eParenError Error
delcommand HiLink
endif
let b:current_syntax="eviews"
" vim: ts=8 sw=2

View File

@@ -138,7 +138,7 @@ syn keyword gnuplotType boxxy[errorbars] csplines dots fsteps histeps impulses
syn keyword gnuplotType line[s] linesp[oints] points poiinttype sbezier splines steps
" w lt lw ls = optional
syn keyword gnuplotType vectors xerr[orbars] xyerr[orbars] yerr[orbars] financebars candlesticks vector
syn keyword gnuplotType errorb[ars surface
syn keyword gnuplotType errorb[ars] surface
syn keyword gnuplotType filledcurve[s] pm3d x1 x2 y1 y2 xy closed
syn keyword gnuplotType at pi front
syn keyword gnuplotType errorlines xerrorlines yerrorlines xyerrorlines

102
runtime/syntax/gretl.vim Normal file
View File

@@ -0,0 +1,102 @@
" Vim syntax file
" Language: gretl (http://gretl.sf.net)
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
" Last Change: 2006 Jan 6
" Filenames: *.inp *.gretl
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if version >= 600
setlocal iskeyword=@,48-57,_,.
else
set iskeyword=@,48-57,_,.
endif
syn case match
" Constant
" string enclosed in double quotes
syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/
" number with no fractional part or exponent
syn match gNumber /\d\+/
" floating point number with integer and fractional parts and optional exponent
syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
" floating point number with no integer part and optional exponent
syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
" floating point number with no fractional part and optional exponent
syn match gFloat /\d\+[Ee][-+]\=\d\+/
" Gretl commands
syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls
"Gretl genr functions
syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem
" Identifier
" identifier with leading letter and optional following keyword characters
syn match gIdentifier /\a\k*/
" Variable with leading $
syn match gVariable /\$\k*/
" Arrow
syn match gArrow /<-/
" Special
syn match gDelimiter /[,;:]/
" Error
syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend
syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
syn match gError /[)\]}]/
syn match gBraceError /[)}]/ contained
syn match gCurlyError /[)\]]/ contained
syn match gParenError /[\]}]/ contained
" Comment
syn match gComment /#.*/
syn match gBCstart /(\*/
syn match gBCend /\*)/
syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_r_syn_inits")
if version < 508
let did_r_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink gComment Comment
HiLink gCommentStart Comment
HiLink gBlockComment Comment
HiLink gString String
HiLink gNumber Number
HiLink gBoolean Boolean
HiLink gFloat Float
HiLink gCommands Repeat
HiLink gGenrFunc Type
HiLink gDelimiter Delimiter
HiLink gError Error
HiLink gBraceError Error
HiLink gCurlyError Error
HiLink gParenError Error
HiLink gIdentifier Normal
HiLink gVariable Identifier
HiLink gArrow Repeat
delcommand HiLink
endif
let b:current_syntax="gretl"
" vim: ts=8 sw=2

View File

@@ -2,7 +2,7 @@
" Language: Java
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/java.vim
" Last Change: 2005 Nov 04
" Last Change: 2006 Jan 15
" Please check :help java.vim for comments on some of the options available.
@@ -65,48 +65,42 @@ syn match javaUserLabelRef "\k\+" contained
syn match javaVarArg "\.\.\."
syn keyword javaScopeDecl public protected private abstract
if exists("java_highlight_java_lang_ids") || exists("java_highlight_java_lang") || exists("java_highlight_all")
if exists("java_highlight_java_lang_ids")
let java_highlight_all=1
endif
if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang")
" java.lang.*
syn match javaLangClass "\<System\>"
syn keyword javaLangClass Cloneable Comparable Runnable Boolean Byte Class
syn keyword javaLangClass Character CharSequence ClassLoader Compiler Double Float
syn keyword javaLangClass Integer InheritableThreadLocal Long Math Number Object Package Process
syn keyword javaLangClass Runtime RuntimePermission InheritableThreadLocal
syn keyword javaLangClass SecurityManager Short String StrictMath StackTraceElement
syn keyword javaLangClass StringBuffer Thread ThreadGroup
syn keyword javaLangClass ThreadLocal Throwable Void ArithmeticException
syn keyword javaLangClass ArrayIndexOutOfBoundsException AssertionError
syn keyword javaLangClass ArrayStoreException ClassCastException
syn keyword javaLangClass ClassNotFoundException
syn keyword javaLangClass CloneNotSupportedException Exception
syn keyword javaLangClass IllegalAccessException
syn keyword javaLangClass IllegalArgumentException
syn keyword javaLangClass IllegalMonitorStateException
syn keyword javaLangClass IllegalStateException
syn keyword javaLangClass IllegalThreadStateException
syn keyword javaLangClass IndexOutOfBoundsException
syn keyword javaLangClass InstantiationException InterruptedException
syn keyword javaLangClass NegativeArraySizeException NoSuchFieldException
syn keyword javaLangClass NoSuchMethodException NullPointerException
syn keyword javaLangClass NumberFormatException RuntimeException
syn keyword javaLangClass SecurityException StringIndexOutOfBoundsException
syn keyword javaLangClass UnsupportedOperationException
syn keyword javaLangClass AbstractMethodError ClassCircularityError
syn keyword javaLangClass ClassFormatError Error ExceptionInInitializerError
syn keyword javaLangClass IllegalAccessError InstantiationError
syn keyword javaLangClass IncompatibleClassChangeError InternalError
syn keyword javaLangClass LinkageError NoClassDefFoundError
syn keyword javaLangClass NoSuchFieldError NoSuchMethodError
syn keyword javaLangClass OutOfMemoryError StackOverflowError
syn keyword javaLangClass ThreadDeath UnknownError UnsatisfiedLinkError
syn keyword javaLangClass UnsupportedClassVersionError VerifyError
syn keyword javaLangClass VirtualMachineError
syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException
syn cluster javaTop add=javaR_JavaLang
syn cluster javaClasses add=javaR_JavaLang
JavaHiLink javaR_JavaLang javaR_Java
syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary
syn cluster javaTop add=javaC_JavaLang
syn cluster javaClasses add=javaC_JavaLang
JavaHiLink javaC_JavaLang javaC_Java
syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError
syn cluster javaTop add=javaE_JavaLang
syn cluster javaClasses add=javaE_JavaLang
JavaHiLink javaE_JavaLang javaE_Java
syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException
syn cluster javaTop add=javaX_JavaLang
syn cluster javaClasses add=javaX_JavaLang
JavaHiLink javaX_JavaLang javaX_Java
JavaHiLink javaR_Java javaR_
JavaHiLink javaC_Java javaC_
JavaHiLink javaE_Java javaE_
JavaHiLink javaX_Java javaX_
JavaHiLink javaX_ javaExceptions
JavaHiLink javaR_ javaExceptions
JavaHiLink javaE_ javaExceptions
JavaHiLink javaC_ javaConstant
syn keyword javaLangObject clone equals finalize getClass hashCode
syn keyword javaLangObject notify notifyAll toString wait
JavaHiLink javaLangClass javaConstant
JavaHiLink javaLangObject javaConstant
syn cluster javaTop add=javaLangObject,javaLangClass
syn cluster javaClasses add=javaLangClass
syn cluster javaTop add=javaLangObject
endif
if filereadable(expand("<sfile>:p:h")."/javaid.vim")
@@ -162,13 +156,15 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp'
" syntax coloring for javadoc comments (HTML)
syntax include @javaHtml <sfile>:p:h/html.vim
unlet b:current_syntax
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaTodo,@Spell
syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
syn match javaDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
syn match javaDocParam contained "\s\S\+"
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
syn match javaDocParam contained "\s\S\+"
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam
syn match javaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
syntax case match
endif
@@ -323,6 +319,7 @@ if version >= 508 || !exists("did_java_syn_inits")
JavaHiLink javaCommentTitle SpecialComment
JavaHiLink javaDocTags Special
JavaHiLink javaDocParam Function
JavaHiLink javaDocSeeTagParam Function
JavaHiLink javaCommentStar javaComment
JavaHiLink javaType Type

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: LambdaProlog (Teyjus)
" Filenames: *.mod *.sig
" Maintainer: Markus Mottl <markus@oefai.at>
" URL: http://www.oefai.at/~markus/vim/syntax/lprolog.vim
" Last Change: 2004 Jul 26
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/syntax/lprolog.vim
" Last Change: 2006 Feb 05
" 2001 Apr 26 - Upgraded for new Vim version
" 2000 Jun 5 - Initial release

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: M4
" Maintainer: Claudio Fleiner
" Maintainer: Claudio Fleiner (claudio@fleiner.com)
" URL: http://www.fleiner.com/vim/syntax/m4.vim
" Last Change: 2001 Apr 26
" Last Change: 2005 Jan 15
" This file will highlight user function calls if they use only
" capital letters and have at least one argument (i.e. the '('
@@ -23,9 +23,9 @@ endif
" define the m4 syntax
syn match m4Variable contained "\$\d\+"
syn match m4Special contained "$[@*#]"
syn match m4Comment "dnl\>.*" contains=SpellErrors
syn match m4Constants "\(\<m4_\)\=__file__"
syn match m4Constants "\(\<m4_\)\=__line__"
syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
syn match m4Constants "\<\(m4_\)\=__file__"
syn match m4Constants "\<\(m4_\)\=__line__"
syn keyword m4Constants divnum sysval m4_divnum m4_sysval
syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top
syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top

View File

@@ -1,9 +1,13 @@
" Vim syntax file
" Language: R (GNU S)
" Maintainer: Tom Payne <tom@tompayne.org>
" Last Change: 2003 May 11
" Filenames: *.r
" URL: http://www.tompayne.org/vim/syntax/r.vim
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
" Last Change: 2006 January 12
" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
" First maintainer Tom Payne <tom@tompayne.org>
" Modified to make syntax less colourful and added the highlighting of
" R assignment arrow
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -54,9 +58,10 @@ syn keyword rConstant LETTERS letters month.ab month.name pi
syn keyword rConstant NULL
syn keyword rBoolean FALSE TRUE
syn keyword rNumber NA
syn match rArrow /<\{1,2}-/
" Type
syn keyword rType array category character complex double function integer list logical matrix numeric vector
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
" Special
syn match rDelimiter /[,;:]/
@@ -89,8 +94,9 @@ if version >= 508 || !exists("did_r_syn_inits")
HiLink rStatement Statement
HiLink rConditional Conditional
HiLink rRepeat Repeat
HiLink rIdentifier Identifier
HiLink rType Type
HiLink rIdentifier Normal
HiLink rArrow Statement
HiLink rType Type
HiLink rDelimiter Delimiter
HiLink rError Error
HiLink rBraceError Error
@@ -102,3 +108,4 @@ endif
let b:current_syntax="r"
" vim: ts=8 sw=2

View File

@@ -2,7 +2,7 @@
" Language: sed
" Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
" Last Change: 2003 May 11
" Last Change: 2005 Dec 15
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -21,7 +21,7 @@ syn match sedAddress "\d\+\~\d\+"
syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
syn match sedComment "^\s*#.*$"
syn match sedFunction "[dDgGhHlnNpPqx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace
syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace
syn match sedLabel ":[^;]*"
syn match sedLineCont "^\(\\\\\)*\\$" contained
syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained

View File

@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Oct 18, 2005
" Version: 78
" Last Change: Feb 01, 2006
" Version: 80
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Using the following VIM variables: {{{1
@@ -123,7 +123,7 @@ syn match shTestError "]"
" Options Interceptor: {{{1
" ====================
syn match shOption "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1
syn match shOption "\s--\S\+"ms=s+1
syn match shOption "\s--[^ \t$`|]\+"ms=s+1
" Operators: {{{1
" ==========
@@ -173,7 +173,7 @@ syn match shComma contained ","
" ====
syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^#$()]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,,shComment
syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^#$()'"]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
if exists("b:is_bash")
@@ -181,7 +181,7 @@ if exists("b:is_bash")
else
syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
endif
syn region shCaseSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseDoubleQuote matchgroup=shOperator start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: SML
" Filenames: *.sml *.sig
" Maintainers: Markus Mottl <markus@oefai.at>
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
" URL: http://www.oefai.at/~markus/vim/syntax/sml.vim
" Last Change: 2004 Jul 26
" URL: http://www.ocaml.info/vim/syntax/sml.vim
" Last Change: 2006 Feb 05
" 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
" 2001 Aug 29 - Fixed small highlighting bug (MM)

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: SQL, PL/SQL (Oracle 8i)
" Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
" Last Change: 2004 Jul 19
" Last Change: 2005 Dec 23
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -58,7 +58,7 @@ syn match sqlComment "--.*$" contains=sqlTodo
syn sync ccomment sqlComment
" Todo.
syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE
syn keyword sqlTodo contained TODO FIXME XXX DEBUG NOTE
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: December 09, 2005
" Version: 7.0-21
" Last Change: February 07, 2006
" Version: 7.0-25
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -16,11 +16,11 @@ syn keyword vimTodo contained COMBAK NOT RELEASED TODO WIP
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cad[dfile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] lockv[ar] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
syn match vimCommand contained "\<z[-+^.=]"
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabstop tag tagbsearch taglength tagrelative tags tagstack tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww
syn keyword vimOption contained : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabstop tag tagbsearch taglength tagrelative tags tagstack tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowildmenu nowinfixheight nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows
@@ -44,7 +44,7 @@ syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
" AutoBuf Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -55,7 +55,7 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair server2client serverlist setbufvar setcmdpos setline setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile
syn keyword vimFuncName contained add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair server2client serverlist setbufvar setcmdpos setline setloclist setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile
"--- syntax above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -126,7 +126,7 @@ syn keyword vimPattern contained start skip end
syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimOperOk,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen oneline matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar
syn match vimOperOk "\<[aiAIrR][()]"
if !exists("g:vimsyntax_noerror")
@@ -175,7 +175,7 @@ endif
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
syn region vimCommentString contained oneline start='\S\s\+"'ms=s+1 end='"'
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Environment Variables: {{{2
" =====================
@@ -185,7 +185,6 @@ syn match vimEnvvar "\${\I\i*}"
" In-String Specials: {{{2
" Try to catch strings, if nothing else matches (therefore it must precede the others!)
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
" COMBAK: I don't know why the \ze is needed in vimPatSepZone
syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
syn match vimPatSepErr contained "\\)"
syn match vimPatSep contained "\\|"
@@ -194,7 +193,7 @@ syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%
syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+ contains=@vimStringGroup
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
@@ -221,7 +220,7 @@ syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
syn match vimSubstFlags contained "[&cegiIpr]\+"
" 'String': {{{2
syn match vimString "[^(,]'[^']\{-}'"lc=1 contains=@vimStringGroup
syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst
@@ -249,8 +248,8 @@ syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
"syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)'
" Set command and associated set-options (vimOptions) with comment {{{2
syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" end="|"me=e-1 end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation
syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
syn match vimSetMod contained "&vim\|[!&]\|all&"
@@ -277,12 +276,13 @@ syn case match
" Maps {{{2
" ====
syn cluster vimMapGroup contains=vimMapBang,vimMapLhs,vimMapMod
syn match vimMap "map\ze\s*[^(]"
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] vm[ap] vn[oremap] skipwhite nextgroup=@vimMapGroup
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMapGroup
syn match vimMap "\<map!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] vm[ap] vn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
syn case ignore
syn keyword vimMapModKey contained buffer leader localleader plug script sid silent unique
syn case match
@@ -422,7 +422,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
syn match vimHiGroup contained "\i\+"
syn case ignore
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
syn keyword vimFgBgAttrib contained none bg background fg foreground
syn case match
syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
@@ -450,7 +450,7 @@ syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
syn match vimHiGuiFgBg contained "\cgui[fb]g="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
syn match vimHiTermcap contained "\S\+" contains=vimNotation
" Highlight: clear {{{2

View File

@@ -14,7 +14,7 @@ be fine for most people.
Contents:
1. MS-DOS
2. Win32 (Windows NT and Windows 95)
2. Win32 (Windows XP/NT and Windows 95/98)
3. Windows NT with OpenNT
4. Windows 3.1
5. Using Mingw
@@ -66,7 +66,7 @@ If you get all kinds of strange error messages when compiling, try adding
changing the file format from "unix" to "dos".
2. Win32 (Windows NT and Windows 95)
2. Win32 (Windows NT/XP and Windows 95/98)
====================================
Summary:

View File

@@ -675,6 +675,8 @@ LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug:full -debugtype:cv,fixup
conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no
PATHDEF_SRC = $(OUTDIR)\pathdef.c
!IF "$(MAP)" == "yes"
# "/map" is for debugging
conflags = $(conflags) /map
@@ -736,7 +738,6 @@ notags:
clean:
- if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
- if exist auto/nul $(DEL_TREE) auto
- if exist *.obj del *.obj
- if exist $(VIM).exe del $(VIM).exe
- if exist $(VIM).ilk del $(VIM).ilk
@@ -894,8 +895,8 @@ $(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
$(OUTDIR)/pathdef.obj: $(OUTDIR) auto/pathdef.c $(INCL)
$(CC) $(CFLAGS) auto/pathdef.c
$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
$(CC) $(CFLAGS) $(PATHDEF_SRC)
$(OUTDIR)/popupmenu.obj: $(OUTDIR) popupmenu.c $(INCL)
@@ -943,16 +944,16 @@ $(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
E0_CFLAGS = $(CFLAGS:\=\\)
E_CFLAGS = $(E0_CFLAGS:"=\")
auto/pathdef.c: auto
@echo creating auto/pathdef.c
@echo /* pathdef.c */ > auto\pathdef.c
@echo #include "vim.h" >> auto\pathdef.c
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> auto\pathdef.c
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> auto\pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> auto\pathdef.c
@echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> auto\pathdef.c
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> auto\pathdef.c
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> auto\pathdef.c
$(PATHDEF_SRC): auto
@echo creating $(PATHDEF_SRC)
@echo /* pathdef.c */ > $(PATHDEF_SRC)
@echo #include "vim.h" >> $(PATHDEF_SRC)
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
@echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
@echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
auto:
if not exist auto/nul mkdir auto

Some files were not shown because too many files have changed in this diff Show More