mirror of
https://github.com/zoriya/vim.git
synced 2025-12-27 09:28:16 +00:00
Compare commits
95 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e34f6269e | ||
|
|
3517bb1ece | ||
|
|
65c923adf3 | ||
|
|
bfb2d40b6e | ||
|
|
a55252087b | ||
|
|
8fd89f0fe7 | ||
|
|
0b23879827 | ||
|
|
c06ac34092 | ||
|
|
b475fb917b | ||
|
|
261bfeab3e | ||
|
|
fd2ac767eb | ||
|
|
e1438bb8d0 | ||
|
|
e224ffa156 | ||
|
|
03f4855fc2 | ||
|
|
b388adb188 | ||
|
|
5e3cb7e869 | ||
|
|
eddf53b02e | ||
|
|
a23ccb8ac6 | ||
|
|
1cad292503 | ||
|
|
a226a6dd9f | ||
|
|
a562149de3 | ||
|
|
5c8837f9d7 | ||
|
|
c542aef58d | ||
|
|
ba6c05240f | ||
|
|
32466aa2e9 | ||
|
|
2a3f7eeebf | ||
|
|
df1bdc92c2 | ||
|
|
80a94a582c | ||
|
|
d1f56e68f1 | ||
|
|
238a564935 | ||
|
|
8f7fd65b24 | ||
|
|
030f0dfad5 | ||
|
|
faa959a870 | ||
|
|
70836c8ba8 | ||
|
|
2a0449d129 | ||
|
|
7e8fd63682 | ||
|
|
997fb4ba69 | ||
|
|
49d7bf13e0 | ||
|
|
f740b29ae2 | ||
|
|
4c7ed462cb | ||
|
|
e45828b593 | ||
|
|
98ea5defcf | ||
|
|
1d2ba7fa85 | ||
|
|
f52c725c47 | ||
|
|
c7453f52d4 | ||
|
|
110bc6bc91 | ||
|
|
06b5db9397 | ||
|
|
3d0a603fa9 | ||
|
|
754b56089f | ||
|
|
cf0c554e3f | ||
|
|
8b6144bdfe | ||
|
|
9f2c6e1deb | ||
|
|
a65576059f | ||
|
|
41cabdadc2 | ||
|
|
a37420f46f | ||
|
|
0e5bd96f84 | ||
|
|
986920760e | ||
|
|
49315f65c9 | ||
|
|
1ef15e30a0 | ||
|
|
afeb4fa8a7 | ||
|
|
b8a7b560b1 | ||
|
|
280f126ef0 | ||
|
|
17c7c01170 | ||
|
|
51156d5a87 | ||
|
|
6ab5b84db4 | ||
|
|
d12f5c17be | ||
|
|
28c258fd24 | ||
|
|
7df351eb8a | ||
|
|
09df3127f4 | ||
|
|
33aec765bd | ||
|
|
71fe80dddd | ||
|
|
66fa271a25 | ||
|
|
0ac9379acf | ||
|
|
c716c306e9 | ||
|
|
b1b715d1fb | ||
|
|
b71eaaeaa8 | ||
|
|
2d3f489e09 | ||
|
|
8ada17c4d9 | ||
|
|
05a7bb363b | ||
|
|
c32840f267 | ||
|
|
04dbce064e | ||
|
|
316059c019 | ||
|
|
ea8bd73212 | ||
|
|
a40ceaf88a | ||
|
|
4770d09abd | ||
|
|
1cbe5f739d | ||
|
|
c7486e034e | ||
|
|
86e01085a1 | ||
|
|
371baa928d | ||
|
|
ebefac63f3 | ||
|
|
cc984263d7 | ||
|
|
0ce33f34a4 | ||
|
|
8fa0445c4f | ||
|
|
5c2f050d91 | ||
|
|
f4cd3e8074 |
4
Filelist
4
Filelist
@@ -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 = \
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Dec 18
|
||||
" Last Change: 2006 Feb 10
|
||||
|
||||
|
||||
" 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
|
||||
@@ -88,7 +162,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
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:]))
|
||||
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0))
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
@@ -99,27 +173,100 @@ 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
|
||||
|
||||
return map(res, 'v:val["match"]')
|
||||
endfunc
|
||||
" 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 = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
|
||||
|
||||
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 line = a:val['tagline']
|
||||
let word = a:val['match'] . a:brackets . s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
|
||||
if has_key(a:val, 'extra')
|
||||
return {'word': word, 'menu': a:val['extra']}
|
||||
endif
|
||||
|
||||
" Isolate the command after the tag and filename.
|
||||
let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)')
|
||||
if s != ''
|
||||
return {'word': word, 'menu': s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))}
|
||||
endif
|
||||
return {'word': word}
|
||||
endfunction
|
||||
|
||||
" Turn a command from a tag line to something that is useful in the menu
|
||||
function! s:Tagcmd2extra(cmd, name, fname)
|
||||
if a:cmd =~ '^/^'
|
||||
" The command is a search command, useful to see what it is.
|
||||
let x = matchstr(a:cmd, '^/^\zs.*\ze$/')
|
||||
let x = substitute(x, a:name, '@@', '')
|
||||
let x = substitute(x, '\\\(.\)', '\1', 'g')
|
||||
let x = x . ' - ' . a:fname
|
||||
elseif a:cmd =~ '^\d*$'
|
||||
" The command is a line number, the file name is more useful.
|
||||
let x = a:fname . ' - ' . a:cmd
|
||||
else
|
||||
" Not recognized, use command and file name.
|
||||
let x = a:cmd . ' - ' . a:fname
|
||||
endif
|
||||
return x
|
||||
endfunction
|
||||
|
||||
" 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 +282,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 +319,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 +335,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 +366,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 +391,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
|
||||
|
||||
@@ -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 18
|
||||
|
||||
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] =~ '\k'
|
||||
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] =~ '\k'
|
||||
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,39 +143,46 @@ 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
|
||||
endif
|
||||
|
||||
" Set attribute groups
|
||||
let coreattrs = ["id", "class", "style", "title"]
|
||||
let i18n = ["lang", "xml:lang", "dir=\"ltr\" ", "dir=\"rtl\" "]
|
||||
let events = ["onclick", "ondblclick", "onmousedown", "onmouseup", "onmousemove",
|
||||
\ "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 +194,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 +362,58 @@ 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, '\k\+$')
|
||||
let js_shortcontext = substitute(a:base, js_context.'$', '', '')
|
||||
let b:compl_context = context
|
||||
let b:jsrange = [l, l]
|
||||
unlet! l c
|
||||
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,113 +489,77 @@ 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\)$'
|
||||
let attrs = coregroup
|
||||
elseif tag == 'a'
|
||||
let attrs = coregroup + focus + ["charset", "type", "name", "href", "hreflang", "rel", "rev", "shape", "coords"]
|
||||
elseif tag == 'area'
|
||||
let attrs = coregroup + focus + ["shape", "coords", "href", "nohref", "alt"]
|
||||
elseif tag == 'base'
|
||||
let attrs = ["href", "id"]
|
||||
elseif tag == 'blockquote'
|
||||
let attrs = coregroup + ["cite"]
|
||||
elseif tag == 'body'
|
||||
let attrs = coregroup + ["onload", "onunload"]
|
||||
elseif tag == 'br'
|
||||
let attrs = coreattrs
|
||||
elseif tag == 'button'
|
||||
let attrs = coregroup + focus + ["name", "value", "type"]
|
||||
elseif tag == '^\(col\|colgroup\)$'
|
||||
let attrs = coregroup + ["span", "width", "align", "char", "charoff", "valign"]
|
||||
elseif tag =~ '^\(del\|ins\)$'
|
||||
let attrs = coregroup + ["cite", "datetime"]
|
||||
elseif tag == 'form'
|
||||
let attrs = coregroup + ["action", "method=\"get\" ", "method=\"post\" ", "enctype", "onsubmit", "onreset", "accept", "accept-charset"]
|
||||
elseif tag == 'head'
|
||||
let attrs = i18n + ["id", "profile"]
|
||||
elseif tag == 'html'
|
||||
let attrs = i18n + ["id", "xmlns"]
|
||||
elseif tag == 'img'
|
||||
let attrs = coregroup + ["src", "alt", "longdesc", "height", "width", "usemap", "ismap"]
|
||||
elseif tag == 'input'
|
||||
let attrs = coregroup + ["type", "name", "value", "checked", "disabled", "readonly", "size", "maxlength", "src", "alt", "usemap", "onselect", "onchange", "accept"]
|
||||
elseif tag == 'label'
|
||||
let attrs = coregroup + ["for", "accesskey", "onfocus", "onblur"]
|
||||
elseif tag == 'legend'
|
||||
let attrs = coregroup + ["accesskey"]
|
||||
elseif tag == 'link'
|
||||
let attrs = coregroup + ["charset", "href", "hreflang", "type", "rel", "rev", "media"]
|
||||
elseif tag == 'map'
|
||||
let attrs = i18n + events + ["id", "class", "style", "title", "name"]
|
||||
elseif tag == 'meta'
|
||||
let attrs = i18n + ["id", "http-equiv", "content", "scheme", "name"]
|
||||
elseif tag == 'title'
|
||||
let attrs = i18n + ["id"]
|
||||
elseif tag == 'object'
|
||||
let attrs = coregroup + ["declare", "classid", "codebase", "data", "type", "codetype", "archive", "standby", "height", "width", "usemap", "name", "tabindex"]
|
||||
elseif tag == 'optgroup'
|
||||
let attrs = coregroup + ["disbled", "label"]
|
||||
elseif tag == 'option'
|
||||
let attrs = coregroup + ["disbled", "selected", "value", "label"]
|
||||
elseif tag == 'param'
|
||||
let attrs = ["id", "name", "value", "valuetype", "type"]
|
||||
elseif tag == 'pre'
|
||||
let attrs = coregroup + ["xml:space"]
|
||||
elseif tag == 'q'
|
||||
let attrs = coregroup + ["cite"]
|
||||
elseif tag == 'script'
|
||||
let attrs = ["id", "charset", "type=\"text/javascript\"", "type", "src", "defer", "xml:space"]
|
||||
elseif tag == 'select'
|
||||
let attrs = coregroup + ["name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange"]
|
||||
elseif tag == 'style'
|
||||
let attrs = coreattrs + ["id", "type=\"text/css\"", "type", "media", "title", "xml:space"]
|
||||
elseif tag == 'table'
|
||||
let attrs = coregroup + ["summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding"]
|
||||
elseif tag =~ '^\(thead\|tfoot\|tbody\|tr\)$'
|
||||
let attrs = coregroup + ["align", "char", "charoff", "valign"]
|
||||
elseif tag == 'textarea'
|
||||
let attrs = coregroup + ["name", "rows", "cols", "disabled", "readonly", "onselect", "onchange"]
|
||||
elseif tag =~ '^\(th\|td\)$'
|
||||
let attrs = coregroup + ["abbr", "headers", "scope", "rowspan", "colspan", "align", "char", "charoff", "valign"]
|
||||
else
|
||||
return []
|
||||
|
||||
" Load data {{{
|
||||
if !exists("g:xmldata_xhtml10s")
|
||||
runtime! autoload/xml/xhtml10s.vim
|
||||
endif
|
||||
" }}}
|
||||
"
|
||||
let attrs = keys(g:xmldata_xhtml10s[tag][1])
|
||||
|
||||
for m in sort(attrs)
|
||||
if m =~ '^'.attr
|
||||
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
|
||||
call add(res, m)
|
||||
else
|
||||
call add(res, m.'="')
|
||||
endif
|
||||
call add(res, m)
|
||||
elseif m =~ attr
|
||||
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
|
||||
call add(res2, m)
|
||||
else
|
||||
call add(res2, m.'="')
|
||||
endif
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
let menu = res + res2
|
||||
if has_key(g:xmldata_xhtml10s, 'vimxmlattrinfo')
|
||||
let final_menu = []
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if has_key(g:xmldata_xhtml10s['vimxmlattrinfo'], item)
|
||||
let m_menu = g:xmldata_xhtml10s['vimxmlattrinfo'][item][0]
|
||||
let m_info = g:xmldata_xhtml10s['vimxmlattrinfo'][item][1]
|
||||
if m_menu !~ 'Bool'
|
||||
let item .= '="'
|
||||
endif
|
||||
else
|
||||
let m_menu = ''
|
||||
let m_info = ''
|
||||
let item .= '="'
|
||||
endif
|
||||
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
|
||||
endfor
|
||||
else
|
||||
let final_menu = map(menu, 'v:val."=\""')
|
||||
endif
|
||||
return final_menu
|
||||
|
||||
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")
|
||||
return [opentag.">"]
|
||||
endif
|
||||
" Deal with tag completion.
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
|
||||
" Load data {{{
|
||||
if !exists("g:xmldata_xhtml10s")
|
||||
runtime! autoload/xml/xhtml10s.vim
|
||||
endif
|
||||
" }}}
|
||||
" Tag completion {{{
|
||||
" 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.
|
||||
" Also when document is empty. Return list of *all* tags.
|
||||
let tags = keys(g:xmldata_xhtml10s)
|
||||
call filter(tags, 'v:val !~ "^vimxml"')
|
||||
else
|
||||
let tags = g:xmldata_xhtml10s[opentag][0]
|
||||
endif
|
||||
" }}}
|
||||
|
||||
let tags = g:xmldata_xhtml10s[opentag][0]
|
||||
|
||||
for m in sort(tags)
|
||||
if m =~ '^'.context
|
||||
@@ -470,8 +568,27 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
let menu = res + res2
|
||||
if has_key(g:xmldata_xhtml10s, 'vimxmltaginfo')
|
||||
let final_menu = []
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if has_key(g:xmldata_xhtml10s['vimxmltaginfo'], item)
|
||||
let m_menu = g:xmldata_xhtml10s['vimxmltaginfo'][item][0]
|
||||
let m_info = g:xmldata_xhtml10s['vimxmltaginfo'][item][1]
|
||||
else
|
||||
let m_menu = ''
|
||||
let m_info = ''
|
||||
endif
|
||||
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
|
||||
endfor
|
||||
else
|
||||
let final_menu = menu
|
||||
endif
|
||||
return final_menu
|
||||
|
||||
return res + res2
|
||||
|
||||
" }}}
|
||||
endif
|
||||
endfunction
|
||||
" vim:set foldmethod=marker:
|
||||
|
||||
625
runtime/autoload/javascriptcomplete.vim
Normal file
625
runtime/autoload/javascriptcomplete.vim
Normal file
@@ -0,0 +1,625 @@
|
||||
" 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] =~ '\k'
|
||||
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\\.\\k"')
|
||||
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\\k\\+\\ze")')
|
||||
|
||||
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\k"')
|
||||
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\\k\\+\\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\k\+\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\k\+\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\k\+\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, "\\k\\+")')
|
||||
let vars += comma_separated
|
||||
endfor
|
||||
|
||||
let variables = sort(vars)
|
||||
unlet! vars
|
||||
|
||||
" Add "no var" variables.
|
||||
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\k\\+\\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, "\\k\\+$")')
|
||||
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\\k\\+")')
|
||||
call map(functions, 'v:val."("')
|
||||
let functions = sort(functions)
|
||||
|
||||
" Create table to keep arguments for additional 'menu' info
|
||||
let b:js_menuinfo = {}
|
||||
for i in arguments
|
||||
let g:ia = i
|
||||
let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))')
|
||||
if len(f_elements) == 3
|
||||
let b:js_menuinfo[f_elements[1].'('] = f_elements[2]
|
||||
endif
|
||||
endfor
|
||||
|
||||
" 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
|
||||
|
||||
let menu = res + res2
|
||||
let final_menu = []
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if item =~ '($'
|
||||
let kind = 'f'
|
||||
if has_key(b:js_menuinfo, item)
|
||||
let m_info = b:js_menuinfo[item]
|
||||
else
|
||||
let m_info = ''
|
||||
endif
|
||||
else
|
||||
let kind = 'v'
|
||||
let m_info = ''
|
||||
endif
|
||||
let final_menu += [{'word':item, 'menu':m_info, 'kind':kind}]
|
||||
endfor
|
||||
let g:fm = final_menu
|
||||
return final_menu
|
||||
|
||||
endfunction
|
||||
|
||||
" vim:set foldmethod=marker:
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
351
runtime/autoload/pycomplete.vim
Normal file
351
runtime/autoload/pycomplete.vim
Normal 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:
|
||||
111
runtime/autoload/spellfile.vim
Normal file
111
runtime/autoload/spellfile.vim
Normal 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
|
||||
260
runtime/autoload/syntaxcomplete.vim
Normal file
260
runtime/autoload/syntaxcomplete.vim
Normal file
@@ -0,0 +1,260 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 1.1
|
||||
" Last Change: Wed Mar 01 2006 9:58:14 PM
|
||||
|
||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||
if exists('+omnifunc')
|
||||
setlocal omnifunc=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 = OmniSyntaxList()
|
||||
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! OmniSyntaxList()
|
||||
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\syntax
|
||||
" directory.
|
||||
redir @l
|
||||
silent! exec 'syntax list '
|
||||
redir END
|
||||
|
||||
let syntax_full = "\n".@l
|
||||
let @l = saveL
|
||||
|
||||
if syntax_full =~ 'E28'
|
||||
\ || syntax_full =~ 'E411'
|
||||
\ || syntax_full =~ 'E415'
|
||||
\ || syntax_full =~ 'No Syntax items'
|
||||
return []
|
||||
endif
|
||||
|
||||
" Default the include group to include the requested syntax group
|
||||
let syntax_group_include_{&filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
if exists('g:omni_syntax_group_include_'.&filetype)
|
||||
let syntax_group_include_{&filetype} =
|
||||
\ substitute( g:omni_syntax_group_include_{&filetype},'\s\+','','g')
|
||||
if syntax_group_include_{&filetype} =~ '\w'
|
||||
let syntax_group_include_{&filetype} =
|
||||
\ substitute( syntax_group_include_{&filetype},
|
||||
\ '\s*,\s*', '\\|', 'g'
|
||||
\ )
|
||||
endif
|
||||
endif
|
||||
|
||||
" Default the exclude group to nothing
|
||||
let syntax_group_exclude_{&filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
if exists('g:omni_syntax_group_exclude_'.&filetype)
|
||||
let syntax_group_exclude_{&filetype} =
|
||||
\ substitute( g:omni_syntax_group_exclude_{&filetype},'\s\+','','g')
|
||||
if syntax_group_exclude_{&filetype} =~ '\w'
|
||||
let syntax_group_exclude_{&filetype} =
|
||||
\ substitute( syntax_group_exclude_{&filetype},
|
||||
\ '\s*,\s*', '\\|', 'g'
|
||||
\ )
|
||||
endif
|
||||
endif
|
||||
|
||||
" Syntax rules can contain items for more than just the current
|
||||
" filetype. They can contain additional items added by the user
|
||||
" via autocmds or their vimrc.
|
||||
" Some syntax files can be combined (html, php, jsp).
|
||||
" We want only items that begin with the filetype we are interested in.
|
||||
let next_group_regex = '\n' .
|
||||
\ '\zs'.&filetype.'\w\+\ze'.
|
||||
\ '\s\+xxx\s\+'
|
||||
let syn_list = ''
|
||||
let index = 0
|
||||
let index = match(syntax_full, next_group_regex, index)
|
||||
|
||||
while index > 0
|
||||
let group_name = matchstr( syntax_full, '\w\+', index )
|
||||
|
||||
let get_syn_list = 1
|
||||
" if syntax_group_include_{&filetype} == ''
|
||||
" if syntax_group_exclude_{&filetype} != ''
|
||||
" if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
|
||||
" let get_syn_list = 0
|
||||
" endif
|
||||
" endif
|
||||
" else
|
||||
" if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
|
||||
" let get_syn_list = 0
|
||||
" endif
|
||||
" endif
|
||||
if syntax_group_exclude_{&filetype} != ''
|
||||
if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
|
||||
let get_syn_list = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
if get_syn_list == 1
|
||||
if syntax_group_include_{&filetype} != ''
|
||||
if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
|
||||
let get_syn_list = 0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if get_syn_list == 1
|
||||
" Pass in the full syntax listing, plus the group name we
|
||||
" are interested in.
|
||||
let extra_syn_list = s:SyntaxGroupItems(group_name, syntax_full)
|
||||
|
||||
let syn_list = syn_list . extra_syn_list . "\n"
|
||||
endif
|
||||
|
||||
let index = index + strlen(group_name)
|
||||
let index = match(syntax_full, next_group_regex, index)
|
||||
endwhile
|
||||
|
||||
" Convert the string to a List and sort it.
|
||||
let compl_list = sort(split(syn_list))
|
||||
|
||||
if &filetype == 'vim'
|
||||
let short_compl_list = []
|
||||
for i in range(len(compl_list))
|
||||
if i == len(compl_list)-1
|
||||
let next = i
|
||||
else
|
||||
let next = i + 1
|
||||
endif
|
||||
if compl_list[next] !~ '^'.compl_list[i].'.$'
|
||||
let short_compl_list += [compl_list[i]]
|
||||
endif
|
||||
endfor
|
||||
|
||||
return short_compl_list
|
||||
else
|
||||
return compl_list
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:SyntaxGroupItems( group_name, syntax_full )
|
||||
|
||||
let syn_list = ""
|
||||
|
||||
" From the full syntax listing, strip out the portion for the
|
||||
" request group.
|
||||
" Query:
|
||||
" \n - must begin with a newline
|
||||
" a:group_name - the group name we are interested in
|
||||
" \s\+xxx\s\+ - group names are always followed by xxx
|
||||
" \zs - start the match
|
||||
" .\{-} - everything ...
|
||||
" \ze - end the match
|
||||
" \n\w - at the first newline starting with a character
|
||||
let syntax_group = matchstr(a:syntax_full,
|
||||
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze'."\n".'\w'
|
||||
\)
|
||||
|
||||
if syntax_group != ""
|
||||
" 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( syntax_group, '\<\('.
|
||||
\ 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
|
||||
|
||||
return syn_list
|
||||
endfunction
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 18
|
||||
|
||||
" 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 =~ '>'
|
||||
@@ -194,25 +230,42 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
|
||||
for m in sort(attrs)
|
||||
if m =~ '^'.attr
|
||||
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
|
||||
call add(res, m)
|
||||
elseif m =~ '='
|
||||
call add(res, m)
|
||||
else
|
||||
call add(res, m.'="')
|
||||
endif
|
||||
call add(res, m)
|
||||
elseif m =~ attr
|
||||
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
|
||||
call add(res, m)
|
||||
elseif m =~ '='
|
||||
call add(res, m)
|
||||
else
|
||||
call add(res2, m.'="')
|
||||
endif
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
let menu = res + res2
|
||||
let final_menu = []
|
||||
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmlattrinfo')
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'], item)
|
||||
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][0]
|
||||
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][1]
|
||||
else
|
||||
let m_menu = ''
|
||||
let m_info = ''
|
||||
endif
|
||||
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
|
||||
let item = item
|
||||
else
|
||||
let item .= '="'
|
||||
endif
|
||||
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
|
||||
endfor
|
||||
else
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
|
||||
let item = item
|
||||
else
|
||||
let item .= '="'
|
||||
endif
|
||||
let final_menu += [item]
|
||||
endfor
|
||||
endif
|
||||
return final_menu
|
||||
|
||||
endif
|
||||
" Close tag
|
||||
@@ -265,25 +318,46 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
" Deal with tag completion.
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
let opentag = substitute(opentag, '^\k*:', '', '')
|
||||
|
||||
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
|
||||
let context = substitute(context, '^\k*:', '', '')
|
||||
|
||||
if b:xml_namespace == 'DEFAULT'
|
||||
let b:xml_namespace = ''
|
||||
if opentag == ''
|
||||
"return []
|
||||
let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
|
||||
call filter(tags, 'v:val !~ "^vimxml"')
|
||||
else
|
||||
let b:xml_namespace .= ':'
|
||||
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
|
||||
endif
|
||||
|
||||
let context = substitute(context, '^\k*:', '', '')
|
||||
|
||||
for m in tags
|
||||
if m =~ '^'.context
|
||||
call add(res, b:xml_namespace.m)
|
||||
call add(res, m)
|
||||
elseif m =~ context
|
||||
call add(res2, b:xml_namespace.m)
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
let menu = res + res2
|
||||
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmltaginfo')
|
||||
let final_menu = []
|
||||
for i in range(len(menu))
|
||||
let item = menu[i]
|
||||
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'], item)
|
||||
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][0]
|
||||
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][1]
|
||||
else
|
||||
let m_menu = ''
|
||||
let m_info = ''
|
||||
endif
|
||||
if b:xml_namespace == 'DEFAULT'
|
||||
let xml_namespace = ''
|
||||
else
|
||||
let xml_namespace = b:xml_namespace.':'
|
||||
endif
|
||||
let final_menu += [{'word':xml_namespace.item, 'menu':m_menu, 'info':m_info}]
|
||||
endfor
|
||||
else
|
||||
let final_menu = menu
|
||||
endif
|
||||
return final_menu
|
||||
|
||||
endif
|
||||
endfunction
|
||||
@@ -357,11 +431,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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ DOCS = \
|
||||
pattern.txt \
|
||||
pi_gzip.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
pi_tar.txt \
|
||||
pi_zip.txt \
|
||||
@@ -89,6 +90,7 @@ DOCS = \
|
||||
starting.txt \
|
||||
spell.txt \
|
||||
syntax.txt \
|
||||
tabpage.txt \
|
||||
tagsrch.txt \
|
||||
term.txt \
|
||||
tips.txt \
|
||||
@@ -195,6 +197,7 @@ HTMLS = \
|
||||
pattern.html \
|
||||
pi_gzip.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
print.html \
|
||||
quickfix.html \
|
||||
@@ -211,6 +214,7 @@ HTMLS = \
|
||||
starting.html \
|
||||
spell.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tagsrch.html \
|
||||
tags.html \
|
||||
term.html \
|
||||
@@ -389,6 +393,7 @@ os_risc.txt:
|
||||
os_win32.txt:
|
||||
touch os_win32.txt
|
||||
|
||||
# Note that $< works with GNU make while $> works for BSD make.
|
||||
vim-fr.UTF-8.1: vim-fr.1
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Dec 18
|
||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -273,13 +273,19 @@ 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
|
||||
|TabEnter| after entering another tab page
|
||||
|TabLeave| before leaving a tab page
|
||||
|CmdwinEnter| after entering the command-line window
|
||||
|CmdwinLeave| before leaving the command-line window
|
||||
|
||||
@@ -330,7 +336,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 +374,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 +445,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
|
||||
@@ -459,6 +466,21 @@ 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.
|
||||
Also when the text of the cursor line has been
|
||||
changed, e.g., with "x", "rx" or "p".
|
||||
Not triggered when there is typeahead or when
|
||||
an operator is pending.
|
||||
For an example see |match-parens|.
|
||||
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.
|
||||
@@ -619,11 +641,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
|
||||
@@ -643,6 +666,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
|
||||
@@ -680,6 +708,14 @@ Syntax When the 'syntax' option has been set.
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'syntax'.
|
||||
See |:syn-on|.
|
||||
*TabEnter*
|
||||
TabEnter Just after entering a tab page. |tab-page|
|
||||
Before triggering the WinEnter and BufEnter
|
||||
events.
|
||||
*TabLeave*
|
||||
TabLeave Just before leaving a tab page. |tab-page|
|
||||
A WinLeave event will have been triggered
|
||||
first.
|
||||
*TermChanged*
|
||||
TermChanged After the value of 'term' has changed. Useful
|
||||
for re-loading the syntax file to update the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2006 Feb 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1168,12 +1168,18 @@ The next three commands always work on whole lines.
|
||||
|
||||
*gq*
|
||||
gq{motion} Format the lines that {motion} moves over.
|
||||
If 'formatprg' is empty formatting is done internally
|
||||
and the 'textwidth' option controls the length of each
|
||||
formatted line (see below).
|
||||
Formatting is done with one of three methods:
|
||||
1. If 'formatexpr' is not empty the expression is
|
||||
evaluated. This can differ for each buffer.
|
||||
2. If 'formatprg' is not empty an external program
|
||||
is used.
|
||||
3. Otherise formatting is done internally.
|
||||
|
||||
In the third case the 'textwidth' option controls the
|
||||
length of each formatted line (see below).
|
||||
If the 'textwidth' option is 0, the formatted line
|
||||
length is the screen width (with a maximum width of
|
||||
79). {not in Vi}
|
||||
79).
|
||||
The 'formatoptions' option controls the type of
|
||||
formatting |fo-table|.
|
||||
The cursor is left on the first non-blank of the last
|
||||
@@ -1193,8 +1199,8 @@ gqq Format the current line. {not in Vi}
|
||||
*gw*
|
||||
gw{motion} Format the lines that {motion} moves over. Similar to
|
||||
|gq| but puts the cursor back at the same position in
|
||||
the text. However, 'formatprg' is not used.
|
||||
{not in Vi}
|
||||
the text. However, 'formatprg' and 'formatexpr' are
|
||||
not used. {not in Vi}
|
||||
|
||||
gwgw *gwgw* *gww*
|
||||
gww Format the current line as with "gw". {not in Vi}
|
||||
@@ -1225,9 +1231,10 @@ white space!).
|
||||
|
||||
The 'joinspaces' option is used when lines are joined together.
|
||||
|
||||
You can set the 'formatprg' option to the name of an external program for Vim
|
||||
to use for text formatting. The 'textwidth' and other options have no effect
|
||||
on formatting by an external program.
|
||||
You can set the 'formatexpr' option to an expression or the 'formatprg' option
|
||||
to the name of an external program for Vim to use for text formatting. The
|
||||
'textwidth' and other options have no effect on formatting by an external
|
||||
program.
|
||||
|
||||
*right-justify*
|
||||
There is no command in Vim to right justify text. You can do it with
|
||||
|
||||
@@ -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()
|
||||
@@ -475,6 +479,7 @@ followed by another command:
|
||||
:global
|
||||
:help
|
||||
:helpfind
|
||||
:lcscope
|
||||
:make
|
||||
:normal
|
||||
:perl
|
||||
@@ -692,6 +697,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 +747,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 Feb 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41,6 +41,10 @@ the file.
|
||||
|
||||
This only works when a standard "diff" command is available. See 'diffexpr'.
|
||||
|
||||
Diffs are local to the current tab page |tab-page|. You can't see diffs with
|
||||
a window in another tab page. This does make it possible to have several
|
||||
diffs at the same time, each in their own tab page.
|
||||
|
||||
What happens is that Vim opens a window for each of the files. This is like
|
||||
using the |-O| argument. This uses vertical splits. If you prefer horizontal
|
||||
splits add the |-o| argument: >
|
||||
@@ -113,7 +117,7 @@ file for a moment and come back to the same file and be in diff mode again.
|
||||
*:diffo* *:diffoff*
|
||||
:diffoff Switch off diff mode for the current window.
|
||||
|
||||
:diffoff! Switch off diff mode for all windows.
|
||||
:diffoff! Switch off diff mode for all windows in the current tab page.
|
||||
|
||||
The ":diffoff" command resets the relevant options to their default value.
|
||||
This may be different from what the values were before diff mode was started,
|
||||
@@ -345,8 +349,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
|
||||
|
||||
@@ -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 Feb 24
|
||||
|
||||
|
||||
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
|
||||
@@ -331,6 +334,22 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
|
||||
(For {Visual} see |Visual-mode|.)
|
||||
{not in VI}
|
||||
|
||||
*gF*
|
||||
[count]gF Same as "gf", except if a number follows the file
|
||||
name, then the cursor is positioned on that line in
|
||||
the file. The file name and the number must be
|
||||
separated by a non-filename (see 'isfname') and
|
||||
non-numeric character. White space between the
|
||||
filename, the separator and the number are ignored.
|
||||
Examples: >
|
||||
eval.c:10
|
||||
eval.c @ 20
|
||||
eval.c (30)
|
||||
eval.c 40
|
||||
<
|
||||
*v_gF*
|
||||
{Visual}[count]gF Same as "v_gf".
|
||||
|
||||
These commands are used to start editing a single file. This means that the
|
||||
file is read into the buffer and the current file name is set. The file that
|
||||
is opened depends on the current directory, see |:cd|.
|
||||
@@ -800,7 +819,7 @@ USING THE ARGUMENT LIST
|
||||
each file.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:windo| and |:bufdo|.
|
||||
Also see |:windo|, |:tabdo| and |:bufdo|.
|
||||
|
||||
Example: >
|
||||
:args *.c
|
||||
@@ -874,6 +893,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*
|
||||
@@ -1009,6 +1030,9 @@ The names can be in upper- or lowercase.
|
||||
Vim refuses to |abandon| the current buffer, and when
|
||||
the last file in the argument list has not been
|
||||
edited.
|
||||
If there are other tab pages and quitting the last
|
||||
window in the current tab page the current tab page is
|
||||
closed |tab-page|.
|
||||
|
||||
:conf[irm] q[uit] Quit, but give prompt when changes have been made, or
|
||||
the last file in the argument list has not been
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.0aa. Last change: 2005 Aug 07
|
||||
*gui.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -24,9 +24,9 @@ Other GUI documentation:
|
||||
1. Starting the GUI *gui-start* *E229* *E233*
|
||||
|
||||
First you must make sure you actually have a version of Vim with the GUI code
|
||||
included. You can check this with the ":version" command, it should include
|
||||
"+GUI_Athena", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or "MS-Windows ... bit
|
||||
GUI version".
|
||||
included. You can check this with the ":version" command, it says "with xxx
|
||||
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK, GTK2, etc., or
|
||||
"MS-Windows 32 bit GUI version".
|
||||
|
||||
How to start the GUI depends on the system used. Mostly you can run the
|
||||
GUI version of Vim with:
|
||||
@@ -37,7 +37,8 @@ The X11 version of Vim can run both in GUI and in non-GUI mode. See
|
||||
|
||||
*gui-init* *gvimrc* *.gvimrc* *_gvimrc*
|
||||
When the GUI starts up initializations are carried out, in this order:
|
||||
- The termcap options are reset to their default value for the GUI.
|
||||
- The 'term' option is set to "builgin_gui" and terminal options are reset to
|
||||
their default value for the GUI |terminal-options|.
|
||||
- If the system menu file exists, it is sourced. The name of this file is
|
||||
normally "$VIMRUNTIME/menu.vim". You can check this with ":version". Also
|
||||
see |$VIMRUNTIME|. To skip loading the system menu include 'M' in
|
||||
@@ -954,6 +955,9 @@ This section describes other features which are related to the GUI.
|
||||
endif
|
||||
endif
|
||||
|
||||
A recommended Japanese font is MS Mincho. You can find info here:
|
||||
http://www.lexikan.com/mincho.htm
|
||||
|
||||
==============================================================================
|
||||
7. Shell Commands *gui-shell*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
|
||||
*help.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -122,6 +122,7 @@ Advanced editing ~
|
||||
|tagsrch.txt| tags and special searches
|
||||
|quickfix.txt| commands for a quick edit-compile-fix cycle
|
||||
|windows.txt| commands for using multiple windows and buffers
|
||||
|tabpage.txt| commands for using multiple tab pages
|
||||
|syntax.txt| syntax highlighting
|
||||
|spell.txt| spell checking
|
||||
|diff.txt| working with two or three versions of the same file
|
||||
@@ -186,18 +187,13 @@ Remarks about specific systems ~
|
||||
|os_win32.txt| MS-Windows 95/98/NT
|
||||
*standard-plugin-list*
|
||||
Standard plugins ~
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_expl.txt| File explorer
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|pi_zip.txt| Zip archive explorer
|
||||
|
||||
LOCAL ADDITIONS: *local-additions*
|
||||
|cecutil.txt| DrChip's Utilities Jun 11, 2004
|
||||
|engspchk.txt| English Spelling Checker (v61) Mar 14, 2005
|
||||
|example.txt| Example for a locally added help file
|
||||
|matchit.txt| Extended "%" matching
|
||||
|test.txt| Testing the h<>lp c<>mm<6D>nd n<>w
|
||||
|typecorr.txt| Plugin for correcting typing mistakes
|
||||
|helpp.txt| Dummy line to avoid an error message
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*bars* Bars example
|
||||
|
||||
@@ -208,6 +208,11 @@ The available subcommands are:
|
||||
|
||||
USAGE :cs show
|
||||
|
||||
*:lcscope* *:lcs*
|
||||
This command is same as the ":cscope" command, except when the
|
||||
'cscopequickfix' option is set, the location list for the current window is
|
||||
used instead of the quickfix list to show the cscope results.
|
||||
|
||||
*:cstag* *E257* *E562*
|
||||
If you use cscope as well as ctags, |:cstag| allows you to search one or
|
||||
the other before making a jump. For example, you can choose to first
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 Dec 14
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -541,6 +541,9 @@ tag command action in Normal mode ~
|
||||
the cursor
|
||||
|CTRL-W_f| CTRL-W f split window and edit file name under the
|
||||
cursor
|
||||
|CTRL-W_F| CTRL-W F split window and edit file name under the
|
||||
cursor and jump to the line number
|
||||
following the file name.
|
||||
|CTRL-W_g_CTRL-]| CTRL-W g CTRL-] split window and do |:tjump| to tag under
|
||||
cursor
|
||||
|CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag
|
||||
@@ -719,6 +722,9 @@ tag char note action in Normal mode ~
|
||||
word
|
||||
|gf| gf start editing the file whose name is under
|
||||
the cursor
|
||||
|gF| gF start editing the file whose name is under
|
||||
the cursor and jump to the line number
|
||||
following the filename.
|
||||
|gg| gg 1 cursor to line N, default first line
|
||||
|gh| gh start Select mode
|
||||
|gi| gi 2 like "i", but first move to the |'^| mark
|
||||
@@ -760,7 +766,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 +1075,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 +1220,56 @@ 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
|
||||
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|
||||
|: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
|
||||
@@ -1270,7 +1311,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:omap| :om[ap] like ":map" but for Operator-pending mode
|
||||
|:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
|
||||
|:omenu| :ome[nu] add menu for Operator-pending mode
|
||||
|:only| :on[ly] close all windows except current one
|
||||
|:only| :on[ly] close all windows except the current one
|
||||
|:onoremap| :ono[remap] like ":noremap" but for Operator-pending mode
|
||||
|:onoremenu| :onoreme[nu] like ":noremenu" but for Operator-pending mode
|
||||
|:options| :opt[ions] open the options-window
|
||||
@@ -1401,6 +1442,20 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:syncbind| :sync[bind] sync scroll binding
|
||||
|:t| :t same as ":copy"
|
||||
|:tNext| :tN[ext] jump to previous matching tag
|
||||
|:tabNext| :tabN[ext] go to previous tab page
|
||||
|:tabclose| :tabc[lose] close current tab page
|
||||
|:tabedit| :tabe[dit] edit a file in a new tab page
|
||||
|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
|
||||
|:tabfirst| :tabfir[st] got to first tab page
|
||||
|:tablast| :tabl[ast] got to last tab page
|
||||
|:tabmove| :tabm[ove] move tab page to other position
|
||||
|:tabnew| :tabnew edit a file in a new tab page
|
||||
|:tabnext| :tabn[ext] go to next tab page
|
||||
|:tabonly| :tabo[nly] close all tab pages except the current one
|
||||
|:tabprevious| :tabp[revious] go to previous tab page
|
||||
|:tabrewind| :tabr[ewind] got to first tab page
|
||||
|:tabs| :tabs list the tab pages and what they contain
|
||||
|:tab| :tab create new tab when opening new window
|
||||
|:tag| :ta[g] jump to tag
|
||||
|:tags| :tags show the contents of the tag stack
|
||||
|:tcl| :tc[l] execute Tcl command
|
||||
@@ -1421,6 +1476,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:tselect| :ts[elect] list matching tags and select one
|
||||
|:tunmenu| :tu[nmenu] remove menu tooltip
|
||||
|:undo| :u[ndo] undo last change(s)
|
||||
|:undojoin| :undoj[oin] join next change with previous undo block
|
||||
|:unabbreviate| :una[bbreviate] remove abbreviation
|
||||
|:unhide| :unh[ide] open a window for each loaded file in the
|
||||
buffer list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 18
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Mar 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -126,8 +126,10 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
|
||||
'=' the expression register: you are prompted to
|
||||
enter an expression (see |expression|)
|
||||
Note that 0x80 (128 decimal) is used for
|
||||
special keys, use CTRL-R CTRL-R to insert it
|
||||
literally.
|
||||
special keys. E.g., you can use this to move
|
||||
the cursor up:
|
||||
CTRL-R ="\<Up>"
|
||||
Use CTRL-R CTRL-R to insert text literally.
|
||||
See |registers| about registers. {not in Vi}
|
||||
|
||||
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
|
||||
@@ -354,7 +356,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*
|
||||
-----------------------------------------------------------------------
|
||||
@@ -422,7 +424,7 @@ When 'textwidth' and 'wrapmargin' are both set, 'textwidth' is used.
|
||||
If you don't really want to break the line, but view the line wrapped at a
|
||||
convenient place, see the 'linebreak' option.
|
||||
|
||||
The line is only broken automatically when using insert mode, or when
|
||||
The line is only broken automatically when using Insert mode, or when
|
||||
appending to a line. When in replace mode and the line length is not
|
||||
changed, the line will not be broken.
|
||||
|
||||
@@ -438,6 +440,10 @@ characters to the 'formatoptions' option:
|
||||
current insert command. Only differs from "l" when entering non-white
|
||||
characters while crossing the 'textwidth' boundary.
|
||||
|
||||
Normally an internal function will be used to decide where to break the line.
|
||||
If you want to do it in a different way set the 'formatexpr' option to an
|
||||
expression that will take care of the line break.
|
||||
|
||||
If you want to format a block of text, you can use the "gq" operator. Type
|
||||
"gq" and a movement command to move the cursor to the end of the block. In
|
||||
many cases, the command "gq}" will do what you want (format until the end of
|
||||
@@ -622,8 +628,8 @@ CTRL-X CTRL-L Search backwards for a line that starts with the
|
||||
the cursor. Indent is ignored. The matching line is
|
||||
inserted in front of the cursor.
|
||||
The 'complete' option is used to decide which buffers
|
||||
are searched for a match. Only loaded buffers are
|
||||
used.
|
||||
are searched for a match. Both loaded and unloaded
|
||||
buffers are used.
|
||||
CTRL-L or
|
||||
CTRL-P Search backwards for next matching line. This line
|
||||
replaces the previous matching line.
|
||||
@@ -871,8 +877,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 +896,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 +958,120 @@ 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
|
||||
icase when not zero case is to be ignored; when omitted
|
||||
the 'ignorecase' option is used
|
||||
|
||||
All of these except 'icase' 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:
|
||||
@@ -961,12 +1079,44 @@ The menu is used when:
|
||||
- The terminal supports at least 8 colors.
|
||||
- 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
|
||||
<PageUp>: Select a match several entries back
|
||||
<PageDown>: Select a match several entries further
|
||||
There are two states:
|
||||
1. A complete match has been inserted.
|
||||
2. Only part of a match has been inserted.
|
||||
|
||||
You normally start in the first state, with the first match being inserted.
|
||||
When "longest" is in 'completeopt' and there is more than one match you start
|
||||
in the second state.
|
||||
|
||||
If you select another match, e.g., with CTRL-N or CTRL-P, you go from the
|
||||
second to the first state. This doesn't change the list of matches.
|
||||
|
||||
|
||||
In the first state these keys have a special meaning:
|
||||
<BS> and CTRL-H Delete one character, find the matches for the word before
|
||||
the cursor. This reduces the list of matches, often to one
|
||||
entry, and switches to the second state.
|
||||
|
||||
In the second state these keys have a special meaning:
|
||||
<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.
|
||||
any printable, non-white character:
|
||||
Add this character and reduce the number of matches.
|
||||
|
||||
In both states these can be used:
|
||||
<CR> and <Enter> Accept the currently selected match and stop completion.
|
||||
<PageUp> Select a match several entries back, but don't insert it.
|
||||
<PageDown> Select a match several entries further, but don't insert it.
|
||||
<Up> Select the previous match, as if CTRL-P was used, but don't
|
||||
insert it.
|
||||
<Down> Select the next match, as if CTRL-N was used, but don't
|
||||
insert it.
|
||||
Any other character:
|
||||
Stop completion without changing the match and insert the
|
||||
typed character. Note that typing a space or <Tab> will
|
||||
work in both states.
|
||||
|
||||
|
||||
The colors of the menu can be changed with these highlight groups:
|
||||
Pmenu normal item |hl-Pmenu|
|
||||
@@ -974,8 +1124,16 @@ PmenuSel selected item |hl-PmenuSel|
|
||||
PmenuSbar scrollbar |hl-PmenuSbar|
|
||||
PmenuThumb thumb of the scrollbar |hl-PmenuThumb|
|
||||
|
||||
There are no special mappings for when the popup menu is visible. However,
|
||||
you can use an Insert mode mapping that checks the |pumvisible()| function to
|
||||
do something different. Example: >
|
||||
:inoremap <Down> <C-R>=pumvisible() ? "\<lt>C-N>" : "\<lt>Down>"<CR>
|
||||
|
||||
Filetype-specific remarks for omni completion *compl-omni-filetypes*
|
||||
|
||||
FILETYPE-SPECIFIC REMARKS FOR OMNI COMPLETION *compl-omni-filetypes*
|
||||
|
||||
The file used for {filetype} should be autoload/{filetype}complete.vim
|
||||
in 'runtimepath'. Thus for "java" it is autoload/javacomplete.vim.
|
||||
|
||||
|
||||
C *ft-c-omni*
|
||||
@@ -985,6 +1143,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: >
|
||||
@@ -1010,37 +1170,133 @@ 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:
|
||||
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
|
||||
inside of an a tag)
|
||||
- inside of tag complete proper attributes (no width attribute for an
|
||||
a tag)
|
||||
- when attribute has limited number of possible values help to complete
|
||||
them
|
||||
- after "<" complete tag name depending on context (no div suggestion inside
|
||||
of an a tag); '/>' indicates empty tags
|
||||
- inside of tag complete proper attributes (no width attribute for an a tag);
|
||||
show also type of attribute; '*' indicates required attributes
|
||||
- when attribute has limited number of possible values help to complete them
|
||||
- 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
|
||||
<style> tag and included CSS files
|
||||
- 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; show function arguments
|
||||
- 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 syntax code completion you can run: >
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
|
||||
You can automate this by placing the following in your vimrc (after any
|
||||
":filetype" command): >
|
||||
if has("autocmd") && exists("+omnifunc")
|
||||
autocmd Filetype *
|
||||
\ if &omnifunc == "" |
|
||||
\ setlocal omnifunc=syntaxcomplete#Complete |
|
||||
\ endif
|
||||
endif
|
||||
|
||||
The above will set completion to this script only if a specific plugin does
|
||||
not already exist for that filetype.
|
||||
|
||||
Each filetype can have a wide range of syntax items. The plugin allows you to
|
||||
customize which syntax groups to include or exclude from the list. Let's have
|
||||
a look at the PHP filetype to see how this works.
|
||||
|
||||
If you edit a file called, index.php, run the following command: >
|
||||
:syntax list
|
||||
|
||||
First thing you will notice is there are many different syntax groups. The
|
||||
PHP language can include elements from different languages like HTML,
|
||||
JavaScript and many more. The syntax plugin will only include syntax groups
|
||||
that begin with the filetype, "php", in this case. For example these syntax
|
||||
groups are included by default with the PHP: phpEnvVar, phpIntVar,
|
||||
phpFunctions.
|
||||
|
||||
The PHP language has an enormous number of items which it knows how to syntax
|
||||
highlight. This means these items will be available within the omni
|
||||
completion list. Some people may find this list unwieldy or are only
|
||||
interested in certain items.
|
||||
|
||||
There are two ways to prune this list (if necessary). If you find certain
|
||||
syntax groups you do not wish displayed you can add the following to your
|
||||
vimrc: >
|
||||
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
|
||||
|
||||
Add as many syntax groups to this list by comma separating them. The basic
|
||||
form of this variable is: >
|
||||
let g:omni_syntax_group_exclude_{filetype} = 'comma,separated,list'
|
||||
|
||||
For completeness the opposite is also true. Creating this variable in your
|
||||
vimrc will only include the items in the phpFunctions and phpMethods syntax
|
||||
groups: >
|
||||
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
|
||||
|
||||
You can create as many of these variables as you need, varying only the
|
||||
filetype at the end of the variable name.
|
||||
|
||||
|
||||
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|.
|
||||
@@ -1056,11 +1312,11 @@ 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)
|
||||
|
||||
XML data files are stored in "autoload/xml" directory in 'runtimepath'. They
|
||||
XML data files are stored in "autoload/xml" directory in 'runtimepath'. They
|
||||
have meaningful name which will be used in commands. It should be unique name
|
||||
which will not create conflicts in future. For example name xhtml10s.vim means
|
||||
it is data file for XHTML 1.0 Strict.
|
||||
@@ -1074,9 +1330,9 @@ compound from two parts:
|
||||
Part two must be exactly the same as name of file.
|
||||
|
||||
Variable is data structure in form of |Dictionary|. Keys are tag names and
|
||||
values are two element |List|. First element of List is also List with
|
||||
names of possible children, second element is |Dictionary| with names of
|
||||
attributes as keys and possible values of attributes as values. Example: >
|
||||
values are two element |List|. First element of List is also List with names
|
||||
of possible children, second element is |Dictionary| with names of attributes
|
||||
as keys and possible values of attributes as values. Example: >
|
||||
|
||||
let g:xmldata_crippledhtml = {
|
||||
\ "html":
|
||||
@@ -1088,24 +1344,34 @@ attributes as keys and possible values of attributes as values. Example: >
|
||||
\ "meta":
|
||||
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
|
||||
\ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}]
|
||||
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]}
|
||||
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]},
|
||||
\ "vimxmltaginfo": {
|
||||
\ 'meta': ['/>', '']},
|
||||
\ "vimxmlattrinfo": {
|
||||
\ 'http-equiv': ['ContentType', '']}
|
||||
|
||||
This example should be put in "autoload/xml/crippledhtml.vim" file.
|
||||
|
||||
In example are visible two special elements:
|
||||
In example are visible four special elements:
|
||||
|
||||
1. "vimxmlentities" - special key with List containing entities of this XML
|
||||
dialect.
|
||||
2. "BOOL" - value of attribute key showing if attribute should be inserted
|
||||
bare ("defer" vs. 'defer="'). It can be the only element of List of
|
||||
attribute values.
|
||||
3. "vimxmltaginfo" - special key with dictionary containing as key tag names,
|
||||
as value two element List for additional menu info and long description.
|
||||
4. "vimxmlattrinfo" - special key with dictionary containing as key attribute
|
||||
names, as value two element List for additional menu info and long
|
||||
description.
|
||||
|
||||
Note: Tag names in data file MUST not contain namespace description. Check
|
||||
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|
|
||||
@@ -1118,24 +1384,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.
|
||||
|
||||
@@ -1143,7 +1409,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")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -581,7 +581,7 @@ function find_tag2() {
|
||||
ntags=split(atag,blata,"[ ]");
|
||||
if ( ntags > 1 ) { return; }
|
||||
if ( ( allow_one_char == "no" ) && \
|
||||
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
|
||||
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
|
||||
return;
|
||||
}
|
||||
if ( skip_word[atag] == "yes" ) { return; }
|
||||
@@ -610,7 +610,7 @@ function find_tag3() {
|
||||
ntags=split(btag,blata,"[ ]");
|
||||
if ( ntags > 1 ) { return; }
|
||||
if ( ( allow_one_char == "no" ) && \
|
||||
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
|
||||
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
|
||||
return;
|
||||
}
|
||||
if ( skip_word[btag] == "yes" ) { return; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.0aa. Last change: 2005 Dec 17
|
||||
*map.txt* For Vim version 7.0aa. Last change: 2006 Feb 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -45,42 +45,42 @@ modes.
|
||||
{lhs} means left-hand-side *{lhs}*
|
||||
{rhs} means right-hand-side *{rhs}*
|
||||
|
||||
:map {lhs} {rhs} *:map*
|
||||
:nm[ap] {lhs} {rhs} *:nm* *:nmap*
|
||||
:vm[ap] {lhs} {rhs} *:vm* *:vmap*
|
||||
:om[ap] {lhs} {rhs} *:om* *:omap*
|
||||
:map! {lhs} {rhs} *:map!*
|
||||
:im[ap] {lhs} {rhs} *:im* *:imap*
|
||||
:lm[ap] {lhs} {rhs} *:lm* *:lmap*
|
||||
:cm[ap] {lhs} {rhs} *:cm* *:cmap*
|
||||
:map {lhs} {rhs} |mapmode-nvo| *:map*
|
||||
:nm[ap] {lhs} {rhs} |mapmode-n| *:nm* *:nmap*
|
||||
:vm[ap] {lhs} {rhs} |mapmode-v| *:vm* *:vmap*
|
||||
:om[ap] {lhs} {rhs} |mapmode-o| *:om* *:omap*
|
||||
:map! {lhs} {rhs} |mapmode-ic| *:map!*
|
||||
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
|
||||
:lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap*
|
||||
:cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap*
|
||||
Map the key sequence {lhs} to {rhs} for the modes
|
||||
where the map command applies. The result, including
|
||||
{rhs}, is then further scanned for mappings. This
|
||||
allows for nested and recursive use of mappings.
|
||||
|
||||
|
||||
:no[remap] {lhs} {rhs} *:no* *:noremap*
|
||||
:nn[oremap] {lhs} {rhs} *:nn* *:nnoremap*
|
||||
:vn[oremap] {lhs} {rhs} *:vn* *:vnoremap*
|
||||
:ono[remap] {lhs} {rhs} *:ono* *:onoremap*
|
||||
:no[remap]! {lhs} {rhs} *:no!* *:noremap!*
|
||||
:ino[remap] {lhs} {rhs} *:ino* *:inoremap*
|
||||
:ln[oremap] {lhs} {rhs} *:ln* *:lnoremap*
|
||||
:cno[remap] {lhs} {rhs} *:cno* *:cnoremap*
|
||||
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap*
|
||||
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
|
||||
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
|
||||
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
|
||||
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
|
||||
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
|
||||
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
|
||||
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
|
||||
Map the key sequence {lhs} to {rhs} for the modes
|
||||
where the map command applies. Disallow mapping of
|
||||
{rhs}, to avoid nested and recursive mappings. Often
|
||||
used to redefine a command. {not in Vi}
|
||||
|
||||
|
||||
:unm[ap] {lhs} *:unm* *:unmap*
|
||||
:nun[map] {lhs} *:nun* *:nunmap*
|
||||
:vu[nmap] {lhs} *:vu* *:vunmap*
|
||||
:ou[nmap] {lhs} *:ou* *:ounmap*
|
||||
:unm[ap]! {lhs} *:unm!* *:unmap!*
|
||||
:iu[nmap] {lhs} *:iu* *:iunmap*
|
||||
:lu[nmap] {lhs} *:lu* *:lunmap*
|
||||
:cu[nmap] {lhs} *:cu* *:cunmap*
|
||||
:unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
|
||||
:nun[map] {lhs} |mapmode-n| *:nun* *:nunmap*
|
||||
:vu[nmap] {lhs} |mapmode-v| *:vu* *:vunmap*
|
||||
:ou[nmap] {lhs} |mapmode-o| *:ou* *:ounmap*
|
||||
:unm[ap]! {lhs} |mapmode-ic| *:unm!* *:unmap!*
|
||||
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
|
||||
:lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap*
|
||||
:cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap*
|
||||
Remove the mapping of {lhs} for the modes where the
|
||||
map command applies. The mapping may remain defined
|
||||
for other modes where it applies.
|
||||
@@ -89,38 +89,38 @@ modes.
|
||||
:map @@ foo
|
||||
:unmap @@ | print
|
||||
|
||||
:mapc[lear] *:mapc* *:mapclear*
|
||||
:nmapc[lear] *:nmapc* *:nmapclear*
|
||||
:vmapc[lear] *:vmapc* *:vmapclear*
|
||||
:omapc[lear] *:omapc* *:omapclear*
|
||||
:mapc[lear]! *:mapc!* *:mapclear!*
|
||||
:imapc[lear] *:imapc* *:imapclear*
|
||||
:lmapc[lear] *:lmapc* *:lmapclear*
|
||||
:cmapc[lear] *:cmapc* *:cmapclear*
|
||||
:mapc[lear] |mapmode-nvo| *:mapc* *:mapclear*
|
||||
:nmapc[lear] |mapmode-n| *:nmapc* *:nmapclear*
|
||||
:vmapc[lear] |mapmode-v| *:vmapc* *:vmapclear*
|
||||
:omapc[lear] |mapmode-o| *:omapc* *:omapclear*
|
||||
:mapc[lear]! |mapmode-ic| *:mapc!* *:mapclear!*
|
||||
:imapc[lear] |mapmode-i| *:imapc* *:imapclear*
|
||||
:lmapc[lear] |mapmode-l| *:lmapc* *:lmapclear*
|
||||
:cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
|
||||
Remove ALL mappings for the modes where the map
|
||||
command applies. {not in Vi}
|
||||
Warning: This also removes the default mappings.
|
||||
|
||||
:map
|
||||
:nm[ap]
|
||||
:vm[ap]
|
||||
:om[ap]
|
||||
:map!
|
||||
:im[ap]
|
||||
:lm[ap]
|
||||
:cm[ap]
|
||||
:map |mapmode-nvo|
|
||||
:nm[ap] |mapmode-n|
|
||||
:vm[ap] |mapmode-v|
|
||||
:om[ap] |mapmode-o|
|
||||
:map! |mapmode-ic|
|
||||
:im[ap] |mapmode-i|
|
||||
:lm[ap] |mapmode-l|
|
||||
:cm[ap] |mapmode-c|
|
||||
List all key mappings for the modes where the map
|
||||
command applies. Note that ":map" and ":map!" are
|
||||
used most often, because they include the other modes.
|
||||
|
||||
:map {lhs} *:map_l*
|
||||
:nm[ap] {lhs} *:nmap_l*
|
||||
:vm[ap] {lhs} *:vmap_l*
|
||||
:om[ap] {lhs} *:omap_l*
|
||||
:map! {lhs} *:map_l!*
|
||||
:im[ap] {lhs} *:imap_l*
|
||||
:lm[ap] {lhs} *:lmap_l*
|
||||
:cm[ap] {lhs} *:cmap_l*
|
||||
:map {lhs} |mapmode-nvo| *:map_l*
|
||||
:nm[ap] {lhs} |mapmode-n| *:nmap_l*
|
||||
:vm[ap] {lhs} |mapmode-v| *:vmap_l*
|
||||
:om[ap] {lhs} |mapmode-o| *:omap_l*
|
||||
:map! {lhs} |mapmode-ic| *:map_l!*
|
||||
:im[ap] {lhs} |mapmode-i| *:imap_l*
|
||||
:lm[ap] {lhs} |mapmode-l| *:lmap_l*
|
||||
:cm[ap] {lhs} |mapmode-c| *:cmap_l*
|
||||
List the key mappings for the key sequences starting
|
||||
with {lhs} in the modes where the map command applies.
|
||||
{not in Vi}
|
||||
@@ -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.
|
||||
@@ -216,6 +218,7 @@ to type a count with a zero.
|
||||
*map-overview* *map-modes*
|
||||
Overview of which map command works in which mode:
|
||||
|
||||
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
|
||||
commands: modes: ~
|
||||
Normal Visual Operator-pending ~
|
||||
:map :noremap :unmap :mapclear yes yes yes
|
||||
@@ -223,6 +226,7 @@ Overview of which map command works in which mode:
|
||||
:vmap :vnoremap :vunmap :vmapclear - yes -
|
||||
:omap :onoremap :ounmap :omapclear - - yes
|
||||
|
||||
*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
|
||||
Insert Command-line Lang-Arg ~
|
||||
:map! :noremap! :unmap! :mapclear! yes yes -
|
||||
:imap :inoremap :iunmap :imapclear yes - -
|
||||
@@ -639,7 +643,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
|
||||
@@ -774,7 +778,7 @@ This does not work if 'cpoptions' includes the '<' flag. |<>|
|
||||
You can even do more complicated things. For example, to consume the space
|
||||
typed after an abbreviation: >
|
||||
func Eatchar(pat)
|
||||
let c = nr2char(getchar())
|
||||
let c = nr2char(getchar(0))
|
||||
return (c =~ a:pat) ? '' : c
|
||||
endfunc
|
||||
iabbr <silent> if if ()<Left><C-R>=Eatchar('\s')<CR>
|
||||
@@ -946,11 +950,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.
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
|
||||
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.
|
||||
@@ -750,9 +751,12 @@ and the screen is about to be redrawn:
|
||||
-> Press <Enter> or <Space> to redraw the screen and continue, without that
|
||||
key being used otherwise.
|
||||
-> Press ':' or any other Normal mode command character to start that command.
|
||||
-> Press 'k', 'u', 'b' or 'g' to scroll back in the messages. This works the
|
||||
same way as at the |more-prompt|. Only works when 'compatible' is off and
|
||||
'more' is on.
|
||||
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
|
||||
works the same way as at the |more-prompt|. Only works when 'compatible'
|
||||
is off and 'more' is on.
|
||||
-> Pressing 'j', 'd' or <Down> is ignored when messages scrolled off the top
|
||||
of the screen, 'compatible' is off and 'more' is on, to avoid that typing
|
||||
one 'j' too many causes the messages to disappear.
|
||||
-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
|
||||
-> Use a menu. The characters defined for Cmdline-mode are used.
|
||||
-> When 'mouse' contains the 'r' flag, clicking the left mouse button works
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 Mar 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -127,7 +127,7 @@ Note that an option may also have been set as a side effect of setting
|
||||
{not available when compiled without the +eval feature}
|
||||
|
||||
*:set-termcap* *E522*
|
||||
For {option} the form "t_xx" may be used to set a termcap option. This will
|
||||
For {option} the form "t_xx" may be used to set a terminal option. This will
|
||||
override the value from the termcap. You can then use it in a mapping. If
|
||||
the "xx" part contains special characters, use the <t_xx> form: >
|
||||
:set <t_#4>=^[Ot
|
||||
@@ -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
|
||||
@@ -1563,6 +1576,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
u scan the unloaded buffers that are in the buffer list
|
||||
U scan the buffers that are not in the buffer list
|
||||
k scan the files given with the 'dictionary' option
|
||||
kspell use the currently active spell checking |spell|
|
||||
k{dict} scan the file {dict}. Several "k" flags can be given,
|
||||
patterns are valid too. For example: >
|
||||
:set cpt=k/usr/dict/*,k~/spanish
|
||||
@@ -1598,104 +1612,32 @@ 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")
|
||||
global
|
||||
{not in Vi}
|
||||
Options for Insert mode completion |ins-completion|.
|
||||
Currently the only supported value is:
|
||||
A comma separated list of options for Insert mode completion
|
||||
|ins-completion|. The supported values are:
|
||||
|
||||
menu Use a popup menu to show the possible completions. The
|
||||
menu is only shown when there is more than one match and
|
||||
sufficient colors are available. |ins-completion-menu|
|
||||
|
||||
menuone Use the popup menu also when there is only one match.
|
||||
Useful when there is additional information about the
|
||||
match, e.g., what file it comes from.
|
||||
|
||||
longest Only insert the longest common text of the matches. Use
|
||||
CTRL-L to add more characters. Whether case is ignored
|
||||
depends on the kind of completion. For buffer text the
|
||||
'ignorecase' option is used.
|
||||
|
||||
|
||||
*'confirm'* *'cf'* *'noconfirm'* *'nocf'*
|
||||
'confirm' 'cf' boolean (default off)
|
||||
@@ -1982,11 +1924,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
|
||||
@@ -2101,8 +2043,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in Vi}
|
||||
When set to "msg", error messages that would otherwise be omitted will
|
||||
be given anyway. This is useful when debugging 'foldexpr' or
|
||||
'indentexpr'.
|
||||
be given anyway. This is useful when debugging 'foldexpr',
|
||||
'formatexpr' or 'indentexpr'.
|
||||
When set to "beep", a message will be given when otherwise only a beep
|
||||
would be produced.
|
||||
The values can be combined, separated by a comma.
|
||||
@@ -2148,6 +2090,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
contain a list of words. This can be one word per line, or several
|
||||
words per line, separated by non-keyword characters (white space is
|
||||
preferred). Maximum line length is 510 bytes.
|
||||
When this option is empty, or an entry "spell" is present, spell
|
||||
checking is enabled the currently active spelling is used. |spell|
|
||||
To include a comma in a file name precede it with a backslash. Spaces
|
||||
after a comma are ignored, otherwise spaces are included in the file
|
||||
name. See |option-backslash| about using backslashes.
|
||||
@@ -2510,6 +2454,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When reading a file 'fileencoding' will be set from 'fileencodings'.
|
||||
To read a file in a certain encoding it won't work by setting
|
||||
'fileencoding', use the |++enc| argument.
|
||||
For a new file the global value of 'fileencoding' is used.
|
||||
Prepending "8bit-" and "2byte-" has no meaning here, they are ignored.
|
||||
When the option is set, the value is converted to lowercase. Thus
|
||||
you can set it with uppercase values too. '_' characters are
|
||||
@@ -2559,9 +2504,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
non-blank characters.
|
||||
When the |++enc| argument is used then the value of 'fileencodings' is
|
||||
not used.
|
||||
Note that 'fileencodings' is not used for a new file, 'fileencoding'
|
||||
is always empty then. This means that a non-existing file may get a
|
||||
different encoding than an empty file.
|
||||
Note that 'fileencodings' is not used for a new file, the global value
|
||||
of 'fileencoding' is used instead. You can set it with: >
|
||||
:setglobal fenc=iso-8859-2
|
||||
< This means that a non-existing file may get a different encoding than
|
||||
an empty file.
|
||||
The special value "ucs-bom" can be used to check for a Unicode BOM
|
||||
(Byte Order Mark) at the start of the file. It must not be preceded
|
||||
by "utf-8" or another Unicode encoding for this to work properly.
|
||||
@@ -2771,8 +2718,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 +2856,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
|
||||
@@ -2936,17 +2894,43 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in Vi}
|
||||
The name of an external program that will be used to format the lines
|
||||
selected with the "gq" command. The program must take the input on
|
||||
selected with the |gq| operator. The program must take the input on
|
||||
stdin and produce the output on stdout. The Unix program "fmt" is
|
||||
such a program.
|
||||
If this option is an empty string, the internal format function will
|
||||
be used |C-indenting|.
|
||||
If the 'formatexpr' option is not empty it will be used instead.
|
||||
Otherwise, if 'formatprg' option is an empty string, the internal
|
||||
format function will be used |C-indenting|.
|
||||
Environment variables are expanded |:set_env|. See |option-backslash|
|
||||
about including spaces and backslashes.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
*'fsync'* *'fs'*
|
||||
*'formatexpr'* *'fex'*
|
||||
'formatexpr' 'fex' string (default "")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
Expression which is evaluated to format a range of lines for the |gq|
|
||||
operator. The |v:lnum| variable holds the first line to be formatted,
|
||||
|v:count| the number of lines to be formatted.
|
||||
When this option is empty 'formatprg' is used.
|
||||
Example: >
|
||||
:set formatexpr=mylang#Format()
|
||||
< This will invoke the mylang#Format() function in the
|
||||
autoload/mylang.vim file in 'runtimepath'. |autoload|
|
||||
|
||||
The expression is also evaluated when 'textwidth' is set and adding
|
||||
text beyond that limit. This happens under the same conditions as
|
||||
when internal formatting is used. Make sure the cursor is kept in the
|
||||
same spot relative to the text then! The |mode()| function will
|
||||
return "i" or "R" in this situation. When the function returns
|
||||
non-zero Vim will fall back to using the internal format mechanism.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
*'fsync'* *'fs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
global
|
||||
{not in Vi}
|
||||
@@ -3000,7 +2984,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,
|
||||
@@ -3274,6 +3259,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'c' Use console dialogs instead of popup dialogs for simple
|
||||
choices.
|
||||
|
||||
'e' Add tab pages when indicated with 'showtabline'.
|
||||
'guitablabel' can be used to change the text in the labels.
|
||||
When 'e' is missing a non-GUI tab pages line may be used.
|
||||
|
||||
'f' Foreground: Don't use fork() to detach the GUI from the shell
|
||||
where it was started. Use this for programs that wait for the
|
||||
editor to finish (e.g., an e-mail program). Alternatively you
|
||||
@@ -3334,6 +3323,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Only in the GUI: If on, an attempt is made to open a pseudo-tty for
|
||||
I/O to/from shell commands. See |gui-pty|.
|
||||
|
||||
*'guitablabel'* *'gtl'*
|
||||
'guitablabel' 'gtl' string (default empty)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with GUI enabled and
|
||||
with the +windows feature}
|
||||
When nonempty describes the text to use in a label of the GUI tab
|
||||
pages line. When empty Vim will use a default label. See
|
||||
|setting-guitablabel| for more info.
|
||||
|
||||
The format of this option is like that of 'statusline'.
|
||||
|
||||
Only used when the GUI tab pages line is displayed. 'e' must be
|
||||
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
|
||||
used.
|
||||
|
||||
*'helpfile'* *'hf'*
|
||||
'helpfile' 'hf' string (default (MSDOS) "$VIMRUNTIME\doc\help.txt"
|
||||
(others) "$VIMRUNTIME/doc/help.txt")
|
||||
@@ -3696,11 +3701,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 +3757,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
|
||||
@@ -4001,8 +4019,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
specified with multi-byte characters (e.g., UTF-8), but only the lower
|
||||
8 bits of each character will be used.
|
||||
|
||||
Example (for Greek): *greek* >
|
||||
:set langmap=<EFBFBD>A,<EFBFBD>B,<EFBFBD>C,<EFBFBD>D,<EFBFBD>E,<EFBFBD>F,<EFBFBD>G,<EFBFBD>H,<EFBFBD>I,<EFBFBD>J,<EFBFBD>K,<EFBFBD>L,<EFBFBD>M,<EFBFBD>N,<EFBFBD>O,<EFBFBD>P,QQ,<EFBFBD>R,<EFBFBD>S,<EFBFBD>T,<EFBFBD>U,<EFBFBD>V,WW,<EFBFBD>X,<EFBFBD>Y,<EFBFBD>Z,<EFBFBD>a,<EFBFBD>b,<EFBFBD>c,<EFBFBD>d,<EFBFBD>e,<EFBFBD>f,<EFBFBD>g,<EFBFBD>h,<EFBFBD>i,<EFBFBD>j,<EFBFBD>k,<EFBFBD>l,<EFBFBD>m,<EFBFBD>n,<EFBFBD>o,<EFBFBD>p,qq,<EFBFBD>r,<EFBFBD>s,<EFBFBD>t,<EFBFBD>u,<EFBFBD>v,<EFBFBD>w,<EFBFBD>x,<EFBFBD>y,<EFBFBD>z
|
||||
Example (for Greek, in UTF-8): *greek* >
|
||||
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
|
||||
< Example (exchanges meaning of z and y for commands): >
|
||||
:set langmap=zy,yz,ZY,YZ
|
||||
<
|
||||
@@ -4597,12 +4615,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
|
||||
@@ -4628,7 +4646,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{only available when compiled with the |+linebreak|
|
||||
feature}
|
||||
Minimal number of columns to use for the line number. Only relevant
|
||||
when the 'number' option is set.
|
||||
when the 'number' option is set or printing lines with a line number.
|
||||
Since one space is always between the number and the text, there is
|
||||
one less character for the number itself.
|
||||
The value is the minimum width. A bigger width is used when needed to
|
||||
@@ -4644,10 +4662,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'*
|
||||
@@ -5085,7 +5103,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
feature}
|
||||
When this option is not empty, it determines the content of the ruler
|
||||
string, as displayed for the 'ruler' option.
|
||||
The format of this option, is like that of 'statusline'.
|
||||
The format of this option is like that of 'statusline'.
|
||||
The default ruler width is 17 characters. To make the ruler 15
|
||||
characters wide, put "%15(" at the start and "%)" at the end.
|
||||
Example: >
|
||||
@@ -5136,6 +5154,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|
|
||||
|
||||
@@ -5349,6 +5368,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
winsize window sizes
|
||||
|
||||
Don't include both "curdir" and "sesdir".
|
||||
There is no option to include tab pages yet, only the current tab page
|
||||
is stored in the session. |tab-page|
|
||||
When "curdir" nor "sesdir" is included, file names are stored with
|
||||
absolute paths.
|
||||
"slash" and "unix" are useful on Windows when sharing session files
|
||||
@@ -5677,7 +5698,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The 'matchpairs' option can be used to specify the characters to show
|
||||
matches for. 'rightleft' and 'revins' are used to look for opposite
|
||||
matches.
|
||||
Note: For the use of the short form parental guidance is advised.
|
||||
Also see the matchparen plugin for highlighting the match when moving
|
||||
around |pi_paren.txt|.
|
||||
Note: Use of the short form is rated PG.
|
||||
|
||||
*'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
|
||||
'showmode' 'smd' boolean (Vim default: on, Vi default: off)
|
||||
@@ -5691,6 +5714,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'showtabline'* *'stal'*
|
||||
'showtabline' 'stal' number (default 1)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the +windows
|
||||
feature}
|
||||
The value of this option specifies when the line with tab page labels
|
||||
will be displayed:
|
||||
0: never
|
||||
1: only if there are at least two tab pages
|
||||
2: always
|
||||
This is both for the GUI and non-GUI implementation of the tab pages
|
||||
line.
|
||||
See |tab-page| for more information about tab pages.
|
||||
|
||||
*'sidescroll'* *'ss'*
|
||||
'sidescroll' 'ss' number (default 0)
|
||||
global
|
||||
@@ -5768,11 +5806,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 +5916,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'*
|
||||
@@ -5992,6 +6036,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
All fields except the {item} is optional. A single percent sign can
|
||||
be given as "%%". Up to 80 items can be specified.
|
||||
|
||||
When the option starts with "%!" then it is used as an expression,
|
||||
evaluated and the result is used as the option value. Example: >
|
||||
:set statusline=%!MyStatusLine()
|
||||
< The result can contain %{} items that will be evaluated too.
|
||||
|
||||
When there is error while evaluating the option then it will be made
|
||||
empty to avoid further errors. Otherwise screen updating would loop.
|
||||
|
||||
Note that the only effect of 'ruler' when this option is set (and
|
||||
'laststatus' is 2) is controlling the output of |CTRL-G|.
|
||||
|
||||
@@ -6050,14 +6102,24 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
percentage described for 'ruler'. Always 3 in length.
|
||||
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.
|
||||
{ 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.
|
||||
T N For 'tabline': start of tab page N label. Use %T after the last
|
||||
label. This information is used for mouse clicks.
|
||||
X N For 'tabline': start of close tab N label. Use %X after the
|
||||
label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
|
||||
mark. This information is used for mouse clicks.
|
||||
< - Where to truncate line if too long. Default is at the start.
|
||||
No width fields allowed.
|
||||
= - Separation point between left and right aligned items.
|
||||
No width fields allowed.
|
||||
# - Set highlight group. The name must follow and then a # again.
|
||||
Thus use %#HLname# for highlight group HLname. The same
|
||||
highlighting is used, also for the statusline of non-current
|
||||
windows.
|
||||
* - Set highlight group to User{N}, where {N} is taken from the
|
||||
minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
|
||||
The difference between User{N} and StatusLine will be applied
|
||||
@@ -6084,7 +6146,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
|
||||
@@ -6232,7 +6300,41 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'S' flag in 'cpoptions'.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
|
||||
*'tabstop'* *'ts'*
|
||||
*'tabline'* *'tal'*
|
||||
'tabline' 'tal' string (default empty)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the +windows
|
||||
feature}
|
||||
When nonempty, this option determines the content of the tab pages
|
||||
line at the top of the Vim window. When empty Vim will use a default
|
||||
tab pages line. See |setting-tabline| for more info.
|
||||
|
||||
The tab pages line only appears as specified with the 'showtabline'
|
||||
option and only when there is no GUI tab line. When 'e' is in
|
||||
'guioptions' and the GUI supports a tab line 'guitablabel' is used
|
||||
instead.
|
||||
|
||||
The value is evaluated like with 'statusline'. You can use
|
||||
|tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
|
||||
the text to be displayed. Use "%1T" for the first label, "%2T" for
|
||||
the second one, etc. Use "%X" items for closing labels.
|
||||
|
||||
Keep in mind that only one of the tab pages is the current one, others
|
||||
are invisible and you can't jump to their windows.
|
||||
|
||||
|
||||
*'tabpagemax'* *'tpm'*
|
||||
'tabpagemax' 'tpm' number (default 10)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the +windows
|
||||
feature}
|
||||
Maximum number of tab pages to be opened by the |-p| command line
|
||||
argument or the ":tab all" command. |tabpage|
|
||||
|
||||
|
||||
*'tabstop'* *'ts'*
|
||||
'tabstop' 'ts' number (default 8)
|
||||
local to buffer
|
||||
Number of spaces that a <Tab> in the file counts for. Also see
|
||||
@@ -7042,7 +7144,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'weirdinvert' 'wiv' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
This option has the same effect as the 't_xs' termcap option.
|
||||
This option has the same effect as the 't_xs' terminal option.
|
||||
It is provided for backwards compatibility with version 4.x.
|
||||
Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and
|
||||
vice versa. Has no effect when the GUI is running.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_dos.txt* For Vim version 7.0aa. Last change: 2003 Dec 20
|
||||
*os_dos.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -126,8 +126,8 @@ text. For example, to get grey text on a blue background: >
|
||||
See |highlight-groups| for other groups that are available.
|
||||
|
||||
A DOS console does not support attributes like bold and underlining. You can
|
||||
set the color used in five modes with nine termcap options. Note that this is
|
||||
not necessary since you can set the color directly with the ":highlight"
|
||||
set the color used in five modes with nine terminal options. Note that this
|
||||
is not necessary since you can set the color directly with the ":highlight"
|
||||
command; these options are for backward compatibility with older Vim versions.
|
||||
The |'highlight'| option specifies which of the five modes is used for which
|
||||
action. >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.0aa. Last change: 2005 Jul 12
|
||||
*os_vms.txt* For Vim version 7.0aa. Last change: 2006 Mar 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -56,11 +56,14 @@ To use the precompiled binary version, you need one of these archives:
|
||||
vim-XX-exe-vax-gui.zip VAX GUI executables
|
||||
vim-XX-exe-vax-term.zip VAX console executables
|
||||
|
||||
and of course
|
||||
and of course (optional)
|
||||
vim-XX-runtime.zip runtime files
|
||||
|
||||
The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
|
||||
|
||||
For GTK executables you will need GTKLIB that is available for
|
||||
Alpha and IA64 platform.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. Compiling *vms-compiling*
|
||||
@@ -121,10 +124,10 @@ Vim uses a special directory structure to hold the document and runtime files:
|
||||
|- vim57
|
||||
|----- doc
|
||||
|----- syntax
|
||||
|- vim60
|
||||
|- vim62
|
||||
|----- doc
|
||||
|----- syntax
|
||||
|- vim61
|
||||
|- vim64
|
||||
|----- doc
|
||||
|----- syntax
|
||||
vimrc (system rc files)
|
||||
@@ -239,6 +242,17 @@ and to the SYS$STARTUP:SYLOGIN.COM >
|
||||
|
||||
It will set up a normal Vim work environment for every user on the system.
|
||||
|
||||
IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line
|
||||
parameters are assumed to be lowecase. In order to indicate that a command
|
||||
line parameter is uppercase "/" sign must be used.
|
||||
|
||||
Examples:
|
||||
>
|
||||
vim -R filename ! means: -r List swap files and exit
|
||||
vim -/r filename ! means: -R Readonly mode (like "view")
|
||||
vim -u <vimrc> ! means: -u Use <vimrc> instead of any .vimrc
|
||||
vim -/u <gvimrc> ! means: -U Use <gvimrc> instead of any .gvimrc
|
||||
|
||||
==============================================================================
|
||||
|
||||
7. GUI mode questions *vms-gui*
|
||||
@@ -653,7 +667,10 @@ start it with: >
|
||||
|
||||
9. VMS related changes *vms-changes*
|
||||
|
||||
Version 7.0
|
||||
Version 7
|
||||
- Improved low level char input (affects just console mode)
|
||||
|
||||
Version 6.4 (2005 Oct 15)
|
||||
- GTKLIB and Vim build on IA64
|
||||
- colors in terminal mode
|
||||
- syntax highlighting in terminal mode
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -161,7 +161,7 @@ The offset gives the cursor position relative to the found match:
|
||||
s[-num] [num] characters to the left of the start of the match
|
||||
b[+num] [num] identical to s[+num] above (mnemonic: begin)
|
||||
b[-num] [num] identical to s[-num] above (mnemonic: begin)
|
||||
;{pattern} perform another searcn, see |//;|
|
||||
;{pattern} perform another search, see |//;|
|
||||
|
||||
If a '-' or '+' is given but [num] is omitted, a count of one will be used.
|
||||
When including an offset with 'e', the search becomes inclusive (the
|
||||
@@ -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
|
||||
@@ -1166,14 +1191,23 @@ Finally, these constructs are unique to Perl:
|
||||
< Instead of // any character can be used to mark the start and
|
||||
end of the {pattern}. Watch out for using special characters,
|
||||
such as '"' and '|'.
|
||||
|
||||
{group} must exist at the moment this command is executed.
|
||||
The match overrides the 'hlsearch' highlighting.
|
||||
'ignorecase' does not apply, use |/\c| in the pattern to
|
||||
ignore case. Otherwise case is not ignored.
|
||||
|
||||
The {group} highlighting still applies when a character is
|
||||
to be highlighted for 'hlsearch'.
|
||||
|
||||
Note that highlighting the last used search pattern with
|
||||
'hlsearch' is used in all windows, while the pattern defined
|
||||
with ":match" only exists in the current window. It is kept
|
||||
when switching to another buffer.
|
||||
|
||||
The |matchparen| plugin uses match highlighting, thus will
|
||||
disable your ":match" command as soon as you move to a paren.
|
||||
|
||||
'ignorecase' does not apply, use |/\c| in the pattern to
|
||||
ignore case. Otherwise case is not ignored.
|
||||
|
||||
Another example, which highlights all characters in virtual
|
||||
column 72 and more: >
|
||||
:highlight rightMargin term=bold ctermfg=blue guifg=blue
|
||||
@@ -1188,4 +1222,20 @@ Finally, these constructs are unique to Perl:
|
||||
:mat[ch] none
|
||||
Clear a previously defined match pattern.
|
||||
|
||||
|
||||
:2mat[ch] {group} /{pattern}/
|
||||
:2mat[ch]
|
||||
:2mat[ch] none
|
||||
:3mat[ch] {group} /{pattern}/
|
||||
:3mat[ch]
|
||||
:3mat[ch] none
|
||||
Just like |:match| above, but set a separate match. Thus
|
||||
there can be three matches active at the same time. The match
|
||||
with the lowest number has priority if several match at the
|
||||
same position.
|
||||
The ":3match" command is used by the |matchparen| plugin. You
|
||||
are suggested to use ":match" for manual matching and
|
||||
":2match" for another plugin.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -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
|
||||
|
||||
42
runtime/doc/pi_paren.txt
Normal file
42
runtime/doc/pi_paren.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
*pi_paren.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Highlighting matching parens *matchparen*
|
||||
|
||||
The functionality mentioned here is a |standard-plugin|.
|
||||
This plugin is only available if 'compatible' is not set.
|
||||
|
||||
You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
|
||||
:let loaded_matchparen = 1
|
||||
|
||||
The plugin installs CursorMoved autocommands to redefine the match
|
||||
highlighting.
|
||||
|
||||
To disable the plugin after it was loaded use this command: >
|
||||
|
||||
:NoMatchParen
|
||||
|
||||
And to enable it again: >
|
||||
|
||||
:DoMatchParen
|
||||
|
||||
The highlighting used is MatchParen. You can specify different colors with
|
||||
the ":highlight" command. Example: >
|
||||
|
||||
:hi MatchParen ctermbg=blue guibg=lightblue
|
||||
|
||||
The characters to be matched come from the 'matchpairs' option. You can
|
||||
change the value to highlight different matches. Note that not everything is
|
||||
possible. For example, you can't highlight single or double quotes, because
|
||||
the start and end are equal.
|
||||
|
||||
The syntax highlighting attributes are used. When the cursor currently is not
|
||||
in a string or comment syntax item, then matches inside string and comment
|
||||
syntax items are ignored. Any syntax items with "string" or "comment"
|
||||
somewhere in their name are considered string or comment items.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 Feb 13
|
||||
|
||||
|
||||
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
|
||||
@@ -690,6 +692,7 @@ Short explanation of each option: *option-list*
|
||||
|'formatlistpat'| |'flp'| pattern used to recognize a list header
|
||||
|'formatoptions'| |'fo'| how automatic formatting is to be done
|
||||
|'formatprg'| |'fp'| name of external program used with "gq" command
|
||||
|'formatexpr'| |'fex'| expression used with "gq" command
|
||||
|'fsync'| |'fs'| whether to invoke fsync() after file write
|
||||
|'gdefault'| |'gd'| the ":substitute" flag 'g' is default on
|
||||
|'grepformat'| |'gfm'| format of 'grepprg' output
|
||||
@@ -938,7 +941,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
|
||||
|
||||
@@ -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 Mar 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:
|
||||
@@ -1065,44 +1254,29 @@ the affix file, without arguments:
|
||||
Vim will try to figure out where one word ends and a next starts. When there
|
||||
are spelling mistakes this may not be quite right.
|
||||
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
NOTE: The following has not been implemented yet, because there are no word
|
||||
lists that support this.
|
||||
> *spell-CMP*
|
||||
> Sometimes it is necessary to change a word when concatenating it to another,
|
||||
> by removing a few letters, inserting something or both. It can also be useful
|
||||
> to restrict concatenation to words that match a pattern. For this purpose CMP
|
||||
> items can be used. They look like this:
|
||||
> CMP {flag} {flags} {strip} {strip2} {add} {cond} {cond2}
|
||||
>
|
||||
> {flag} the flag, as used in COMPOUNDFLAGS for the lead word
|
||||
> {flags} accepted flags for the following word ('.' to accept
|
||||
> all)
|
||||
> {strip} text to remove from the end of the lead word (zero
|
||||
> for no stripping)
|
||||
> {strip2} text to remove from the start of the following word
|
||||
> (zero for no stripping)
|
||||
> {add} text to insert between the words (zero for no
|
||||
> addition)
|
||||
> {cond} condition to match at the end of the lead word
|
||||
> {cond2} condition to match at the start of the following word
|
||||
>
|
||||
> This is the same as what is used for SFX and PFX items, with the extra {flags}
|
||||
> and {cond2} fields. Example:
|
||||
> CMP f mrt 0 - . . ~
|
||||
>
|
||||
> When used with the food and dish word list above, this means that a dash is
|
||||
> inserted after each food item. Thus you get "onion-soup" and
|
||||
> "onion-tomato-salat".
|
||||
>
|
||||
> When there are CMP items for a compound flag the concatenation is only done
|
||||
> when a CMP item matches.
|
||||
>
|
||||
> When there are no CMP items for a compound flag, then all words will be
|
||||
> concatenated, as if there was an item:
|
||||
> CMP {flag} . 0 0 . .
|
||||
>
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
*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 splitting a word to make suggestions is not a good
|
||||
idea. Split-word suggestions will appear only when there are few similar
|
||||
words.
|
||||
|
||||
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 % ~
|
||||
|
||||
|
||||
REPLACEMENTS *spell-REP*
|
||||
@@ -1118,7 +1292,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 +1303,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 +1320,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 +1386,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:
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -372,6 +372,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
-O[N] Open N windows, split vertically. Otherwise it's like -o.
|
||||
If both the -o and the -O option are given, the last one on
|
||||
the command line determines how the windows will be split.
|
||||
{not in Vi}
|
||||
|
||||
*-p*
|
||||
-p[N] Open N tab pages. If [N] is not given, one tab page is opened
|
||||
for every file given as argument. The maximum is set with
|
||||
'tabpagemax' pages (default 10). If there are more tab pages
|
||||
than arguments, the last few tab pages will be editing an
|
||||
empty file.
|
||||
{not in Vi}
|
||||
|
||||
*-T*
|
||||
@@ -706,7 +714,8 @@ accordingly. Vim proceeds in this order:
|
||||
'shell' option. On MS-DOS and Win32, the COMSPEC variable is used
|
||||
if SHELL is not set.
|
||||
The environment variable TERM, if it exists, is used to set the 'term'
|
||||
option.
|
||||
option. However, 'term' will change later when starting the GUI (step
|
||||
8 below).
|
||||
|
||||
2. Process the arguments
|
||||
The options and file names from the command that start Vim are
|
||||
@@ -799,8 +808,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
|
||||
@@ -829,6 +839,8 @@ accordingly. Vim proceeds in this order:
|
||||
11. Open all windows
|
||||
When the |-o| flag was given, windows will be opened (but not
|
||||
displayed yet).
|
||||
When the |-p| flag was given, tab pages will be created (but not
|
||||
displayed yet).
|
||||
When switching screens, it happens now. Redrawing starts.
|
||||
If the "-q" flag was given to Vim, the first error is jumped to.
|
||||
Buffers for all windows will be loaded.
|
||||
@@ -1201,6 +1213,9 @@ An example mapping: >
|
||||
:nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>:so ~/sessions/
|
||||
This saves the current Session, and starts off the command to load another.
|
||||
|
||||
A session only includes the current tab page. There currently is no option to
|
||||
store all tab pages. |tab-page|
|
||||
|
||||
The |SessionLoadPost| autocmd event is triggered after a session file is
|
||||
loaded/sourced.
|
||||
*SessionLoad-variable*
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
|
||||
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
|
||||
@@ -3961,8 +3968,12 @@ SignColumn column where |signs| are displayed
|
||||
IncSearch 'incsearch' highlighting; also used for the text replaced with
|
||||
":s///c"
|
||||
*hl-LineNr*
|
||||
LineNr line number for ":number" and ":#" commands, and when 'number'
|
||||
LineNr Line number for ":number" and ":#" commands, and when 'number'
|
||||
option is set.
|
||||
*hl-MatchParen*
|
||||
MatchParen The character under the cursor or just before it, if it
|
||||
is a paired bracket, and its match. |pi_paren.txt|
|
||||
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --")
|
||||
*hl-MoreMsg*
|
||||
@@ -4013,6 +4024,12 @@ StatusLine status line of current window
|
||||
StatusLineNC status lines of not-current windows
|
||||
Note: if this is equal to "StatusLine" Vim will use "^^^" in
|
||||
the status line of the current window.
|
||||
*hl-TabLine*
|
||||
TabLine tab pages line, not active tab page label
|
||||
*hl-TabLineFill*
|
||||
TabLineFill tab pages line, where there are no labels
|
||||
*hl-TabLineSel*
|
||||
TabLineSel tab pages line, active tab page label
|
||||
*hl-Title*
|
||||
Title titles for output from ":set all", ":autocmd" etc.
|
||||
*hl-Visual*
|
||||
@@ -4250,9 +4267,8 @@ But for using 16 colors in an rxvt these should work with terminfo: >
|
||||
<
|
||||
*colortest.vim*
|
||||
To test your color setup, a file has been included in the Vim distribution.
|
||||
To use it, execute these commands: >
|
||||
:e $VIMRUNTIME/syntax/colortest.vim
|
||||
:so %
|
||||
To use it, execute this command: >
|
||||
:runtime syntax/colortest.vim
|
||||
|
||||
Some versions of xterm (and other terminals, like the Linux console) can
|
||||
output lighter foreground colors, even though the number of colors is defined
|
||||
|
||||
346
runtime/doc/tabpage.txt
Normal file
346
runtime/doc/tabpage.txt
Normal file
@@ -0,0 +1,346 @@
|
||||
*tabpage.txt* For Vim version 7.0aa. Last change: 2006 Mar 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Editing with windows in multiple tab pages. *tab-page* *tabpage*
|
||||
|
||||
The commands which have been added to use multiple tab pages are explained
|
||||
here. Additionally, there are explanations for commands that work differently
|
||||
when used in combination with more than one tab page.
|
||||
|
||||
1. Introduction |tab-page-intro|
|
||||
2. Commands |tab-page-commands|
|
||||
3. Other items |tab-page-other|
|
||||
4. Setting 'tabline' |setting-tabline|
|
||||
5. Setting 'guitablabel' |setting-guitablabel|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
{not able to use multiple tab pages when the |+windows| feature was disabled
|
||||
at compile time}
|
||||
|
||||
==============================================================================
|
||||
1. Introduction *tab-page-intro*
|
||||
|
||||
A tab page holds one or more windows. You can easily switch between tab
|
||||
pages, so that you have several collections of windows to work on different
|
||||
things.
|
||||
|
||||
Usually you will see a list of labels at the top of the Vim window, one for
|
||||
each tab page. With the mouse you can click on the label to jump to that tab
|
||||
page. There are other ways to move between tab pages, see below.
|
||||
|
||||
Most commands work only in the current tab page. That includes the |CTRL-W|
|
||||
commands, |:windo|, |:all| and |:ball| (when not using the |:tab| modifier).
|
||||
The commands that are aware of other tab pages than the current one are
|
||||
mentioned below.
|
||||
|
||||
Tabs are also a nice way to edit a buffer temporarily without changing the
|
||||
current window layout. Open a new tab page, do whatever you want to do and
|
||||
close the tab page.
|
||||
|
||||
==============================================================================
|
||||
2. Commands *tab-page-commands*
|
||||
|
||||
OPENING A NEW TAB PAGE:
|
||||
|
||||
When starting Vim "vim -p filename ..." opens each file argument in a separate
|
||||
tab page (up to 'tabpagemax'). |-p|
|
||||
|
||||
A double click with the mouse in the non-GUI tab pages line opens a new, empty
|
||||
tab page. It is placed left of the position of the click. The first click
|
||||
may select another tab page first, causing an extra screen update.
|
||||
|
||||
In the GUI tab pages line you can use the right mouse button to open menu.
|
||||
|tabline-menu|.
|
||||
|
||||
:tabe[dit] *:tabe* *:tabedit* *:tabnew*
|
||||
:tabnew Open a new tab page with an empty window, after the current
|
||||
tab page.
|
||||
|
||||
:tabe[dit] [++opt] [+cmd] {file}
|
||||
:tabnew [++opt] [+cmd] {file}
|
||||
Open a new tab page and edit {file}, like with |:edit|.
|
||||
|
||||
:tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
|
||||
Open a new tab page and edit {file} in 'path', like with
|
||||
|:find|.
|
||||
{not available when the |+file_in_path| feature was disabled
|
||||
at compile time}
|
||||
|
||||
:[count]tab {cmd} *:tab*
|
||||
Execute {cmd} and when it opens a new window open a new tab
|
||||
page instead. Doesn't work for |:diffsplit| or |:diffpatch|.
|
||||
When [count] is omitted the tab page appears after the current
|
||||
one. When [count] is specified the new tab page comes after
|
||||
tab page [count]. Use ":0tab cmd" to get the new tab page as
|
||||
the first one. Examples: >
|
||||
:tab split " opens current buffer in new tab page
|
||||
:tab help gt " opens tab page with help for "gt"
|
||||
|
||||
|
||||
CLOSING A TAB PAGE:
|
||||
|
||||
Closing the last window of a tab page closes the tab page too, unless there is
|
||||
only one tab page.
|
||||
|
||||
Using the mouse: If the tab page line is displayed you can click in the "X" at
|
||||
the top right to close the current tab page. A custom |'tabline'| may show
|
||||
something else.
|
||||
|
||||
*:tabc* *:tabclose*
|
||||
:tabc[lose][!] Close current tab page.
|
||||
This command fails when:
|
||||
- There is only one tab page on the screen. *E784*
|
||||
- When 'hidden' is not set, [!] is not used, a buffer has
|
||||
changes, and there is no other window on this buffer.
|
||||
Changes to the buffer are not written and won't get lost, so
|
||||
this is a "safe" command.
|
||||
|
||||
:tabc[lose][!] {count}
|
||||
Close tab page {count}. Fails in the same way as ':tabclose"
|
||||
above.
|
||||
|
||||
*:tabo* *:tabonly*
|
||||
:tabo[nly][!] Close all other tab pages.
|
||||
When the 'hidden' option is set, all buffers in closed windows
|
||||
become hidden.
|
||||
When 'hidden' is not set, and the 'autowrite' option is set,
|
||||
modified buffers are written. Otherwise, windows that have
|
||||
buffers that are modified are not removed, unless the [!] is
|
||||
given, then they become hidden. But modified buffers are
|
||||
never abandoned, so changes cannot get lost.
|
||||
|
||||
|
||||
SWITCHING TO ANOTHER TAB PAGE:
|
||||
|
||||
Using the mouse: If the tab page line is displayed you can click in a tab page
|
||||
label to switch to that tab page. Click where there is no label to go to the
|
||||
next tab page. |'tabline'|
|
||||
|
||||
:tabn[ext] *:tabn* *:tabnext* *gt*
|
||||
gt Go to the next tab page. Wraps around from the last to the
|
||||
first one.
|
||||
|
||||
:tabn[ext] {count}
|
||||
{count}gt Go to tab page {count}. The first tab page has number one.
|
||||
|
||||
|
||||
:tabp[revious] *:tabp* *:tabprevious* *gT*
|
||||
:tabN[ext] *:tabN* *:tabNext*
|
||||
gT Go to the previous tab page. Wraps around from the first one
|
||||
to the last one.
|
||||
|
||||
:tabp[revious] {count}
|
||||
:tabN[ext] {count}
|
||||
{count}gT Go {count} tab pages back. Wraps around from the first one
|
||||
to the last one.
|
||||
|
||||
:tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
|
||||
:tabfir[st] Go to the first tab page.
|
||||
|
||||
*:tabl* *:tablast*
|
||||
:tabl[ast] Go to the last tab page.
|
||||
|
||||
|
||||
Other commands:
|
||||
*:tabs*
|
||||
:tabs List the tab pages and the windows they contain.
|
||||
Shows a ">" for the current window.
|
||||
Shows a "+" for modified buffers.
|
||||
|
||||
|
||||
REORDERING TAB PAGES:
|
||||
|
||||
*:tabm* *:tabmove*
|
||||
:tabmove N Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. Without N the tab
|
||||
page is made the last one.
|
||||
|
||||
|
||||
LOOPING OVER TAB PAGES:
|
||||
|
||||
*:tabd* *:tabdo*
|
||||
:tabd[o] {cmd} Execute {cmd} in each tab page.
|
||||
It works like doing this: >
|
||||
:tabfirst
|
||||
:{cmd}
|
||||
:tabnext
|
||||
:{cmd}
|
||||
etc.
|
||||
< This only operates in the current window of each tab page.
|
||||
When an error is detected on one tab page, further tab pages
|
||||
will not be visited.
|
||||
The last tab page (or where an error occurred) becomes the
|
||||
current tab page.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
{cmd} must not open or close tab pages or reorder them.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:windo|, |:argdo| and |:bufdo|.
|
||||
|
||||
==============================================================================
|
||||
3. Other items *tab-page-other*
|
||||
|
||||
*tabline-menu*
|
||||
The GUI tab pages line has a popup menu. It is accessed with a right click.
|
||||
The entries are:
|
||||
Close Close the tab page under the mouse pointer. The
|
||||
current one if there is no label under the mouse
|
||||
pointer.
|
||||
New Tab Open a tab page, editing an empty buffer. It appears
|
||||
to the left of the mouse pointer.
|
||||
Open Tab... Like "New Tab" and additionaly use a file selector to
|
||||
select a file to edit.
|
||||
|
||||
Diff mode works per tab page. You can see the diffs between several files
|
||||
within one tab page. Other tab pages can show differences between other
|
||||
files.
|
||||
|
||||
The TabLeave and TabEnter autocommand events can be used to do something when
|
||||
switching from one tab page to another. The exact order depends on what you
|
||||
are doing. When creating a new tab page this works as if you create a new
|
||||
window on the same buffer and then edit another buffer. Thus ":tabnew"
|
||||
triggers:
|
||||
WinLeave leave current window
|
||||
TabLeave leave current tab page
|
||||
TabEnter enter new tab page
|
||||
WinEnter enter window in new tab page
|
||||
BufLeave leave current buffer
|
||||
BufEnter enter new empty buffer
|
||||
|
||||
When switching to another tab page the order is:
|
||||
BufLeave
|
||||
WinLeave
|
||||
TabLeave
|
||||
TabEnter
|
||||
WinEnter
|
||||
BufEnter
|
||||
|
||||
==============================================================================
|
||||
4. Setting 'tabline' *setting-tabline*
|
||||
|
||||
The 'tabline' option specifies what the line with tab pages labels looks like.
|
||||
It is only used when there is no GUI tab line.
|
||||
|
||||
You can use the 'showtabline' option to specify when you want the line with
|
||||
tab page labels to appear: never, when there is more than one tab page or
|
||||
always.
|
||||
|
||||
The highlighting of the tab pages line is set with the groups TabLine
|
||||
TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill|
|
||||
|
||||
The 'tabline' option allows you to define your preferred way to tab pages
|
||||
labels. This isn't easy, thus an example will be given here.
|
||||
|
||||
For basics see the 'statusline' option. The same items can be used in the
|
||||
'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and
|
||||
|tabpagewinnr()| functions are useful.
|
||||
|
||||
Since the number of tab labels will vary, you need to use an expresion for the
|
||||
whole option. Something like: >
|
||||
:set tabline=%!MyTabLine()
|
||||
|
||||
Then define the MyTabLine() function to list all the tab pages labels. A
|
||||
convenient method is to split it in two parts: First go over all the tab
|
||||
pages and define labels for them. Then get the label for each tab page. >
|
||||
|
||||
function MyTabLine()
|
||||
let s = ''
|
||||
for i in range(tabpagenr('$'))
|
||||
" select the highlighting
|
||||
if i + 1 == tabpagenr()
|
||||
let s .= '%#TabLineSel#'
|
||||
else
|
||||
let s .= '%#TabLine#'
|
||||
endif
|
||||
|
||||
" set the tab page number (for mouse clicks)
|
||||
let s .= '%' . (i + 1) . 'T'
|
||||
|
||||
" the label is made by MyTabLabel()
|
||||
let s .= ' %{MyTabLabel(' . (i + 1) . ')} '
|
||||
endfor
|
||||
|
||||
" after the last tab fill with TabLineFill and reset tab page nr
|
||||
let s .= '%#TabLineFill#%T'
|
||||
|
||||
" right-align the label to close the current tab page
|
||||
if tabpagenr('$') > 1
|
||||
let s .= '%=%#TabLine#%999Xclose'
|
||||
endif
|
||||
|
||||
return s
|
||||
endfunction
|
||||
|
||||
Now the MyTabLabel() function is called for each tab page to get its label. >
|
||||
|
||||
function MyTabLabel(n)
|
||||
let buflist = tabpagebuflist(a:n)
|
||||
let winnr = tabpagewinnr(a:n)
|
||||
return bufname(buflist[winnr - 1])
|
||||
endfunction
|
||||
|
||||
This is just a simplistic example that results in a tab pages line that
|
||||
resembles the default, but without adding a + for a modified buffer or
|
||||
trunctating the names. You will want to reduce the width of labels in a
|
||||
clever way when there is not enough room. Check the 'columns' option for the
|
||||
space available.
|
||||
|
||||
==============================================================================
|
||||
5. Setting 'guitablabel' *setting-guitablabel*
|
||||
|
||||
When the GUI tab pages line is displayed, 'guitablabel' can be used to
|
||||
specify the label to display for each tab page. Unlike 'tabline', which
|
||||
specifies the whole tab pages line at once, 'guitablabel' is used for each
|
||||
label separately.
|
||||
|
||||
See the 'statusline' option for the format of the value.
|
||||
|
||||
The "%N" item can be used for the current tab page number. The |v:lnum|
|
||||
variable is also set to this number when 'guitablabel' is evaluated.
|
||||
The items that use a file name refer to the current window of the tab page.
|
||||
|
||||
Note that syntax highlighting is not used for 'guitablabel'. The %T and %X
|
||||
items are also ignored.
|
||||
|
||||
A simple example that puts the tab page number and the buffer name in the
|
||||
label: >
|
||||
:set guitablabel=%N\ %f
|
||||
|
||||
An example that resembles the default: Show the number of windows in the tab
|
||||
page and a '+' if there is a modifed buffer: >
|
||||
|
||||
function GuiTabLabel()
|
||||
let label = ''
|
||||
let bufnrlist = tabpagebuflist(v:lnum)
|
||||
|
||||
" Add '+' if one of the buffers in the tab page is modified
|
||||
for bufnr in bufnrlist
|
||||
if getbufvar(bufnr, "&modified")
|
||||
let label = '+'
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Append the number of windows in the tab page if more than one
|
||||
let wincount = tabpagewinnr(v:lnum, '$')
|
||||
if wincount > 1
|
||||
let label .= wincount
|
||||
endif
|
||||
if label != ''
|
||||
let label .= ' '
|
||||
endif
|
||||
|
||||
" Append the buffer name
|
||||
return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
|
||||
endfunction
|
||||
|
||||
set guitablabel=%{GuiTabLabel()}
|
||||
|
||||
Note that the function must be defined before setting the option, otherwise
|
||||
you get an error message for the function not being known.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
238
runtime/doc/tags
238
runtime/doc/tags
@@ -202,6 +202,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'fen' options.txt /*'fen'*
|
||||
'fenc' options.txt /*'fenc'*
|
||||
'fencs' options.txt /*'fencs'*
|
||||
'fex' options.txt /*'fex'*
|
||||
'ff' options.txt /*'ff'*
|
||||
'ffs' options.txt /*'ffs'*
|
||||
'fileencoding' options.txt /*'fileencoding'*
|
||||
@@ -231,6 +232,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'foldnestmax' options.txt /*'foldnestmax'*
|
||||
'foldopen' options.txt /*'foldopen'*
|
||||
'foldtext' options.txt /*'foldtext'*
|
||||
'formatexpr' options.txt /*'formatexpr'*
|
||||
'formatlistpat' options.txt /*'formatlistpat'*
|
||||
'formatoptions' options.txt /*'formatoptions'*
|
||||
'formatprg' options.txt /*'formatprg'*
|
||||
@@ -252,6 +254,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'graphic' vi_diff.txt /*'graphic'*
|
||||
'grepformat' options.txt /*'grepformat'*
|
||||
'grepprg' options.txt /*'grepprg'*
|
||||
'gtl' options.txt /*'gtl'*
|
||||
'guicursor' options.txt /*'guicursor'*
|
||||
'guifont' options.txt /*'guifont'*
|
||||
'guifontset' options.txt /*'guifontset'*
|
||||
@@ -259,6 +262,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'guiheadroom' options.txt /*'guiheadroom'*
|
||||
'guioptions' options.txt /*'guioptions'*
|
||||
'guipty' options.txt /*'guipty'*
|
||||
'guitablabel' options.txt /*'guitablabel'*
|
||||
'hardtabs' vi_diff.txt /*'hardtabs'*
|
||||
'helpfile' options.txt /*'helpfile'*
|
||||
'helpheight' options.txt /*'helpheight'*
|
||||
@@ -716,6 +720,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'showfulltag' options.txt /*'showfulltag'*
|
||||
'showmatch' options.txt /*'showmatch'*
|
||||
'showmode' options.txt /*'showmode'*
|
||||
'showtabline' options.txt /*'showtabline'*
|
||||
'shq' options.txt /*'shq'*
|
||||
'si' options.txt /*'si'*
|
||||
'sidescroll' options.txt /*'sidescroll'*
|
||||
@@ -756,6 +761,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'ssop' options.txt /*'ssop'*
|
||||
'st' options.txt /*'st'*
|
||||
'sta' options.txt /*'sta'*
|
||||
'stal' options.txt /*'stal'*
|
||||
'startofline' options.txt /*'startofline'*
|
||||
'statusline' options.txt /*'statusline'*
|
||||
'stl' options.txt /*'stl'*
|
||||
@@ -890,6 +896,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
't_vs' term.txt /*'t_vs'*
|
||||
't_xs' term.txt /*'t_xs'*
|
||||
'ta' options.txt /*'ta'*
|
||||
'tabline' options.txt /*'tabline'*
|
||||
'tabpagemax' options.txt /*'tabpagemax'*
|
||||
'tabstop' options.txt /*'tabstop'*
|
||||
'tag' options.txt /*'tag'*
|
||||
'tagbsearch' options.txt /*'tagbsearch'*
|
||||
@@ -897,6 +905,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'tagrelative' options.txt /*'tagrelative'*
|
||||
'tags' options.txt /*'tags'*
|
||||
'tagstack' options.txt /*'tagstack'*
|
||||
'tal' options.txt /*'tal'*
|
||||
'tb' options.txt /*'tb'*
|
||||
'tbi' options.txt /*'tbi'*
|
||||
'tbidi' options.txt /*'tbidi'*
|
||||
@@ -926,6 +935,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'toolbar' options.txt /*'toolbar'*
|
||||
'toolbariconsize' options.txt /*'toolbariconsize'*
|
||||
'top' options.txt /*'top'*
|
||||
'tpm' options.txt /*'tpm'*
|
||||
'tr' options.txt /*'tr'*
|
||||
'ts' options.txt /*'ts'*
|
||||
'tsl' options.txt /*'tsl'*
|
||||
@@ -1089,6 +1099,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*
|
||||
@@ -1221,6 +1232,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
-n starting.txt /*-n*
|
||||
-nb starting.txt /*-nb*
|
||||
-o starting.txt /*-o*
|
||||
-p starting.txt /*-p*
|
||||
-q starting.txt /*-q*
|
||||
-qf starting.txt /*-qf*
|
||||
-r starting.txt /*-r*
|
||||
@@ -1263,15 +1275,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*
|
||||
@@ -1469,6 +1485,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
08.6 usr_08.txt /*08.6*
|
||||
08.7 usr_08.txt /*08.7*
|
||||
08.8 usr_08.txt /*08.8*
|
||||
08.9 usr_08.txt /*08.9*
|
||||
09.1 usr_09.txt /*09.1*
|
||||
09.2 usr_09.txt /*09.2*
|
||||
09.3 usr_09.txt /*09.3*
|
||||
@@ -1783,6 +1800,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 +2113,31 @@ $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*
|
||||
:lcs if_cscop.txt /*:lcs*
|
||||
:lcscope if_cscop.txt /*:lcscope*
|
||||
:le change.txt /*:le*
|
||||
:left change.txt /*:left*
|
||||
:lefta windows.txt /*:lefta*
|
||||
@@ -2116,13 +2153,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 +2196,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*
|
||||
@@ -2566,6 +2648,33 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:tN tagsrch.txt /*:tN*
|
||||
:tNext tagsrch.txt /*:tNext*
|
||||
:ta tagsrch.txt /*:ta*
|
||||
:tab tabpage.txt /*:tab*
|
||||
:tabN tabpage.txt /*:tabN*
|
||||
:tabNext tabpage.txt /*:tabNext*
|
||||
:tabc tabpage.txt /*:tabc*
|
||||
:tabclose tabpage.txt /*:tabclose*
|
||||
:tabd tabpage.txt /*:tabd*
|
||||
:tabdo tabpage.txt /*:tabdo*
|
||||
:tabe tabpage.txt /*:tabe*
|
||||
:tabedit tabpage.txt /*:tabedit*
|
||||
:tabf tabpage.txt /*:tabf*
|
||||
:tabfind tabpage.txt /*:tabfind*
|
||||
:tabfir tabpage.txt /*:tabfir*
|
||||
:tabfirst tabpage.txt /*:tabfirst*
|
||||
:tabl tabpage.txt /*:tabl*
|
||||
:tablast tabpage.txt /*:tablast*
|
||||
:tabm tabpage.txt /*:tabm*
|
||||
:tabmove tabpage.txt /*:tabmove*
|
||||
:tabn tabpage.txt /*:tabn*
|
||||
:tabnew tabpage.txt /*:tabnew*
|
||||
:tabnext tabpage.txt /*:tabnext*
|
||||
:tabo tabpage.txt /*:tabo*
|
||||
:tabonly tabpage.txt /*:tabonly*
|
||||
:tabp tabpage.txt /*:tabp*
|
||||
:tabprevious tabpage.txt /*:tabprevious*
|
||||
:tabr tabpage.txt /*:tabr*
|
||||
:tabrewind tabpage.txt /*:tabrewind*
|
||||
:tabs tabpage.txt /*:tabs*
|
||||
:tag tagsrch.txt /*:tag*
|
||||
:tags tagsrch.txt /*:tags*
|
||||
:tc if_tcl.txt /*:tc*
|
||||
@@ -2603,6 +2712,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:una map.txt /*:una*
|
||||
:unabbreviate map.txt /*:unabbreviate*
|
||||
:undo undo.txt /*:undo*
|
||||
:undoj undo.txt /*:undoj*
|
||||
:undojoin undo.txt /*:undojoin*
|
||||
:unh windows.txt /*:unh*
|
||||
:unhide windows.txt /*:unhide*
|
||||
:unl eval.txt /*:unl*
|
||||
@@ -2989,6 +3100,7 @@ CTRL-W_CTRL-Z windows.txt /*CTRL-W_CTRL-Z*
|
||||
CTRL-W_CTRL-] windows.txt /*CTRL-W_CTRL-]*
|
||||
CTRL-W_CTRL-^ windows.txt /*CTRL-W_CTRL-^*
|
||||
CTRL-W_CTRL-_ windows.txt /*CTRL-W_CTRL-_*
|
||||
CTRL-W_F windows.txt /*CTRL-W_F*
|
||||
CTRL-W_H windows.txt /*CTRL-W_H*
|
||||
CTRL-W_J windows.txt /*CTRL-W_J*
|
||||
CTRL-W_K windows.txt /*CTRL-W_K*
|
||||
@@ -3046,7 +3158,10 @@ Contents quickref.txt /*Contents*
|
||||
Cscope if_cscop.txt /*Cscope*
|
||||
CursorHold autocmd.txt /*CursorHold*
|
||||
CursorHold-example windows.txt /*CursorHold-example*
|
||||
CursorHoldI autocmd.txt /*CursorHoldI*
|
||||
CursorIM mbyte.txt /*CursorIM*
|
||||
CursorMoved autocmd.txt /*CursorMoved*
|
||||
CursorMovedI autocmd.txt /*CursorMovedI*
|
||||
D change.txt /*D*
|
||||
DOS os_dos.txt /*DOS*
|
||||
DOS-format editing.txt /*DOS-format*
|
||||
@@ -3789,7 +3904,18 @@ 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*
|
||||
E784 tabpage.txt /*E784*
|
||||
E79 message.txt /*E79*
|
||||
E80 message.txt /*E80*
|
||||
E800 arabic.txt /*E800*
|
||||
@@ -3991,6 +4117,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*
|
||||
@@ -4000,6 +4127,8 @@ TCL if_tcl.txt /*TCL*
|
||||
TERM starting.txt /*TERM*
|
||||
TTpro-telnet syntax.txt /*TTpro-telnet*
|
||||
Tab intro.txt /*Tab*
|
||||
TabEnter autocmd.txt /*TabEnter*
|
||||
TabLeave autocmd.txt /*TabLeave*
|
||||
Tcl if_tcl.txt /*Tcl*
|
||||
TermChanged autocmd.txt /*TermChanged*
|
||||
TermResponse autocmd.txt /*TermResponse*
|
||||
@@ -4499,6 +4628,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*
|
||||
@@ -4681,6 +4811,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*
|
||||
@@ -5032,6 +5163,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*
|
||||
@@ -5079,6 +5211,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*
|
||||
@@ -5121,6 +5254,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*
|
||||
@@ -5173,12 +5308,14 @@ g?g? change.txt /*g?g?*
|
||||
g@ map.txt /*g@*
|
||||
gD pattern.txt /*gD*
|
||||
gE motion.txt /*gE*
|
||||
gF editing.txt /*gF*
|
||||
gH visual.txt /*gH*
|
||||
gI insert.txt /*gI*
|
||||
gJ change.txt /*gJ*
|
||||
gP change.txt /*gP*
|
||||
gQ intro.txt /*gQ*
|
||||
gR change.txt /*gR*
|
||||
gT tabpage.txt /*gT*
|
||||
gU change.txt /*gU*
|
||||
gUU change.txt /*gUU*
|
||||
gUgU change.txt /*gUgU*
|
||||
@@ -5211,6 +5348,8 @@ getfsize() eval.txt /*getfsize()*
|
||||
getftime() eval.txt /*getftime()*
|
||||
getftype() eval.txt /*getftype()*
|
||||
getline() eval.txt /*getline()*
|
||||
getloclist() eval.txt /*getloclist()*
|
||||
getpos() eval.txt /*getpos()*
|
||||
getqflist() eval.txt /*getqflist()*
|
||||
getreg() eval.txt /*getreg()*
|
||||
getregtype() eval.txt /*getregtype()*
|
||||
@@ -5247,6 +5386,7 @@ group-name syntax.txt /*group-name*
|
||||
gs various.txt /*gs*
|
||||
gsp.vim syntax.txt /*gsp.vim*
|
||||
gstar pattern.txt /*gstar*
|
||||
gt tabpage.txt /*gt*
|
||||
gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
|
||||
gu change.txt /*gu*
|
||||
gugu change.txt /*gugu*
|
||||
@@ -5316,6 +5456,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*
|
||||
@@ -5386,6 +5527,7 @@ hl-FoldColumn syntax.txt /*hl-FoldColumn*
|
||||
hl-Folded syntax.txt /*hl-Folded*
|
||||
hl-IncSearch syntax.txt /*hl-IncSearch*
|
||||
hl-LineNr syntax.txt /*hl-LineNr*
|
||||
hl-MatchParen syntax.txt /*hl-MatchParen*
|
||||
hl-Menu syntax.txt /*hl-Menu*
|
||||
hl-ModeMsg syntax.txt /*hl-ModeMsg*
|
||||
hl-MoreMsg syntax.txt /*hl-MoreMsg*
|
||||
@@ -5406,6 +5548,9 @@ hl-SpellLocal syntax.txt /*hl-SpellLocal*
|
||||
hl-SpellRare syntax.txt /*hl-SpellRare*
|
||||
hl-StatusLine syntax.txt /*hl-StatusLine*
|
||||
hl-StatusLineNC syntax.txt /*hl-StatusLineNC*
|
||||
hl-TabLine syntax.txt /*hl-TabLine*
|
||||
hl-TabLineFill syntax.txt /*hl-TabLineFill*
|
||||
hl-TabLineSel syntax.txt /*hl-TabLineSel*
|
||||
hl-Title syntax.txt /*hl-Title*
|
||||
hl-Tooltip syntax.txt /*hl-Tooltip*
|
||||
hl-User1 syntax.txt /*hl-User1*
|
||||
@@ -5711,6 +5856,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*
|
||||
@@ -5762,15 +5909,25 @@ mapcheck() eval.txt /*mapcheck()*
|
||||
maple.vim syntax.txt /*maple.vim*
|
||||
mapleader map.txt /*mapleader*
|
||||
maplocalleader map.txt /*maplocalleader*
|
||||
mapmode-c map.txt /*mapmode-c*
|
||||
mapmode-i map.txt /*mapmode-i*
|
||||
mapmode-ic map.txt /*mapmode-ic*
|
||||
mapmode-l map.txt /*mapmode-l*
|
||||
mapmode-n map.txt /*mapmode-n*
|
||||
mapmode-nvo map.txt /*mapmode-nvo*
|
||||
mapmode-o map.txt /*mapmode-o*
|
||||
mapmode-v map.txt /*mapmode-v*
|
||||
mapping map.txt /*mapping*
|
||||
mark motion.txt /*mark*
|
||||
mark-motions motion.txt /*mark-motions*
|
||||
masm.vim syntax.txt /*masm.vim*
|
||||
match() eval.txt /*match()*
|
||||
match-highlight pattern.txt /*match-highlight*
|
||||
match-parens tips.txt /*match-parens*
|
||||
matchend() eval.txt /*matchend()*
|
||||
matchit-install usr_05.txt /*matchit-install*
|
||||
matchlist() eval.txt /*matchlist()*
|
||||
matchparen pi_paren.txt /*matchparen*
|
||||
matchstr() eval.txt /*matchstr()*
|
||||
max() eval.txt /*max()*
|
||||
mbyte-IME mbyte.txt /*mbyte-IME*
|
||||
@@ -5858,6 +6015,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*
|
||||
@@ -5896,6 +6054,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*
|
||||
@@ -5914,10 +6073,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*
|
||||
@@ -5930,7 +6091,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*
|
||||
@@ -5961,6 +6121,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*
|
||||
@@ -5973,6 +6134,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*
|
||||
@@ -5986,6 +6148,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*
|
||||
@@ -6023,7 +6186,9 @@ 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-matchparen version7.txt /*new-matchparen*
|
||||
new-multi-byte version5.txt /*new-multi-byte*
|
||||
new-multi-lang version6.txt /*new-multi-lang*
|
||||
new-netrw-explore version7.txt /*new-netrw-explore*
|
||||
@@ -6162,6 +6327,7 @@ php3.vim syntax.txt /*php3.vim*
|
||||
phtml.vim syntax.txt /*phtml.vim*
|
||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
plugin usr_05.txt /*plugin*
|
||||
plugin-details filetype.txt /*plugin-details*
|
||||
@@ -6172,6 +6338,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*
|
||||
@@ -6202,6 +6369,7 @@ progname-variable eval.txt /*progname-variable*
|
||||
progress.vim syntax.txt /*progress.vim*
|
||||
ptcap.vim syntax.txt /*ptcap.vim*
|
||||
pterm-mouse options.txt /*pterm-mouse*
|
||||
pumvisible() eval.txt /*pumvisible()*
|
||||
put change.txt /*put*
|
||||
put-Visual-mode change.txt /*put-Visual-mode*
|
||||
python if_pyth.txt /*python*
|
||||
@@ -6389,6 +6557,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*
|
||||
@@ -6421,6 +6590,8 @@ search-range pattern.txt /*search-range*
|
||||
search-replace change.txt /*search-replace*
|
||||
searchdecl() eval.txt /*searchdecl()*
|
||||
searchpair() eval.txt /*searchpair()*
|
||||
searchpairpos() eval.txt /*searchpairpos()*
|
||||
searchpos() eval.txt /*searchpos()*
|
||||
section motion.txt /*section*
|
||||
sed.vim syntax.txt /*sed.vim*
|
||||
self eval.txt /*self*
|
||||
@@ -6437,9 +6608,13 @@ set-spc-auto spell.txt /*set-spc-auto*
|
||||
setbufvar() eval.txt /*setbufvar()*
|
||||
setcmdpos() eval.txt /*setcmdpos()*
|
||||
setline() eval.txt /*setline()*
|
||||
setloclist() eval.txt /*setloclist()*
|
||||
setpos() eval.txt /*setpos()*
|
||||
setqflist() eval.txt /*setqflist()*
|
||||
setreg() eval.txt /*setreg()*
|
||||
setting-guifont gui.txt /*setting-guifont*
|
||||
setting-guitablabel tabpage.txt /*setting-guitablabel*
|
||||
setting-tabline tabpage.txt /*setting-tabline*
|
||||
setwinvar() eval.txt /*setwinvar()*
|
||||
sftp pi_netrw.txt /*sftp*
|
||||
sgml.vim syntax.txt /*sgml.vim*
|
||||
@@ -6480,35 +6655,73 @@ 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-CMP spell.txt /*spell-CMP*
|
||||
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-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*
|
||||
@@ -6522,11 +6735,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*
|
||||
@@ -6769,6 +6984,16 @@ t_vi term.txt /*t_vi*
|
||||
t_vs term.txt /*t_vs*
|
||||
t_xs term.txt /*t_xs*
|
||||
tab intro.txt /*tab*
|
||||
tab-page tabpage.txt /*tab-page*
|
||||
tab-page-commands tabpage.txt /*tab-page-commands*
|
||||
tab-page-intro tabpage.txt /*tab-page-intro*
|
||||
tab-page-other tabpage.txt /*tab-page-other*
|
||||
tabline-menu tabpage.txt /*tabline-menu*
|
||||
tabpage tabpage.txt /*tabpage*
|
||||
tabpage.txt tabpage.txt /*tabpage.txt*
|
||||
tabpagebuflist() eval.txt /*tabpagebuflist()*
|
||||
tabpagenr() eval.txt /*tabpagenr()*
|
||||
tabpagewinnr() eval.txt /*tabpagewinnr()*
|
||||
tag tagsrch.txt /*tag*
|
||||
tag-! tagsrch.txt /*tag-!*
|
||||
tag-any-white tagsrch.txt /*tag-any-white*
|
||||
@@ -6780,6 +7005,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*
|
||||
@@ -6860,6 +7086,7 @@ termcap-changed version4.txt /*termcap-changed*
|
||||
termcap-colors term.txt /*termcap-colors*
|
||||
termcap-cursor-color term.txt /*termcap-cursor-color*
|
||||
termcap-cursor-shape term.txt /*termcap-cursor-shape*
|
||||
termcap-options term.txt /*termcap-options*
|
||||
termcap-title term.txt /*termcap-title*
|
||||
terminal-colors os_unix.txt /*terminal-colors*
|
||||
terminal-info term.txt /*terminal-info*
|
||||
@@ -6875,6 +7102,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*
|
||||
@@ -6912,6 +7140,7 @@ uganda.txt uganda.txt /*uganda.txt*
|
||||
undercurl syntax.txt /*undercurl*
|
||||
underline syntax.txt /*underline*
|
||||
undo undo.txt /*undo*
|
||||
undo-blocks undo.txt /*undo-blocks*
|
||||
undo-commands undo.txt /*undo-commands*
|
||||
undo-redo undo.txt /*undo-redo*
|
||||
undo-remarks undo.txt /*undo-remarks*
|
||||
@@ -7087,6 +7316,7 @@ v_b_r_example visual.txt /*v_b_r_example*
|
||||
v_c change.txt /*v_c*
|
||||
v_d change.txt /*v_d*
|
||||
v_g? change.txt /*v_g?*
|
||||
v_gF editing.txt /*v_gF*
|
||||
v_gJ change.txt /*v_gJ*
|
||||
v_gV visual.txt /*v_gV*
|
||||
v_g] tagsrch.txt /*v_g]*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 7.0aa. Last change: 2005 Oct 15
|
||||
*tagsrch.txt* For Vim version 7.0aa. Last change: 2006 Feb 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,19 +36,26 @@ An easy way back is with the CTRL-T command. Also read about the tag stack
|
||||
below.
|
||||
|
||||
*:ta* *:tag* *E426* *E429*
|
||||
:ta[g][!] {ident} Jump to the definition of {ident}, using the
|
||||
:[count]ta[g][!] {ident}
|
||||
Jump to the definition of {ident}, using the
|
||||
information in the tags file(s). Put {ident} in the
|
||||
tag stack. See |tag-!| for [!].
|
||||
{ident} can be a regexp pattern, see |tag-regexp|.
|
||||
When there are several matching tags for {ident}, the
|
||||
first one is jumped to. |:tnext|.
|
||||
When there are several matching tags for {ident}, jump
|
||||
to the [count] one. When [count] is omitted the
|
||||
first one is jumped to. See |tag-matchlist| for
|
||||
jumping to other matching tags.
|
||||
|
||||
g<LeftMouse> *g<LeftMouse>*
|
||||
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
|
||||
CTRL-] Jump to the definition of the keyword under the
|
||||
cursor. Same as ":tag {ident}", where {ident} is the
|
||||
keyword under or after cursor. {Vi: identifier after
|
||||
the cursor}
|
||||
keyword under or after cursor.
|
||||
When there are several matching tags for {ident}, jump
|
||||
to the [count] one. When no [count] is given the
|
||||
first one is jumped to. See |tag-matchlist| for
|
||||
jumping to other matching tags.
|
||||
{Vi: identifier after the cursor}
|
||||
|
||||
*v_CTRL-]*
|
||||
{Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that
|
||||
@@ -257,6 +264,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 +293,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}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.0aa. Last change: 2005 Dec 14
|
||||
*term.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -208,7 +208,7 @@ starts with CSI, it assumes that the terminal is in 8-bit mode and will
|
||||
convert all key sequences to their 8-bit variants.
|
||||
|
||||
==============================================================================
|
||||
2. Terminal options *terminal-options* *E436*
|
||||
2. Terminal options *terminal-options* *termcap-options* *E436*
|
||||
|
||||
The terminal options can be set just like normal options. But they are not
|
||||
shown with the ":set all" command. Instead use ":set termcap".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tips.txt* For Vim version 7.0aa. Last change: 2005 Apr 19
|
||||
*tips.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -24,6 +24,7 @@ Compressing the help files |gzip-helpfile|
|
||||
Hex editing |hex-editing|
|
||||
Executing shell commands in a window |shell-window|
|
||||
Using <> notation in autocommands |autocmd-<>|
|
||||
Highlighting matching parens |match-parens|
|
||||
|
||||
==============================================================================
|
||||
Editing C programs *C-editing*
|
||||
@@ -443,4 +444,65 @@ forget to double the number of existing backslashes and put a backslash before
|
||||
For a real buffer menu, user functions should be used (see |:function|), but
|
||||
then the <> notation isn't used, which defeats using it as an example here.
|
||||
|
||||
==============================================================================
|
||||
Highlighting matching parens *match-parens*
|
||||
|
||||
This example shows the use of a few advanced tricks:
|
||||
- using the |CursorMoved| autocommand event
|
||||
- using |searchpairpos()| to find a matching paren
|
||||
- using |synID()| to detect whether the cursor is in a string or comment
|
||||
- using |:match| to highlight something
|
||||
- using a |pattern| to match a specific position in the file.
|
||||
|
||||
This should be put in a Vim script file, since it uses script-local variables.
|
||||
It skips matches in strings or comments, unless the cursor started in string
|
||||
or comment. This requires syntax highlighting.
|
||||
|
||||
A slightly more advanced version is used in the |matchparen| plugin.
|
||||
>
|
||||
let s:paren_hl_on = 0
|
||||
function s:Highlight_Matching_Paren()
|
||||
if s:paren_hl_on
|
||||
match none
|
||||
let s:paren_hl_on = 0
|
||||
endif
|
||||
|
||||
let c_lnum = line('.')
|
||||
let c_col = col('.')
|
||||
|
||||
let c = getline(c_lnum)[c_col - 1]
|
||||
let plist = split(&matchpairs, ':\|,')
|
||||
let i = index(plist, c)
|
||||
if i < 0
|
||||
return
|
||||
endif
|
||||
if i % 2 == 0
|
||||
let s_flags = 'nW'
|
||||
let c2 = plist[i + 1]
|
||||
else
|
||||
let s_flags = 'nbW'
|
||||
let c2 = c
|
||||
let c = plist[i - 1]
|
||||
endif
|
||||
if c == '['
|
||||
let c = '\['
|
||||
let c2 = '\]'
|
||||
endif
|
||||
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
|
||||
\ '=~? "string\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip)
|
||||
|
||||
if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
|
||||
exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col .
|
||||
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
let s:paren_hl_on = 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd CursorMoved,CursorMovedI * call s:Highlight_Matching_Paren()
|
||||
autocmd InsertEnter * match none
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 19
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,55 +30,57 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
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)
|
||||
- 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
|
||||
Can't reproduce it right now...
|
||||
- Window resize when poup is displayed
|
||||
- When completing something that is a structure, add the "." or "->" right
|
||||
away. How to figure out if it's a pointer or not?
|
||||
- When a typedef or struct is local to a file only use it in that file?
|
||||
Function to get and restore window position? Including topline, column
|
||||
offset, etc. Use dictionary to store the info?
|
||||
|
||||
Crash with X command server (Ciaran McCreesh).
|
||||
|
||||
Ctags still hasn't included the patch. Darren is looking for someone to do
|
||||
maintanance. Is there another solution?
|
||||
|
||||
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.
|
||||
- Look into hungarian dictionary:
|
||||
http://magyarispell.sourceforge.net/rc3-beta2.zip
|
||||
- Support breakpoint character <20> 0xb7 and ignore it?
|
||||
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.
|
||||
-> proper case compare against pattern, also for multi-byte
|
||||
- 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.
|
||||
- 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.
|
||||
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
|
||||
- Add a command like "zg" that selects one of the files 'spellfile'.
|
||||
- Add a command like "zg" that selects one of the files in 'spellfile'.
|
||||
- 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)
|
||||
|
||||
GTK: get an X error while exiting quickly after starting (running the tests).
|
||||
Caused by new GTK library?
|
||||
X Error: BadWindow (invalid Window parameter) 3
|
||||
- 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/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.
|
||||
|
||||
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.
|
||||
|
||||
7 Add plugins for formatting. Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
Setting the 'langformat' option to "chinese" would load the
|
||||
"format/chinese.vim" plugin.
|
||||
Edward L. Fox explains how it should be done for most Asian languages. (2005
|
||||
Nov 24)
|
||||
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).
|
||||
|
||||
Mac unicode patch (Da Woon Jung):
|
||||
- configuration option for platform: i386, ppc or both.
|
||||
Use __LITTLE_ENDIAN__ to test for current platform.
|
||||
- selecting proportional font breaks display
|
||||
- UTF-8 text causes display problems. Font replacement causes this.
|
||||
- Command-key mappings do not work. (Alan Schmitt)
|
||||
@@ -88,18 +90,17 @@ Mac unicode patch (Da Woon Jung):
|
||||
(Alan Schmitt)
|
||||
|
||||
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.
|
||||
|
||||
CTRL-X CTRL-L only completes from loaded buffers. Make it work for unloaded
|
||||
buffers too?
|
||||
|
||||
Autoload:
|
||||
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
|
||||
script names and a help file and produces a script that can be sourced to
|
||||
@@ -128,50 +129,32 @@ Awaiting response:
|
||||
- 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.
|
||||
|
||||
It's not much different from other Insert-mode completion, use the same
|
||||
mechanism. Use CTRL-X CTRL-O and 'omnifunc'. Set 'omnifunc' in the
|
||||
filetype plugin, define the function in the autoload directory.
|
||||
|
||||
Separately develop the completion logic and the UI. When adding UI stuff
|
||||
make it work for all completion methods.
|
||||
Omni completion:
|
||||
ccomplete:
|
||||
- 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.
|
||||
Could build the list of items for each structure in memory. Is that
|
||||
faster? Not using too much memory?
|
||||
- For C add tag "kind" field to each match?
|
||||
- Flickering because of syntax highlighting redrawing further lines.
|
||||
- When a typedef or struct is local to a file only use it in that file?
|
||||
|
||||
UI:
|
||||
- Complete longest common string first, like 'wildmode' "longest:full".
|
||||
- Add an "auto" mode: after typing a character (or string) completion is
|
||||
done for the longest common string. plugin defines the possible
|
||||
characters/strings. (Martin Stubenschrott)
|
||||
And/or: Provide a function to popup the menu, so that an insert mode
|
||||
mapping can start it (with a specific selection).
|
||||
- GUI implementation of the popup menu.
|
||||
- When using tags, show match in preview window (function prototype,
|
||||
struct member, etc.).
|
||||
- Show "info" from a match in preview window.
|
||||
Or use one window for matches, another for context/info (Doug Kearns,
|
||||
2005 Sep 13)
|
||||
- Ideas on: http://www.wholetomato.com/
|
||||
|
||||
|
||||
Completion logic:
|
||||
Use runtime/autoload/{filetype}complete.vim files.
|
||||
|
||||
In function arguments suggest variables of expected type.
|
||||
Tags file has "signature" field.
|
||||
|
||||
List of completions is a Dictionary with items:
|
||||
complist[0]['text'] = completion text
|
||||
complist[0]['type'] = type of completion (e.g. function, var, arg)
|
||||
complist[0]['help'] = help text (e.g. function declaration)
|
||||
complist[0]['helpfunc'] = function that shows help text
|
||||
etc.
|
||||
|
||||
Can CTRL-] (jump to tag) include the "." and "->" to restrict the
|
||||
number of possible matches? (Flemming Madsen)
|
||||
|
||||
In general: Besides completion, figure out the type of a variable
|
||||
and use it for information.
|
||||
|
||||
Ideas from others:
|
||||
http://www.vim.org/scripts/script.php?script_id=747
|
||||
http://sourceforge.net/projects/insenvim
|
||||
@@ -184,10 +167,6 @@ PLANNED FOR VERSION 7.0:
|
||||
Uses ctags to find the info:
|
||||
ctags -f $allTagsFile --fields=+aiKmnsSz --language-force=C++ --C++-kinds=+cefgmnpsut-dlux -u $files
|
||||
|
||||
UI: popup menu with list of alternatives, icon to indicate type
|
||||
optional popup window with info about selected alternative
|
||||
Unrelated settings are changed (e.g. 'mousemodel').
|
||||
|
||||
www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
|
||||
IComplete: http://www.vim.org/scripts/script.php?script_id=1265
|
||||
and http://stud4.tuwien.ac.at/~e0125672/icomplete/
|
||||
@@ -195,16 +174,12 @@ PLANNED FOR VERSION 7.0:
|
||||
Ivan Villanueva has something for Java.
|
||||
Emads: http://www.xref-tech.com/xrefactory/more_c_completion.html
|
||||
Ideas from the Vim 7 BOF at SANE:
|
||||
- It's not possible to have one solution for all languages. Design an
|
||||
interface for completion plugins. The matches can be done in a
|
||||
Vim-script list.
|
||||
- For interpreted languages, use the interpreter to obtain information.
|
||||
Should work for Java (Eclipse does this), Python, Tcl, etc.
|
||||
Richard Emberson mentioned working on an interface to Java.
|
||||
- Check Readline for its completion interface.
|
||||
- Use ctags for other languages. Writing a file could trigger running
|
||||
ctags, merging the tags of the changed file.
|
||||
"Visual Assist" http://www.wholetomato.com/products:
|
||||
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
|
||||
- Pre-expand abbreviations, show which abbrevs would match?
|
||||
@@ -229,22 +204,6 @@ PLANNED FOR VERSION 7.0:
|
||||
before some time/date can be flushed. 'undopersist' gives maximum time to
|
||||
keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
|
||||
extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
|
||||
7 Support WINDOW TABS. Works like several pages, each with their own
|
||||
split windows.
|
||||
In Emacs these are called frames. Could also call them "pages".
|
||||
Use the name of the first buffer in the tab (ignoring the help window,
|
||||
unless it's the only one). Add a number for the window count.
|
||||
First make it work on the console. Use a line of text with highlighting.
|
||||
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.
|
||||
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?
|
||||
- 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.
|
||||
@@ -276,7 +235,8 @@ PLANNED FOR VERSION 7.0:
|
||||
to avoid a performance penalty (esp. for string options)?
|
||||
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).
|
||||
At the same time support 32 bit Unicode characters?
|
||||
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",
|
||||
@@ -320,6 +280,8 @@ PLANNED FOR VERSION 7.0:
|
||||
taglist() can be used.
|
||||
|
||||
Adjust src/main.aap for installing manpages like in Makefile.
|
||||
And for generating Vim.app for the Mac.
|
||||
Install spell files with src/main.aap.
|
||||
|
||||
When editing a file with both utf-8 and latin1 text Vim always falls back to
|
||||
latin1. Add a command to convert the latin1 characters to utf-8?
|
||||
@@ -364,25 +326,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]])
|
||||
@@ -403,6 +346,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.
|
||||
@@ -412,7 +360,7 @@ Awaiting updated patches:
|
||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||
Update 2004 Sep 6.
|
||||
How does this work? Missing comments.
|
||||
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
|
||||
- gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
|
||||
Update 2004 Sep 10
|
||||
Another patch from Edward L. Fox (2005 Nov 24)
|
||||
Search in 'runtimepath'?
|
||||
@@ -1386,20 +1334,34 @@ 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.
|
||||
|
||||
|
||||
Tab pages:
|
||||
9 GUI implementation for the tab pages line for other systems.
|
||||
8 Make GUI menu in tab pages line configurable. Like the popup menu.
|
||||
8 tab pages in the session file, if "tabpages" in 'sessionoptions'
|
||||
8 :tabmove +N move tab page N pages forward
|
||||
8 :tabmove -N move tab page N pages backward
|
||||
7 :tabdup duplicate the tab with all its windows.
|
||||
7 Option to put tab line at the left or right? Need an option to specify
|
||||
its witdh. It's like a separate window with ":tabs" output.
|
||||
7 Add local variables for each tab page?
|
||||
8 Add local options for each tab page? E.g., 'diffopt' could differ between
|
||||
tab pages.
|
||||
7 Add local highlighting for each tab page?
|
||||
|
||||
|
||||
Spell checking:
|
||||
9 Work together with OpenOffice.org to update the wordlists. (Adri Verhoef,
|
||||
Aad Nales) Setup vim-spell maillist?
|
||||
- suggestion for "KG" to "kg" when it's keepcase.
|
||||
- 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/
|
||||
@@ -1411,6 +1373,8 @@ Spell checking:
|
||||
- PSEUDOROOT == NEEDAFFIX
|
||||
- COMPOUNDROOT -> COMPOUNDED? For a word that already is a compound word
|
||||
Or use COMPOUNDED2, COMPOUNDED3, etc.
|
||||
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
|
||||
obtain). But new Myspell wordlist will come (Hagen)
|
||||
- CIRCUMFIX: when a word uses a prefix marked with the CIRCUMFIX flag, then
|
||||
the word must also have a suffix marked with the CIRCUMFIX flag. It's a
|
||||
bit primitive, since only one flag is used, which doesn't allow matching
|
||||
@@ -1424,8 +1388,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/
|
||||
@@ -1433,7 +1397,6 @@ Spell checking:
|
||||
syntax items (to add @Spell).
|
||||
Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn
|
||||
cluster" but change the contains list directly for matching syntax items.
|
||||
8 Install spell files with src/main.aap.
|
||||
- References: MySpell library (in OpenOffice.org).
|
||||
http://spellchecker.mozdev.org/source.html
|
||||
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
|
||||
@@ -1486,11 +1449,12 @@ 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.
|
||||
- 'foldmethod' "syntax": "fold=3" argument: set fold level for a region or
|
||||
match.
|
||||
- Apply a new foldlevel to a range of lines. (Steve Litt)
|
||||
8 Have some way to restrict commands to not folded text. Also commands like
|
||||
searches.
|
||||
@@ -1524,7 +1488,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.
|
||||
@@ -1620,7 +1583,7 @@ Syntax highlighting:
|
||||
"%" match. :syntax nomatch cMatchError (,{,[,),},] [contained]
|
||||
8 Highlight the text between two matching parens (e.g., with a grey
|
||||
background) when on one of the parens or in between them.
|
||||
Or highlight the matching paren when the cursor is on one.
|
||||
Option for the matchparen plugin?
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop
|
||||
sequences. Add remark in docs that :if 'term' == "term-name" should be
|
||||
@@ -1755,13 +1718,6 @@ Built-in script language:
|
||||
Alternative: Support packages. {package-name}:{function-name}().
|
||||
Packages are loaded automatically when first used, from
|
||||
$VIMRUNTIME/packages (or use a search path).
|
||||
7 Add the markclear() function to delete a mark in another buffer. Charles
|
||||
Campbell (2004 Jan 9)
|
||||
http://mysite.verizon.net/astronaut/vim/index.html#Patch
|
||||
Implement setmark(markname, lnum [, col [, filename]]) instead?
|
||||
When "lnum" is zero delete the mark.
|
||||
When "filename" has no wildcards and there is no matching buffer, add
|
||||
the buffer (unlisted).
|
||||
7 Pre-parse or compile Vim scripts into a bytecode.
|
||||
1. Put the bytecode with the original script, with an ":if
|
||||
has('bytecode')" around it, so that it's only used with a Vim that
|
||||
@@ -1813,17 +1769,16 @@ Built-in script language:
|
||||
specified in any way? To be able to jump to the last edited file.
|
||||
8 Pass the executable name to the Vim scripts in some way. As v:argv0?
|
||||
8 Add command arguments with three dashes, passed on to Vim scripts.
|
||||
8 When starting to source a vim script, delete all functions that it has
|
||||
previously defined? Avoids using ":fun!" all the time.
|
||||
7 Add optional arguments to user functions:
|
||||
:func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17)
|
||||
6 User functions: Functions local to buffer "b:func()"?
|
||||
8 Add ":let var[{expr}] = {expr}". When past the end of "var" just ignore.
|
||||
8 For Strings add ":let var[{expr}] = {expr}". When past the end of "var"
|
||||
just ignore.
|
||||
8 The "= register should be writable, if followed by the name of a variable,
|
||||
option or environment variable.
|
||||
8 ":let &option" should list the value of the option.
|
||||
7 Add synIDlist(), making the whole list of syntax items on the
|
||||
stack available (separated with '\n').
|
||||
7 Add synIDlist(), making the whole list of syntax items on the syntax stack
|
||||
available as a List.
|
||||
8 Add autocommand-event for when a variable is changed:
|
||||
:au VarChanged {varname} {commands}
|
||||
8 Add "has("gui_capable")", to check if the GUI can be started.
|
||||
@@ -1857,8 +1812,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?
|
||||
@@ -2069,14 +2022,12 @@ 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
|
||||
7 Can CTRL-] (jump to tag) include a following "." and "->" to restrict the
|
||||
number of possible matches? Check tags file for an item that has members.
|
||||
(Flemming Madsen)
|
||||
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?
|
||||
@@ -2237,30 +2188,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
|
||||
@@ -2277,7 +2223,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
|
||||
@@ -2309,8 +2254,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
|
||||
@@ -2815,8 +2759,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:
|
||||
@@ -3282,14 +3227,20 @@ Debug mode:
|
||||
|
||||
|
||||
Various improvements:
|
||||
7 Add plugins for formatting? Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
Setting the 'langformat' option to "chinese" would load the
|
||||
"format/chinese.vim" plugin.
|
||||
The plugin would set 'formatexpr' and define the function being called.
|
||||
Edward L. Fox explains how it should be done for most Asian languages.
|
||||
(2005 Nov 24)
|
||||
7 [t to move to previous xml/html tag (like "vatov"), ]t to move to next
|
||||
("vatv").
|
||||
7 [< to move to previous xml/html tag, e.g., previous <li>. ]< to move to
|
||||
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".
|
||||
@@ -3353,6 +3304,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
|
||||
@@ -3413,9 +3365,6 @@ Various improvements:
|
||||
paragraph. Both start a new paragraph on any indent change.
|
||||
7 Add a way to define an item list with a pattern in 'formatoptions'. The
|
||||
'n' flag doesn't work for "6.3" or "6a.".
|
||||
8 Add 'formatexpr' option: Used for formatting operator "gq" instead of the
|
||||
builtin formatting or 'formatprg'. Or use a string that starts with "="
|
||||
in 'formatprg': "=MyFormat()".
|
||||
8 Allow using a trailing space to signal a paragraph that continues on the
|
||||
next line (MIME text/plain; format=flowed, RFC 2646). Can be used for
|
||||
continuous formatting. Could use 'autoformat' option, which specifies a
|
||||
@@ -3760,6 +3709,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 :
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.0aa. Last change: 2003 Oct 21
|
||||
*undo.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,7 +10,8 @@ The basics are explained in section |02.5| of the user manual.
|
||||
|
||||
1. Undo and redo commands |undo-commands|
|
||||
2. Two ways of undo |undo-two-ways|
|
||||
3. Remarks about undo |undo-remarks|
|
||||
3. Undo blocks |undo-blocks|
|
||||
4. Remarks about undo |undo-remarks|
|
||||
|
||||
==============================================================================
|
||||
1. Undo and redo commands *undo-commands*
|
||||
@@ -72,7 +73,36 @@ Rationale: Nvi uses the "." command instead of CTRL-R. Unfortunately, this
|
||||
words, in Nvi it does nothing.
|
||||
|
||||
==============================================================================
|
||||
3. Remarks about undo *undo-remarks*
|
||||
3. Undo blocks *undo-blocks*
|
||||
|
||||
One undo command normally undoes a typed command, no matter how many changes
|
||||
that command makes. This sequence of undo-able changes forms an undo block.
|
||||
Thus if the typed key(s) call a function, all the commands in the function are
|
||||
undone together.
|
||||
|
||||
If you want to write a function or script that doesn't create a new undoable
|
||||
change but joins in with the previous change use this command:
|
||||
|
||||
*:undoj* *:undojoin*
|
||||
:undoj[oin] Join further changes with the previous undo block.
|
||||
Warning: Use with care, it may prevent the user from
|
||||
properly undoing changes.
|
||||
{not in Vi}
|
||||
|
||||
This is most useful when you need to prompt the user halfway a change. For
|
||||
example in a function that calls |getchar()|. Do make sure that there was a
|
||||
related change before this that you must join with.
|
||||
|
||||
This doesn't work by itself, because the next key press will start a new
|
||||
change again. But you can do something like this: >
|
||||
|
||||
:undojoin | delete
|
||||
|
||||
After this an "u" command will undo the delete command and the previous
|
||||
change.
|
||||
|
||||
==============================================================================
|
||||
4. Remarks about undo *undo-remarks*
|
||||
|
||||
The number of changes that are remembered is set with the 'undolevels' option.
|
||||
If it is zero, the Vi-compatible way is always used. If it is negative no
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_06.txt* For Vim version 7.0aa. Last change: 2002 Jul 14
|
||||
*usr_06.txt* For Vim version 7.0aa. Last change: 2006 Feb 16
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -179,10 +179,9 @@ You could also write your own color scheme. This is how you do it:
|
||||
colorscheme mine
|
||||
|
||||
If you want to see what the most often used color combinations look like, use
|
||||
these commands: >
|
||||
this command: >
|
||||
|
||||
:edit $VIMRUNTIME/syntax/colortest.vim
|
||||
:source %
|
||||
:runtime syntax/colortest.vim
|
||||
|
||||
You will see text in various color combinations. You can check which ones are
|
||||
readable and look nice.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_08.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*usr_08.txt* For Vim version 7.0aa. Last change: 2006 Feb 25
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -17,6 +17,7 @@ side by side. All this is possible with split windows.
|
||||
|08.6| Commands for all windows
|
||||
|08.7| Viewing differences with vimdiff
|
||||
|08.8| Various
|
||||
|08.9| Tab pages
|
||||
|
||||
Next chapter: |usr_09.txt| Using the GUI
|
||||
Previous chapter: |usr_07.txt| Editing more than one file
|
||||
@@ -504,6 +505,95 @@ window is to appear:
|
||||
:topleft {cmd} at the top or left of the Vim window
|
||||
:botright {cmd} at the bottom or right of the Vim window
|
||||
|
||||
|
||||
==============================================================================
|
||||
*08.9* Tab pages
|
||||
|
||||
You will have noticed that windows never overlap. That means you quickly run
|
||||
out of screen space. The solution for this is called Tab pages.
|
||||
|
||||
Assume you are editing "thisfile". To create a new tab page use this command: >
|
||||
|
||||
:tabedit thatfile
|
||||
|
||||
This will edit the file "thatfile" in a window that occupies the whole Vim
|
||||
window. And you will notice a bar at the top with the two file names:
|
||||
|
||||
+----------------------------------+
|
||||
| thisfile | /thatfile/ __________X| (thatfile is bold)
|
||||
|/* thatfile */ |
|
||||
|that |
|
||||
|that |
|
||||
|~ |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
+----------------------------------+
|
||||
|
||||
You now have two tab pages. The first one has a window for "thisfile" and the
|
||||
second one a window for "thatfile". It's like two pages that are on top of
|
||||
eachother, with a tab sticking out of each page showing the file name.
|
||||
|
||||
Now use the mouse to click on "thisfile" in the top line. The result is
|
||||
|
||||
+----------------------------------+
|
||||
| /thisfile/ | thatfile __________X| (thisfile is bold)
|
||||
|/* thisfile */ |
|
||||
|this |
|
||||
|this |
|
||||
|~ |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
+----------------------------------+
|
||||
|
||||
Thus you can switch between tab pages by clicking on the label in the top
|
||||
line. If you don't have a mouse or don't want to use it, you can use the "gt"
|
||||
command. Mnemonic: Goto Tab.
|
||||
|
||||
Now let's create another tab page with the command: >
|
||||
|
||||
:tab split
|
||||
|
||||
This makes a new tab page with one window that is editing the same buffer as
|
||||
the window we were in:
|
||||
|
||||
+-------------------------------------+
|
||||
| thisfile | /thisfile/ | thatfile __X| (thisfile is bold)
|
||||
|/* thisfile */ |
|
||||
|this |
|
||||
|this |
|
||||
|~ |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
+-------------------------------------+
|
||||
|
||||
You can put ":tab" before any Ex command that opens a window. The window will
|
||||
be opened in a new tab page. Another example: >
|
||||
|
||||
:tab help gt
|
||||
|
||||
Will show the help text for "gt" in a new tab page.
|
||||
|
||||
A few more things you can do with tab pages:
|
||||
|
||||
- click with the mouse in the space after the last label
|
||||
The next tab page will be selected, like with "gt".
|
||||
|
||||
- click with the mouse on the "X" in the top right corner
|
||||
The current tab page will be closed. Unless there are unsaved
|
||||
changes in the current tab page.
|
||||
|
||||
- double click with the mouse in the top line
|
||||
A new tab page will be created.
|
||||
|
||||
- the "tabonly" command
|
||||
Closes all tab pages except the current one. Unless there are unsaved
|
||||
changes in other tab pages.
|
||||
|
||||
For more information about tab pages see |tab-page|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Next chapter: |usr_09.txt| Using the GUI
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_12.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
|
||||
*usr_12.txt* For Vim version 7.0aa. Last change: 2006 Feb 26
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -273,7 +273,7 @@ To display a man page for the word under the cursor, use this: >
|
||||
For example, you want to know the return value of "strstr()" while editing
|
||||
this line:
|
||||
|
||||
if (strstr(input, "aap") == ) ~
|
||||
if ( strstr (input, "aap") == ) ~
|
||||
|
||||
Move the cursor to somewhere on "strstr" and type "\K". A window will open
|
||||
to display the man page for strstr().
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_31.txt* For Vim version 7.0aa. Last change: 2003 Oct 21
|
||||
*usr_31.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -76,7 +76,7 @@ Will start the browser in "/usr".
|
||||
|
||||
When you are not using the GUI version, you could use the file explorer window
|
||||
to select files like in a file browser. However, this doesn't work for the
|
||||
":browse" command. See |file-explorer|.
|
||||
":browse" command. See |netrw-browse|.
|
||||
|
||||
==============================================================================
|
||||
*31.2* Confirmation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
|
||||
*usr_41.txt* For Vim version 7.0aa. Last change: 2006 Feb 22
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -654,7 +654,9 @@ Working with text in the current buffer:
|
||||
nextnonblank() find next non-blank line
|
||||
prevnonblank() find previous non-blank line
|
||||
search() find a match for a pattern
|
||||
searchpos() find a match for a pattern
|
||||
searchpair() find the other end of a start/skip/end
|
||||
searchpairpos() find the other end of a start/skip/end
|
||||
|
||||
System functions and manipulation of files:
|
||||
browse() put up a file requester
|
||||
@@ -747,6 +749,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 +761,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
|
||||
|
||||
@@ -830,7 +834,7 @@ For people who like short functions, this does the same thing: >
|
||||
: return a:num2
|
||||
:endfunction
|
||||
|
||||
A user defined function is called in exactly the same way as a builtin
|
||||
A user defined function is called in exactly the same way as a built-in
|
||||
function. Only the name is different. The Min function can be used like
|
||||
this: >
|
||||
|
||||
@@ -2241,7 +2245,7 @@ organize your functions in library scripts. But you must use function names
|
||||
where the part before the '#' matches the script name. Otherwise Vim would
|
||||
not know what script to load.
|
||||
|
||||
If you get really enthousiastic and write lots of library scripts, you may
|
||||
If you get really enthusiastic and write lots of library scripts, you may
|
||||
want to use subdirectories. Example: >
|
||||
|
||||
call netlib#ftp#read('somefile')
|
||||
|
||||
@@ -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 Feb 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -94,7 +94,8 @@ g8 Print the hex values of the bytes used in the
|
||||
*:nu* *:number*
|
||||
:[range]nu[mber] [count] [flags]
|
||||
Same as :print, but precede each line with its line
|
||||
number. (See also 'highlight' option).
|
||||
number. (See also 'highlight' and 'numberwidth'
|
||||
option).
|
||||
See |ex-flags| for [flags].
|
||||
|
||||
*:#*
|
||||
@@ -321,6 +322,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 +649,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}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 19
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -23,6 +23,7 @@ Spell checking |new-spell|
|
||||
Omni completion |new-omni-completion|
|
||||
MzScheme interface |new-MzScheme|
|
||||
Printing multi-byte text |new-print-multi-byte|
|
||||
Highlighting matching parens |new-matchparen|
|
||||
Translated manual pages |new-manpage-trans|
|
||||
Internal grep |new-vimgrep|
|
||||
Scroll back in messages |new-scroll-back|
|
||||
@@ -30,6 +31,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|
|
||||
@@ -130,6 +132,12 @@ compatibility problems and because "SS" can't be changed back to a sharp s.
|
||||
that could be the function argument without type. Now it finds the position
|
||||
where the type is given.
|
||||
|
||||
The line continuation in functions was not taken into account, line numbers in
|
||||
errors were logical lines, not lines in the sourced file. That made it
|
||||
difficult to locate errors. Now the line number in the sourced file is
|
||||
reported, relative to the function start. This also means that line numbers
|
||||
for ":breakadd func" are different.
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-7*
|
||||
|
||||
@@ -154,6 +162,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 +199,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 +208,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.
|
||||
@@ -220,6 +234,20 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
|
||||
Also see |postscript-cjk-printing|. (Mike Williams)
|
||||
|
||||
|
||||
Highlighting matching parens *new-matchparen*
|
||||
----------------------------
|
||||
|
||||
When moving the cursor through the text and it is on a paren, then the
|
||||
matching paren can be highlighted. This uses the new |CursorMoved|
|
||||
autocommand event.
|
||||
|
||||
See |matchparen| for more information.
|
||||
|
||||
The plugin uses the |:match| command. It now supports three match patterns.
|
||||
The plugin uses the third one. The first one is for the user and the second
|
||||
one can be used by another plugin.
|
||||
|
||||
|
||||
Translated manual pages *new-manpage-trans*
|
||||
-----------------------
|
||||
|
||||
@@ -354,6 +382,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*
|
||||
-----------------
|
||||
|
||||
@@ -371,6 +409,14 @@ CTRL-W <Enter> In the quickfix window: opens a new window to show the
|
||||
<A-RightMouse> ('mousemodel' "extend")
|
||||
Make a blockwise selection. |<A-LeftMouse>|
|
||||
|
||||
gF Start editing the filename under the cursor and jump
|
||||
to the line number following the file name.
|
||||
(Yegappan Lakshmanan)
|
||||
|
||||
CTRL-W F Start editing the filename under the cursor in a new
|
||||
window and jump to the line number following the file
|
||||
name. (Yegappan Lakshmanan)
|
||||
|
||||
Insert mode commands: ~
|
||||
|
||||
CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but
|
||||
@@ -397,6 +443,8 @@ Options: ~
|
||||
(based on an idea from Yegappan Lakshmanan)
|
||||
'formatlistpat' pattern to recognize a numbered list for formatting.
|
||||
(idea by Hugo Haas)
|
||||
'formatexpr' expression for formatting text with |gq| and when text
|
||||
goes over 'textwidth' in Insert mode.
|
||||
'spell' switch spell checking on/off
|
||||
'spelllang' languages to check spelling for
|
||||
'spellsuggest' methods for spell suggestions
|
||||
@@ -435,6 +483,45 @@ 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.
|
||||
|
||||
|: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.
|
||||
|:lprevious| Like |:cprevious| 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.
|
||||
|: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.
|
||||
|:lcscope| Like |:cscope| but use the location list.
|
||||
|:ltag| Jump to a tag and add matching tags to a location list.
|
||||
|
||||
|:undojoin| Join a change with the previous undo block.
|
||||
|
||||
|
||||
Ex command modifiers: ~
|
||||
|
||||
@@ -466,8 +553,11 @@ New and extended functions: ~
|
||||
|complete_check()| check for key pressed, for 'completefunc'
|
||||
|copy()| make a shallow copy of a List or Dictionary
|
||||
|count()| count nr of times a value is in a List or Dictionary
|
||||
|cursor()| also accepts an offset for 'virtualedit', and
|
||||
the first argument can be a list: [lnum, col, off]
|
||||
|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
|
||||
@@ -485,6 +575,7 @@ New and extended functions: ~
|
||||
|getfperm()| get file permission string (Nikolai Weibull)
|
||||
|getftype()| get type of file (Nikolai Weibull)
|
||||
|getline()| with second argument: get List with buffer lines
|
||||
|getpos()| return a list with the position of cursor, mark, etc.
|
||||
|has_key()| check whether a key appears in a Dictionary
|
||||
|inputlist()| select an entry from a list
|
||||
|insert()| insert an item somewhere in a List
|
||||
@@ -503,7 +594,10 @@ 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)
|
||||
|searchpairpos()| return a List with the position of the match
|
||||
|searchpos()| return a List with the position of the match
|
||||
|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
|
||||
@@ -531,6 +625,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
|
||||
@@ -544,9 +644,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
|
||||
@@ -575,11 +681,18 @@ 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)
|
||||
|
||||
MGL syntax file. (Gero Kuhlmann)
|
||||
|
||||
rd syntax file. (Johannes Ranke)
|
||||
|
||||
New Keymaps: ~
|
||||
|
||||
Sinhala (Sri Lanka) (Harshula Jayasuriya)
|
||||
|
||||
Tamil in TSCII encoding (Yegappan Lakshmanan)
|
||||
|
||||
|
||||
New message translations: ~
|
||||
|
||||
@@ -649,6 +762,9 @@ 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.
|
||||
|
||||
Undo now also restores the '< and '> marks. "gv" selects the same area as
|
||||
before the change and undo.
|
||||
|
||||
==============================================================================
|
||||
IMPROVEMENTS *improvements-7*
|
||||
|
||||
@@ -664,9 +780,21 @@ 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.
|
||||
|
||||
It is now possible to define a function with: >
|
||||
:exe "func Test()\n ...\n endfunc"
|
||||
|
||||
The tutor was updated to make it simpler to use and added text to explain a
|
||||
few more important commands. Used ideas from Gabriel Zachmann.
|
||||
|
||||
@@ -712,9 +840,6 @@ upper case. Add color support to the builtin vt320 terminal codes.
|
||||
For the '%' item in 'viminfo', allow a number to set a maximum for the number
|
||||
of buffers.
|
||||
|
||||
The 'statusline' option can be local to the window, so that each window can
|
||||
have a different value. (partly by Yegappan Lakshmanan)
|
||||
|
||||
When a file looks like a shell script, check for an "exec" command that starts
|
||||
the tcl interpreter. (suggested by Alexios Zavras)
|
||||
|
||||
@@ -728,6 +853,10 @@ list.
|
||||
Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
|
||||
(NAKADAIRA Yukihiro)
|
||||
|
||||
Win32: Vim was not aware of hard links on NTFS file systems. These are
|
||||
detected now for when 'backupcopy' is "auto". Also fixed a bogus "file has
|
||||
been changed since reading it" error for links.
|
||||
|
||||
When foldtext() finds no text after removing the comment leader, use the
|
||||
second line of the fold. Helps for C-style /* */ comments where the first
|
||||
line is just "/*".
|
||||
@@ -854,6 +983,9 @@ Win32: Balloons can have multiple lines if common controls supports it.
|
||||
The 's' flag is added to the search() and searchpair() function to set the
|
||||
' mark if the cursor is moved. (Yegappan Lakshmanan)
|
||||
|
||||
The search() and searchpair() functions have an extra argument to specify
|
||||
where to stop searching. Speeds up searches that should not continue too far.
|
||||
|
||||
For 'errorformat' it was not possible to have a file name that contains the
|
||||
character that follows after "%f". For example, in "%f:%l:%m" the file name
|
||||
could not contain ":". Now include the first ":" where the rest of the
|
||||
@@ -916,8 +1048,37 @@ 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.
|
||||
(Yegappan Lakshmanan)
|
||||
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.
|
||||
|
||||
Insert mode completion for whole lines now also searches unloaded buffers.
|
||||
|
||||
The colortest.vim script can now be invoked directly with ":source" or
|
||||
":runtime".
|
||||
|
||||
The 'statusline' option can be local to the window, so that each window can
|
||||
have a different value. (partly by Yegappan Lakshmanan)
|
||||
|
||||
The 'statusline' option and other options that support the same format can now
|
||||
use these new features:
|
||||
- When it starts with "%!" the value is first evaluated as an expression
|
||||
before parsing the value.
|
||||
- "%#HLname#" can be used to start highlighting with HLname.
|
||||
|
||||
When 'statusline' is set to something that causes an error message then it is
|
||||
made empty to avoid an endless redraw loop. Also for other options, such at
|
||||
'tabline'. ":verbose set statusline" will mention that it was set in an error
|
||||
handler.
|
||||
|
||||
When there are several matching tags, the ":tag <name>" and CTRL-] commands
|
||||
jump to the [count] matching tag. (Yegappan Lakshmanan)
|
||||
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
@@ -954,6 +1115,9 @@ Mac: When running "make install" the runtime files are installed as for Unix.
|
||||
Avoids that too many files are copied. When running "make" a link to the
|
||||
runtime files is created to avoid a recursive copy that takes much time.
|
||||
|
||||
Mac: Configure will attempt to build Vim for both Intel and PowerPC. The
|
||||
--with-mac-arch configure argument can change it.
|
||||
|
||||
==============================================================================
|
||||
BUG FIXES *bug-fixes-7*
|
||||
|
||||
@@ -1050,6 +1214,9 @@ just before it is invoked
|
||||
VMS: Occasionally CR characters were inserted in the file. Expansion of
|
||||
environment variables was not correct. (Zoltan Arpadffy)
|
||||
|
||||
VMS: Improved low level char input (affects just console mode). (Zoltan
|
||||
Arpadffy)
|
||||
|
||||
UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
|
||||
from the first character of the word.
|
||||
|
||||
@@ -1509,4 +1676,143 @@ 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.
|
||||
|
||||
In some situations the menu and scrollbar didn't work, when the value contains
|
||||
a CSI byte. (Yukihiro Nakadaira)
|
||||
|
||||
GTK GUI: When drawing the balloon focus changes and we might get a key release
|
||||
event that removed the balloon again. Ignore the key release event.
|
||||
|
||||
'titleold' was included in ":mkexrc" and ":mksession" files.
|
||||
|
||||
":set background&" didn't use the same logic as was used when starting up.
|
||||
|
||||
When "umask" is set such that nothing is writable then the viminfo file would
|
||||
be written without write permission. (Julian Bridle)
|
||||
|
||||
Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the
|
||||
other diff'ed window.
|
||||
|
||||
When editing in an xterm with a different number of colors than expected the
|
||||
screen would be cleared and redrawn, causing the message about the edited file
|
||||
to be cleared. Now set "keep_msg" to redraw the last message.
|
||||
|
||||
For a color terminal: When the Normal HL uses bold, possibly to make the color
|
||||
lighter, and another HL group specifies a color it might become light as well.
|
||||
Now reset bold if a HL group doesn't specify bold itself.
|
||||
|
||||
When using 256 color xterm the color 255 would show up as color 0. Use a
|
||||
short instead of a char to store the color number.
|
||||
|
||||
ml_get errors when searching for "\n\zs" in an empty file.
|
||||
|
||||
When selecting a block and using "$" to select until the end of every line and
|
||||
not highlighting the character under the cursor the first character of the
|
||||
block could be unhighlighted.
|
||||
|
||||
When counting words for the Visual block area and using "$" to select until
|
||||
the end of every line only up to the length of the last line was counted.
|
||||
|
||||
"dip" in trailing empty lines left one empty line behind.
|
||||
|
||||
The script ID was only remembered globally for each option. When a buffer- or
|
||||
window-local option was set the same "last set" location was changed for all
|
||||
buffers and windows. Now remember the script ID for each local option
|
||||
separately.
|
||||
|
||||
GUI: The "Replace All" button didn't handle backslashes in the replacement in
|
||||
the same way as "Replace". Escape backslashes so that they are taken
|
||||
literally.
|
||||
|
||||
When using Select mode from Insert mode and typing a key, causing lines to be
|
||||
deleted and a message displayed, delayed the effect of inserting the key.
|
||||
Now overwrite the message without delay.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,574 @@
|
||||
.\" Traduction Lundi 7 août 2000 par Richard Hitier
|
||||
.\" (richard.hitier@dial.oleane.com)
|
||||
.\" Mise à jour de la traduction par David Blanchet
|
||||
.\" (david.blanchet@free.fr) 2005-01-17
|
||||
.\"
|
||||
.TH VIM 1 "22 Février 2002"
|
||||
.SH NOM
|
||||
vim \- Vi IMproved, éditeur de texte pour programmeurs
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.B vim
|
||||
[options] [fichier ...]
|
||||
.br
|
||||
.B vim
|
||||
[options] \-
|
||||
.br
|
||||
.B vim
|
||||
[options] \-t marqueur
|
||||
.br
|
||||
.B vim
|
||||
[options] \-q [fichiererreurs]
|
||||
.PP
|
||||
.br
|
||||
.B ex
|
||||
.br
|
||||
.B view
|
||||
.br
|
||||
.B gvim
|
||||
.B gview
|
||||
.B evim
|
||||
.B eview
|
||||
.br
|
||||
.B rvim
|
||||
.B rview
|
||||
.B rgvim
|
||||
.B rgview
|
||||
.SH DESCRIPTION
|
||||
.B Vim
|
||||
est un éditeur de texte proposant une compatibilité ascendante
|
||||
avec Vi. Il permet d'éditer n'importe quel type de texte brut.
|
||||
Il est particulièrement adapté pour l'édition des programmes.
|
||||
.PP
|
||||
Il comporte de nombreuses améliorations par rapport à Vi : annulation sur
|
||||
plusieurs niveaux, fenêtres et tampons multiples, coloration syntaxique,
|
||||
édition en ligne de commande, complètement des noms de fichiers, aide en
|
||||
ligne, sélection visuelle, etc.
|
||||
Voir ":help vi_diff.txt" pour un résumé des différences entre
|
||||
.B Vim
|
||||
et Vi.
|
||||
.PP
|
||||
Pendant l'exécution de
|
||||
.B Vim
|
||||
\, une aide abondante est accessible au travers du système d'aide
|
||||
en ligne, grâce à la commande ":help".
|
||||
Voir la section AIDE EN LIGNE plus bas.
|
||||
.PP
|
||||
Le plus souvent
|
||||
.B Vim
|
||||
est démarré pour éditer un unique fichier avec la commande
|
||||
.PP
|
||||
vim fichier
|
||||
.PP
|
||||
Plus généralement,
|
||||
.B Vim
|
||||
est lancé avec :
|
||||
.PP
|
||||
vim [options] [listefichiers]
|
||||
.PP
|
||||
Si la listefichiers est omise, l'éditeur démarre avec un tampon vide.
|
||||
Autrement, l'une des quatre méthodes suivantes vous permettra de choisir
|
||||
un ou plusieurs fichiers à éditer.
|
||||
.TP 12
|
||||
fichier ...
|
||||
Une liste de noms de fichiers.
|
||||
Le premier sera le fichier courant et sera lu dans le tampon.
|
||||
Le curseur sera placé sur la première ligne du tampon.
|
||||
Vous pouvez passer aux autres fichiers avec la commande ":next".
|
||||
Pour éditer un fichier débutant par un tiret, faites précéder la
|
||||
liste de fichiers par "\-\-".
|
||||
.TP
|
||||
\-
|
||||
Le fichier à éditer est lu sur l'entrée standard (stdin). Les commandes sont
|
||||
lues depuis stderr, qui devrait être un terminal.
|
||||
.TP
|
||||
\-t {marqueur}
|
||||
Le fichier à éditer et la position initiale du curseur dépendent
|
||||
d'un "marqueur", qui est une sorte d'étiquette.
|
||||
{marqueur} est recherché dans le fichier des marqueurs, le fichier correspondant
|
||||
devient le fichier courant et la commande associée est exécutée.
|
||||
Principalement utile pour les programmes en C ; dans ce cas, {marqueur}
|
||||
peut être le nom d'une fonction.
|
||||
Au final, le fichier contenant cette fonction devient le fichier
|
||||
courant et le curseur est placé au début de la fonction.
|
||||
Voir ":help tag\-commands".
|
||||
.TP
|
||||
\-q [fichiererreurs]
|
||||
Démarre en mode Mise-au-point (QuickFix).
|
||||
Le fichier [fichiererreurs] est lu et la première erreur est affichée.
|
||||
Si [fichiererreurs] est omis, le nom du fichier est lu dans
|
||||
l'option 'errorfile' ("AztecC.Err" par défaut sur Amiga, "errors.err" sur les
|
||||
autres systèmes).
|
||||
La commande ":cn" permet de sauter aux erreurs suivantes.
|
||||
Voir ":help quickfix".
|
||||
.PP
|
||||
.B Vim
|
||||
se comporte différemment selon le nom de la commande (l'exécutable peut
|
||||
cependant être le même fichier).
|
||||
.TP 10
|
||||
vim
|
||||
La façon "normale", le comportement par défaut.
|
||||
.TP
|
||||
ex
|
||||
Démarre en mode Ex.
|
||||
La commande ":vi" permet de passer en mode Normal.
|
||||
Ce mode est également accessible avec l'argument "\-e".
|
||||
.TP
|
||||
view
|
||||
Démarre en mode Lecture-Seule. Vous êtes protégé de l'écriture accidentelle
|
||||
des fichiers. Ce mode est également accessible avec l'argument "\-R".
|
||||
.TP
|
||||
gvim gview
|
||||
La version graphique.
|
||||
Ouvre une nouvelle fenêtre.
|
||||
Également accessible avec l'argument "\-g".
|
||||
.TP
|
||||
evim eview
|
||||
La version graphique en mode Débutant (easy).
|
||||
Ouvre une nouvelle fenêtre.
|
||||
Également accessible avec l'argument "\-y".
|
||||
.TP
|
||||
rvim rview rgvim rgview
|
||||
Comme ci-dessus, mais avec des restrictions. Il vous sera impossible de
|
||||
lancer des commandes du shell, ou de suspendre
|
||||
.B Vim.
|
||||
Également accessible avec l'argument "\-Z".
|
||||
.SH OPTIONS
|
||||
Les options peuvent être spécifiées dans n'importe quel ordre,
|
||||
avant ou après les noms de fichiers. Les options sans arguments
|
||||
peuvent être combinées après un unique tiret.
|
||||
.TP 12
|
||||
+[num]
|
||||
Place le curseur sur la ligne "num" dans le premier fichier.
|
||||
Si "num" est omis, le curseur sera placé sur la dernière ligne.
|
||||
.TP
|
||||
+/{motif}
|
||||
Place le curseur sur la première occurence de {motif} dans le premier fichier.
|
||||
Voir ":help search\-pattern" pour connaître les motifs de recherches
|
||||
disponibles.
|
||||
.TP
|
||||
+{commande}
|
||||
.TP
|
||||
\-c {commande}
|
||||
Exécute {commande} après la lecture du premier fichier.
|
||||
{commande} est interprétée comme une commande Ex.
|
||||
Si la {commande} contient des espaces, elle doit être entourée
|
||||
de doubles-apostrophes (cela dépend du shell utilisé).
|
||||
Exemple: Vim "+set si" main.c
|
||||
.br
|
||||
Note : vous pouvez utiliser jusqu'à 10 commandes "+" ou "\-c".
|
||||
.TP
|
||||
\-S {fichier}
|
||||
Source {fichier} après la lecture du premier fichier.
|
||||
C'est équivalent à \-c "source {fichier}".
|
||||
{fichier} ne peut pas débuter par un '\-'.
|
||||
Si {fichier} est omis, "Session.vim" est utilisé (cela ne fonctionne que si
|
||||
\-S est le dernier argument).
|
||||
.TP
|
||||
\-\-cmd {commande}
|
||||
Comme "\-c", mais la commande est exécutée juste avant de traiter les fichiers
|
||||
vimrc.
|
||||
Vous pouvez utiliser jusqu'à 10 de ces commandes, indépendamment des
|
||||
commandes "\-c".
|
||||
.TP
|
||||
\-A
|
||||
Si
|
||||
.B Vim
|
||||
a été compilé avec le support de la fonctionnalité ARABIC pour l'édition de
|
||||
fichiers de droite à gauche et les claviers arabes, cette option lance
|
||||
.B Vim
|
||||
en mode Arabe, c.-à-d. que l'option 'arabic' est activée.
|
||||
Sinon, un message d'erreur est émis et
|
||||
.B Vim
|
||||
quitte.
|
||||
.TP
|
||||
\-b
|
||||
Mode Binaire.
|
||||
Active plusieurs options pour permettre l'édition
|
||||
d'un fichier binaire ou exécutable.
|
||||
.TP
|
||||
\-C
|
||||
Compatible. Active l'option 'compatible'.
|
||||
.B Vim
|
||||
se comportera alors quasiment comme Vi, même s'il existe un fichier .vimrc.
|
||||
.TP
|
||||
\-d
|
||||
Démarre en mode Diff.
|
||||
Deux ou trois noms de fichiers doivent être spécifiés.
|
||||
.B Vim
|
||||
ouvrira alors tous les fichiers et affichera leurs différences.
|
||||
Fonctionne comme vimdiff(1).
|
||||
.TP
|
||||
\-d {périph}
|
||||
Ouvre {périph} pour l'utiliser comme terminal.
|
||||
Uniquement sur Amiga.
|
||||
Exemple:
|
||||
"\-d con:20/30/600/150".
|
||||
.TP
|
||||
\-D
|
||||
Debogage. Passe en mode Débogage lors de l'exécution de la première commande
|
||||
d'un script.
|
||||
.TP
|
||||
\-e
|
||||
Démarre
|
||||
.B Vim
|
||||
en mode Ex, comme si l'exécutable s'appelait "ex".
|
||||
.TP
|
||||
\-E
|
||||
Démarre
|
||||
.B Vim
|
||||
en mode Ex amélioré, comme si l'exécutable "exim" avait été invoqué.
|
||||
.TP
|
||||
\-f
|
||||
Premier-plan (Foreground). Pour la version graphique,
|
||||
.B Vim
|
||||
ne forke pas et ne se détache pas du shell dans lequel il a été invoqué.
|
||||
Sur Amiga,
|
||||
.B Vim
|
||||
n'est pas relancé pour ouvrir une nouvelle fenêtre.
|
||||
Cette option est utile quand
|
||||
.B Vim
|
||||
est exécuté par un programme qui attend la fin de la session d'édition
|
||||
(par exemple mail).
|
||||
Sur Amiga, les commandes ":sh" et ":!" ne fonctionneront pas.
|
||||
.TP
|
||||
\-\-nofork
|
||||
Premier-plan (Foreground). Pour la version graphique,
|
||||
.B Vim
|
||||
ne forkera pas et ne se détachera pas du shell dans lequel il a été lancé.
|
||||
.TP
|
||||
\-F
|
||||
Si
|
||||
.B Vim
|
||||
a été compilé avec le support de la fonctionnalité FKMAP pour l'édition de
|
||||
fichiers de droite à gauche et les claviers farsi, cette option lance
|
||||
.B Vim
|
||||
en mode Farsi, c.-à-d. avec les options 'fkmap' et 'rightleft' activées.
|
||||
Sinon, un message d'erreur est émis et
|
||||
.B Vim
|
||||
quitte.
|
||||
.TP
|
||||
\-g
|
||||
Si
|
||||
.B Vim
|
||||
a été compilé avec le support de l'IHM graphique, cette option active
|
||||
l'IHM graphique. Si le support n'a pas été compilé, un message d'erreur
|
||||
est émis et
|
||||
.B Vim
|
||||
quitte.
|
||||
.TP
|
||||
\-h
|
||||
Donne une aide succinte sur les arguments et les options de la ligne de
|
||||
commande. Après cela,
|
||||
.B Vim
|
||||
quitte.
|
||||
.TP
|
||||
\-H
|
||||
Si
|
||||
.B Vim
|
||||
a été compilé avec le support de la fonctionnalité RIGHTLEFT pour l'édition de
|
||||
fichiers de droite à gauche et les claviers hébreu, cette option lance
|
||||
.B Vim
|
||||
en mode Hebreu, c.-à-d. avec les options 'hkmap' et 'rightleft' activées.
|
||||
Sinon, un message d'erreur est émis et
|
||||
.B Vim
|
||||
quitte.
|
||||
.TP
|
||||
\-i {viminfo}
|
||||
Lorsque l'utilisation d'un fichier viminfo est activée, cette option indique
|
||||
le nom de fichier à utiliser à la place de "~/.viminfo" par défaut.
|
||||
Il est possible d'empêcher l'utilisation d'un fichier ".viminfo", en
|
||||
spécifiant le nom de fichier "NONE".
|
||||
.TP
|
||||
\-L
|
||||
Comme \-r.
|
||||
.TP
|
||||
\-l
|
||||
Mode Lisp.
|
||||
Active les options 'lisp' et 'showmatch'.
|
||||
.TP
|
||||
\-m
|
||||
Empêche la modification des fichiers.
|
||||
Désactive l'option 'write'.
|
||||
Vous pouvez toujours modifier le tampon, mais il vous sera impossible
|
||||
d'écrire le fichier.
|
||||
.TP
|
||||
\-M
|
||||
N'autorise aucune modification. les options 'modifiable' et 'write' sont
|
||||
desactivées, de sorte que les changements ne sont pas autorisés et que les
|
||||
fichiers ne peuvent pas être écrits. Note : ces options peuvent être activées
|
||||
pour autoriser les modifications.
|
||||
.TP
|
||||
\-N
|
||||
Mode Non-compatible. Désactive l'option 'compatible'.
|
||||
Cela améliorera le comportement de
|
||||
.B Vim
|
||||
\, mais il sera moins conforme à celui de Vi, même s'il n'existe aucun
|
||||
fichier ".vimrc".
|
||||
.TP
|
||||
\-n
|
||||
N'utilise pas de fichier d'échange (swapfile).
|
||||
Le recouvrement après un plantage sera impossible.
|
||||
Utile pour éditer un fichier sur un support très lent (disquette par ex.).
|
||||
Également activable avec ":set uc=0".
|
||||
Il est possible de l'annuler avec ":set uc=200".
|
||||
.TP
|
||||
\-nb
|
||||
Devient un serveur d'édition pour NetBeans. Consulter la documentation à ce
|
||||
sujet pour davantage de détails.
|
||||
.TP
|
||||
\-o[N]
|
||||
Ouvre N fenêtres les unes au-dessus des autres.
|
||||
Quand N est omis, ouvre une fenêtre pour chaque fichier.
|
||||
.TP
|
||||
\-O[N]
|
||||
Ouvre N fenêtres côte à côte.
|
||||
Quand N est omis, ouvre une fenêtre pour chaque fichier fichier.
|
||||
.TP
|
||||
\-R
|
||||
Mode Lecture-Seule.
|
||||
Active l'option 'readonly'.
|
||||
Vous pouvez toujours éditer le tampon, mais il vous sera impossible de
|
||||
d'écraser accidentellement un fichier.
|
||||
Si vous voulez écraser un fichier, ajoutez un point d'exclamation à la commande
|
||||
Ex, comme dans ":w!".
|
||||
L'option \-R impose l'option \-n (voir ci-dessus).
|
||||
L'option 'readonly' peut être désactivée avec ":set noro".
|
||||
Voir ":help 'readonly'".
|
||||
.TP
|
||||
\-r
|
||||
Donne la liste des fichiers d'échange, avec des informations pour les utiliser
|
||||
à des fins de recouvrement.
|
||||
.TP
|
||||
\-r {file}
|
||||
Mode Recouvrement.
|
||||
Utilise le fichier d'échange pour récouvrer d'une session d'édition plantée.
|
||||
Le fichier d'échange est un fichier avec le même nom que le fichier texte,
|
||||
suivi du suffixe ".swp".
|
||||
Voir ":help recovery".
|
||||
.TP
|
||||
\-s
|
||||
Mode Silencieux. Disponible uniquement quand
|
||||
.B Vim
|
||||
est lancé en tant que "ex" ou quand l'option "\-e" a été spécifiée avant
|
||||
l'option "\-s".
|
||||
.TP
|
||||
\-s {scriptEntrée}
|
||||
Lit le fichier de script {scriptEntrée}.
|
||||
Les caractères du fichier sont interprétés comme si vous les tapiez.
|
||||
La commande ":source! {scriptEntrée}" donne le même résultat.
|
||||
Si la fin du fichier est atteinte avant que l'éditeur quitte, les caractères
|
||||
suivants sont lus depuis le clavier.
|
||||
.TP
|
||||
\-T {terminal}
|
||||
Indique à
|
||||
.B Vim
|
||||
le nom du terminal utilisé.
|
||||
Cela n'est requis que lorsque la détection automatique échoue.
|
||||
Le {terminal} devrait être connu de
|
||||
.B Vim
|
||||
(intégré) ou défini dans le fichier termcap ou terminfo.
|
||||
.TP
|
||||
\-u {vimrc}
|
||||
Utilise les commandes du fichier {vimrc} pour les initialisations.
|
||||
Toutes les autres initialisations sont omises.
|
||||
À utiliser pour éditer un type de fichiers particulier.
|
||||
Cela permet aussi d'omettre toute initialisation en spécifiant le nom de
|
||||
fichier "NONE".
|
||||
Voir ":help initialization" dans Vim pour davantage de détails.
|
||||
.TP
|
||||
\-U {gvimrc}
|
||||
Utilise les commandes du fichier {gvimrc} pour l'initialisation de l'IHM
|
||||
graphique.
|
||||
Toutes les autres initialisations graphiques sont omises.
|
||||
Cela permet aussi d'omettre toute initialisation graphique en spécifiant le nom
|
||||
de fichier "NONE".
|
||||
Voir ":help gui\-init" dans Vim pour davantage de détails.
|
||||
.TP
|
||||
\-V[N]
|
||||
Mode Verbeux.
|
||||
Donne des messages à propos des fichiers sourcés, ainsi que sur la lecture
|
||||
et les écritures dans le fichier viminfo. le nombre optionnel N précise la
|
||||
valeur de l'option 'verbose' (10 par défaut).
|
||||
.TP
|
||||
\-v
|
||||
Démarre
|
||||
.B Vim
|
||||
en mode Vi, comme si l'exécutable s'appelait "vi". Cela n'a d'effet que si
|
||||
l'exécutable invoqué est "ex".
|
||||
.TP
|
||||
\-w {scriptSortie}
|
||||
Tous les caractères que vous tapez sont enregistrés dans le fichier
|
||||
{scriptSortie}, jusqu'à ce que vous quittiez
|
||||
.B Vim.
|
||||
C'est utile quand vous voulez créer un fichier de script à utiliser avec
|
||||
"vim \-s" ou ":source!".
|
||||
Si le fichier {scriptSortie} existe, les caractères sont ajoutés à la fin.
|
||||
.TP
|
||||
\-W {scriptSortie}
|
||||
Comme \-w, mais un fichier existant sera écrasé.
|
||||
.TP
|
||||
\-x
|
||||
Chiffre les fichiers lors de l'écriture. Une clé de chiffrement sera demandée.
|
||||
.TP
|
||||
\-X
|
||||
Ne se connecte pas au serveur X. Accélère le temps de démarrage dans un
|
||||
terminal, mais le titre de la fenêtre et le presse-papier seront inaccessibles.
|
||||
.TP
|
||||
\-y
|
||||
Démarre
|
||||
.B Vim
|
||||
en mode Débutant (easy), comme si l'exécutable s'appelait "evim" ou "eview".
|
||||
Donne à
|
||||
.B Vim
|
||||
un comportement plus proche des éditeurs « cliquez-tapez ».
|
||||
.TP
|
||||
\-Z
|
||||
Mode restreint. Fonctionne comme si l'exécutable commençait par la lettre 'r'.
|
||||
.TP
|
||||
\-\-
|
||||
Délimite la fin des options.
|
||||
Les arguments qui suivent seront considérés comme des noms de fichiers.
|
||||
Cela permet d'éditer des fichier débutant par un '\-'.
|
||||
.TP
|
||||
\-\-echo\-wid
|
||||
IHM graphique GTK uniquement : retourne la Window ID sur stdout.
|
||||
.TP
|
||||
\-\-help
|
||||
Donne un message d'aide et quitte, comme "\-h".
|
||||
.TP
|
||||
\-\-literal
|
||||
Prend les arguments de noms de fichiers littéralement, sans étendre les
|
||||
jokers. N'a aucun effet sur Unix, où le shell étend les jokers.
|
||||
.TP
|
||||
\-\-noplugin
|
||||
Ne charge pas les greffons. Implicite avec \-u NONE.
|
||||
.TP
|
||||
\-\-remote
|
||||
Se connecte à un serveur Vim et lui fait éditer les fichiers spécifiés dans
|
||||
le reste des arguments. Si aucun serveur n'est trouvé, un avertissement est
|
||||
émis et les fichiers sont édités dans le Vim courant.
|
||||
.TP
|
||||
\-\-remote\-expr {expr}
|
||||
Se connecte à un serveur Vim, y évalue {expr} et affiche le résultat sur la
|
||||
sortie standard (stdout).
|
||||
.TP
|
||||
\-\-remote\-send {touches}
|
||||
Se connecte à un serveur Vim et y envoie {touches}.
|
||||
.TP
|
||||
\-\-remote\-silent
|
||||
Comme \-\-remote, mais sans émettre d'avertissement si aucun serveur n'est
|
||||
trouvé.
|
||||
.TP
|
||||
\-\-remote\-wait
|
||||
Comme \-\-remote, mais Vim ne quitte pas tant que le fichier est en cours
|
||||
d'édition.
|
||||
.TP
|
||||
\-\-remote\-wait\-silent
|
||||
Comme \-\-remote\-wait, mais sans émettre d'avertissement si aucun serveur n'est
|
||||
trouvé.
|
||||
.TP
|
||||
\-\-serverlist
|
||||
Donne la liste des noms de tous les serveurs Vim disponibles.
|
||||
.TP
|
||||
\-\-servername {nom}
|
||||
Utilise {nom} pour le nom de serveur. Ce nom est donné au Vim courant, à moins
|
||||
qu'il ne soit utilisé avec un argument \-\-remote. Dans ce cas, il s'agit du nom
|
||||
du serveur auquel se connecter.
|
||||
.TP
|
||||
\-\-socketid {id}
|
||||
IHM graphique GTK+ uniquement : utilise le mécanisme GtkPlug pour faire
|
||||
fonctionner gvim dans une autre fenêtre.
|
||||
.TP
|
||||
\-\-version
|
||||
Affiche les informations sur la version puis quitte.
|
||||
.SH AIDE EN LIGNE
|
||||
Taper ":help" dans
|
||||
.B Vim
|
||||
pour commencer.
|
||||
Taper ":help sujet" pour obtenir de l'aide sur un sujet précis.
|
||||
Par exemple : ":help ZZ" pour consulter l'aide sur la commande "ZZ".
|
||||
Utiliser <Tab> et CTRL\-D pour compléter les sujets (":help
|
||||
cmdline\-completion").
|
||||
Des marqueurs sont inclus dans l'aide et vous permettent de sauter d'un endroit
|
||||
à un autre (comme des liens hypertextes, voir ":help").
|
||||
L'ensemble des fichiers de la documentation peut être consulté de cette
|
||||
façon, par exemple ":help syntax.txt".
|
||||
.SH FICHIERS
|
||||
.TP 15
|
||||
/usr/local/lib/vim/doc/*.txt
|
||||
Les fichiers de la documentation de
|
||||
.B Vim.
|
||||
Utiliser ":help doc\-file\-list" pour obtenir la liste complète.
|
||||
.TP
|
||||
/usr/local/lib/vim/doc/tags
|
||||
Le fichier des marqueurs utilisé pour trouver les informations dans les
|
||||
fichiers de la documentation.
|
||||
.TP
|
||||
/usr/local/lib/vim/syntax/syntax.vim
|
||||
Initialisation de la syntaxe pour l'ensemble du système.
|
||||
.TP
|
||||
/usr/local/lib/vim/syntax/*.vim
|
||||
Fichiers de syntaxe pour différents langages.
|
||||
.TP
|
||||
/usr/local/lib/vim/vimrc
|
||||
Initialisation de
|
||||
.B Vim
|
||||
pour l'ensemble du système.
|
||||
.TP
|
||||
/usr/local/lib/vim/gvimrc
|
||||
Initialisation de gvim pour l'ensemble du système.
|
||||
.TP
|
||||
/usr/local/lib/vim/optwin.vim
|
||||
Script utilisé pour la commande ":options", une manière pratique de consulter
|
||||
et de modifier les options.
|
||||
.TP
|
||||
/usr/local/lib/vim/menu.vim
|
||||
Initialisation des menus de gvim pour l'ensemble du système.
|
||||
.TP
|
||||
/usr/local/lib/vim/bugreport.vim
|
||||
Script pour générer un rapport de bogue. Voir ":help bugs".
|
||||
.TP
|
||||
/usr/local/lib/vim/filetype.vim
|
||||
Script pour détecter le type d'un fichier d'après son nom.
|
||||
Voir ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/lib/vim/scripts.vim
|
||||
Script pour détecter le type d'un fichier d'après son contenu.
|
||||
Voir ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/lib/vim/*.ps
|
||||
Fichiers utilisés pour l'impression PostScript.
|
||||
.PP
|
||||
Pour disposer d'informations récentes, consulter le site Internet de VIM :
|
||||
.br
|
||||
<URL:http://www.vim.org/>
|
||||
.SH VOIR AUSSI
|
||||
vimtutor(1)
|
||||
.SH AUTEUR
|
||||
La majeure partie de
|
||||
.B Vim
|
||||
a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs.
|
||||
Voir ":help credits" dans
|
||||
.B Vim.
|
||||
.br
|
||||
.B Vim
|
||||
est basé sur Stevie, réalisé par Tim Thompson,
|
||||
Tony Andrews et G.R. (Fred) Walter.
|
||||
Toutefois, pratiquement rien du code original ne subsiste.
|
||||
.SH BOGUES
|
||||
Probablement.
|
||||
Voir ":help todo" pour consulter la liste des problèmes connus.
|
||||
.PP
|
||||
NOTE : Remarquez que bon nombre de points, qui pourraient être considérés comme
|
||||
des bugs par certains, sont en fait dus à une reproduction trop fidèle
|
||||
du comportement de Vi. Et si vous pensez que d'autres points sont des
|
||||
bugs "parce que Vi le fait différemment", vous devriez jeter un oeil
|
||||
attentif au fichier vi_diff.txt (ou taper ":help vi_diff.txt" dans Vim).
|
||||
Regardez aussi les options 'compatible' et 'coptions'.
|
||||
.SH TRADUCTION
|
||||
Cette page de manuel a été traduite par Richard Hitier.
|
||||
<richard.hitier@dial.oleane.com> 2000-08-07.
|
||||
.br
|
||||
Cette page de manuel a été mise à jour par David Blanchet.
|
||||
<david.blanchet@free.fr> 2005-01-17.
|
||||
|
||||
@@ -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*
|
||||
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -68,6 +68,9 @@ inactive no no ' '
|
||||
Note: All CTRL-W commands can also be executed with |:wincmd|, for those
|
||||
places where a Normal mode command can't be used or is inconvenient.
|
||||
|
||||
The main Vim window can hold several split windows. There are also tab pages
|
||||
|tab-page|, each of which can hold multiple windows.
|
||||
|
||||
==============================================================================
|
||||
2. Starting Vim *windows-starting*
|
||||
|
||||
@@ -255,6 +258,9 @@ CTRL-W c *CTRL-W_c* *:clo* *:close*
|
||||
:clo[se][!] Close current window. When the 'hidden' option is set, or
|
||||
when the buffer was changed and the [!] is used, the buffer
|
||||
becomes hidden (unless there is another window editing it).
|
||||
When there is only one window in the current tab page and
|
||||
there is another tab page, this closes the current tab page.
|
||||
|tab-page|.
|
||||
This command fails when: *E444*
|
||||
- There is only one window on the screen.
|
||||
- When 'hidden' is not set, [!] is not used, the buffer has
|
||||
@@ -271,6 +277,8 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
|
||||
:hid[e] Quit current window, unless it is the last window on the
|
||||
screen. The buffer becomes hidden (unless there is another
|
||||
window editing it or 'bufhidden' is "unload" or "delete").
|
||||
If the window is the last one in the current tab page the tab
|
||||
page is closed. |tab-page|
|
||||
The value of 'hidden' is irrelevant for this command.
|
||||
Changes to the buffer are not written and won't get lost, so
|
||||
this is a "safe" command.
|
||||
@@ -551,6 +559,9 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
Rearrange the screen to open one window for each argument.
|
||||
All other windows are closed. When a count is given, this is
|
||||
the maximum number of windows to open.
|
||||
With the |:tab| modifier open a tab page for each argument.
|
||||
When there are more arguments than 'tabpagemax' further ones
|
||||
become split windows in the last tab page.
|
||||
When the 'hidden' option is set, all buffers in closed windows
|
||||
become hidden.
|
||||
When 'hidden' is not set, and the 'autowrite' option is set,
|
||||
@@ -620,7 +631,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
CTRL-W w
|
||||
:{cmd}
|
||||
etc.
|
||||
< When an error is detected on one window, further
|
||||
< This only operates in the current tab page.
|
||||
When an error is detected on one window, further
|
||||
windows will not be visited.
|
||||
The last window (or where an error occurred) becomes
|
||||
the current window.
|
||||
@@ -628,7 +640,7 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
{cmd} must not open or close windows or reorder them.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:argdo| and |:bufdo|.
|
||||
Also see |:tabdo|, |:argdo| and |:bufdo|.
|
||||
|
||||
*:bufdo*
|
||||
:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list.
|
||||
@@ -654,7 +666,7 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
each buffer.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:argdo| and |:windo|.
|
||||
Also see |:tabdo|, |:argdo| and |:windo|.
|
||||
|
||||
Examples: >
|
||||
|
||||
@@ -704,6 +716,11 @@ CTRL-W CTRL-F Split current window in two. Edit file name under cursor.
|
||||
{not available when the |+file_in_path| feature was disabled
|
||||
at compile time}
|
||||
|
||||
CTRL-W F *CTRL-W_F*
|
||||
Split current window in two. Edit file name under cursor and
|
||||
jump to the line number following the file name. See |gF| for
|
||||
details on how the line number is obtained.
|
||||
|
||||
Also see |CTRL-W_CTRL-I|: open window for an included file that includes
|
||||
the keyword under the cursor.
|
||||
|
||||
@@ -939,9 +956,10 @@ list of buffers. |unlisted-buffer|
|
||||
:bw[ipeout][!] {bufname}
|
||||
:N,Mbw[ipeout][!]
|
||||
:bw[ipeout][!] N1 N2 ...
|
||||
Like |:bdelete|, but really delete the buffer. All marks in
|
||||
this buffer become invalid, option settings are lost, etc.
|
||||
Don't use this unless you know what you are doing.
|
||||
Like |:bdelete|, but really delete the buffer. Everything
|
||||
related to the buffer is lost. All marks in this buffer
|
||||
become invalid, option settings are lost, etc. Don't use this
|
||||
unless you know what you are doing.
|
||||
|
||||
:[N]bun[load][!] *:bun* *:bunload* *E515*
|
||||
:bun[load][!] [N]
|
||||
@@ -992,9 +1010,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 [!].
|
||||
@@ -1071,6 +1091,8 @@ list of buffers. |unlisted-buffer|
|
||||
of windows opened ('winwidth' if |:vertical| was prepended).
|
||||
Buf/Win Enter/Leave autocommands are not executed for the new
|
||||
windows here, that's only done when they are really entered.
|
||||
When the |:tab| modifier is used new windows are opended in a
|
||||
new tab, up to 'tabpagemax'.
|
||||
|
||||
Note: All the commands above that start editing another buffer, keep the
|
||||
'readonly' flag as it was. This differs from the ":edit" command, which sets
|
||||
@@ -1089,9 +1111,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 +1123,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 +1142,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:
|
||||
|
||||
@@ -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 Mar 01
|
||||
|
||||
" 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
|
||||
|
||||
@@ -888,6 +891,9 @@ au BufNewFile,BufRead *.mf setf mf
|
||||
" MetaPost
|
||||
au BufNewFile,BufRead *.mp setf mp
|
||||
|
||||
" MGL
|
||||
au BufNewFile,BufRead *.mgl setf mgl
|
||||
|
||||
" MMIX or VMS makefile
|
||||
au BufNewFile,BufRead *.mms call s:FTmms()
|
||||
|
||||
@@ -1291,6 +1297,9 @@ au BufNewFile,BufRead *.rexx,*.rex setf rexx
|
||||
" R (Splus)
|
||||
au BufNewFile,BufRead *.s,*.S setf r
|
||||
|
||||
" R Help file
|
||||
au BufNewFile,BufRead *.rd,*.Rd setf rd
|
||||
|
||||
" Rexx, Rebol or R
|
||||
au BufNewFile,BufRead *.r,*.R call s:FTr()
|
||||
|
||||
@@ -1652,19 +1661,29 @@ au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
||||
au BufNewFile,BufRead *.tex call s:FTtex()
|
||||
|
||||
fun! s:FTtex()
|
||||
let n = 1
|
||||
while n < 10 && n < line("$")
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\)'
|
||||
setf tex
|
||||
return
|
||||
elseif line =~ '^\s*\\\%(start\l\+\|setup\l\+\|usemodule\)\>'
|
||||
setf context
|
||||
return
|
||||
let lnum = 1
|
||||
let checked = 0
|
||||
while checked < 25 && lnum < line("$")
|
||||
let line = getline(lnum)
|
||||
if line !~ '^\s*%'
|
||||
if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\)'
|
||||
setf tex
|
||||
return
|
||||
elseif line =~ '^\s*\\\%(start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\)\>'
|
||||
setf context
|
||||
return
|
||||
endif
|
||||
let checked = checked + 1
|
||||
endif
|
||||
let n = n + 1
|
||||
let lnum = lnum + 1
|
||||
endwhile
|
||||
setf tex
|
||||
|
||||
" Didn't recognize anything, guess.
|
||||
if exists("g:tex_flavour") && g:tex_flavour == "context"
|
||||
setf context
|
||||
else
|
||||
setf tex
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Context
|
||||
|
||||
13
runtime/ftplugin/javascript.vim
Normal file
13
runtime/ftplugin/javascript.vim
Normal 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
|
||||
@@ -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)
|
||||
|
||||
|
||||
30
runtime/ftplugin/matlab.vim
Normal file
30
runtime/ftplugin/matlab.vim
Normal 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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: VHDL
|
||||
" Maintainer: R.Shankar (shankar at txc.stpn.soft.net)
|
||||
" Last Change: Tue Oct 8
|
||||
|
||||
" VHDL filetype plugin
|
||||
" Language: VHDL
|
||||
" Maintainer: R.Shankar <shankar.r?freescale.com>
|
||||
" Modified By: Gerald Lai <laigera+vim?gmail.com>
|
||||
" Last Change: 2006 Feb 16
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -20,7 +20,7 @@ let b:did_ftplugin = 1
|
||||
"setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
setlocal tw=75
|
||||
"setlocal tw=75
|
||||
|
||||
set cpo-=C
|
||||
|
||||
@@ -34,8 +34,51 @@ set cpo-=C
|
||||
if ! exists("b:match_words") && exists("loaded_matchit")
|
||||
let b:match_ignorecase=1
|
||||
let s:notend = '\%(\<end\s\+\)\@<!'
|
||||
let b:match_words=
|
||||
\ s:notend . '\<if\>:\<elsif\>:\<else\>:\<end\>\s\+\<if\>,' .
|
||||
\ s:notend . '\<case\>:\<when\>:\<end\>\s\+\<case\>,' .
|
||||
\ s:notend . '\<process\>:\<end\>\s\+\<process\>'
|
||||
let b:match_words =
|
||||
\ s:notend.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'.
|
||||
\ s:notend.'\<case\>:\<when\>:\<end\s\+case\>,'.
|
||||
\ s:notend.'\<loop\>:\<end\s\+loop\>,'.
|
||||
\ s:notend.'\<for\>:\<end\s\+for\>,'.
|
||||
\ s:notend.'\<generate\>:\<end\s\+generate\>,'.
|
||||
\ s:notend.'\<record\>:\<end\s\+record\>,'.
|
||||
\ s:notend.'\<units\>:\<end\s\+units\>,'.
|
||||
\ s:notend.'\<process\>:\<end\s\+process\>,'.
|
||||
\ s:notend.'\<block\>:\<end\s\+block\>,'.
|
||||
\ s:notend.'\<function\>:\<end\s\+function\>,'.
|
||||
\ s:notend.'\<entity\>:\<end\s\+entity\>,'.
|
||||
\ s:notend.'\<component\>:\<end\s\+component\>,'.
|
||||
\ s:notend.'\<architecture\>:\<end\s\+architecture\>,'.
|
||||
\ s:notend.'\<package\>:\<end\s\+package\>,'.
|
||||
\ s:notend.'\<procedure\>:\<end\s\+procedure\>,'.
|
||||
\ s:notend.'\<configuration\>:\<end\s\+configuration\>'
|
||||
endif
|
||||
|
||||
" count repeat
|
||||
function! <SID>CountWrapper(cmd)
|
||||
let i = v:count1
|
||||
if a:cmd[0] == ":"
|
||||
while i > 0
|
||||
execute a:cmd
|
||||
let i = i - 1
|
||||
endwhile
|
||||
else
|
||||
execute "normal! gv\<Esc>"
|
||||
execute "normal ".i.a:cmd
|
||||
let curcol = col(".")
|
||||
let curline = line(".")
|
||||
normal! gv
|
||||
call cursor(curline, curcol)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" explore motion
|
||||
" 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\)'
|
||||
noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
|
||||
noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
|
||||
noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
|
||||
noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
|
||||
vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR>
|
||||
vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR>
|
||||
vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR>
|
||||
vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR>
|
||||
|
||||
@@ -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
|
||||
|
||||
464
runtime/indent/vhdl.vim
Normal file
464
runtime/indent/vhdl.vim
Normal file
@@ -0,0 +1,464 @@
|
||||
" VHDL indent ('93 syntax)
|
||||
" Language: VHDL
|
||||
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
|
||||
" Version: 1.34
|
||||
" Last Change: 2006 Feb 11
|
||||
" 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,=~--
|
||||
|
||||
" count repeat
|
||||
function! <SID>CountWrapper(cmd)
|
||||
let i = v:count1
|
||||
if a:cmd[0] == ":"
|
||||
while i > 0
|
||||
execute a:cmd
|
||||
let i = i - 1
|
||||
endwhile
|
||||
else
|
||||
execute "normal! gv\<Esc>"
|
||||
execute "normal ".i.a:cmd
|
||||
let curcol = col(".")
|
||||
let curline = line(".")
|
||||
normal! gv
|
||||
call cursor(curline, curcol)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" explore motion
|
||||
" 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\)'
|
||||
noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
|
||||
noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
|
||||
noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
|
||||
noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
|
||||
vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR>
|
||||
vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR>
|
||||
vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR>
|
||||
vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 25
|
||||
|
||||
" 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.
|
||||
@@ -98,6 +98,7 @@ endfun
|
||||
" File menu
|
||||
an 10.310 &File.&Open\.\.\.<Tab>:e :browse confirm e<CR>
|
||||
an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp :browse sp<CR>
|
||||
an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew :browse tabnew<CR>
|
||||
an 10.325 &File.&New<Tab>:enew :confirm enew<CR>
|
||||
an <silent> 10.330 &File.&Close<Tab>:close
|
||||
\ :if winheight(2) < 0 <Bar>
|
||||
@@ -140,14 +141,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 +1035,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 +1047,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'")
|
||||
|
||||
99
runtime/plugin/matchparen.vim
Normal file
99
runtime/plugin/matchparen.vim
Normal file
@@ -0,0 +1,99 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Mar 03
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
" - when 'compatible' is set
|
||||
" - the "CursorMoved" autocmd event is not availble.
|
||||
if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_matchparen = 1
|
||||
|
||||
augroup matchparen
|
||||
" Replace all matchparen autocommands
|
||||
autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair()
|
||||
augroup END
|
||||
|
||||
let s:paren_hl_on = 0
|
||||
|
||||
" Skip the rest if it was already done.
|
||||
if exists("*s:Highlight_Matching_Pair")
|
||||
finish
|
||||
endif
|
||||
|
||||
" The function that is invoked (very often) to define a ":match" highlighting
|
||||
" for any matching paren.
|
||||
function! s:Highlight_Matching_Pair()
|
||||
" Remove any previous match.
|
||||
if s:paren_hl_on
|
||||
3match none
|
||||
let s:paren_hl_on = 0
|
||||
endif
|
||||
|
||||
" Get the character under the cursor and check if it's in 'matchpairs'.
|
||||
let c_lnum = line('.')
|
||||
let c_col = col('.')
|
||||
let before = 0
|
||||
|
||||
let c = getline(c_lnum)[c_col - 1]
|
||||
let plist = split(&matchpairs, ':\|,')
|
||||
let i = index(plist, c)
|
||||
if i < 0
|
||||
" not found, in Insert mode try character before the cursor
|
||||
if c_col > 1 && (mode() == 'i' || mode() == 'R')
|
||||
let before = 1
|
||||
let c = getline(c_lnum)[c_col - 2]
|
||||
let i = index(plist, c)
|
||||
endif
|
||||
if i < 0
|
||||
" not found, nothing to do
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
" Figure out the arguments for searchpairpos().
|
||||
" Restrict the search to visible lines with "stopline".
|
||||
if i % 2 == 0
|
||||
let s_flags = 'nW'
|
||||
let c2 = plist[i + 1]
|
||||
let stopline = line('w$')
|
||||
else
|
||||
let s_flags = 'nbW'
|
||||
let c2 = c
|
||||
let c = plist[i - 1]
|
||||
let stopline = line('w0')
|
||||
endif
|
||||
if c == '['
|
||||
let c = '\['
|
||||
let c2 = '\]'
|
||||
endif
|
||||
|
||||
" When not in a string or comment ignore matches inside them.
|
||||
let s_skip ='synIDattr(synID(c_lnum, c_col - before, 0), "name") ' .
|
||||
\ '=~? "string\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
" Find the match. When it was just before the cursor move it there for a
|
||||
" moment.
|
||||
if before > 0
|
||||
let save_cursor = getpos('.')
|
||||
call cursor(c_lnum, c_col - before)
|
||||
endif
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
|
||||
if before > 0
|
||||
call setpos('.', save_cursor)
|
||||
endif
|
||||
|
||||
" If a match is found setup match highlighting.
|
||||
if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
|
||||
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
|
||||
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
let s:paren_hl_on = 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Define commands that will disable and enable the plugin.
|
||||
command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen
|
||||
command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved
|
||||
@@ -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
|
||||
|
||||
15
runtime/plugin/spellfile.vim
Normal file
15
runtime/plugin/spellfile.vim
Normal 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>'))
|
||||
@@ -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 =~ '^--- ')
|
||||
|
||||
22
runtime/spell/cleanadd.vim
Normal file
22
runtime/spell/cleanadd.vim
Normal 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
BIN
runtime/spell/en.ascii.sug
Normal file
Binary file not shown.
Binary file not shown.
BIN
runtime/spell/en.latin1.sug
Normal file
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
BIN
runtime/spell/en.utf-8.sug
Normal file
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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...
|
||||
|
||||
|
||||
@@ -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
|
||||
+
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** sv_SE.orig.aff Wed Aug 31 21:00:19 2005
|
||||
--- sv_SE.aff Fri Sep 30 14:09:19 2005
|
||||
*** sv_SE.orig.aff 2003-08-14 14:00:32.000000000 +0200
|
||||
--- sv_SE.aff 2006-02-21 20:33:31.687500000 +0100
|
||||
***************
|
||||
*** 6,7 ****
|
||||
--- 6,22 ----
|
||||
@@ -139,547 +139,82 @@
|
||||
+ SAL <20> E
|
||||
+ SAL <20>G(IE)-6 <09>K # vokal+g(ie) ger ej j-ljud
|
||||
+ SAL <20> <09>
|
||||
*** sv_SE.orig.dic 2003-08-14 13:02:06.000000000 +0200
|
||||
--- sv_SE.dic 2005-10-15 18:15:52.171875000 +0200
|
||||
*** sv_SE.orig.dic 2003-08-14 14:02:06.000000000 +0200
|
||||
--- sv_SE.dic 2006-02-23 18:39:11.218750000 +0100
|
||||
***************
|
||||
*** 108,113 ****
|
||||
--- 108,114 ----
|
||||
adoption/ADHS
|
||||
adoptivbarn/BDS
|
||||
adoptivson/ADS
|
||||
+ adr.
|
||||
adrenalin/BS
|
||||
adress/DHS
|
||||
adressat/ADHS
|
||||
***************
|
||||
*** 608,613 ****
|
||||
--- 609,615 ----
|
||||
anl<6E>ps/S
|
||||
anl<6E>pta/JRS
|
||||
anm
|
||||
+ anm.
|
||||
anmaning/ADGS
|
||||
anmoda/ABCDEFMNPS
|
||||
anmodande/ACEFS
|
||||
***************
|
||||
*** 973,978 ****
|
||||
--- 975,981 ----
|
||||
arrogant/OS
|
||||
arsenal/DHS
|
||||
arsenik/DS
|
||||
+ art.
|
||||
art/ADHOS
|
||||
arta/CHJMNPS
|
||||
artefakt/DHS
|
||||
***************
|
||||
*** 1094,1099 ****
|
||||
--- 1097,1103 ----
|
||||
audiens/DHS
|
||||
auditorie/CIS
|
||||
auditorium/JS
|
||||
+ aug.
|
||||
August/A
|
||||
augusti/AS
|
||||
auktion/ADHS
|
||||
***************
|
||||
*** 2376,2381 ****
|
||||
--- 2380,2386 ----
|
||||
bikupa/AEGS
|
||||
bikupe/S
|
||||
bikups/S
|
||||
+ bil.
|
||||
bil/ADGS
|
||||
bila/EGIJOS
|
||||
bilaga/EGOS
|
||||
***************
|
||||
*** 2490,2495 ****
|
||||
--- 2495,2501 ----
|
||||
Bj<42>rn
|
||||
bj<62>rn/ADGS
|
||||
Bj<42>rns
|
||||
+ bl.a.
|
||||
bla/JS
|
||||
black/DGS
|
||||
blackout/DHS
|
||||
***************
|
||||
*** 3645,3650 ****
|
||||
--- 3651,3657 ----
|
||||
debut/ADHS
|
||||
debutant/DHS
|
||||
debutera/JMS
|
||||
+ dec.
|
||||
december/AS
|
||||
decennie/CIS
|
||||
decennium/AJS
|
||||
***************
|
||||
*** 4117,4122 ****
|
||||
--- 4124,4130 ----
|
||||
dotterson/ADS
|
||||
Douglas
|
||||
dov/OPS
|
||||
+ dr
|
||||
dra/AJS
|
||||
drabant/DHS
|
||||
drabba/ACMNPS
|
||||
***************
|
||||
*** 4315,4321 ****
|
||||
duven/MS
|
||||
dvala/EGJS
|
||||
*** 4317,4319 ****
|
||||
dvaldes/S
|
||||
! dvs
|
||||
dv<64>ljas/S
|
||||
dv<64>ljes/S
|
||||
dv<64>ljs/NS
|
||||
--- 4323,4330 ----
|
||||
duven/MS
|
||||
dvala/EGJS
|
||||
--- 4317,4319 ----
|
||||
dvaldes/S
|
||||
! dvs.
|
||||
! d.v.s.
|
||||
! #dvs Removed by Stefan.
|
||||
dv<64>ljas/S
|
||||
dv<64>ljes/S
|
||||
dv<64>ljs/NS
|
||||
***************
|
||||
*** 4463,4468 ****
|
||||
--- 4472,4478 ----
|
||||
Ebbas
|
||||
Ecuador/A
|
||||
ed/ADHS
|
||||
+ e.d.
|
||||
Edberg/A
|
||||
eder/AJMS
|
||||
Edit/A
|
||||
***************
|
||||
*** 4612,4617 ****
|
||||
--- 4622,4628 ----
|
||||
ekorre/AEGS
|
||||
ekosystem/BDS
|
||||
ekos<6F>ndning/ADGS
|
||||
*** 24490 ****
|
||||
--- 24490,24554 ----
|
||||
<EFBFBD>vila/MS
|
||||
+
|
||||
+ # Additions by Stefan:
|
||||
+ SEK
|
||||
+ adr.
|
||||
+ anm.
|
||||
+ art.
|
||||
+ aug.
|
||||
+ bl.a.
|
||||
+ d.v.s.
|
||||
+ dec.
|
||||
+ dr
|
||||
+ dvs.
|
||||
+ e.Kr.
|
||||
eksem/BDS
|
||||
Eksj<73>/A
|
||||
ekumenik/DS
|
||||
***************
|
||||
*** 4825,4830 ****
|
||||
--- 4836,4842 ----
|
||||
enkrona/EGS
|
||||
enk<6E>t/DHS
|
||||
Enk<6E>ping/A
|
||||
+ e.d.
|
||||
+ enl.
|
||||
enlighet/S
|
||||
enligt/S
|
||||
enorm/OPS
|
||||
***************
|
||||
*** 4990,4995 ****
|
||||
--- 5002,5008 ----
|
||||
etanol/DS
|
||||
etapp/DHS
|
||||
etc
|
||||
+ etc.
|
||||
etcetera/S
|
||||
eten/BDS
|
||||
eter/ES
|
||||
***************
|
||||
*** 5334,5341 ****
|
||||
--- 5347,5356 ----
|
||||
favorisera/ACDMNPS
|
||||
favorit/ADHS
|
||||
fav<61>r/DHS
|
||||
+ f.d.
|
||||
fe/EFHS
|
||||
feber/ES
|
||||
+ febr.
|
||||
febril/MOPS
|
||||
februari/AS
|
||||
federal/MOS
|
||||
***************
|
||||
*** 5451,5456 ****
|
||||
--- 5466,5472 ----
|
||||
fiffla/ACDMNS
|
||||
fifflar/DJQS
|
||||
fifflare/AEJS
|
||||
+ fig.
|
||||
figur/ADHS
|
||||
figurativ/OS
|
||||
figurera/ACJMNPS
|
||||
***************
|
||||
*** 5635,5640 ****
|
||||
--- 5651,5657 ----
|
||||
fj<66>sk/ABS
|
||||
fj<66>ska/JMS
|
||||
fj<66>ttra/CMNPS
|
||||
+ f.Kr.
|
||||
flack/OPS
|
||||
flacka/ABCDJMNS
|
||||
fladder/CS
|
||||
***************
|
||||
*** 5913,5918 ****
|
||||
--- 5930,5936 ----
|
||||
fortplanta/ACMNPS
|
||||
fortplantning/ADGS
|
||||
fortran/S
|
||||
+ forts.
|
||||
fortsatt/OQS
|
||||
fortskrida/KS
|
||||
forts<74>tta/AJS
|
||||
***************
|
||||
*** 6075,6080 ****
|
||||
--- 6093,6099 ----
|
||||
fras/DHS
|
||||
frasa/BDHJMS
|
||||
frasering/ADS
|
||||
+ fre.
|
||||
fred/ADS
|
||||
freda/ACJMNPS
|
||||
fredag/ADGS
|
||||
***************
|
||||
*** 6170,6175 ****
|
||||
--- 6189,6195 ----
|
||||
frivol/MOS
|
||||
froda/ACMNPS
|
||||
frodig/OS
|
||||
+ fr.o.m.
|
||||
from/KLMNS
|
||||
fromhet/ADS
|
||||
fromt/S
|
||||
***************
|
||||
*** 6453,6458 ****
|
||||
--- 6473,6479 ----
|
||||
f<>stman/AFS
|
||||
f<>stm<74>/AEIS
|
||||
f<>stning/ADGS
|
||||
+ f.d.
|
||||
+ f.n.
|
||||
+ f.<2E>.
|
||||
f<>da/ADEJKLRS
|
||||
f<>dd/OQS
|
||||
f<>delse/AES
|
||||
***************
|
||||
*** 10493,10498 ****
|
||||
--- 10514,10520 ----
|
||||
Jan/A
|
||||
Janne/A
|
||||
Janos
|
||||
+ febr.
|
||||
+ fig.
|
||||
+ fil.kand.
|
||||
+ fil.lic.
|
||||
+ forts.
|
||||
+ fr.o.m.
|
||||
+ fre.
|
||||
+ jan.
|
||||
januari/AS
|
||||
japan/DHS
|
||||
Japans
|
||||
***************
|
||||
*** 10520,10525 ****
|
||||
--- 10542,10548 ----
|
||||
jetflyg/ABS
|
||||
jetmotor/EHS
|
||||
jetplan/ABDS
|
||||
+ jfr
|
||||
jiddisch/DS
|
||||
Jimmy/A
|
||||
jippo/ACES
|
||||
***************
|
||||
*** 10870,10875 ****
|
||||
--- 10893,10899 ----
|
||||
kaos/BS
|
||||
kaotisk/OS
|
||||
Kap
|
||||
+ kap.
|
||||
kap/BDS
|
||||
kapa/ACJMNPS
|
||||
kapabel/KMS
|
||||
***************
|
||||
*** 11119,11124 ****
|
||||
--- 11143,11149 ----
|
||||
Kjell/A
|
||||
kjol/ADGS
|
||||
kjortel/EIS
|
||||
+ kl.
|
||||
kl
|
||||
klack/DGS
|
||||
klacka/IJMS
|
||||
***************
|
||||
*** 13445,13450 ****
|
||||
--- 13470,13476 ----
|
||||
l<>pning/ADGS
|
||||
l<>psedel/AEIS
|
||||
l<>ptid/DS
|
||||
+ l<>r.
|
||||
l<>rdag/ADGS
|
||||
l<>s/AORS
|
||||
l<>sa/ABDJKLQRS
|
||||
***************
|
||||
*** 13783,13788 ****
|
||||
--- 13809,13815 ----
|
||||
Mauretanien/A
|
||||
Mauritius
|
||||
mausoleum/JS
|
||||
+ max.
|
||||
max
|
||||
maxim/DHS
|
||||
maximal/MOS
|
||||
***************
|
||||
*** 13965,13970 ****
|
||||
--- 13992,13998 ----
|
||||
mexikan/DHS
|
||||
mexikanska/AEGS
|
||||
Mexiko/A
|
||||
+ m.fl.
|
||||
mg
|
||||
MHz
|
||||
Michael/A
|
||||
***************
|
||||
*** 14016,14021 ****
|
||||
--- 14044,14050 ----
|
||||
milsl<73>ng/OS
|
||||
milstolpe/AEGS
|
||||
mimosa/AES
|
||||
+ min.
|
||||
min/ACDFHS
|
||||
mina/HJS
|
||||
minderv<72>rdig/OQRS
|
||||
***************
|
||||
*** 14136,14141 ****
|
||||
--- 14165,14171 ----
|
||||
mj<6D>lnar/DJQS
|
||||
mj<6D>lnare/AEJS
|
||||
ml
|
||||
+ m.m.
|
||||
mm
|
||||
mo/AEGS
|
||||
mobba/ACMNPS
|
||||
***************
|
||||
*** 14539,14544 ****
|
||||
--- 14569,14575 ----
|
||||
m<>lstyrd/OS
|
||||
m<>ls<6C>ttning/ADGS
|
||||
m<>ltid/ADHS
|
||||
+ max.
|
||||
+ min.
|
||||
+ m<>n.
|
||||
m<>n/DGQS
|
||||
m<>na/IJMPRS
|
||||
m<>nad/ADHQS
|
||||
***************
|
||||
*** 14792,14797 ****
|
||||
--- 14823,14830 ----
|
||||
neutron/DHS
|
||||
nev<65>/ES
|
||||
New
|
||||
+ ngn
|
||||
+ ngt
|
||||
nia/EGJQS
|
||||
Nicaragua/A
|
||||
nick/DGS
|
||||
***************
|
||||
*** 14920,14931 ****
|
||||
--- 14953,14966 ----
|
||||
notifikation/ADS
|
||||
notis/DHS
|
||||
notorisk/OS
|
||||
+ nov.
|
||||
nova/AES
|
||||
novell/DHS
|
||||
novellmagasin/ABDS
|
||||
novellsamling/ADGS
|
||||
november/AS
|
||||
novis/DHS
|
||||
+ nr.
|
||||
nr
|
||||
nu/BS
|
||||
nubb/S
|
||||
***************
|
||||
*** 15243,15248 ****
|
||||
--- 15278,15284 ----
|
||||
obrottslig/OS
|
||||
obrukbar/MOS
|
||||
obruten/MS
|
||||
+ obs.
|
||||
obs
|
||||
observant/OPS
|
||||
observation/ADHS
|
||||
***************
|
||||
*** 15470,15475 ****
|
||||
--- 15506,15512 ----
|
||||
okonventionell/MOS
|
||||
okritisk/OS
|
||||
okryddade/OS
|
||||
+ okt.
|
||||
oktagon/HS
|
||||
oktal/MOS
|
||||
oktav/DHS
|
||||
***************
|
||||
*** 15741,15746 ****
|
||||
--- 15778,15784 ----
|
||||
onjutbar/MOS
|
||||
onkel/AES
|
||||
onormal/MOS
|
||||
+ ons.
|
||||
onsdag/ADGS
|
||||
onyanserade/OS
|
||||
onykter/MS
|
||||
***************
|
||||
*** 15977,15983 ****
|
||||
--- 16015,16023 ----
|
||||
ostrukturerade/OS
|
||||
ost<73>rd/OS
|
||||
osund/OS
|
||||
+ osv.
|
||||
osv
|
||||
+ o.s.v.
|
||||
osvensk/OS
|
||||
osviklig/OPS
|
||||
osympatisk/OPQS
|
||||
***************
|
||||
*** 16378,16383 ****
|
||||
--- 16418,16424 ----
|
||||
petitum/ES
|
||||
Petra/A
|
||||
Pettersson/A
|
||||
+ obs.
|
||||
+ okt.
|
||||
+ ons.
|
||||
+ osv.
|
||||
+ p.g.a.
|
||||
pga
|
||||
Philips
|
||||
pi/FS
|
||||
***************
|
||||
*** 17457,17462 ****
|
||||
--- 17498,17504 ----
|
||||
resonabel/MS
|
||||
resonemang/ABDS
|
||||
resonera/ACMNS
|
||||
+ resp.
|
||||
resp/S
|
||||
respekt/S
|
||||
respektabel/LMS
|
||||
***************
|
||||
*** 18328,18333 ****
|
||||
--- 18370,18376 ----
|
||||
sentimentalitet/ADS
|
||||
separat/OS
|
||||
separera/ACMNPS
|
||||
+ sept.
|
||||
september/AS
|
||||
seraf/DHS
|
||||
serenad/DHS
|
||||
***************
|
||||
*** 18652,18657 ****
|
||||
--- 18695,18701 ----
|
||||
sj<73>slag/S
|
||||
sj<73>ss/S
|
||||
sj<73>pig/OS
|
||||
+ s.k.
|
||||
ska/GJMPS
|
||||
skada/ABCDEGJMNPS
|
||||
skadedjur/BDS
|
||||
***************
|
||||
*** 20767,20772 ****
|
||||
--- 20811,20817 ----
|
||||
s<>mnl<6E>s/OQRS
|
||||
s<>mnl<6E>shet/ADS
|
||||
s<>mnmedel/ACFS
|
||||
+ sept.
|
||||
+ s<>n.
|
||||
s<>ndag/ADGS
|
||||
s<>nder/S
|
||||
s<>nderbruten/MS
|
||||
***************
|
||||
*** 20832,20837 ****
|
||||
--- 20877,20883 ----
|
||||
s<>v<EFBFBD>l/S
|
||||
s<>v<EFBFBD>rst/S
|
||||
ta/AKRS
|
||||
+ tab.
|
||||
tabbe/S
|
||||
tabell/DHS
|
||||
tabernaklet/AS
|
||||
***************
|
||||
*** 21063,21068 ****
|
||||
--- 21109,21115 ----
|
||||
testar/DJQS
|
||||
testare/AEJS
|
||||
testning/ADGS
|
||||
+ t.ex.
|
||||
tex
|
||||
Texas
|
||||
text/DHOS
|
||||
***************
|
||||
*** 21336,21341 ****
|
||||
--- 21383,21389 ----
|
||||
tippa/ACMNPS
|
||||
tips/BDS
|
||||
tipsa/ACJMNPS
|
||||
+ tis.
|
||||
tisdag/ADGS
|
||||
tistel/EIS
|
||||
titan/S
|
||||
***************
|
||||
*** 21463,21468 ****
|
||||
--- 21511,21517 ----
|
||||
tolv<6C>rig/OS
|
||||
tolv<6C>rs/S
|
||||
Tom
|
||||
+ t.o.m.
|
||||
tom/LMS
|
||||
Tomas
|
||||
tomat/DHS
|
||||
***************
|
||||
*** 21513,21518 ****
|
||||
--- 21562,21568 ----
|
||||
torped/ADHS
|
||||
torpedb<64>t/ADGS
|
||||
torr/MOPS
|
||||
+ tab.
|
||||
+ tis.
|
||||
+ tors.
|
||||
torsdag/ADGS
|
||||
torsk/DGS
|
||||
Torsten/A
|
||||
***************
|
||||
*** 22359,22364 ****
|
||||
--- 22409,22415 ----
|
||||
uppkomst/DS
|
||||
uppkoppling/ADGS
|
||||
uppkrupen/MS
|
||||
+ u.a.
|
||||
+ uppl.
|
||||
upplaga/AEGOS
|
||||
upplagd/OS
|
||||
upplage/S
|
||||
***************
|
||||
*** 22639,22644 ****
|
||||
--- 22690,22696 ----
|
||||
utf<74>rar/DJQS
|
||||
utf<74>rare/AEJS
|
||||
utf<74>rlig/OPS
|
||||
+ utg.
|
||||
utgallra/ACMNPS
|
||||
utgamla/S
|
||||
utgammal/MS
|
||||
***************
|
||||
*** 23003,23008 ****
|
||||
--- 23055,23061 ----
|
||||
varannan/S
|
||||
varav/S
|
||||
Varberg/A
|
||||
+ vard.
|
||||
varda/BDS
|
||||
vardag/ADGS
|
||||
vardaglig/OPS
|
||||
***************
|
||||
*** 23091,23096 ****
|
||||
--- 23144,23150 ----
|
||||
Vaxholm/A
|
||||
vaxljus/BDS
|
||||
Vaxmora
|
||||
+ vd
|
||||
VD
|
||||
ve/GS
|
||||
veck/ABDS
|
||||
***************
|
||||
*** 23203,23208 ****
|
||||
--- 23257,23264 ----
|
||||
vettl<74>s/OS
|
||||
vev/DS
|
||||
veva/ACJMNPS
|
||||
+ v.g.
|
||||
+ v.g.v.
|
||||
vi/ACEOS
|
||||
vibration/ADHS
|
||||
vibrator/AES
|
||||
***************
|
||||
*** 23416,23421 ****
|
||||
--- 23472,23478 ----
|
||||
VM
|
||||
vokabul<75>r/S
|
||||
vokal/DHS
|
||||
+ vard.
|
||||
+ vd
|
||||
+ vol.
|
||||
volont<6E>r/ADHS
|
||||
volt/S
|
||||
Volvo/A
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim script for testing colors
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Contributors: Rafael Garcia-Suarez, Charles Campbell
|
||||
" Last Change: 2001 Jul 28
|
||||
" Last Change: 2006 Feb 20
|
||||
|
||||
" edit this file, then do ":source %", and check if the colors match
|
||||
|
||||
@@ -52,6 +52,16 @@
|
||||
" lightcyan lightcyan_on_white white_on_lightcyan
|
||||
" lightcyan_on_black black_on_lightcyan
|
||||
|
||||
" Open this file in a window if it isn't edited yet.
|
||||
" Use the current window if it's empty.
|
||||
if expand('%:p') != expand('<sfile>:p')
|
||||
if &mod || line('$') != 1 || getline(1) != ''
|
||||
exe "new " . expand('<sfile>')
|
||||
else
|
||||
exe "edit " . expand('<sfile>')
|
||||
endif
|
||||
endif
|
||||
|
||||
syn clear
|
||||
8
|
||||
while search("_on_", "W") < 55
|
||||
@@ -60,6 +70,5 @@ while search("_on_", "W") < 55
|
||||
exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2
|
||||
exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2
|
||||
endwhile
|
||||
8,55g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")|
|
||||
\ exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>")
|
||||
8,54g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>")
|
||||
nohlsearch
|
||||
|
||||
@@ -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
104
runtime/syntax/eviews.vim
Normal 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user