mirror of
https://github.com/zoriya/vim.git
synced 2026-01-01 20:08:13 +00:00
Compare commits
132 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db552d60ec | ||
|
|
7b5f8325ee | ||
|
|
8ab561d31e | ||
|
|
e580b0c34d | ||
|
|
433f7c88d5 | ||
|
|
76916e60ed | ||
|
|
eee697b748 | ||
|
|
b3656edcb9 | ||
|
|
9b2200acd6 | ||
|
|
0126585dbb | ||
|
|
371d5403d0 | ||
|
|
ceaf7b8b66 | ||
|
|
39f05630ad | ||
|
|
c15ef30c08 | ||
|
|
e0fa560e6f | ||
|
|
2c93230f48 | ||
|
|
97b2ad3542 | ||
|
|
658b74a736 | ||
|
|
8d6ea5eb4f | ||
|
|
be4d506b5f | ||
|
|
f0acfce534 | ||
|
|
ca003e1e4f | ||
|
|
68f1a48647 | ||
|
|
a83c3e0ebd | ||
|
|
ea0cd36bdd | ||
|
|
2eb25daffd | ||
|
|
efd2bf158a | ||
|
|
d3667a2e29 | ||
|
|
cf03447964 | ||
|
|
27dc19509b | ||
|
|
95e9b49537 | ||
|
|
9d47f1707b | ||
|
|
7d47b6eed7 | ||
|
|
5671873089 | ||
|
|
c4675a193d | ||
|
|
db00351723 | ||
|
|
114216c417 | ||
|
|
34e9e2f13d | ||
|
|
a9a568ca77 | ||
|
|
2092d32231 | ||
|
|
1f4d4de1ba | ||
|
|
3b1ddfed51 | ||
|
|
c7d893589e | ||
|
|
af48b0924f | ||
|
|
0ce29937aa | ||
|
|
1e60789f9b | ||
|
|
019ff6825b | ||
|
|
346d743df2 | ||
|
|
35a2e197cf | ||
|
|
3c56a964af | ||
|
|
a1956f6b07 | ||
|
|
17be7e614e | ||
|
|
5316eee835 | ||
|
|
1c8f93ff02 | ||
|
|
b9a02fc557 | ||
|
|
600dddcf66 | ||
|
|
1fc0046932 | ||
|
|
c4956c8d1d | ||
|
|
2b48ad5cd7 | ||
|
|
5baddf0285 | ||
|
|
60f8377e42 | ||
|
|
f71a3db47e | ||
|
|
e48ec1fa6b | ||
|
|
a5b6ad13ef | ||
|
|
eb94e559e0 | ||
|
|
038221bcd0 | ||
|
|
d289f1315f | ||
|
|
c270d806f8 | ||
|
|
96d2c5b5be | ||
|
|
838bb71992 | ||
|
|
0b598c2fda | ||
|
|
d996771378 | ||
|
|
8ee8926785 | ||
|
|
ade0083d3a | ||
|
|
a94bc430e8 | ||
|
|
5c4bab0fe7 | ||
|
|
eca1575717 | ||
|
|
4e42719355 | ||
|
|
1056d98844 | ||
|
|
4ea8fe1d06 | ||
|
|
0fd9289de3 | ||
|
|
a3227e2b15 | ||
|
|
1f35bf9cab | ||
|
|
a203182302 | ||
|
|
362e1a30c6 | ||
|
|
768b8c4dbc | ||
|
|
87b5ca5172 | ||
|
|
36fc535cb1 | ||
|
|
d0131a8bd2 | ||
|
|
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 |
4
Filelist
4
Filelist
@@ -248,6 +248,7 @@ SRC_DOS = \
|
||||
src/Make_mvc.mak \
|
||||
src/Make_w16.mak \
|
||||
src/bigvim.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/dimm.idl \
|
||||
src/dlldata.c \
|
||||
src/dosinst.c \
|
||||
@@ -285,6 +286,7 @@ SRC_DOS = \
|
||||
src/uninstal.c \
|
||||
src/vim.def \
|
||||
src/vim.rc \
|
||||
src/vimio.h \
|
||||
src/gvim.exe.mnf \
|
||||
src/vim16.def \
|
||||
src/vim16.rc \
|
||||
@@ -496,6 +498,7 @@ RT_SCRIPTS = \
|
||||
runtime/filetype.vim \
|
||||
runtime/scripts.vim \
|
||||
runtime/menu.vim \
|
||||
runtime/macmap.vim \
|
||||
runtime/delmenu.vim \
|
||||
runtime/synmenu.vim \
|
||||
runtime/makemenu.vim \
|
||||
@@ -675,6 +678,7 @@ LANG_GEN = \
|
||||
runtime/spell/??/main.aap \
|
||||
runtime/spell/yi/README.txt \
|
||||
runtime/spell/main.aap \
|
||||
runtime/spell/cleanadd.vim \
|
||||
runtime/spell/*.vim \
|
||||
runtime/spell/fixdup \
|
||||
|
||||
|
||||
8
Makefile
8
Makefile
@@ -128,21 +128,24 @@ MINOR = 0aa
|
||||
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
||||
# "uninstald32.exe".
|
||||
# Win32 console version:
|
||||
# - Set environment for Visual C++ 5.0: "vcvars32"
|
||||
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
|
||||
# - "nmake -f Make_mvc.mak"
|
||||
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
|
||||
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
|
||||
# - Rename ObjC/vim.pdb to vimw32.pdb.
|
||||
# - When building the Win32s version later, delete vimrun.exe, install.exe and
|
||||
# uninstal.exe. Otherwise rename executables to installw32.exe and
|
||||
# uninstalw32.exe.
|
||||
# Win32 GUI version:
|
||||
# - "nmake -f Make_mvc.mak GUI=yes.
|
||||
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
|
||||
# - Move ObjC/gvim.pdb to here.
|
||||
# - Delete vimrun.exe, install.exe and uninstall.exe.
|
||||
# - Copy "GvimExt/gvimext.dll" to here.
|
||||
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
|
||||
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
|
||||
# - Rename "gvim.exe" to "gvim_ole.exe".
|
||||
# - Rename ObjC/gvim.pdb to "gvim_ole.pdb".
|
||||
# - Delete install.exe and uninstall.exe.
|
||||
# - If building the Win32s version delete vimrun.exe.
|
||||
# Win32s GUI version:
|
||||
@@ -430,6 +433,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
||||
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
|
||||
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
|
||||
cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
|
||||
cp gvim.pdb dist/gvim$(VERSION).pdb
|
||||
|
||||
# make Win32 console
|
||||
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
|
||||
@@ -446,6 +450,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
|
||||
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
|
||||
cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
|
||||
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
|
||||
|
||||
# make 32bit DOS
|
||||
dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
|
||||
@@ -500,6 +505,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
|
||||
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
|
||||
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
|
||||
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
|
||||
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
|
||||
|
||||
# make Win32s gvim
|
||||
dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
|
||||
|
||||
@@ -4,12 +4,18 @@ These are functions used by plugins and for general use. They will be loaded
|
||||
automatically when the function is invoked. See ":help autoload".
|
||||
|
||||
gzip.vim for editing compressed files
|
||||
netrw.vim browsing (remote) directories and editing remote files
|
||||
netrw*.vim browsing (remote) directories and editing remote files
|
||||
tar.vim browsing tar files
|
||||
zip.vim browsing zip files
|
||||
paste.vim common code for mswin.vim, menu.vim and macmap.vim
|
||||
spellfile.vim downloading of a missing spell file
|
||||
|
||||
Occult completion files:
|
||||
Omni completion files:
|
||||
ccomplete.vim C
|
||||
csscomplete.vim HTML / CSS
|
||||
htmlcomplete.vim HTML
|
||||
|
||||
javascriptcomplete.vim Javascript
|
||||
phpcomplete.vim PHP
|
||||
pycomplete.vim Python
|
||||
syntaxcomplete.vim from syntax highlighting
|
||||
xmlcomplete.vim XML (uses files in the xml directory)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Feb 10
|
||||
" Last Change: 2006 Mar 19
|
||||
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
@@ -64,6 +64,9 @@ function! ccomplete#Complete(findstart, base)
|
||||
return []
|
||||
endif
|
||||
|
||||
" init cache for vimgrep to empty
|
||||
let s:grepCache = {}
|
||||
|
||||
" Split item in words, keep empty word after "." or "->".
|
||||
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
|
||||
" We can't use split, because we need to skip nested [...].
|
||||
@@ -120,10 +123,11 @@ function! ccomplete#Complete(findstart, base)
|
||||
" Completing one word and it's a local variable: May add '[', '.' or
|
||||
" '->'.
|
||||
let match = items[0]
|
||||
if match(line, match . '\s*\[') > 0
|
||||
let kind = 'v'
|
||||
if match(line, '\<' . match . '\s*\[') > 0
|
||||
let match .= '['
|
||||
else
|
||||
let res = s:Nextitem(strpart(line, 0, col), [''], 0)
|
||||
let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1)
|
||||
if len(res) > 0
|
||||
" There are members, thus add "." or "->".
|
||||
if match(line, '\*[ \t(]*' . match . '\>') > 0
|
||||
@@ -133,27 +137,38 @@ function! ccomplete#Complete(findstart, base)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let res = [{'match': match, 'tagline' : ''}]
|
||||
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
|
||||
else
|
||||
" Completing "var.", "var.something", etc.
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0)
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
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)'))
|
||||
let tags = taglist('^' . base)
|
||||
|
||||
" Remove members, these can't appear without something in front.
|
||||
call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
|
||||
|
||||
" Remove static matches in other files.
|
||||
call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])')
|
||||
|
||||
call extend(res, map(tags, 's:Tag2item(v:val)'))
|
||||
endif
|
||||
|
||||
if len(res) == 0
|
||||
" Find the variable in the tags file(s)
|
||||
let diclist = taglist('^' . items[0] . '$')
|
||||
|
||||
" Remove members, these can't appear without something in front.
|
||||
call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
|
||||
|
||||
let res = []
|
||||
for i in range(len(diclist))
|
||||
" New ctags has the "typename" field.
|
||||
if has_key(diclist[i], 'typename')
|
||||
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:]))
|
||||
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1))
|
||||
endif
|
||||
|
||||
" For a variable use the command, which must be a search pattern that
|
||||
@@ -162,7 +177,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:], 0))
|
||||
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1))
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
@@ -173,7 +188,7 @@ 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:], 0)
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
endif
|
||||
|
||||
" If the last item(s) are [...] they need to be added to the matches.
|
||||
@@ -197,7 +212,7 @@ function! s:GetAddition(line, match, memarg, bracket)
|
||||
endif
|
||||
|
||||
" Check if the item has members.
|
||||
if len(s:SearchMembers(a:memarg, [''])) > 0
|
||||
if len(s:SearchMembers(a:memarg, [''], 0)) > 0
|
||||
" If there is a '*' before the name use "->".
|
||||
if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0
|
||||
return '->'
|
||||
@@ -213,17 +228,29 @@ endfunction
|
||||
" 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'])
|
||||
let res = {'match': a:val['name']}
|
||||
|
||||
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
|
||||
|
||||
" Use the whole search command as the "info" entry.
|
||||
let s = matchstr(a:val['cmd'], '/^\s*\zs.*\ze$/')
|
||||
if s != ''
|
||||
let res['info'] = substitute(s, '\\\(.\)', '\1', 'g')
|
||||
endif
|
||||
|
||||
let res['tagline'] = ''
|
||||
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}
|
||||
let kind = a:val['kind']
|
||||
let res['kind'] = kind
|
||||
if kind == 'v'
|
||||
let res['tagline'] = "\t" . a:val['cmd']
|
||||
let res['dict'] = a:val
|
||||
elseif kind == 'f'
|
||||
let res['match'] = a:val['name'] . '('
|
||||
endif
|
||||
endif
|
||||
return {'match': a:val['name'], 'tagline': '', 'extra': x}
|
||||
|
||||
return res
|
||||
endfunction
|
||||
|
||||
" Turn a match item "val" into an item for completion.
|
||||
@@ -231,25 +258,50 @@ endfunction
|
||||
" "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 == '')
|
||||
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
|
||||
let res = {'word': a:val['match'] . a:brackets . add }
|
||||
|
||||
if has_key(a:val, 'info')
|
||||
" Use info from Tag2item().
|
||||
let res['info'] = a:val['info']
|
||||
else
|
||||
" Use the whole search command as the "info" entry.
|
||||
let s = matchstr(line, '\t/^\s*\zs.*\ze$/')
|
||||
if s != ''
|
||||
let res['info'] = substitute(s, '\\\(.\)', '\1', 'g')
|
||||
endif
|
||||
endif
|
||||
|
||||
if has_key(a:val, 'kind')
|
||||
let res['kind'] = a:val['kind']
|
||||
elseif add == '('
|
||||
let res['kind'] = 'f'
|
||||
else
|
||||
let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
|
||||
if s != ''
|
||||
let res['kind'] = s
|
||||
endif
|
||||
endif
|
||||
|
||||
if has_key(a:val, 'extra')
|
||||
return {'word': word, 'menu': a:val['extra']}
|
||||
let res['menu'] = a:val['extra']
|
||||
return res
|
||||
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'))}
|
||||
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
|
||||
endif
|
||||
return {'word': word}
|
||||
return res
|
||||
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 = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
|
||||
let x = substitute(x, '\<' . a:name . '\>', '@@', '')
|
||||
let x = substitute(x, '\\\(.\)', '\1', 'g')
|
||||
let x = x . ' - ' . a:fname
|
||||
elseif a:cmd =~ '^\d*$'
|
||||
@@ -266,7 +318,7 @@ endfunction
|
||||
" 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, depth)
|
||||
function! s:Nextitem(lead, items, depth, all)
|
||||
|
||||
" Use the text up to the variable name and split it in tokens.
|
||||
let tokens = split(a:lead, '\s\+\|\<')
|
||||
@@ -275,9 +327,14 @@ function! s:Nextitem(lead, items, depth)
|
||||
let res = []
|
||||
for tidx in range(len(tokens))
|
||||
|
||||
" Skip tokens starting with a non-ID character.
|
||||
if tokens[tidx] !~ '^\h'
|
||||
continue
|
||||
endif
|
||||
|
||||
" Recognize "struct foobar" and "union foobar".
|
||||
if (tokens[tidx] == 'struct' || tokens[tidx] == 'union') && tidx + 1 < len(tokens)
|
||||
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items)
|
||||
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all)
|
||||
break
|
||||
endif
|
||||
|
||||
@@ -289,20 +346,27 @@ function! s:Nextitem(lead, items, depth)
|
||||
" Use the tags file to find out if this is a typedef.
|
||||
let diclist = taglist('^' . tokens[tidx] . '$')
|
||||
for tagidx in range(len(diclist))
|
||||
let item = diclist[tagidx]
|
||||
|
||||
" New ctags has the "typename" field.
|
||||
if has_key(diclist[tagidx], 'typename')
|
||||
call extend(res, s:StructMembers(diclist[tagidx]['typename'], a:items))
|
||||
if has_key(item, 'typename')
|
||||
call extend(res, s:StructMembers(item['typename'], a:items, a:all))
|
||||
continue
|
||||
endif
|
||||
|
||||
" Only handle typedefs here.
|
||||
if diclist[tagidx]['kind'] != 't'
|
||||
if item['kind'] != 't'
|
||||
continue
|
||||
endif
|
||||
|
||||
" Skip matches local to another file.
|
||||
if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename'])
|
||||
continue
|
||||
endif
|
||||
|
||||
" For old ctags we recognize "typedef struct aaa" and
|
||||
" "typedef union bbb" in the tags file command.
|
||||
let cmd = diclist[tagidx]['cmd']
|
||||
let cmd = item['cmd']
|
||||
let ei = matchend(cmd, 'typedef\s\+')
|
||||
if ei > 1
|
||||
let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<')
|
||||
@@ -317,11 +381,11 @@ function! s:Nextitem(lead, items, depth)
|
||||
endif
|
||||
endfor
|
||||
if name != ''
|
||||
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items))
|
||||
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all))
|
||||
endif
|
||||
elseif a:depth < 10
|
||||
" Could be "typedef other_T some_T".
|
||||
call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1))
|
||||
call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -338,7 +402,9 @@ 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)
|
||||
" When "all" is non-zero find all, otherwise just return 1 if there is any
|
||||
" member.
|
||||
function! s:StructMembers(typename, items, all)
|
||||
" Todo: What about local structures?
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
if fnames == ''
|
||||
@@ -347,21 +413,54 @@ function! s:StructMembers(typename, items)
|
||||
|
||||
let typename = a:typename
|
||||
let qflist = []
|
||||
while 1
|
||||
exe 'silent! vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
|
||||
let qflist = getqflist()
|
||||
if len(qflist) > 0 || match(typename, "::") < 0
|
||||
break
|
||||
let cached = 0
|
||||
if a:all == 0
|
||||
let n = '1' " stop at first found match
|
||||
if has_key(s:grepCache, a:typename)
|
||||
let qflist = s:grepCache[a:typename]
|
||||
let cached = 1
|
||||
endif
|
||||
" No match for "struct:context::name", remove "context::" and try again.
|
||||
let typename = substitute(typename, ':[^:]*::', ':', '')
|
||||
endwhile
|
||||
else
|
||||
let n = ''
|
||||
endif
|
||||
if !cached
|
||||
while 1
|
||||
exe 'silent! ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
|
||||
|
||||
let qflist = getqflist()
|
||||
if len(qflist) > 0 || match(typename, "::") < 0
|
||||
break
|
||||
endif
|
||||
" No match for "struct:context::name", remove "context::" and try again.
|
||||
let typename = substitute(typename, ':[^:]*::', ':', '')
|
||||
endwhile
|
||||
|
||||
if a:all == 0
|
||||
" Store the result to be able to use it again later.
|
||||
let s:grepCache[a:typename] = qflist
|
||||
endif
|
||||
endif
|
||||
|
||||
" Put matching members in matches[].
|
||||
let matches = []
|
||||
for l in qflist
|
||||
let memb = matchstr(l['text'], '[^\t]*')
|
||||
if memb =~ '^' . a:items[0]
|
||||
call add(matches, {'match': memb, 'tagline': l['text']})
|
||||
" Skip matches local to another file.
|
||||
if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*'))
|
||||
let item = {'match': memb, 'tagline': l['text']}
|
||||
|
||||
" Add the kind of item.
|
||||
let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
|
||||
if s != ''
|
||||
let item['kind'] = s
|
||||
if s == 'f'
|
||||
let item['match'] = memb . '('
|
||||
endif
|
||||
endif
|
||||
|
||||
call add(matches, item)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
@@ -380,7 +479,7 @@ function! s:StructMembers(typename, items)
|
||||
|
||||
" More items following. For each of the possible members find the
|
||||
" matching following members.
|
||||
return s:SearchMembers(matches, a:items[idx :])
|
||||
return s:SearchMembers(matches, a:items[idx :], a:all)
|
||||
endif
|
||||
|
||||
" Failed to find anything.
|
||||
@@ -388,7 +487,9 @@ function! s:StructMembers(typename, items)
|
||||
endfunction
|
||||
|
||||
" For matching members, find matches for following items.
|
||||
function! s:SearchMembers(matches, items)
|
||||
" When "all" is non-zero find all, otherwise just return 1 if there is any
|
||||
" member.
|
||||
function! s:SearchMembers(matches, items, all)
|
||||
let res = []
|
||||
for i in range(len(a:matches))
|
||||
let typename = ''
|
||||
@@ -405,18 +506,22 @@ function! s:SearchMembers(matches, items)
|
||||
let typename = matchstr(line, '[^\t]*', e)
|
||||
endif
|
||||
endif
|
||||
|
||||
if typename != ''
|
||||
call extend(res, s:StructMembers(typename, a:items))
|
||||
call extend(res, s:StructMembers(typename, a:items, a:all))
|
||||
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)
|
||||
if e > 0
|
||||
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0))
|
||||
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if a:all == 0 && len(res) > 0
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
endfunc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
let compl_begin = col('.') - 2
|
||||
" Bit risky but JS is rather limited language and local chars shouldn't
|
||||
" fint way into names
|
||||
while start >= 0 && line[start - 1] =~ '\w'
|
||||
while start >= 0 && line[start - 1] =~ '\k'
|
||||
let start -= 1
|
||||
endwhile
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
@@ -120,17 +120,17 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
let stris = striprop + strimeth
|
||||
|
||||
" User created properties
|
||||
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\w"')
|
||||
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\\w\\+\\ze")')
|
||||
call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\k\\+\\ze")')
|
||||
|
||||
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\w"')
|
||||
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\\w\\+\\ze")')
|
||||
call map(user_props2, 'matchstr(v:val, "prototype\\.\\zs\\k\\+\\ze")')
|
||||
let user_props = user_props1 + user_props2
|
||||
|
||||
" HTML DOM properties
|
||||
@@ -394,11 +394,11 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
" for regexp "= /re/"
|
||||
" 4. Make correction for Microsoft.XMLHTTP ActiveXObject
|
||||
" 5. Repeat for external files
|
||||
let object = matchstr(shortcontext, '\zs\w\+\ze\(\[.\{-}\]\)\?\.$')
|
||||
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\w\+\ze')
|
||||
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
|
||||
@@ -413,7 +413,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
if decl_line == 0 && exists("b:js_extfiles")
|
||||
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "'.object.'.\\{-}=\\s*new\\s*"')
|
||||
if len(dext_line) > 0
|
||||
let object_type = matchstr(dext_line[-1], object.'.\{-}=\s*new\s*\zs\w\+\ze')
|
||||
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
|
||||
@@ -532,7 +532,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
" constructs like: var var1, var2, var3 = "something";
|
||||
for i in range(len(variables))
|
||||
let comma_separated = split(variables[i], ',\s*')
|
||||
call map(comma_separated, 'matchstr(v:val, "\\w\\+")')
|
||||
call map(comma_separated, 'matchstr(v:val, "\\k\\+")')
|
||||
let vars += comma_separated
|
||||
endfor
|
||||
|
||||
@@ -540,11 +540,11 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
unlet! vars
|
||||
|
||||
" Add "no var" variables.
|
||||
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\w\\+\\s*="')
|
||||
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, "\\w\\+$")')
|
||||
call map(split_equal, 'matchstr(v:val, "\\k\\+$")')
|
||||
let u_vars += split_equal
|
||||
endfor
|
||||
|
||||
@@ -554,10 +554,20 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
" Get functions
|
||||
let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
|
||||
let arguments = copy(functions)
|
||||
call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\w\\+")')
|
||||
call map(functions, '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, ',')
|
||||
@@ -590,7 +600,26 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
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:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
" netrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Oct 12, 2005
|
||||
" Version: 7
|
||||
" Date: Mar 22, 2006
|
||||
" Version: 8
|
||||
" 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
|
||||
@@ -22,22 +22,27 @@ if exists("g:loaded_netrwFileHandlers") || &cp
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
let g:loaded_netrwFileHandlers= "v7"
|
||||
let g:loaded_netrwFileHandlers= "v8"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#Init: {{{1
|
||||
" This functions is here to allow a call to this function to autoload
|
||||
" the netrwFileHandlers.vim file
|
||||
fun! netrwFileHandlers#Init()
|
||||
" call Dfunc("netrwFileHandlers#Init()")
|
||||
" call Dret("netrwFileHandlers#Init")
|
||||
" netrwFileHandlers#Invoke: {{{2
|
||||
fun! netrwFileHandlers#Invoke(exten,fname)
|
||||
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
|
||||
|
||||
if a:exten != "" && exists("*s:NFH_".a:exten)
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.a:fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
|
||||
return 0
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_html: handles html when the user hits "x" when the {{{1
|
||||
" s:NFH_html: handles html when the user hits "x" when the {{{1
|
||||
" cursor is atop a *.html file
|
||||
fun! netrwFileHandlers#NFH_html(pagefile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_html(".a:pagefile.")")
|
||||
fun! s:NFH_html(pagefile)
|
||||
" call Dfunc("s:NFH_html(".a:pagefile.")")
|
||||
|
||||
let page= substitute(a:pagefile,'^','file://','')
|
||||
|
||||
@@ -48,19 +53,19 @@ fun! netrwFileHandlers#NFH_html(pagefile)
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_html 0")
|
||||
" call Dret("s:NFH_html 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_html 1")
|
||||
" call Dret("s:NFH_html 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_htm: handles html when the user hits "x" when the {{{1
|
||||
" s:NFH_htm: handles html when the user hits "x" when the {{{1
|
||||
" cursor is atop a *.htm file
|
||||
fun! netrwFileHandlers#NFH_htm(pagefile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_htm(".a:pagefile.")")
|
||||
fun! s:NFH_htm(pagefile)
|
||||
" call Dfunc("s:NFH_htm(".a:pagefile.")")
|
||||
|
||||
let page= substitute(a:pagefile,'^','file://','')
|
||||
|
||||
@@ -71,18 +76,18 @@ fun! netrwFileHandlers#NFH_htm(pagefile)
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_htm 0")
|
||||
" call Dret("s:NFH_htm 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_htm 1")
|
||||
" call Dret("s:NFH_htm 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_jpg: {{{1
|
||||
fun! netrwFileHandlers#NFH_jpg(jpgfile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||
" s:NFH_jpg: {{{1
|
||||
fun! s:NFH_jpg(jpgfile)
|
||||
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:jpgfile
|
||||
@@ -90,181 +95,181 @@ fun! netrwFileHandlers#NFH_jpg(jpgfile)
|
||||
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_jpg 0")
|
||||
" call Dret("s:NFH_jpg 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_jpg 1")
|
||||
" call Dret("s:NFH_jpg 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_gif: {{{1
|
||||
fun! netrwFileHandlers#NFH_gif(giffile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_gif(giffile<".a:giffile.">)")
|
||||
" s:NFH_gif: {{{1
|
||||
fun! s:NFH_gif(giffile)
|
||||
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:giffile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_gif 0")
|
||||
" call Dret("s:NFH_gif 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_gif 1")
|
||||
" call Dret("s:NFH_gif 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_png: {{{1
|
||||
fun! netrwFileHandlers#NFH_png(pngfile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_png(pngfile<".a:pngfile.">)")
|
||||
" s:NFH_png: {{{1
|
||||
fun! s:NFH_png(pngfile)
|
||||
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pngfile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_png 0")
|
||||
" call Dret("s:NFH_png 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_png 1")
|
||||
" call Dret("s:NFH_png 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_pnm: {{{1
|
||||
fun! netrwFileHandlers#NFH_pnm(pnmfile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||
" s:NFH_pnm: {{{1
|
||||
fun! s:NFH_pnm(pnmfile)
|
||||
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pnmfile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_pnm 0")
|
||||
" call Dret("s:NFH_pnm 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_pnm 1")
|
||||
" call Dret("s:NFH_pnm 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_bmp: visualize bmp files {{{1
|
||||
fun! netrwFileHandlers#NFH_bmp(bmpfile)
|
||||
" call Dfunc("netrwFileHandlers#NFH_bmp(bmpfile<".a:bmpfile.">)")
|
||||
" s:NFH_bmp: visualize bmp files {{{1
|
||||
fun! s:NFH_bmp(bmpfile)
|
||||
" call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:bmpfile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_bmp 0")
|
||||
" call Dret("s:NFH_bmp 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_bmp 1")
|
||||
" call Dret("s:NFH_bmp 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_pdf: visualize pdf files {{{1
|
||||
fun! netrwFileHandlers#NFH_pdf(pdf)
|
||||
" " call Dfunc("netrwFileHandlers#NFH_pdf(pdf<".a:pdf.">)")
|
||||
" s:NFH_pdf: visualize pdf files {{{1
|
||||
fun! s:NFH_pdf(pdf)
|
||||
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
||||
if executable("gs")
|
||||
exe 'silent! !gs "'.a:pdf.'"'
|
||||
else
|
||||
" " call Dret("netrwFileHandlers#NFH_pdf 0")
|
||||
" call Dret("s:NFH_pdf 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" " call Dret("netrwFileHandlers#NFH_pdf 1")
|
||||
" call Dret("s:NFH_pdf 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_doc: visualize doc files {{{1
|
||||
fun! netrwFileHandlers#NFH_doc(doc)
|
||||
" " call Dfunc("netrwFileHandlers#NFH_doc(doc<".a:doc.">)")
|
||||
" s:NFH_doc: visualize doc files {{{1
|
||||
fun! s:NFH_doc(doc)
|
||||
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:doc.'"'
|
||||
redraw!
|
||||
else
|
||||
" " call Dret("netrwFileHandlers#NFH_doc 0")
|
||||
" call Dret("s:NFH_doc 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" " call Dret("netrwFileHandlers#NFH_doc 1")
|
||||
" call Dret("s:NFH_doc 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_sxw: visualize sxw files {{{1
|
||||
fun! netrwFileHandlers#NFH_sxw(sxw)
|
||||
" " call Dfunc("netrwFileHandlers#NFH_sxw(sxw<".a:sxw.">)")
|
||||
" s:NFH_sxw: visualize sxw files {{{1
|
||||
fun! s:NFH_sxw(sxw)
|
||||
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:sxw.'"'
|
||||
redraw!
|
||||
else
|
||||
" " call Dret("netrwFileHandlers#NFH_sxw 0")
|
||||
" call Dret("s:NFH_sxw 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" " call Dret("netrwFileHandlers#NFH_sxw 1")
|
||||
" call Dret("s:NFH_sxw 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_xls: visualize xls files {{{1
|
||||
fun! netrwFileHandlers#NFH_xls(xls)
|
||||
" " call Dfunc("netrwFileHandlers#NFH_xls(xls<".a:xls.">)")
|
||||
" s:NFH_xls: visualize xls files {{{1
|
||||
fun! s:NFH_xls(xls)
|
||||
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
||||
|
||||
if executable("oocalc")
|
||||
exe 'silent! !oocalc "'.a:xls.'"'
|
||||
redraw!
|
||||
else
|
||||
" " call Dret("netrwFileHandlers#NFH_xls 0")
|
||||
" call Dret("s:NFH_xls 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" " call Dret("netrwFileHandlers#NFH_xls 1")
|
||||
" call Dret("s:NFH_xls 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_ps: handles PostScript files {{{1
|
||||
fun! netrwFileHandlers#NFH_ps(ps)
|
||||
" call Dfunc("netrwFileHandlers#NFH_ps()")
|
||||
" s:NFH_ps: handles PostScript files {{{1
|
||||
fun! s:NFH_ps(ps)
|
||||
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
||||
if executable("gs")
|
||||
" call Decho("exe silent! !gs ".a:ps)
|
||||
exe "silent! !gs ".a:ps
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".a:ps
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
" call Decho("exe silent! !ghostscript ".a:ps)
|
||||
exe "silent! !ghostscript ".a:ps
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
" call Decho("exe silent! !gswin32 \"".a:ps.'"')
|
||||
exe "silent! !gswin32 \"".a:ps.'"'
|
||||
redraw!
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_ps 0")
|
||||
" call Dret("s:NFH_ps 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_ps 1")
|
||||
" call Dret("s:NFH_ps 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_eps: handles encapsulated PostScript files {{{1
|
||||
fun! netrwFileHandlers#NFH_eps(eps)
|
||||
" call Dfunc("netrwFileHandlers#NFH_ps()")
|
||||
" s:NFH_eps: handles encapsulated PostScript files {{{1
|
||||
fun! s:NFH_eps(eps)
|
||||
" call Dfunc("s:NFH_eps()")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".a:eps
|
||||
redraw!
|
||||
@@ -278,40 +283,42 @@ fun! netrwFileHandlers#NFH_eps(eps)
|
||||
exe "silent! !gswin32 \"".a:eps.'"'
|
||||
redraw!
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_ps 0")
|
||||
" call Dret("s:NFH_eps 0")
|
||||
return 0
|
||||
endif
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_fig: handles xfig files {{{1
|
||||
fun! netrwFileHandlers#NFH_fig(fig)
|
||||
" call Dfunc("netrwFileHandlers#NFH_fig()")
|
||||
if executable("xfig")
|
||||
exe "silent! !xfig ".a:fig
|
||||
redraw!
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_fig 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_fig 1")
|
||||
" call Dret("s:NFH_eps 0")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#NFH_obj: handles tgif's obj files {{{1
|
||||
fun! netrwFileHandlers#NFH_obj(obj)
|
||||
" call Dfunc("netrwFileHandlers#NFH_obj()")
|
||||
" s:NFH_fig: handles xfig files {{{1
|
||||
fun! s:NFH_fig(fig)
|
||||
" call Dfunc("s:NFH_fig()")
|
||||
if executable("xfig")
|
||||
exe "silent! !xfig ".a:fig
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_fig 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_fig 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_obj: handles tgif's obj files {{{1
|
||||
fun! s:NFH_obj(obj)
|
||||
" call Dfunc("s:NFH_obj()")
|
||||
if has("unix") && executable("tgif")
|
||||
exe "silent! !tgif ".a:obj
|
||||
redraw!
|
||||
else
|
||||
" call Dret("netrwFileHandlers#NFH_obj 0")
|
||||
" call Dret("s:NFH_obj 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#NFH_obj 1")
|
||||
" call Dret("s:NFH_obj 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Jan 26, 2006
|
||||
" Date: Mar 22, 2006
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 6a ASTRO-ONLY
|
||||
" Version: 6
|
||||
" 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 = "v6a"
|
||||
let g:loaded_netrwSettings = "v6"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwSettings: {{{1
|
||||
@@ -56,10 +56,10 @@ fun! netrwSettings#NetrwSettings()
|
||||
let g:netrw_ignorenetrc= 0
|
||||
endif
|
||||
|
||||
put ='+ --------------------------------------------'
|
||||
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
|
||||
put ='+ Press ? with cursor atop any line for help '
|
||||
put ='+ --------------------------------------------'
|
||||
put ='+ ---------------------------------------------'
|
||||
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
|
||||
put ='+ Press <F1> with cursor atop any line for help'
|
||||
put ='+ ---------------------------------------------'
|
||||
let s:netrw_settings_stop= line(".")
|
||||
|
||||
put =''
|
||||
@@ -96,6 +96,7 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_browsex_viewer = (not defined)'
|
||||
endif
|
||||
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
|
||||
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
|
||||
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
||||
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
||||
put = 'let g:netrw_hide = '.g:netrw_hide
|
||||
@@ -131,7 +132,7 @@ fun! netrwSettings#NetrwSettings()
|
||||
|
||||
set nomod
|
||||
|
||||
map <buffer> <silent> ? :call NetrwSettingHelp()<cr>
|
||||
map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
|
||||
let tmpfile= tempname()
|
||||
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
|
||||
endfun
|
||||
|
||||
39
runtime/autoload/paste.vim
Normal file
39
runtime/autoload/paste.vim
Normal file
@@ -0,0 +1,39 @@
|
||||
" Vim support file to help with paste mappings and menus
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Mar 09
|
||||
|
||||
" Define the string to use for items that are present both in Edit, Popup and
|
||||
" Toolbar menu. Also used in mswin.vim and macmap.vim.
|
||||
|
||||
" Pasting blockwise and linewise selections is not possible in Insert and
|
||||
" Visual mode without the +virtualedit feature. They are pasted as if they
|
||||
" were characterwise instead. Add to that some tricks to leave the cursor in
|
||||
" the right position, also for "gi".
|
||||
if has("virtualedit")
|
||||
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
|
||||
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
|
||||
let paste#paste_cmd['i'] = '<Esc>' . paste#paste_cmd['n'] . 'gi'
|
||||
|
||||
func! paste#Paste()
|
||||
let ove = &ve
|
||||
set ve=all
|
||||
normal! `^
|
||||
if @+ != ''
|
||||
normal! "+gP
|
||||
endif
|
||||
let c = col(".")
|
||||
normal! i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
normal! l
|
||||
endif
|
||||
let &ve = ove
|
||||
endfunc
|
||||
else
|
||||
let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"}
|
||||
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
|
||||
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
|
||||
endif
|
||||
|
||||
if has("virtualedit")
|
||||
else
|
||||
endif
|
||||
4905
runtime/autoload/phpcomplete.vim
Normal file
4905
runtime/autoload/phpcomplete.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,18 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 1.0
|
||||
" Last Change: Sun Jan 08 2006 10:17:51 PM
|
||||
" Version: 1.2
|
||||
" Last Change: Sat Mar 18 2006 8:25:30 PM
|
||||
|
||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||
if exists('&ofu')
|
||||
setlocal ofu=syntaxcomplete#Complete
|
||||
" This check is in place in case this script is
|
||||
" sourced directly instead of using the autoload feature.
|
||||
if exists('+omnifunc')
|
||||
" Do not set the option if already set since this
|
||||
" results in an E117 warning.
|
||||
if &omnifunc == ""
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('g:loaded_syntax_completion')
|
||||
@@ -22,6 +28,7 @@ let s:syn_remove_words = 'match,matchgroup=,contains,'.
|
||||
|
||||
let s:cache_name = []
|
||||
let s:cache_list = []
|
||||
let s:prepended = ''
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! syntaxcomplete#Complete(findstart, base)
|
||||
@@ -62,7 +69,7 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
if list_idx > -1
|
||||
let compl_list = s:cache_list[list_idx]
|
||||
else
|
||||
let compl_list = s:SyntaxList()
|
||||
let compl_list = OmniSyntaxList()
|
||||
let s:cache_name = add( s:cache_name, &filetype )
|
||||
let s:cache_list = add( s:cache_list, compl_list )
|
||||
endif
|
||||
@@ -78,7 +85,7 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
return compl_list
|
||||
endfunc
|
||||
|
||||
function! s:SyntaxList()
|
||||
function! OmniSyntaxList()
|
||||
let saveL = @l
|
||||
|
||||
" Loop through all the syntax groupnames, and build a
|
||||
@@ -86,63 +93,146 @@ function! s:SyntaxList()
|
||||
" work generically for any filetype that does not already
|
||||
" have a plugin defined.
|
||||
" This ASSUMES the syntax groupname BEGINS with the name
|
||||
" of the filetype. From my casual viewing of the vim7\sytax
|
||||
" of the filetype. From my casual viewing of the vim7\syntax
|
||||
" directory.
|
||||
redir @l
|
||||
silent! exec 'syntax list '
|
||||
redir END
|
||||
|
||||
let syntax_groups = @l
|
||||
let syntax_full = "\n".@l
|
||||
let @l = saveL
|
||||
|
||||
if syntax_groups =~ 'E28'
|
||||
\ || syntax_groups =~ 'E411'
|
||||
\ || syntax_groups =~ 'E415'
|
||||
\ || syntax_groups =~ 'No sytax items'
|
||||
return -1
|
||||
if syntax_full =~ 'E28'
|
||||
\ || syntax_full =~ 'E411'
|
||||
\ || syntax_full =~ 'E415'
|
||||
\ || syntax_full =~ 'No Syntax items'
|
||||
return []
|
||||
endif
|
||||
|
||||
" Abort names - match, links to, matchgroup=, start=, contains=, contained,
|
||||
" cluster=, nextgroup=, end=
|
||||
" 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\+'.
|
||||
\ '\<\('.
|
||||
\ substitute(s:syn_remove_words, ',', '\\|', 'g').
|
||||
\ '\)\@!'
|
||||
\ '\s\+xxx\s\+'
|
||||
let syn_list = ''
|
||||
let index = 0
|
||||
let index = match(syntax_groups, next_group_regex, index)
|
||||
|
||||
let index = match(syntax_full, next_group_regex, index)
|
||||
|
||||
while index > 0
|
||||
let group_name = matchstr( syntax_groups, '\w\+', index )
|
||||
let group_name = matchstr( syntax_full, '\w\+', index )
|
||||
|
||||
let extra_syn_list = s:SyntaxGroupItems(group_name)
|
||||
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
|
||||
|
||||
let syn_list = syn_list . extra_syn_list . "\n"
|
||||
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_groups, next_group_regex, index)
|
||||
let index = match(syntax_full, next_group_regex, index)
|
||||
endwhile
|
||||
|
||||
return sort(split(syn_list))
|
||||
" 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 )
|
||||
let saveL = @l
|
||||
|
||||
" Generate (based on the syntax highlight rules) a list of
|
||||
" the Statements, functions, keywords and so on available
|
||||
" If this needs updating, the syntax\sql.vim file should be
|
||||
" updated
|
||||
redir @l
|
||||
silent! exec 'syntax list ' . a:group_name
|
||||
redir END
|
||||
function! s:SyntaxGroupItems( group_name, syntax_full )
|
||||
|
||||
if @l !~ 'E28'
|
||||
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*', "", '' )
|
||||
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
|
||||
|
||||
" We only want the words for the lines begining with
|
||||
" containedin, but there could be other items.
|
||||
@@ -152,7 +242,7 @@ function! s:SyntaxGroupItems( group_name )
|
||||
" contained nextgroup=...
|
||||
" So this will strip off the ending of lines with known
|
||||
" keywords.
|
||||
let syn_list = substitute( syn_list, '\<\('.
|
||||
let syn_list = substitute( syntax_group, '\<\('.
|
||||
\ substitute(
|
||||
\ escape( s:syn_remove_words, '\\/.*$^~[]')
|
||||
\ , ',', '\\|', 'g').
|
||||
@@ -172,8 +262,6 @@ function! s:SyntaxGroupItems( group_name )
|
||||
let syn_list = ''
|
||||
endif
|
||||
|
||||
let @l = saveL
|
||||
|
||||
return syn_list
|
||||
endfunction
|
||||
|
||||
|
||||
254
runtime/autoload/vimball.vim
Normal file
254
runtime/autoload/vimball.vim
Normal file
@@ -0,0 +1,254 @@
|
||||
" vimball : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Mar 22, 2006
|
||||
" Version: 5
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
" (see |copyright|) except use "Vimball" instead of "Vim".
|
||||
" No warranty, express or implied.
|
||||
" *** *** Use At-Your-Own-Risk! *** ***
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
let g:loaded_vimball = "v5"
|
||||
set cpo&vim
|
||||
|
||||
" =====================================================================
|
||||
" Functions: {{{1
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" Vimball Format:
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
|
||||
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
|
||||
if !a:writelevel && filereadable(vbname)
|
||||
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
|
||||
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
|
||||
return
|
||||
endif
|
||||
|
||||
" user option bypass
|
||||
let eikeep= &ei
|
||||
set ei=all
|
||||
|
||||
let home = substitute(&rtp,',.*$','','')
|
||||
let curdir = getcwd()
|
||||
exe "cd ".home
|
||||
|
||||
" record current tab, initialize while loop index
|
||||
let curtabnr = tabpagenr()
|
||||
let linenr = a:line1
|
||||
" call Decho("curtabnr=".curtabnr)
|
||||
|
||||
while linenr <= a:line2
|
||||
let svfile = getline(linenr)
|
||||
" call Decho("svfile<".svfile.">")
|
||||
|
||||
if !filereadable(svfile)
|
||||
echohl Error | echo "unable to read file<".svfile.">" | echohl None
|
||||
let &ei= eikeep
|
||||
exe "cd ".curdir
|
||||
" call Dret("MkVimball")
|
||||
return
|
||||
endif
|
||||
|
||||
" create/switch to mkvimball tab
|
||||
if !exists("vbtabnr")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
else
|
||||
exe "tabn ".vbtabnr
|
||||
endif
|
||||
|
||||
let lastline= line("$") + 1
|
||||
if lastline == 2 && getline("$") == ""
|
||||
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
|
||||
call setline(2,'UseVimball')
|
||||
call setline(3,'finish')
|
||||
let lastline= 4
|
||||
endif
|
||||
call setline(lastline ,svfile)
|
||||
call setline(lastline+1,0)
|
||||
exe "$r ".svfile
|
||||
call setline(lastline+1,line("$") - lastline - 1)
|
||||
" call Decho("lastline=".lastline." line$=".line("$"))
|
||||
|
||||
" restore to normal tab
|
||||
exe "tabn ".curtabnr
|
||||
let linenr= linenr + 1
|
||||
endwhile
|
||||
|
||||
" write the vimball
|
||||
exe "tabn ".vbtabnr
|
||||
exe "cd ".curdir
|
||||
if a:writelevel
|
||||
exe "w! ".vbname
|
||||
else
|
||||
exe "w ".vbname
|
||||
endif
|
||||
" call Decho("Vimball<".vbname."> created")
|
||||
echo "Vimball<".vbname."> created"
|
||||
|
||||
" remove the evidence
|
||||
setlocal nomod bh=wipe
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabc ".vbtabnr
|
||||
|
||||
" restore options
|
||||
let &ei= eikeep
|
||||
|
||||
" call Dret("MkVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Vimball: {{{2
|
||||
fun! vimball#Vimball(really)
|
||||
" call Dfunc("Vimball(really=".a:really.")")
|
||||
|
||||
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
|
||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||
" call Dret("Vimball")
|
||||
return
|
||||
endif
|
||||
|
||||
" initialize
|
||||
let regakeep = @a
|
||||
let eikeep = &ei
|
||||
let vekeep = &ve
|
||||
let makeep = getpos("'a")
|
||||
let curtabnr = tabpagenr()
|
||||
set ei=all ve=all
|
||||
|
||||
" set up vimball tab
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
let didhelp= ""
|
||||
|
||||
" go to vim plugin home
|
||||
let home = substitute(&rtp,',.*$','','')
|
||||
let curdir = getcwd()
|
||||
" call Decho("exe cd ".home)
|
||||
exe "cd ".home
|
||||
let linenr = 4
|
||||
let filecnt = 0
|
||||
|
||||
" give title to listing of (extracted) files from Vimball Archive
|
||||
if a:really
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
endif
|
||||
|
||||
" apportion vimball contents to various files
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
" call Decho("linenr=".linenr." line$=".line("$"))
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = getline(linenr)
|
||||
let fsize = getline(linenr+1)
|
||||
let filecnt = filecnt + 1
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
else
|
||||
echomsg "would extract <".fname.">: ".fsize." lines"
|
||||
endif
|
||||
" call Decho(linenr.": will extract file<".fname.">")
|
||||
" call Decho((linenr+1).": fsize=".fsize)
|
||||
|
||||
" make directories if they don't exist yet
|
||||
let fnamebuf= fname
|
||||
while fnamebuf =~ '/'
|
||||
let dirname = substitute(fnamebuf,'/.*$','','e')
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
|
||||
if !isdirectory(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
call mkdir(dirname)
|
||||
endif
|
||||
exe "cd ".dirname
|
||||
endwhile
|
||||
exe "cd ".home
|
||||
|
||||
" grab specified qty of lines and place into "a" buffer
|
||||
exe linenr
|
||||
norm! jjma
|
||||
exe (linenr + fsize + 1)
|
||||
silent norm! "ay'a
|
||||
" call Decho("yanked ".fsize." lines into register-a")
|
||||
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
endif
|
||||
|
||||
" copy "a" buffer into tab
|
||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||
exe "tabn ".vbtabnr
|
||||
silent! %d
|
||||
silent norm! "aPGdd1G
|
||||
" call Decho("rega<".@a.">")
|
||||
|
||||
" write tab to file
|
||||
if a:really
|
||||
" call Decho("exe w! ".fname)
|
||||
exe "silent w! ".fname
|
||||
endif
|
||||
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
" let oldlinenr = linenr " Decho
|
||||
let linenr = linenr + fsize + 2
|
||||
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] + 2 = ".linenr)
|
||||
endwhile
|
||||
|
||||
" set up help
|
||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||
if didhelp != ""
|
||||
" call Decho("exe helptags ".home."/".didhelp)
|
||||
exe "helptags ".home."/".didhelp
|
||||
echomsg "did helptags"
|
||||
endif
|
||||
|
||||
" make sure a "Press ENTER..." prompt appears to keep the messages showing!
|
||||
while filecnt <= &ch
|
||||
echomsg " "
|
||||
let filecnt= filecnt + 1
|
||||
endwhile
|
||||
|
||||
" restore events, delete tab and buffer
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal nomod bh=wipe
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabc ".vbtabnr
|
||||
let &ei= eikeep
|
||||
let @a = regakeep
|
||||
if makeep[0] != 0
|
||||
" restore mark a
|
||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||
call setpos("'a",makeep)
|
||||
ka
|
||||
endif
|
||||
exe "cd ".curdir
|
||||
|
||||
" call Dret("Vimball")
|
||||
endfun
|
||||
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: XML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Feb 6
|
||||
" Last Change: 2006 Mar 19
|
||||
|
||||
" This function will create Dictionary with users namespace strings and values
|
||||
" canonical (system) names of data files. Names should be lowercase,
|
||||
@@ -81,8 +81,9 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$'
|
||||
elseif context_line =~ '>[^<]*$' || i == curline
|
||||
" Normal tag line, no need for completion at all
|
||||
" OR reached first line without tag at all
|
||||
let b:compl_context = ''
|
||||
break
|
||||
endif
|
||||
@@ -230,25 +231,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
|
||||
@@ -302,27 +320,45 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
let opentag = substitute(opentag, '^\k*:', '', '')
|
||||
if opentag == ''
|
||||
return []
|
||||
endif
|
||||
|
||||
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
|
||||
let context = substitute(context, '^\k*:', '', '')
|
||||
|
||||
if b:xml_namespace == 'DEFAULT'
|
||||
let b:xml_namespace = ''
|
||||
"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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Dec 21, 2005
|
||||
" Version: 6
|
||||
" Date: Mar 22, 2006
|
||||
" Version: 7
|
||||
" 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,8 @@ if exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_zip= "v6"
|
||||
let g:loaded_zip = "v7"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -53,6 +54,7 @@ fun! zip#Browse(zipfile)
|
||||
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
|
||||
return
|
||||
endif
|
||||
" call Decho("passed sanity checks")
|
||||
if &ma != 1
|
||||
set ma
|
||||
endif
|
||||
@@ -73,7 +75,8 @@ fun! zip#Browse(zipfile)
|
||||
0d
|
||||
$
|
||||
|
||||
exe "silent r! unzip -l ".a:zipfile
|
||||
call Decho("exe silent r! unzip -l '".escape(a:zipfile,s:zipfile_escape)."'")
|
||||
exe "silent r! unzip -l '".escape(a:zipfile,s:zipfile_escape)."'"
|
||||
$d
|
||||
silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
|
||||
silent 4,$s/^\%(.*\)\s\+\(\S\)/\1/
|
||||
@@ -111,12 +114,15 @@ fun! s:ZipBrowseSelect()
|
||||
|
||||
" get zipfile to the new-window
|
||||
let zipfile= substitute(w:zipfile,'.zip$','','e')
|
||||
let curfile= expand("%")
|
||||
let curfile= escape(expand("%"),s:zipfile_escape)
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
|
||||
new
|
||||
wincmd _
|
||||
let s:zipfile_{winnr()}= curfile
|
||||
exe "e zipfile:".zipfile.':'.fname
|
||||
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname)
|
||||
exe "e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname
|
||||
filetype detect
|
||||
|
||||
let &report= repkeep
|
||||
@@ -130,11 +136,12 @@ fun! zip#Read(fname,mode)
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
|
||||
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile:.\{-}:\([^\\].*\)$','\1','')
|
||||
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
||||
|
||||
exe "r! unzip -p ".zipfile." ".fname
|
||||
" call Decho("exe r! unzip -p '".escape(zipfile,s:zipfile_escape)."' ".fname)
|
||||
exe "r! unzip -p '".escape(zipfile,s:zipfile_escape)."' ".fname
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
|
||||
@@ -28,6 +28,7 @@ DOCS = \
|
||||
farsi.txt \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
getscript.txt \
|
||||
gui.txt \
|
||||
gui_w16.txt \
|
||||
gui_w32.txt \
|
||||
@@ -71,6 +72,7 @@ DOCS = \
|
||||
pattern.txt \
|
||||
pi_gzip.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
pi_tar.txt \
|
||||
pi_zip.txt \
|
||||
@@ -88,7 +90,9 @@ DOCS = \
|
||||
sponsor.txt \
|
||||
starting.txt \
|
||||
spell.txt \
|
||||
sql.txt \
|
||||
syntax.txt \
|
||||
tabpage.txt \
|
||||
tagsrch.txt \
|
||||
term.txt \
|
||||
tips.txt \
|
||||
@@ -133,6 +137,7 @@ DOCS = \
|
||||
version6.txt \
|
||||
version7.txt \
|
||||
vi_diff.txt \
|
||||
vimball.txt \
|
||||
visual.txt \
|
||||
windows.txt \
|
||||
workshop.txt
|
||||
@@ -152,13 +157,13 @@ HTMLS = \
|
||||
farsi.html \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
getscript.html \
|
||||
gui.html \
|
||||
gui_w16.html \
|
||||
gui_w32.html \
|
||||
gui_x11.html \
|
||||
hangulin.html \
|
||||
hebrew.html \
|
||||
help.html \
|
||||
howto.html \
|
||||
if_cscop.html \
|
||||
if_mzsch.html \
|
||||
@@ -170,6 +175,7 @@ HTMLS = \
|
||||
if_tcl.html \
|
||||
indent.html \
|
||||
index.html \
|
||||
vimindex.html \
|
||||
insert.html \
|
||||
intro.html \
|
||||
map.html \
|
||||
@@ -195,6 +201,7 @@ HTMLS = \
|
||||
pattern.html \
|
||||
pi_gzip.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
print.html \
|
||||
quickfix.html \
|
||||
@@ -210,7 +217,9 @@ HTMLS = \
|
||||
sponsor.html \
|
||||
starting.html \
|
||||
spell.html \
|
||||
sql.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tagsrch.html \
|
||||
tags.html \
|
||||
term.html \
|
||||
@@ -256,6 +265,7 @@ HTMLS = \
|
||||
version6.html \
|
||||
version7.html \
|
||||
vi_diff.html \
|
||||
vimball.txt \
|
||||
visual.html \
|
||||
windows.html \
|
||||
workshop.html
|
||||
@@ -321,6 +331,14 @@ noerrors:
|
||||
.txt.html:
|
||||
$(AWK) -f makehtml.awk $< >$@
|
||||
|
||||
# index.html is the starting point for HTML, but for the help files it is
|
||||
# help.txt. Therefore use vimindex.html for index.txt.
|
||||
index.html: help.txt
|
||||
$(AWK) -f makehtml.awk help.txt >index.html
|
||||
|
||||
vimindex.html: index.txt
|
||||
$(AWK) -f makehtml.awk index.txt >vimindex.html
|
||||
|
||||
tags.ref tags.html: tags
|
||||
$(AWK) -f maketags.awk tags >tags.html
|
||||
|
||||
@@ -389,6 +407,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: 2006 Feb 09
|
||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -270,11 +270,17 @@ Name triggered by ~
|
||||
|
||||
Various
|
||||
|FileChangedShell| Vim notices that a file changed since editing started
|
||||
|FileChangedShellPost| After handling a file changed since editing started
|
||||
|FileChangedRO| before making the first change to a read-only file
|
||||
|
||||
|ShellCmdPost| after executing a shell command
|
||||
|ShellFilterPost| after filtering with a shell command
|
||||
|
||||
|FuncUndefined| a user function is used but it isn't defined
|
||||
|SpellFileMissing| a spell file is used but it can't be found
|
||||
|SourcePre| before sourcing a Vim script
|
||||
|
||||
|VimResized| after the Vim window size changed
|
||||
|FocusGained| Vim got input focus
|
||||
|FocusLost| Vim lost input focus
|
||||
|CursorHold| the user doesn't press a key for a while
|
||||
@@ -284,6 +290,8 @@ Name triggered by ~
|
||||
|
||||
|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
|
||||
|
||||
@@ -469,8 +477,11 @@ 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*
|
||||
@@ -528,6 +539,9 @@ FileChangedShell When Vim notices that the modification time of
|
||||
commands for the FileChangedShell event no
|
||||
other FileChangedShell event will be
|
||||
triggered.
|
||||
*FileChangedShellPost*
|
||||
FileChangedShellPost After handling a file that was changed outside
|
||||
of Vim. Can be used to update the statusline.
|
||||
*FileEncoding*
|
||||
FileEncoding Obsolete. It still works and is equivalent
|
||||
to |EncodingChanged|.
|
||||
@@ -661,6 +675,16 @@ RemoteReply When a reply from a Vim that functions as
|
||||
*SessionLoadPost*
|
||||
SessionLoadPost After loading the session file created using
|
||||
the |:mksession| command.
|
||||
*ShellCmdPost*
|
||||
ShellCmdPost After executing a shell command with |:!cmd|,
|
||||
|:shell|, |:make| and |:grep|. Can be used to
|
||||
check for any changed files.
|
||||
*ShellFilterPost*
|
||||
ShellFilterPost After executing a shell command with
|
||||
":{range}!cmd", ":w !cmd" or ":r !cmd".
|
||||
Can be used to check for any changed files.
|
||||
*SourcePre*
|
||||
SourcePre Before sourcing a Vim script. |:source|
|
||||
*SpellFileMissing*
|
||||
SpellFileMissing When trying to load a spell checking file and
|
||||
it can't be found. <amatch> is the language,
|
||||
@@ -703,6 +727,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
|
||||
@@ -737,6 +769,10 @@ VimLeavePre Before exiting Vim, just before writing the
|
||||
Mostly useful with a "*" pattern. >
|
||||
:autocmd VimLeavePre * call CleanupStuff()
|
||||
< To detect an abnormal exit use |v:dying|.
|
||||
*VimResized*
|
||||
VimResized After the Vim window was resized, thus 'lines'
|
||||
and/or 'columns' changed. Not when starting
|
||||
up though.
|
||||
*WinEnter*
|
||||
WinEnter After entering another window. Not done for
|
||||
the first window, when Vim has just started.
|
||||
|
||||
@@ -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 Mar 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -728,6 +728,7 @@ Examples: >
|
||||
:s/\([abc]\)\([efg]\)/\2\1/g modifies "af fa bg" to "fa fa gb"
|
||||
:s/abcde/abc^Mde/ modifies "abcde" to "abc", "de" (two lines)
|
||||
:s/$/\^M/ modifies "abcde" to "abcde^M"
|
||||
:s/\w\+/\u\0/g modifies "bla bla" to "Bla Bla"
|
||||
|
||||
Note: In previous versions CTRL-V was handled in a special way. Since this is
|
||||
not Vi compatible, this was removed. Use a backslash instead.
|
||||
@@ -765,6 +766,10 @@ break the line.
|
||||
For convenience a <NL> character is also used as a line break. Prepend a
|
||||
backslash to get a real <NL> character (which will be a NUL in the file).
|
||||
|
||||
When the result is a |List| then the items are joined with separating line
|
||||
breaks. Thus each item becomes a line, except that they can contain line
|
||||
breaks themselves.
|
||||
|
||||
The whole matched text can be accessed with "submatch(0)". The text matched
|
||||
with the first pair of () with "submatch(1)". Likewise for further
|
||||
sub-matches in ().
|
||||
@@ -1168,12 +1173,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 +1204,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 +1236,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: 2006 Feb 01
|
||||
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Mar 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -172,8 +172,11 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
|
||||
'path' as in |gf|
|
||||
CTRL-W the Word under the cursor
|
||||
CTRL-A the WORD under the cursor; see |WORD|
|
||||
When 'incsearch' is set the cursor position of the currently
|
||||
displayed match is used.
|
||||
|
||||
When 'incsearch' is set the cursor position at the end of the
|
||||
currently displayed match is used. With CTRL-W the part of
|
||||
the word that was already typed is not inserted again.
|
||||
|
||||
{not in Vi}
|
||||
CTRL-F and CTRL-P: {only when +file_in_path feature is
|
||||
included}
|
||||
@@ -354,6 +357,7 @@ word before the cursor. This is available for:
|
||||
- File names: Only after a command that accepts a file name or a setting for
|
||||
an option that can be set to a file name. This is called file name
|
||||
completion.
|
||||
- Shell command names: After ":!cmd", ":r !cmd" and ":w !cmd". $PATH is used.
|
||||
- Options: Only after the ":set" command.
|
||||
- Mappings: Only after a ":map" or similar command.
|
||||
- Variable and function names: Only after a ":if", ":call" or similar command.
|
||||
@@ -398,6 +402,9 @@ CTRL-L A match is done on the pattern in front of the cursor. If
|
||||
If there are multiple matches the longest common part is
|
||||
inserted in place of the pattern. If the result is shorter
|
||||
than the pattern, no completion is done.
|
||||
When 'incsearch' is set, entering a search pattern for "/" or
|
||||
"?" and the current match is displayed then CTRL-L will add
|
||||
one character from the end of the current match.
|
||||
|
||||
The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
|
||||
a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
||||
@@ -742,8 +749,9 @@ Note: these are typed literally, they are not special keys!
|
||||
<afile> when executing autocommands, is replaced with the file name
|
||||
for a file read or write
|
||||
<abuf> when executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" it is the current
|
||||
buffer, the file being read is not in a buffer).
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
<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
|
||||
@@ -970,6 +978,11 @@ that there will be an extra screen redraw.
|
||||
The buffer used for the command-line window is deleted. Any changes to lines
|
||||
other than the one that is executed with <CR> are lost.
|
||||
|
||||
If you would like to execute the command under the cursor and then have the
|
||||
command-line window open again, you may find this mapping useful: >
|
||||
|
||||
:map <F5> <CR>q:
|
||||
|
||||
|
||||
VARIOUS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12
|
||||
*develop.txt* For Vim version 7.0aa. Last change: 2006 Mar 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -149,6 +149,7 @@ VIM IS... NOT *design-not*
|
||||
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
|
||||
everything but the kitchen sink, but some people say that you can clean one
|
||||
with it. ;-)"
|
||||
To use Vim with gdb see: http://www.agide.org and http://clewn.sf.net.
|
||||
- Vim is not a fancy GUI editor that tries to look nice at the cost of
|
||||
being less consistent over all platforms. But functional GUI features are
|
||||
welcomed.
|
||||
@@ -187,8 +188,8 @@ strchr() vim_strchr() Accepts special characters
|
||||
strrchr() vim_strrchr() Accepts special characters
|
||||
isspace() vim_isspace() Can handle characters > 128
|
||||
iswhite() vim_iswhite() Only TRUE for Tab and space
|
||||
memcpy() vim_memmove() Handles overlapped copies
|
||||
bcopy() vim_memmove() Handles overlapped copies
|
||||
memcpy() mch_memmove() Handles overlapped copies
|
||||
bcopy() mch_memmove() Handles overlapped copies
|
||||
memset() vim_memset() Uniform for all systems
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2006 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41,12 +41,18 @@ 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: >
|
||||
|
||||
vimdiff -o file1 file2 [file3]
|
||||
|
||||
If you always prefer horizontal splits include "horizontal" in 'diffopt'.
|
||||
|
||||
In each of the edited files these options are set:
|
||||
|
||||
'diff' on
|
||||
@@ -54,7 +60,7 @@ In each of the edited files these options are set:
|
||||
'scrollopt' includes "hor"
|
||||
'wrap' off
|
||||
'foldmethod' "diff"
|
||||
'foldcolumn' 2
|
||||
'foldcolumn' value from 'diffopt', default is 2
|
||||
|
||||
These options are set local to the window. When editing another file they are
|
||||
reset to the global value.
|
||||
@@ -103,7 +109,9 @@ To make these commands use a vertical split, prepend |:vertical|. Examples: >
|
||||
|
||||
:vert diffsplit main.c~
|
||||
:vert diffpatch /tmp/diff
|
||||
<
|
||||
|
||||
If you always prefer a vertical split include "vertical" in 'diffopt'.
|
||||
|
||||
*E96*
|
||||
There can be up to four buffers with 'diff' set.
|
||||
|
||||
@@ -113,7 +121,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,
|
||||
@@ -374,8 +382,8 @@ will have the same effect. These variables are set to the file names used:
|
||||
|
||||
Example (this does the same as 'patchexpr' being empty): >
|
||||
|
||||
let patchexpr=MyPatch
|
||||
function MyPatch
|
||||
set patchexpr=MyPatch()
|
||||
function MyPatch()
|
||||
:call system("patch -o " . v:fname_out . " " . v:fname_in .
|
||||
\ " < " . v:fname_diff)
|
||||
endfunction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
|
||||
*editing.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -334,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|.
|
||||
@@ -398,7 +414,9 @@ You can have the backticks expanded as a Vim expression, instead of an
|
||||
external command, by using the syntax `={expr}` e.g.: >
|
||||
:e `=tempname()`
|
||||
The expression can contain just about anything, thus this can also be used to
|
||||
avoid the special meaning of '"', '|', '%' and '#'.
|
||||
avoid the special meaning of '"', '|', '%' and '#'. Names are to be separated
|
||||
with line breaks. When the result is a |List| then each item is used as a
|
||||
name. Line breaks also separate names.
|
||||
|
||||
*++opt* *[++opt]*
|
||||
The [++opt] argument can be used to force the value of 'fileformat',
|
||||
@@ -803,7 +821,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
|
||||
@@ -1014,6 +1032,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 @@
|
||||
*filetype.txt* For Vim version 7.0aa. Last change: 2005 Sep 16
|
||||
*filetype.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -148,6 +148,7 @@ can be used to overrule the filetype used for certain extensions:
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
*.tex g:tex_flavor |ft-tex-plugin|
|
||||
|
||||
*filetype-ignore*
|
||||
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
|
||||
@@ -536,4 +537,22 @@ Since the text for this plugin is rather long it has been put in a separate
|
||||
file: |pi_spec.txt|.
|
||||
|
||||
|
||||
SQL *ft-sql*
|
||||
|
||||
Since the text for this plugin is rather long it has been put in a separate
|
||||
file: |sql.txt|.
|
||||
|
||||
|
||||
TEX *ft-tex-plugin*
|
||||
|
||||
If the first line of a *.tex file has the form >
|
||||
%&<format>
|
||||
then this determined the file type: plaintex (for plain TeX), context (for
|
||||
ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
|
||||
choose context or tex. If no keywords are found, it defaults to tex. You can
|
||||
change the default by defining the variable g:tex_flavor to the format (not
|
||||
the file type) you use most: plain or context or latex. (Currently no other
|
||||
formats are recognized.)
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
301
runtime/doc/getscript.txt
Normal file
301
runtime/doc/getscript.txt
Normal file
@@ -0,0 +1,301 @@
|
||||
*getscript.txt* Get the Latest VimScripts Dec 23, 2005
|
||||
|
||||
Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
|
||||
(remove NOSPAM from the email address)
|
||||
*GetLatestVimScripts-copyright*
|
||||
Copyright: (c) 2004-2005 by Charles E. Campbell, Jr.
|
||||
The VIM LICENSE applies to GetLatestVimScripts.vim and
|
||||
GetLatestVimScripts.txt (see |copyright|) except use
|
||||
"GetLatestVimScripts" instead of "Vim".
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
|
||||
==============================================================================
|
||||
1. Contents *glvs-contents*
|
||||
|
||||
1. Contents.......................................: |glvs-contents|
|
||||
2. GetLatestVimScripts Usage......................: |glvs|
|
||||
3. GetLatestVimScripts Data File..................: |glvs-data|
|
||||
4. GetLatestVimScripts Plugins....................: |glvs-plugins|
|
||||
5. GetLatestVimScripts AutoInstall................: |glvs-autoinstall|
|
||||
6. GetLatestVimScripts Algorithm..................: |glvs-alg|
|
||||
7. GetLatestVimScripts History....................: |glvs-hist|
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs*
|
||||
|
||||
While in vim, type
|
||||
>
|
||||
:GetLatestVimScripts
|
||||
<
|
||||
Unless its been defined elsewhere,
|
||||
>
|
||||
:GLVS
|
||||
<
|
||||
will also work.
|
||||
|
||||
The script will attempt to update and, if so directed, automatically
|
||||
install scripts from http://vim.sourceforge.net/. To do so it will
|
||||
peruse a file, [.vim|vimfiles]/GetLatest/GetLatestVimScripts.dat
|
||||
(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
|
||||
directory (see |glvs-plugins|).
|
||||
|
||||
Scripts which have been downloaded will appear in the .../GetLatest
|
||||
subdirectory.
|
||||
|
||||
The <GetLatestVimScripts.dat> file will be automatically be updated to
|
||||
reflect the latest version of script(s) so downloaded.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. GetLatestVimScripts Data File *getlatestvimscripts-data* *glvs-data*
|
||||
|
||||
The Data file has a header which should appear as:
|
||||
>
|
||||
ScriptID SourceID Filename
|
||||
--------------------------
|
||||
<
|
||||
Below that are three columns; the first two are numeric followed by a
|
||||
text column.
|
||||
|
||||
The first number on each line gives the script's ScriptID. When
|
||||
you're about to use a web browser to look at scripts on
|
||||
http://vim.sf.net/, just before you click on the script's link, you'll
|
||||
see a line resembling
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
|
||||
download the associated page.
|
||||
|
||||
The second number on each line gives the script's SourceID. The
|
||||
SourceID records the count of uploaded scripts as determined by
|
||||
vim.sf.net; hence it serves to indicate "when" a script was uploaded.
|
||||
Setting the SourceID to 1 insures that GetLatestVimScripts will assume
|
||||
that the script it has is out-of-date.
|
||||
|
||||
The SourceID is extracted by GetLatestVimScripts from the script's
|
||||
page on vim.sf.net; whenever its greater than the one stored in the
|
||||
GetLatestVimScripts.dat file, the script will be downloaded.
|
||||
|
||||
If your script's author has included a special comment line in his/her
|
||||
plugin, the plugin itself will be used by GetLatestVimScripts to build
|
||||
your <GetLatestVimScripts.dat> file, including any dependencies on
|
||||
other scripts it may have.
|
||||
|
||||
If your comment field begins with :AutoInstall:, GetLatestVimScripts
|
||||
will attempt to automatically install the script. Thus,
|
||||
GetLatestVimScripts thus provides a comprehensive ability to keep your
|
||||
plugins up-to-date!
|
||||
|
||||
==============================================================================
|
||||
4. GetLatestVimScripts Plugins *getlatestvimscripts-plugins* *glvs-plugins*
|
||||
|
||||
|
||||
If a plugin author includes the following comment anywhere in their
|
||||
plugin, GetLatestVimScripts will find it and use it to build user's
|
||||
GetLatestVimScripts.dat files:
|
||||
>
|
||||
src_id
|
||||
v
|
||||
" GetLatestVimScripts: ### ### yourscriptname
|
||||
^
|
||||
scriptid
|
||||
<
|
||||
As an author, you should include such a line in to refer to your own
|
||||
script plus any additional lines describing any plugin dependencies it
|
||||
may have. Same format, of course!
|
||||
|
||||
If your command is auto-installable (see |glvs-autoinstall|), and most
|
||||
scripts are, then you may include :AutoInstall: at the start of
|
||||
"yourscriptname".
|
||||
|
||||
GetLatestVimScript commands for those scripts are then appended, if
|
||||
not already present, to the user's GetLatest/GetLatestVimScripts.dat
|
||||
file. Its a relatively painless way to automate the acquisition of
|
||||
any scripts your plugins depend upon.
|
||||
|
||||
Now, as an author, you probably don't want GetLatestVimScripts to
|
||||
download your own scripts for you yourself, thereby overwriting your
|
||||
not-yet-released hard work. GetLatestVimScripts provides a solution
|
||||
for this: put
|
||||
>
|
||||
0 0 yourscriptname
|
||||
<
|
||||
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will
|
||||
skip examining the "yourscriptname" scripts for those
|
||||
GetLatestVimScript comment lines. As a result, those lines won't be
|
||||
inadvertently installed into your <GetLatestVimScripts.dat> file and
|
||||
subsequently used to download your own scripts. This is especially
|
||||
important to do if you've included the :AutoInstall: option.
|
||||
|
||||
Be certain to use the same "yourscriptname" in the "0 0
|
||||
yourscriptname" line as you've used in your GetLatestVimScript
|
||||
comment!
|
||||
|
||||
|
||||
==============================================================================
|
||||
5. GetLatestVimScripts AutoInstall *getlatestvimscripts-autoinstall*
|
||||
*glvs-autoinstall*
|
||||
|
||||
GetLatestVimScripts now supports "AutoInstall". Not all scripts are
|
||||
supportive of auto-install, as they may have special things you need
|
||||
to do to install them (please refer to the script's "install"
|
||||
directions). On the other hand, most scripts will be
|
||||
auto-installable.
|
||||
|
||||
To let GetLatestVimScripts do an autoinstall, the data file's comment
|
||||
field should begin with (surrounding blanks are ignored):
|
||||
|
||||
:AutoInstall:
|
||||
|
||||
Both colons are needed, and it should begin the comment
|
||||
(yourscriptname) field.
|
||||
|
||||
One may prevent any autoinstalling by putting the following line
|
||||
in your <.vimrc>:
|
||||
>
|
||||
let g:GetLatestVimScripts_allowautoinstall= 0
|
||||
<
|
||||
|
||||
With :AutoInstall: enabled, as it is by default, files which end with
|
||||
|
||||
---.tar.bz2 : decompressed and untarred in [.vim|vimfiles] directory
|
||||
---.tar.gz : decompressed and untarred in [.vim|vimfiles] directory
|
||||
---.vim.bz2 : decompressed and moved to the .vim/plugin directory
|
||||
---.vim.gz : decompressed and moved to the .vim/plugin directory
|
||||
---.zip : unzipped in [.vim|vimfiles] directory
|
||||
---.vim : moved to [.vim|vimfiles]/plugin directory
|
||||
|
||||
and which merely need to have their components placed by the
|
||||
untar/gunzip or move-to-plugin-directory process should be
|
||||
auto-installable.
|
||||
|
||||
When is a script not auto-installable? Let me give an example:
|
||||
>
|
||||
[.vim|vimfiles]/after/syntax/blockhl.vim
|
||||
<
|
||||
The <blockhl.vim> script provides block highlighting for C/C++
|
||||
programs; it is available at:
|
||||
>
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=104
|
||||
<
|
||||
Currently, vim's after/syntax only supports by-filetype scripts (in
|
||||
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install
|
||||
would possibly overwrite the current user's after/syntax/c.vim file.
|
||||
|
||||
In my own case, I use <aftersyntax.vim> (renamed to
|
||||
after/syntax/c.vim) to allow a after/syntax/c/ directory:
|
||||
>
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=1023
|
||||
<
|
||||
The script allows multiple syntax files to exist separately in the
|
||||
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and
|
||||
build an appropriate tarball for auto-install because of the potential
|
||||
for the after/syntax/c.vim contained in it to overwrite a user's
|
||||
c.vim.
|
||||
|
||||
|
||||
==============================================================================
|
||||
6. GetLatestVimScripts Algorithm *getlatestvimscripts-algorithm*
|
||||
*glvs-alg*
|
||||
|
||||
The Vim sourceforge page dynamically creates a page by keying off of
|
||||
the so-called script-id. Within the webpage of
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
is a line specifying the latest source-id (src_id). The source
|
||||
identifier numbers are always increasing, hence if the src_id is
|
||||
greater than the one recorded for the script in GetLatestVimScripts
|
||||
then its time to download a newer copy of that script.
|
||||
|
||||
GetLatestVimScripts will then download the script and update its
|
||||
internal database of script ids, source ids, and scriptnames.
|
||||
|
||||
The AutoInstall process will:
|
||||
|
||||
Move the file from GetLatest/ to the following directory
|
||||
Unix : $HOME/.vim
|
||||
Windows: $HOME\vimfiles
|
||||
|
||||
if the downloaded file ends with ".bz2"
|
||||
bunzip2 it
|
||||
else if the downloaded file ends with ".gz"
|
||||
gunzip it
|
||||
if the resulting file ends with ".zip"
|
||||
unzip it
|
||||
else if the resulting file ends with ".tar"
|
||||
tar -oxvf it
|
||||
else if the resulting file ends with ".vim"
|
||||
move it to the plugin subdirectory
|
||||
|
||||
|
||||
==============================================================================
|
||||
7. GetLatestVimScripts History *getlatestvimscripts-history* *glvs-hist*
|
||||
|
||||
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
|
||||
unzip needs the -o flag to overwrite.
|
||||
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
|
||||
script! Fixed.
|
||||
v18 Mar 21, 2005 : * bugfix to automatic database construction
|
||||
* bugfix - nowrapscan caused an error
|
||||
(tnx to David Green for the fix)
|
||||
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in
|
||||
:AutoInstall:s, even though its o/s is windows
|
||||
Apr 01, 2005 * when downloading errors occurred, GLVS was
|
||||
terminating early. It now just goes on to trying
|
||||
the next script (after trying three times to
|
||||
download a script description page)
|
||||
Apr 20, 2005 * bugfix - when a failure to download occurred,
|
||||
GetLatestVimScripts would stop early and claim that
|
||||
everything was current. Fixed.
|
||||
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
|
||||
defaults to 1, can be used to prevent all
|
||||
:AutoInstall:
|
||||
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
|
||||
* fixed bug with :AutoInstall: use of helptags
|
||||
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
|
||||
always preventing downloads (just usually). Fixed.
|
||||
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
|
||||
s:dotvim. Fixed.
|
||||
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
|
||||
is zero. Useful for script authors; that way their
|
||||
own GetLatestVimScripts activity won't overwrite
|
||||
their scripts.
|
||||
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
|
||||
was intended only for testing. Removed, now works.
|
||||
* :AutoInstall: implemented
|
||||
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
|
||||
* :GetLatestVimScripts command
|
||||
* (runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
now holds scripts that need updating
|
||||
v10 Apr 19, 2004 : * moved history from script to doc
|
||||
v9 Jan 23, 2004 : windows (win32/win16/win95) will use
|
||||
double quotes ("") whereas other systems will use
|
||||
single quotes ('') around the urls in calls via wget
|
||||
v8 Dec 01, 2003 : makes three tries at downloading
|
||||
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="
|
||||
not found in downloaded webpage
|
||||
Uses t_ti, t_te, and rs to make progress visible
|
||||
v6 Aug 06, 2003 : final status messages now display summary of work
|
||||
( "Downloaded someqty scripts" or
|
||||
"Everything was current")
|
||||
Now GetLatestVimScripts is careful about downloading
|
||||
GetLatestVimScripts.vim itself!
|
||||
(goes to <NEW_GetLatestVimScripts.vim>)
|
||||
v5 Aug 04, 2003 : missing an endif near bottom
|
||||
v4 Jun 17, 2003 : redraw! just before each "considering" message
|
||||
v3 May 27, 2003 : Protects downloaded files from errant shell
|
||||
expansions with single quotes: '...'
|
||||
v2 May 14, 2003 : extracts name of item to be obtained from the
|
||||
script file. Uses it instead of comment field
|
||||
for output filename; comment is used in the
|
||||
"considering..." line and is now just a comment!
|
||||
* Fixed a bug: a string-of-numbers is not the
|
||||
same as a number, so I added zero to them
|
||||
and they became numbers. Fixes comparison.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help
|
||||
@@ -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 Mar 20
|
||||
|
||||
|
||||
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
|
||||
@@ -498,6 +499,8 @@ floating menus that do not appear on the main menu bar.
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu*
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu*
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*E330* *E327* *E331* *E336* *E333*
|
||||
@@ -786,6 +789,8 @@ using the last visual selection.
|
||||
*:nunme* *:nunmenu*
|
||||
*:ounme* *:ounmenu*
|
||||
*:vunme* *:vunmenu*
|
||||
*:xunme* *:xunmenu*
|
||||
*:sunme* *:sunmenu*
|
||||
*:iunme* *:iunmenu*
|
||||
*:cunme* *:cunmenu*
|
||||
To delete a menu item or a whole submenu, use the unmenu commands, which are
|
||||
@@ -954,6 +959,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 Mar 17
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -84,7 +84,7 @@ Making Vim Run ~
|
||||
|usr_90.txt| Installing Vim
|
||||
|
||||
|
||||
REFERENCE MANUAL: These files explain every detail of Vim.
|
||||
REFERENCE MANUAL: These files explain every detail of Vim. *ref-toc*
|
||||
|
||||
General subjects ~
|
||||
|intro.txt| general introduction to Vim; notation used in help files
|
||||
@@ -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,11 +187,20 @@ 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
|
||||
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -166,7 +166,10 @@ interface.
|
||||
Common
|
||||
------
|
||||
(command {command-string}) Perform the vim ":Ex" style command.
|
||||
(eval {expr-string}) Evaluate the vim command string.
|
||||
(eval {expr-string}) Evaluate the vim expression to a string.
|
||||
A |List| is turned into a string by
|
||||
joining the items and inserting line
|
||||
breaks.
|
||||
NOTE clashes with MzScheme eval
|
||||
(range-start) Start/End of the range passed with
|
||||
(range-end) the Scheme command.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ole.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
|
||||
*if_ole.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -77,7 +77,8 @@ Eval(expr) Evaluate an expression.
|
||||
|
||||
This method takes a single parameter, which is an expression in Vim's normal
|
||||
format (see |expression|). It returns a string, which is the result of
|
||||
evaluating the expression.
|
||||
evaluating the expression. A |List| is turned into a string by joining the
|
||||
items and inserting line breaks.
|
||||
|
||||
Examples (Visual Basic syntax) >
|
||||
Line20 = Vim.Eval("getline(20)")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*if_perl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sven Verdoolaege
|
||||
@@ -181,6 +181,8 @@ VIM::Eval({expr}) Evaluates {expr} and returns (success, val).
|
||||
value of internal |variables| x, and '$x' is equivalent
|
||||
to perl's $ENV{x}. All |functions| accessible from
|
||||
the command-line are valid for {expr}.
|
||||
A |List| is turned into a string by joining the items
|
||||
and inserting line breaks.
|
||||
|
||||
*perl-SetHeight*
|
||||
Window->SetHeight({height})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*if_ruby.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -117,6 +117,8 @@ VIM::command({cmd})
|
||||
VIM::evaluate({expr})
|
||||
Evaluates {expr} using the vim internal expression evaluator (see
|
||||
|expression|). Returns the expression result as a string.
|
||||
A |List| is turned into a string by joining the items and inserting
|
||||
line breaks.
|
||||
|
||||
==============================================================================
|
||||
3. VIM::Buffer objects *ruby-buffer*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*if_tcl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
@@ -133,7 +133,8 @@ Commands:
|
||||
Evaluates the expression {expr} using vim's internal expression
|
||||
evaluator (see |expression|). Any expression that queries a buffer
|
||||
or window property uses the current buffer/current window. Returns
|
||||
the result as a string.
|
||||
the result as a string. A |List| is turned into a string by joining
|
||||
the items and inserting line breaks.
|
||||
Examples: >
|
||||
set perl_available [::vim::expr has("perl")]
|
||||
< See also |tcl-window-expr| and |tcl-buffer-expr|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
|
||||
|
||||
|
||||
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
|
||||
@@ -1082,6 +1088,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:cexpr| :cex[pr] read errors from expr and jump to first
|
||||
|:cfile| :cf[ile] read file with error messages and jump to first
|
||||
|:cfirst| :cfir[st] go to the specified error, default first one
|
||||
|:cgetexpr| :cgete[xpr] get errors from expr
|
||||
|:cgetfile| :cg[etfile] read file with error messages
|
||||
|:changes| :cha[nges] print the change list
|
||||
|:chdir| :chd[ir] change directory
|
||||
@@ -1142,6 +1149,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:dsearch| :ds[earch] list one #define
|
||||
|:dsplit| :dsp[lit] split window and jump to #define
|
||||
|:edit| :e[dit] edit a file
|
||||
|:earlier| :ea[rlier] go to older change, undo
|
||||
|:echo| :ec[ho] echoes the result of expressions
|
||||
|:echoerr| :echoe[rr] like :echo, show like an error and use history
|
||||
|:echohl| :echoh[l] set highlighting for echo commands
|
||||
@@ -1222,6 +1230,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|: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)
|
||||
|:later| :lat[er] go to newer change, redo
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
|:lcd| :lc[d] change directory locally
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
@@ -1233,6 +1242,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|: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
|
||||
|:lgetexpr| :lgete[xpr] get locations from expr
|
||||
|: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
|
||||
@@ -1305,7 +1315,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
|
||||
@@ -1405,15 +1415,22 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:slast| :sla[st] split window and go to last file in the
|
||||
argument list
|
||||
|:smagic| :sm[agic] :substitute with 'magic'
|
||||
|:smap| :sma[p] like ":map" but for Select mode
|
||||
|:smapclear| :smapc[lear] remove all mappings for Select mode
|
||||
|:smenu| :sme[nu] add menu for Select mode
|
||||
|:snext| :sn[ext] split window and go to next file in the
|
||||
argument list
|
||||
|:sniff| :sni[ff] send request to sniff
|
||||
|:snomagic| :sno[magic] :substitute with 'nomagic'
|
||||
|:snoremap| :snor[emap] like ":noremap" but for Select mode
|
||||
|:snoremenu| :snoreme[nu] like ":noremenu" but for Select mode
|
||||
|:sort| :sor[t] sort lines
|
||||
|:source| :so[urce] read Vim or Ex commands from a file
|
||||
|:spelldump| :spelld[ump] split window and fill with all correct words
|
||||
|:spellgood| :spe[llgood] add good word for spelling
|
||||
|:spellinfo| :spelli[nfo] show info about loaded spell files
|
||||
|:spellrepall| :spellr[epall] replace all bad words like last |z=|
|
||||
|:spellundo| :spellu[ndo] remove good or bad word
|
||||
|:spellwrong| :spellw[rong] add spelling mistake
|
||||
|:split| :sp[lit] split current window
|
||||
|:sprevious| :spr[evious] split window and go to previous file in the
|
||||
@@ -1429,6 +1446,8 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|:stselect| :sts[elect] do ":tselect" and split window
|
||||
|:sunhide| :sun[hide] same as ":unhide"
|
||||
|:sunmap| :sunm[ap] like ":unmap" but for Select mode
|
||||
|:sunmenu| :sunme[nu] remove menu for Select mode
|
||||
|:suspend| :sus[pend] same as ":stop"
|
||||
|:sview| :sv[iew] split window and edit file read-only
|
||||
|:swapname| :sw[apname] show the name of the current swap file
|
||||
@@ -1436,6 +1455,21 @@ 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
|
||||
|:tabdo| :tabdo execute command in each 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
|
||||
@@ -1456,6 +1490,8 @@ 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
|
||||
|:undolist| :undol[ist] list leafs of the undo tree
|
||||
|:unabbreviate| :una[bbreviate] remove abbreviation
|
||||
|:unhide| :unh[ide] open a window for each loaded file in the
|
||||
buffer list
|
||||
@@ -1473,15 +1509,15 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode
|
||||
|:viusage| :viu[sage] overview of Normal mode commands
|
||||
|:view| :vie[w] edit a file read-only
|
||||
|:vmap| :vm[ap] like ":map" but for Visual mode
|
||||
|:vmapclear| :vmapc[lear] remove all mappings for Visual mode
|
||||
|:vmenu| :vme[nu] add menu for Visual mode
|
||||
|:vnoremap| :vn[oremap] like ":noremap" but for Visual mode
|
||||
|:vmap| :vm[ap] like ":map" but for Visual+Select mode
|
||||
|:vmapclear| :vmapc[lear] remove all mappings for Visual+Select mode
|
||||
|:vmenu| :vme[nu] add menu for Visual+Select mode
|
||||
|:vnew| :vne[w] create a new empty window, vertically split
|
||||
|:vnoremenu| :vnoreme[nu] like ":noremenu" but for Visual mode
|
||||
|:vnoremap| :vn[oremap] like ":noremap" but for Visual+Select mode
|
||||
|:vnoremenu| :vnoreme[nu] like ":noremenu" but for Visual+Select mode
|
||||
|:vsplit| :vs[plit] split current window vertically
|
||||
|:vunmap| :vu[nmap] like ":unmap" but for Visual mode
|
||||
|:vunmenu| :vunme[nu] remove menu for Visual mode
|
||||
|:vunmap| :vu[nmap] like ":unmap" but for Visual+Select mode
|
||||
|:vunmenu| :vunme[nu] remove menu for Visual+Select mode
|
||||
|:windo| :windo execute command in each window
|
||||
|:write| :w[rite] write to a file
|
||||
|:wNext| :wN[ext] write to a file and go to previous file in
|
||||
@@ -1501,8 +1537,16 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:wviminfo| :wv[iminfo] write to viminfo file
|
||||
|:xit| :x[it] write if buffer changed and quit window or Vim
|
||||
|:xall| :xa[ll] same as ":wqall"
|
||||
|:xmapclear| :xmapc[lear] remove all mappings for Visual mode
|
||||
|:xmap| :xm[ap] like ":map" but for Visual mode
|
||||
|:xmenu| :xme[nu] add menu for Visual mode
|
||||
|:xnoremap| :xn[oremap] like ":noremap" but for Visual mode
|
||||
|:xnoremenu| :xnoreme[nu] like ":noremenu" but for Visual mode
|
||||
|:xunmap| :xu[nmap] like ":unmap" but for Visual mode
|
||||
|:xunmenu| :xunme[nu] remove menu for Visual mode
|
||||
|:yank| :y[ank] yank lines into a register
|
||||
|:z| :z print some lines
|
||||
|:~| :~ repeat last ":substitute"
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -126,8 +126,13 @@ 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.
|
||||
When the result is a |List| the items are used
|
||||
as lines. They can have line breaks inside
|
||||
too.
|
||||
See |registers| about registers. {not in Vi}
|
||||
|
||||
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
|
||||
@@ -422,7 +427,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 +443,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 +631,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.
|
||||
@@ -979,29 +988,36 @@ On the second invocation the arguments are:
|
||||
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.
|
||||
|
||||
*complete-items*
|
||||
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
|
||||
abbr abbreviation of "word", to be used in the menu
|
||||
menu extra text for the popup menu
|
||||
info more information about the item
|
||||
kind single letter indicating the type of completion
|
||||
icase when non-zero case is to be ignored; when omitted
|
||||
the 'ignorecase' option is used
|
||||
|
||||
All of these must be a string. If an item does not meet these requirements
|
||||
then an error message is given and further items in the list are not used.
|
||||
You can mix string and Dictionary items in the returned list.
|
||||
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.
|
||||
be relatively short. The "info" item can be longer, it will be displayed in
|
||||
the preview window when "preview" appears in 'completeopt'. The "info" item
|
||||
will also remain displayed after the popup menu has been removed. This is
|
||||
useful for function arguments.
|
||||
|
||||
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)
|
||||
m member of a struct or class
|
||||
t typedef
|
||||
d #define or macro
|
||||
|
||||
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
|
||||
@@ -1067,29 +1083,56 @@ INSERT COMPLETION POPUP MENU *ins-completion-menu*
|
||||
Vim can display the matches in a simplistic popup menu.
|
||||
|
||||
The menu is used when:
|
||||
- The 'completeopt' option contains "menu".
|
||||
- The 'completeopt' option contains "menu" or "menuone".
|
||||
- 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
|
||||
The 'pumheight' option can be used to set a maximum height. The default is to
|
||||
use all space available.
|
||||
|
||||
<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.
|
||||
|
||||
When you are back at the original text then you are in the second state. To
|
||||
get there right away you can use a mapping that uses CTRL-P right after
|
||||
starting the completion: >
|
||||
:imap <F7> <C-N><C-P>
|
||||
<
|
||||
*popupmenu-keys*
|
||||
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. Does not work after selecting one of the
|
||||
matches with CTRL-N, <Up>, etc.
|
||||
<Up> Select the previous match, as if CTRL-P was used, but don't
|
||||
insert it when editing the selection.
|
||||
<Down> Select the next match, as if CTRL-N was used, but don't
|
||||
insert it when editing the selection.
|
||||
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 selection is being edited after typing <BS>, CTRL-L or when using the
|
||||
longest common match. This stops when a match is inserted, as with CTRL-N or
|
||||
CTRL-P.
|
||||
|
||||
The colors of the menu can be changed with these highlight groups:
|
||||
Pmenu normal item |hl-Pmenu|
|
||||
@@ -1097,8 +1140,28 @@ 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*
|
||||
You can use of <expr> in mapping to have the popup menu used when typing a
|
||||
character and some condition is met. For example, for typing a dot: >
|
||||
inoremap <expr> . MayComplete()
|
||||
func MayComplete()
|
||||
if (can complete)
|
||||
return ".\<C-X>\<C-O>"
|
||||
endif
|
||||
return '.'
|
||||
endfunc
|
||||
|
||||
See |:map-<expr>| for more info.
|
||||
|
||||
|
||||
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*
|
||||
@@ -1107,9 +1170,9 @@ Completion of C code requires a tags file. You should use Exuberant ctags,
|
||||
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
|
||||
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
|
||||
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: >
|
||||
@@ -1144,23 +1207,22 @@ specification.
|
||||
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 suggestion
|
||||
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
|
||||
<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 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
|
||||
@@ -1176,7 +1238,7 @@ Completion of most elements of JavaScript language and DOM elements.
|
||||
Complete:
|
||||
|
||||
- variables
|
||||
- function name
|
||||
- function name; show function arguments
|
||||
- function arguments
|
||||
- properties of variables trying to detect type of variable
|
||||
- complete DOM objects and properties depending on context
|
||||
@@ -1205,23 +1267,92 @@ 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.
|
||||
|
||||
|
||||
PHP *ft-php-omni*
|
||||
|
||||
Completion of PHP code requires tags file for completion of data from external
|
||||
files. You should use Exuberant ctags version 5.5.4 or newer. You can find it
|
||||
here: http://ctags.sourceforge.net/
|
||||
|
||||
Script completes:
|
||||
|
||||
- after $ variables name
|
||||
- if variable was declared as object add "->", if tags file is available show
|
||||
name of class
|
||||
|
||||
- function names with additonal info:
|
||||
- in case of built-in functions list of possible arguments and after | type
|
||||
data returned by function
|
||||
- in case of user function arguments and name of file were function was
|
||||
defined (if it is not current file)
|
||||
|
||||
- constants names
|
||||
- class names after "new" declaration
|
||||
|
||||
|
||||
Note: when doing completion first time Vim will load all necessary data into
|
||||
memory. It may take several seconds. After next use of completion delay
|
||||
should not be noticeable.
|
||||
|
||||
Script detects if cursor is inside <?php ?> tags. If it is outside it will
|
||||
automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
|
||||
original HTML files completion of tags (and only tags) isn't context aware.
|
||||
|
||||
|
||||
SYNTAX *ft-syntax-omni*
|
||||
|
||||
This uses the current syntax highlighting for completion. It can be used for
|
||||
any filetype and provides a minimal language-sensitive completion.
|
||||
|
||||
To enable code completion do: >
|
||||
source $VIMRUNTIME/autoload/syntaxcomplete.vim
|
||||
To enable syntax code completion you can run: >
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
|
||||
You can automate this by placing this in your vimrc (after any ":filetype"
|
||||
command): >
|
||||
autocmd Filetype *
|
||||
\ if exists('&ofu') && &ofu == "" |
|
||||
\ source $VIMRUNTIME/autoload/syntaxcomplete.vim |
|
||||
\ endif
|
||||
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 proper one does not
|
||||
already exist for that filetype.
|
||||
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*
|
||||
@@ -1244,7 +1375,7 @@ 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.
|
||||
@@ -1258,9 +1389,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":
|
||||
@@ -1272,21 +1403,31 @@ 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*
|
||||
|
||||
@@ -135,7 +135,7 @@ NR == 1 { nf=split(FILENAME,f,".")
|
||||
print "<H1>Vim documentation: " f[1] "</H1>";
|
||||
print "<A NAME=\"top\"></A>";
|
||||
if ( FILENAME != "help.txt" ) {
|
||||
print "<A HREF=\"help.html\">main help file</A>\n";
|
||||
print "<A HREF=\"index.html\">main help file</A>\n";
|
||||
}
|
||||
print "<HR>";
|
||||
print "<PRE>";
|
||||
@@ -244,7 +244,15 @@ npipe > 2 && nstar < 3 {
|
||||
find_tag1();
|
||||
}
|
||||
else {
|
||||
if ( f[1] == "index" ) {
|
||||
printf "|<A HREF=\"vimindex.html\">" p[i] "</A>|";
|
||||
} else {
|
||||
if ( f[1] == "help" ) {
|
||||
printf "|<A HREF=\"index.html\">" p[i] "</A>|";
|
||||
} else {
|
||||
printf "|<A HREF=\"" f[1] ".html\">" p[i] "</A>|";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -373,13 +381,12 @@ END {
|
||||
|
||||
#
|
||||
# as main we keep index.txt (by default)
|
||||
# other candidate, help.txt
|
||||
#
|
||||
function topback () {
|
||||
if ( FILENAME != "tags" ) {
|
||||
if ( FILENAME != "help.txt" ) {
|
||||
printf("<A HREF=\"#top\">top</A> - ");
|
||||
printf("<A HREF=\"help.html\">main help file</A>\n");
|
||||
printf("<A HREF=\"index.html\">main help file</A>\n");
|
||||
} else {
|
||||
printf("<A HREF=\"#top\">top</A>\n");
|
||||
}
|
||||
@@ -581,7 +588,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 +617,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: 2006 Feb 10
|
||||
*map.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -48,6 +48,8 @@ modes.
|
||||
:map {lhs} {rhs} |mapmode-nvo| *:map*
|
||||
:nm[ap] {lhs} {rhs} |mapmode-n| *:nm* *:nmap*
|
||||
:vm[ap] {lhs} {rhs} |mapmode-v| *:vm* *:vmap*
|
||||
:xm[ap] {lhs} {rhs} |mapmode-x| *:xm* *:xmap*
|
||||
:smap {lhs} {rhs} |mapmode-s| *:smap*
|
||||
:om[ap] {lhs} {rhs} |mapmode-o| *:om* *:omap*
|
||||
:map! {lhs} {rhs} |mapmode-ic| *:map!*
|
||||
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
|
||||
@@ -62,6 +64,8 @@ modes.
|
||||
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap*
|
||||
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
|
||||
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
|
||||
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
|
||||
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
|
||||
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
|
||||
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
|
||||
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
|
||||
@@ -76,6 +80,8 @@ modes.
|
||||
:unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
|
||||
:nun[map] {lhs} |mapmode-n| *:nun* *:nunmap*
|
||||
:vu[nmap] {lhs} |mapmode-v| *:vu* *:vunmap*
|
||||
:xu[nmap] {lhs} |mapmode-x| *:xu* *:xunmap*
|
||||
:sunm[ap] {lhs} |mapmode-s| *:sunm* *:sunmap*
|
||||
:ou[nmap] {lhs} |mapmode-o| *:ou* *:ounmap*
|
||||
:unm[ap]! {lhs} |mapmode-ic| *:unm!* *:unmap!*
|
||||
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
|
||||
@@ -92,6 +98,8 @@ modes.
|
||||
:mapc[lear] |mapmode-nvo| *:mapc* *:mapclear*
|
||||
:nmapc[lear] |mapmode-n| *:nmapc* *:nmapclear*
|
||||
:vmapc[lear] |mapmode-v| *:vmapc* *:vmapclear*
|
||||
:xmapc[lear] |mapmode-x| *:xmapc* *:xmapclear*
|
||||
:smapc[lear] |mapmode-s| *:smapc* *:smapclear*
|
||||
:omapc[lear] |mapmode-o| *:omapc* *:omapclear*
|
||||
:mapc[lear]! |mapmode-ic| *:mapc!* *:mapclear!*
|
||||
:imapc[lear] |mapmode-i| *:imapc* *:imapclear*
|
||||
@@ -104,6 +112,8 @@ modes.
|
||||
:map |mapmode-nvo|
|
||||
:nm[ap] |mapmode-n|
|
||||
:vm[ap] |mapmode-v|
|
||||
:xm[ap] |mapmode-x|
|
||||
:sm[ap] |mapmode-s|
|
||||
:om[ap] |mapmode-o|
|
||||
:map! |mapmode-ic|
|
||||
:im[ap] |mapmode-i|
|
||||
@@ -116,6 +126,8 @@ modes.
|
||||
:map {lhs} |mapmode-nvo| *:map_l*
|
||||
:nm[ap] {lhs} |mapmode-n| *:nmap_l*
|
||||
:vm[ap] {lhs} |mapmode-v| *:vmap_l*
|
||||
:xm[ap] {lhs} |mapmode-x| *:xmap_l*
|
||||
:sm[ap] {lhs} |mapmode-s| *:smap_l*
|
||||
:om[ap] {lhs} |mapmode-o| *:omap_l*
|
||||
:map! {lhs} |mapmode-ic| *:map_l!*
|
||||
:im[ap] {lhs} |mapmode-i| *:imap_l*
|
||||
@@ -145,6 +157,9 @@ type "a", then "bar" will get inserted.
|
||||
|
||||
1.2 SPECIAL ARGUMENTS *:map-arguments*
|
||||
|
||||
"<buffer>", "<silent>", "<script>", "<expr>" and "<unique>" can be used in any
|
||||
order. They must appear right after the command, before any other arguments.
|
||||
|
||||
*:map-local* *:map-<buffer>* *E224* *E225*
|
||||
If the first argument to one of these commands is "<buffer>" it will apply to
|
||||
mappings locally to the current buffer only. Example: >
|
||||
@@ -194,8 +209,35 @@ Example of what will fail: >
|
||||
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.
|
||||
*:map-<expr>* *:map-expression*
|
||||
If the first argument to one of these commands is "<expr>" and it is used to
|
||||
define a new mapping or abbreviation, the argument is an expression. The
|
||||
expression is evaluated to obtain the {rhs} that is used. Example: >
|
||||
:inoremap <expr> . InsertDot()
|
||||
The result of the InsertDot() function will be inserted. It could check the
|
||||
text before the cursor and start omni completion when some condition is met.
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, if you change buffer text, move the cursor, edit another
|
||||
file, etc. you may very well make command disfunctional.
|
||||
|
||||
Here is an example that inserts a list number that increases: >
|
||||
let counter = 0
|
||||
inoremap <expr> <C-L> ListItem()
|
||||
inoremap <expr> <C-R> ListReset()
|
||||
|
||||
func ListItem()
|
||||
let g:counter += 1
|
||||
return g:counter . '. '
|
||||
endfunc
|
||||
|
||||
func ListReset()
|
||||
let g:counter = 0
|
||||
return ''
|
||||
endfunc
|
||||
|
||||
CTRL-L inserts the next number, CTRL-R resets the count. CTRL-R returns an
|
||||
empty string, so that nothing is inserted.
|
||||
|
||||
|
||||
1.3 MAPPING AND MODES *:map-modes*
|
||||
@@ -208,9 +250,6 @@ There are five sets of mappings
|
||||
- For Insert mode. These are also used in Replace mode.
|
||||
- For Command-line mode: When entering a ":" or "/" command.
|
||||
|
||||
There are no separate mappings for Select mode. The same as for Visual mode
|
||||
are used |Select-mode-mapping|.
|
||||
|
||||
Special case: While typing a count for a command in Normal mode, mapping zero
|
||||
is disabled. This makes it possible to map zero without making it impossible
|
||||
to type a count with a zero.
|
||||
@@ -220,13 +259,27 @@ 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
|
||||
:nmap :nnoremap :nunmap :nmapclear yes - -
|
||||
:vmap :vnoremap :vunmap :vmapclear - yes -
|
||||
:omap :onoremap :ounmap :omapclear - - yes
|
||||
Normal Visual+Select Operator-pending ~
|
||||
:map :noremap :unmap :mapclear yes yes yes
|
||||
:nmap :nnoremap :nunmap :nmapclear yes - -
|
||||
:vmap :vnoremap :vunmap :vmapclear - yes -
|
||||
:omap :onoremap :ounmap :omapclear - - yes
|
||||
|
||||
*mapmode-x* *mapmode-s*
|
||||
Some commands work both in Visual and Select mode, some in only one. Note
|
||||
that quite often "Visual" is mentioned where both Visual and Select mode
|
||||
apply. |Select-mode-mapping|
|
||||
|
||||
commands: modes: ~
|
||||
Visual Select ~
|
||||
:vmap :vnoremap :vunmap :vmapclear yes yes
|
||||
:xmap :xnoremap :xunmap :xmapclear yes -
|
||||
:smap :snoremap :sunmap :smapclear - yes
|
||||
|
||||
*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
|
||||
Some commands work both in Insert mode and Command-line mode, some not:
|
||||
|
||||
commands: modes: ~
|
||||
Insert Command-line Lang-Arg ~
|
||||
:map! :noremap! :unmap! :mapclear! yes yes -
|
||||
:imap :inoremap :iunmap :imapclear yes - -
|
||||
@@ -778,7 +831,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>
|
||||
@@ -1089,6 +1142,7 @@ completion can be enabled:
|
||||
-complete=event autocommand events
|
||||
-complete=expression Vim expression
|
||||
-complete=file file and directory names
|
||||
-complete=shellcmd Shell command
|
||||
-complete=function function name
|
||||
-complete=help help subjects
|
||||
-complete=highlight highlight groups
|
||||
@@ -1187,8 +1241,9 @@ Replacement text
|
||||
The replacement text for a user defined command is scanned for special escape
|
||||
sequences, using <...> notation. Escape sequences are replaced with values
|
||||
from the entered command line, and all other text is copied unchanged. The
|
||||
resulting string is executed as an Ex command. If the initial < of an escape
|
||||
sequence is preceded by a backslash, the sequence is copied unchanged.
|
||||
resulting string is executed as an Ex command. To avoid the replacement use
|
||||
<lt> in plade of the initial <. Thus to include "<bang>" literally use
|
||||
"<lt>bang>".
|
||||
|
||||
The valid escape sequences are
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*mbyte.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -1257,11 +1257,16 @@ Double-width characters are supported. This works best with 'guifontwide' or
|
||||
normal width and a space to fill the gap. Note that the 'guifontset' option
|
||||
is no longer relevant in the GTK+ 2 GUI.
|
||||
|
||||
Up to two combining characters can be used. The combining character is drawn
|
||||
on top of the preceding character. When editing text a composing character is
|
||||
mostly considered part of the preceding character. For example "x" will
|
||||
delete a character and its following composing characters by default. If the
|
||||
'delcombine' option is on, then pressing 'x' will delete the combining
|
||||
*mbyte-combining* *mbyte-composing*
|
||||
A composing or combining character is used to change the meaning of the
|
||||
character before it. The combining characters are drawn on top of the
|
||||
preceding character.
|
||||
Up to two combining characters can be used by default. This can be changed
|
||||
with the 'maxcombine' option.
|
||||
When editing text a composing character is mostly considered part of the
|
||||
preceding character. For example "x" will delete a character and its
|
||||
following composing characters by default.
|
||||
If the 'delcombine' option is on, then pressing 'x' will delete the combining
|
||||
characters, one at a time, then the base character. But when inserting, you
|
||||
type the first character and the following composing characters separately,
|
||||
after which they will be joined. The "r" command will not allow you to type a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -751,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 @@
|
||||
*netbeans.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
|
||||
*netbeans.txt* For Vim version 7.0aa. Last change: 2006 Mar 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -194,7 +194,7 @@ Partial writes disallowed for NetBeans buffers
|
||||
*E658*
|
||||
NetBeans connection lost for this buffer
|
||||
NetBeans has become confused about the state of this file.
|
||||
Rather than risc data corruption, NetBeans has severed the
|
||||
Rather than risk data corruption, NetBeans has severed the
|
||||
connection for this file. Vim will take over responsibility
|
||||
for saving changes to this file and NetBeans will no longer
|
||||
know of these changes.
|
||||
@@ -259,10 +259,19 @@ problems and has been fixed in 2.2. To decrease the likelihood of this
|
||||
confusion happening again, netbeans_saved() has been renamed to
|
||||
netbeans_save_buffer().
|
||||
|
||||
We are now at version 2.3. For the differences between 2.2 and 2.3 search for
|
||||
"2.3" below.
|
||||
|
||||
The messages are currently sent over a socket. Since the messages are in
|
||||
plain UTF-8 text this protocol could also be used with any other communication
|
||||
mechanism.
|
||||
|
||||
To see an example implementation look at the gvim tool in Agide. Currently
|
||||
found here:
|
||||
http://cvs.sf.net/viewcvs.py/a-a-p/Agide/Tools/GvimTool.py?view=markup
|
||||
|
||||
|
||||
|
||||
10.1 Kinds of messages |nb-messages|
|
||||
10.2 Terms |nb-terms|
|
||||
10.3 Commands |nb-commands|
|
||||
@@ -612,11 +621,22 @@ getText Return the contents of the buffer as a string.
|
||||
insert off text
|
||||
Insert "text" before position "off". "text" is a string
|
||||
argument, "off" a number.
|
||||
"off" should have a "\n" (newline) at the end of each line.
|
||||
Or "\r\n" when 'fileformat' is "dos". When using "insert" in
|
||||
an empty buffer Vim will set 'fileformat' accordingly.
|
||||
When "off" points to the start of a line the text is inserted
|
||||
above this line. Thus when "off" is zero lines are inserted
|
||||
before the first line.
|
||||
When "off" points after the start of a line, possibly on the
|
||||
NUL at the end of a line, the first line of text is appended
|
||||
to this line. Further lines come below it.
|
||||
Possible replies:
|
||||
123 no problem
|
||||
123 !message failed
|
||||
Note that the message in the reply is not quoted.
|
||||
Also sets the current buffer, if necessary.
|
||||
Does not move the cursor to the changed text.
|
||||
Resets undo information.
|
||||
|
||||
remove off length
|
||||
Delete "length" bytes of text at position "off". Both
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
|
||||
|
||||
|
||||
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
|
||||
@@ -447,8 +447,8 @@ There are two forms of modelines. The first form:
|
||||
where each part between ':' is the argument for a ":set"
|
||||
command
|
||||
|
||||
Example: >
|
||||
vi:noai:sw=3 ts=6
|
||||
Example:
|
||||
vi:noai:sw=3 ts=6 ~
|
||||
|
||||
The second form (this is compatible with some versions of Vi):
|
||||
|
||||
@@ -464,8 +464,8 @@ se[t] the string "set " or "se " (note the space)
|
||||
: a colon
|
||||
[text] any text or empty
|
||||
|
||||
Example: >
|
||||
/* vim: set ai tw=75: */
|
||||
Example:
|
||||
/* vim: set ai tw=75: */ ~
|
||||
|
||||
The white space before {vi:|vim:|ex:} is required. This minimizes the chance
|
||||
that a normal word like "lex:" is caught. There is one exception: "vi:" and
|
||||
@@ -493,10 +493,10 @@ number can be specified where "vim:" is used:
|
||||
vim={vers}: version {vers}
|
||||
vim>{vers}: version after {vers}
|
||||
{vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
|
||||
For example, to use a modeline only for Vim 6.0 and later: >
|
||||
/* vim600: set foldmethod=marker: */
|
||||
To use a modeline for Vim before version 5.7: >
|
||||
/* vim<570: set sw=4: */
|
||||
For example, to use a modeline only for Vim 6.0 and later:
|
||||
/* vim600: set foldmethod=marker: */ ~
|
||||
To use a modeline for Vim before version 5.7:
|
||||
/* vim<570: set sw=4: */ ~
|
||||
There can be no blanks between "vim" and the ":".
|
||||
|
||||
|
||||
@@ -504,16 +504,16 @@ The number of lines that are checked can be set with the 'modelines' option.
|
||||
If 'modeline' is off or 'modelines' is 0 no lines are checked.
|
||||
|
||||
Note that for the first form all of the rest of the line is used, thus a line
|
||||
like: >
|
||||
/* vi:ts=4: */
|
||||
will give an error message for the trailing "*/". This line is OK: >
|
||||
/* vi:set ts=4: */
|
||||
like:
|
||||
/* vi:ts=4: */ ~
|
||||
will give an error message for the trailing "*/". This line is OK:
|
||||
/* vi:set ts=4: */ ~
|
||||
|
||||
If an error is detected the rest of the line is skipped.
|
||||
|
||||
If you want to include a ':' in a set command precede it with a '\'. The
|
||||
backslash in front of the ':' will be removed. Example: >
|
||||
/* vi:set dir=c\:\tmp: */
|
||||
backslash in front of the ':' will be removed. Example:
|
||||
/* vi:set dir=c\:\tmp: */ ~
|
||||
This sets the 'dir' option to "c:\tmp". Only a single backslash before the
|
||||
':' is removed. Thus to include "\:" you have to specify "\\:".
|
||||
|
||||
@@ -1013,12 +1013,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'balloonexpr'* *'bexpr'*
|
||||
'balloonexpr' 'bexpr' string (default "")
|
||||
global
|
||||
global or local to buffer |global-local|
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+balloon_eval|
|
||||
feature}
|
||||
Expression to show in evaluation balloon. It is only used when
|
||||
'ballooneval' is on. These variables can be used:
|
||||
Expression for text to show in evaluation balloon. It is only used
|
||||
when 'ballooneval' is on. These variables can be used:
|
||||
|
||||
v:beval_bufnr number of the buffer in which balloon is going to show
|
||||
v:beval_winnr number of the window
|
||||
@@ -1050,7 +1050,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
To check whether line breaks in the balloon text work use this check: >
|
||||
if has("balloon_multiline")
|
||||
<
|
||||
< When they are supported "\n" characters will start a new line. If the
|
||||
expression evaluates to a |List| this is equal to using each List item
|
||||
as a string and putting "\n" in between them.
|
||||
|
||||
*'binary'* *'bin'* *'nobinary'* *'nobin'*
|
||||
'binary' 'bin' boolean (default off)
|
||||
local to buffer
|
||||
@@ -1576,6 +1579,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
|
||||
@@ -1618,8 +1622,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu")
|
||||
'completeopt' 'cot' string (default: "menu,preview")
|
||||
global
|
||||
{not available when compiled without the
|
||||
|+insert_expand| feature}
|
||||
{not in Vi}
|
||||
A comma separated list of options for Insert mode completion
|
||||
|ins-completion|. The supported values are:
|
||||
@@ -1628,9 +1634,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
menu is only shown when there is more than one match and
|
||||
sufficient colors are available. |ins-completion-menu|
|
||||
|
||||
longest Only insert the longest common text of the matches. Use
|
||||
CTRL-L to add more characters.
|
||||
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.
|
||||
|
||||
preview Show extra information about the currently selected
|
||||
completion in the preview window.
|
||||
|
||||
*'confirm'* *'cf'* *'noconfirm'* *'nocf'*
|
||||
'confirm' 'cf' boolean (default off)
|
||||
@@ -2031,13 +2045,35 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Give messages when adding a cscope database. See |cscopeverbose|.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
|
||||
*'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
|
||||
'cursorcolumn' 'cuc' boolean (default off)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Highlight the screen column of the cursor with CursorColumn
|
||||
|hl-CursorColumn|. Useful to align text. Will make screen redrawing
|
||||
slower.
|
||||
|
||||
*'cursorline'* *'cul'* *'nocursorline'* *'nocul'*
|
||||
'cursorline' 'cul' boolean (default off)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Highlight the screen line of the cursor with CursorLine
|
||||
|hl-CursorLine|. Useful to easily spot the cursor. Will make screen
|
||||
redrawing slower.
|
||||
|
||||
|
||||
*'debug'*
|
||||
'debug' string (default "")
|
||||
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.
|
||||
@@ -2083,6 +2119,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.
|
||||
@@ -2147,11 +2185,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
exactly. It should ignore adding trailing
|
||||
white space, but not leading white space.
|
||||
|
||||
horizontal Start diff mode with horizontal splits (unless
|
||||
explicitly specified otherwise).
|
||||
|
||||
vertical Start diff mode with vertical splits (unless
|
||||
explicitly specified otherwise).
|
||||
|
||||
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
|
||||
starting diff mode. Without this 2 is used.
|
||||
|
||||
Examples: >
|
||||
|
||||
:set diffopt=filler,context:4
|
||||
:set diffopt=
|
||||
:set diffopt=filler
|
||||
:set diffopt=filler,foldcolumn:3
|
||||
<
|
||||
*'digraph'* *'dg'* *'nodigraph'* *'nodg'*
|
||||
'digraph' 'dg' boolean (default off)
|
||||
@@ -2445,6 +2492,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
|
||||
@@ -2494,9 +2542,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.
|
||||
@@ -2507,6 +2557,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
environment. This is the default value for 'encoding'. It is useful
|
||||
when 'encoding' is set to "utf-8" and your environment uses a
|
||||
non-latin1 encoding, such as Russian.
|
||||
When 'encoding' is "utf-8" and a file contains an illegal byte
|
||||
sequence it won't be recognized as UTF-8. You can use the |8g8|
|
||||
command to find the illegal byte sequence.
|
||||
WRONG VALUES: WHAT'S WRONG:
|
||||
latin1,utf-8 "latin1" will always be used
|
||||
utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8
|
||||
@@ -2612,9 +2665,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
this use the ":filetype on" command. |:filetype|
|
||||
Setting this option to a different value is most useful in a modeline,
|
||||
for a file for which the file type is not automatically recognized.
|
||||
Example, for in an IDL file: >
|
||||
/* vim: set filetype=idl : */
|
||||
< |FileType| |filetypes|
|
||||
Example, for in an IDL file:
|
||||
/* vim: set filetype=idl : */ ~
|
||||
|FileType| |filetypes|
|
||||
When a dot appears in the value then this separates two filetype
|
||||
names. Example:
|
||||
/* vim: set filetype=c.doxygen : */ ~
|
||||
This will use the "c" filetype first, then the "doxygen" filetype.
|
||||
This works both for filetype plugins and for syntax files. More than
|
||||
one dot may appear.
|
||||
Do not confuse this option with 'osfiletype', which is for the file
|
||||
type that is actually stored with the file.
|
||||
This option is not copied to another buffer, independent of the 's' or
|
||||
@@ -2707,7 +2766,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
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|.
|
||||
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
@@ -2882,17 +2941,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}
|
||||
@@ -3221,6 +3306,12 @@ 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.
|
||||
The GUI tabs are only supported on some systens, currently
|
||||
only for GTK.
|
||||
|
||||
'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
|
||||
@@ -3281,6 +3372,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")
|
||||
@@ -3670,6 +3777,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
cursor to the match.
|
||||
The highlighting can be set with the 'i' flag in 'highlight'.
|
||||
See also: 'hlsearch'.
|
||||
CTRL-L can be used to add one character from after the current match
|
||||
to the command line.
|
||||
CTRL-R CTRL-W can be used to add the word at the end of the current
|
||||
match, excluding the characters that were already typed.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'indentexpr'* *'inde'*
|
||||
@@ -3961,8 +4072,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
|
||||
<
|
||||
@@ -4231,6 +4342,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set. Note that this is not in milliseconds, like other options that
|
||||
set a time. This is to be compatible with Nvi.
|
||||
|
||||
*'maxcombine'* *'mco'*
|
||||
'maxcombine' 'mco' number (default 2)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
The maximum number of combining characters supported for displaying.
|
||||
Only used when 'encoding' is "utf-8".
|
||||
The default is OK for most languages. Hebrew may require 4.
|
||||
Maximum value is 6.
|
||||
Even when this option is set to 2 you can still edit text with more
|
||||
combining characters, you just can't see them. Use |g8| or |ga|.
|
||||
See |mbyte-combining|.
|
||||
|
||||
*'maxfuncdepth'* *'mfd'*
|
||||
'maxfuncdepth' 'mfd' number (default 100)
|
||||
global
|
||||
@@ -4588,7 +4713,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
|
||||
@@ -4917,6 +5042,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
When on a ":" prompt is used in Ex mode.
|
||||
|
||||
*'pumheight'* *'ph'*
|
||||
'pumheight' 'ph' number (default 0)
|
||||
global
|
||||
{not available when compiled without the
|
||||
|+insert_expand| feature}
|
||||
{not in Vi}
|
||||
Determines the maximum number of items to show in the popup menu.
|
||||
When zero as much space as available is used.
|
||||
|ins-completion-menu|.
|
||||
|
||||
|
||||
*'quoteescape'* *'qe'*
|
||||
'quoteescape' 'qe' string (default "\")
|
||||
local to buffer
|
||||
@@ -4943,6 +5079,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
Allows for mappings to work recursively. If you do not want this for
|
||||
a single entry, use the :noremap[!] command.
|
||||
NOTE: To avoid portability problems with Vim scripts, always keep
|
||||
this option at the default "on". Only switch it off when working with
|
||||
old Vi scripts.
|
||||
|
||||
*'report'*
|
||||
'report' number (default 2)
|
||||
@@ -5045,7 +5184,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: >
|
||||
@@ -5310,6 +5449,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
|
||||
@@ -5638,7 +5779,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)
|
||||
@@ -5652,6 +5795,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
|
||||
@@ -5959,6 +6117,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|.
|
||||
|
||||
@@ -6017,15 +6183,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
|
||||
@@ -6193,9 +6368,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Otherwise this option does not always reflect the current syntax (the
|
||||
b:current_syntax variable does).
|
||||
This option is most useful in a modeline, for a file which syntax is
|
||||
not automatically recognized. Example, in an IDL file: >
|
||||
/* vim: set syntax=idl : */
|
||||
< To switch off syntax highlighting for the current file, use: >
|
||||
not automatically recognized. Example, in an IDL file:
|
||||
/* vim: set syntax=idl : */ ~
|
||||
When a dot appears in the value then this separates two filetype
|
||||
names. Example:
|
||||
/* vim: set syntax=c.doxygen : */ ~
|
||||
This will use the "c" syntax first, then the "doxygen" syntax.
|
||||
Note that the second one must be prepared to be loaded as an addition,
|
||||
otherwise it will be skipped. More than one dot may appear.
|
||||
To switch off syntax highlighting for the current file, use: >
|
||||
:set syntax=OFF
|
||||
< To switch syntax highlighting on according to the current value of the
|
||||
'filetype' option: >
|
||||
@@ -6206,7 +6387,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
|
||||
@@ -6809,7 +7024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Currently, these messages are given:
|
||||
>= 1 When the viminfo file is read or written.
|
||||
>= 2 When a file is ":source"'ed.
|
||||
>= 5 Every searched tags file.
|
||||
>= 5 Every searched tags file and include file.
|
||||
>= 8 Files for which a group of autocommands is executed.
|
||||
>= 9 Every executed autocommand.
|
||||
>= 12 Every executed function.
|
||||
@@ -6986,10 +7201,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
block Allow virtual editing in Visual block mode.
|
||||
insert Allow virtual editing in Insert mode.
|
||||
all Allow virtual editing in all modes.
|
||||
onemore Allow the cursor to move just past the end of the line
|
||||
|
||||
Virtual editing means that the cursor can be positioned where there is
|
||||
no actual character. This can be halfway into a Tab or beyond the end
|
||||
of the line. Useful for selecting a rectangle in Visual mode and
|
||||
editing a table.
|
||||
"onemore" is not the same, it will only allow moving the cursor just
|
||||
after the last character of the line. This makes some commands more
|
||||
consistent. Previously the cursor was always past the end of the line
|
||||
if the line was empty. But it is far from Vi compatible. It may also
|
||||
break some plugins or Vim scripts. For example because |l| can move
|
||||
the cursor after the last character. Use with care!
|
||||
Using the |$| command will move to the last character in the line, not
|
||||
past it. This may actually move the cursor to the left!
|
||||
It doesn't make sense to combine "all" with "onemore", but you will
|
||||
not get a warning for it.
|
||||
|
||||
*'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
|
||||
'visualbell' 'vb' boolean (default off)
|
||||
@@ -7016,7 +7243,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.
|
||||
@@ -7031,8 +7258,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
char key mode ~
|
||||
b <BS> Normal and Visual
|
||||
s <Space> Normal and Visual
|
||||
h "h" Normal and Visual
|
||||
l "l" Normal and Visual
|
||||
h "h" Normal and Visual (not recommended)
|
||||
l "l" Normal and Visual (not recommended)
|
||||
< <Left> Normal and Visual
|
||||
> <Right> Normal and Visual
|
||||
~ "~" Normal
|
||||
@@ -7048,8 +7275,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"dh". If you use this, you may also want to use the mapping
|
||||
":map <BS> X" to make backspace delete the character in front of the
|
||||
cursor.
|
||||
When 'l' is included, you get a side effect: "yl" on an empty line
|
||||
will include the <EOL>, so that "p" will insert a new line.
|
||||
When 'l' is included and it is used after an operator at the end of a
|
||||
line then it will not move to the next line. This makes "dl", "cl",
|
||||
"yl" etc. work normally.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
@@ -7253,6 +7481,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|quickfix-window|.
|
||||
The height may be changed anyway when running out of room.
|
||||
|
||||
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
|
||||
'winfixwidth' 'wfw' boolean (default off)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the +windows
|
||||
feature}
|
||||
Keep the window width when windows are opened or closed and
|
||||
'equalalways' is set.
|
||||
The width may be changed anyway when running out of room.
|
||||
|
||||
*'winminheight'* *'wmh'*
|
||||
'winminheight' 'wmh' number (default 1)
|
||||
global
|
||||
|
||||
@@ -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_mac.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
|
||||
*os_mac.txt* For Vim version 7.0aa. Last change: 2006 Mar 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -33,9 +33,10 @@ Indianapolis IN 46220 USA
|
||||
==============================================================================
|
||||
1. Filename Convention *mac-filename*
|
||||
|
||||
You can use either the unix or mac path separator or a mix of both. In order
|
||||
to determine if the specified filename is relative to the current folder or
|
||||
absolute (i.e. relative to the "Desktop"), the following algorithm is used:
|
||||
Starting with Vim version 7 you can just use the unix path separators with
|
||||
Vim. In order to determine if the specified filename is relative to the
|
||||
current folder or absolute (i.e. relative to the "Desktop"), the following
|
||||
algorithm is used:
|
||||
|
||||
If the path start by a "/", the path is absolute
|
||||
If the path start by a ":", the path is relative
|
||||
@@ -58,10 +59,16 @@ You can use the |$VIM| and |$VIMRUNTIME| variable. >
|
||||
==============================================================================
|
||||
2. .vimrc and .vim files *mac-vimfile*
|
||||
|
||||
On the Mac files starting with a dot "." are discouraged, thus the rc files
|
||||
are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files can be in
|
||||
any format (mac, dos or unix). Vim can handle any file format when the
|
||||
|'nocompatible'| option is set, otherwise it will only handle mac format
|
||||
It is recommended to use Unix style line separators for Vim scripts, thus a
|
||||
single newline character.
|
||||
|
||||
When starting up Vim will load the $VIMRUNTIME/macmap.vim script to define
|
||||
default command-key mappings.
|
||||
|
||||
On older systems files starting with a dot "." are discouraged, thus the rc
|
||||
files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files
|
||||
can be in any format (mac, dos or unix). Vim can handle any file format when
|
||||
the |'nocompatible'| option is set, otherwise it will only handle mac format
|
||||
files.
|
||||
|
||||
==============================================================================
|
||||
@@ -80,14 +87,6 @@ A: Assuming that Vim.app is located in /Applications:
|
||||
==============================================================================
|
||||
4. Mac Lack *mac-lack*
|
||||
|
||||
The filenames containing both ":" and "/" are sometimes misinterpreted. (just
|
||||
re-execute the command)
|
||||
|
||||
Scrollbar are not scrolling live, and when only the arrow or scroll area, a
|
||||
limit of 32 line or page is scrolled.
|
||||
|
||||
Syntax highlighting works on 68k Macs but is _really_ slow.
|
||||
|
||||
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
|
||||
Shift-Control-2.
|
||||
|
||||
|
||||
@@ -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: 2006 Feb 01
|
||||
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -16,8 +16,9 @@ explanations are in chapter 27 |usr_27.txt|.
|
||||
5. Multi items |pattern-multi-items|
|
||||
6. Ordinary atoms |pattern-atoms|
|
||||
7. Ignoring case in a pattern |/ignorecase|
|
||||
8. Compare with Perl patterns |perl-patterns|
|
||||
9. Highlighting matches |match-highlight|
|
||||
8. Composing characters |patterns-composing|
|
||||
9. Compare with Perl patterns |perl-patterns|
|
||||
10. Highlighting matches |match-highlight|
|
||||
|
||||
==============================================================================
|
||||
1. Search commands *search-commands* *E486*
|
||||
@@ -161,7 +162,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
|
||||
@@ -1104,12 +1105,6 @@ Examples:
|
||||
\cfoo - - foo Foo FOO
|
||||
foo\C - - foo
|
||||
|
||||
*/\Z*
|
||||
When "\Z" appears anywhere in the pattern, composing characters are ignored.
|
||||
Thus only the base characters need to match, the composing characters may be
|
||||
different and the number of composing characters may differ. Only relevant
|
||||
when 'encoding' is "utf-8".
|
||||
|
||||
Technical detail: *NL-used-for-Nul*
|
||||
<Nul> characters in the file are stored as <NL> in memory. In the display
|
||||
they are shown as "^@". The translation is done when reading and writing
|
||||
@@ -1134,7 +1129,27 @@ expect. But invalid bytes may cause trouble, a pattern with an invalid byte
|
||||
will probably never match.
|
||||
|
||||
==============================================================================
|
||||
8. Compare with Perl patterns *perl-patterns*
|
||||
8. Composing characters *patterns-composing*
|
||||
|
||||
*/\Z*
|
||||
When "\Z" appears anywhere in the pattern, composing characters are ignored.
|
||||
Thus only the base characters need to match, the composing characters may be
|
||||
different and the number of composing characters may differ. Only relevant
|
||||
when 'encoding' is "utf-8".
|
||||
|
||||
When a composing character appears at the start of the pattern of after an
|
||||
item that doesn't include the composing character, a match is found at any
|
||||
character that includes this composing character.
|
||||
|
||||
When using a dot and a composing character, this works the same as the
|
||||
composing character by itself, except that it doesn't matter what comes before
|
||||
this.
|
||||
|
||||
The order of composing characters matters, even though changing the order
|
||||
doen't change what a character looks like. This may change in the future.
|
||||
|
||||
==============================================================================
|
||||
9. Compare with Perl patterns *perl-patterns*
|
||||
|
||||
Vim's regexes are most similar to Perl's, in terms of what you can do. The
|
||||
difference between them is mostly just notation; here's a summary of where
|
||||
@@ -1144,7 +1159,7 @@ Capability in Vimspeak in Perlspeak ~
|
||||
----------------------------------------------------------------
|
||||
force case insensitivity \c (?i)
|
||||
force case sensitivity \C (?-i)
|
||||
backref-less grouping \%(atom) (?:atom)
|
||||
backref-less grouping \%(atom\) (?:atom)
|
||||
conservative quantifiers \{-n,m} *?, +?, ??, {}?
|
||||
0-width match atom\@= (?=atom)
|
||||
0-width non-match atom\@! (?!atom)
|
||||
@@ -1177,10 +1192,10 @@ Finally, these constructs are unique to Perl:
|
||||
- \& (which is to \| what "and" is to "or"; it forces several branches
|
||||
to match at one spot)
|
||||
- matching lines/columns by number: \%5l \%5c \%5v
|
||||
- limiting the "return value" of a regex: \zs \ze
|
||||
- setting the start and end of the match: \zs \ze
|
||||
|
||||
==============================================================================
|
||||
9. Highlighting matches *match-highlight*
|
||||
10. Highlighting matches *match-highlight*
|
||||
|
||||
*:mat* *:match*
|
||||
:mat[ch] {group} /{pattern}/
|
||||
@@ -1191,14 +1206,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
|
||||
@@ -1213,4 +1237,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: Jan 27, 2006
|
||||
*pi_netrw.txt* For Vim version 7.0. Last change: Mar 21, 2006
|
||||
|
||||
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
==============================================================================
|
||||
0. Contents *netrw-contents*
|
||||
|
||||
1. Starting With Netrw.................................|netrw-start|
|
||||
1. Starting With Netrw..................................|netrw-start|
|
||||
2. Netrw Reference......................................|netrw-ref|
|
||||
CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
|
||||
CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp|
|
||||
READING............................................|netrw-read|
|
||||
WRITING............................................|netrw-write|
|
||||
DIRECTORY LISTING..................................|netrw-dirlist|
|
||||
@@ -32,6 +32,7 @@
|
||||
Quick Reference Commands Table.....................|netrw-browse-cmds|
|
||||
Netrw Browser Variables............................|netrw-browse-var|
|
||||
Introduction To Directory Browsing.................|netrw-browse-intro|
|
||||
Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
|
||||
Directory Exploring Commands.......................|netrw-explore|
|
||||
Refreshing The Listing.............................|netrw-ctrl-l|
|
||||
Going Up...........................................|netrw--|
|
||||
@@ -39,7 +40,7 @@
|
||||
Obtaining A File...................................|netrw-O|
|
||||
Thin, Long, and Wide Listings......................|netrw-i|
|
||||
Making A New Directory.............................|netrw-d|
|
||||
Deleting Files Or Directories......................|netrw-delete|
|
||||
Deleting Files Or Directories......................|netrw-D|
|
||||
Renaming Files Or Directories......................|netrw-move|
|
||||
Hiding Files Or Directories........................|netrw-a|
|
||||
Edit File Or Directory Hiding List.................|netrw-ctrl-h|
|
||||
@@ -132,7 +133,7 @@ section, |netrw-externapp|.
|
||||
==============================================================================
|
||||
2. Netrw Reference *netrw-ref*
|
||||
|
||||
CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp*
|
||||
CONTROLLING EXTERNAL APPLICATIONS *netrw-externapp*
|
||||
|
||||
Protocol Variable Default Value
|
||||
-------- ---------------- -------------
|
||||
@@ -161,7 +162,7 @@ READING *netrw-read* *netrw-nread*
|
||||
:Nread "sftp://[user@]machine/path" uses sftp
|
||||
|
||||
WRITING *netrw-write* *netrw-nwrite*
|
||||
:Nwrite ? give help
|
||||
:Nwrite ? give help
|
||||
:Nwrite "machine:path" uses rcp
|
||||
:Nwrite "machine path" uses ftp w/ <.netrc>
|
||||
:Nwrite "machine id password path" uses ftp
|
||||
@@ -207,7 +208,7 @@ VARIABLES *netrw-variables*
|
||||
="ascii"
|
||||
|
||||
*g:netrw_ignorenetrc* =0 (default)
|
||||
=1 If you have a <.netrc> file but it doesn't work and
|
||||
=1 If you have a <.netrc> file but it doesn't work and
|
||||
you want it ignored, then set this variable as shown.
|
||||
|
||||
*g:netrw_uid* (ftp) user-id, retained on a per-session basis
|
||||
@@ -266,10 +267,12 @@ series of commands (typically ftp) which it issues to an external program
|
||||
from/written to a temporary file (under Unix/Linux, /tmp/...) which the
|
||||
<netrw.vim> script will clean up.
|
||||
|
||||
*netrw-putty* *netrw-pscp*
|
||||
One may modify any protocol's implementing external application by setting a
|
||||
variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
|
||||
"scp -q").
|
||||
|
||||
"scp -q"). As an example, consider using PuTTY: >
|
||||
let g:netrw_scp_cmd= '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
|
||||
<
|
||||
Ftp, an old protocol, seems to be blessed by numerous implementations.
|
||||
Unfortunately, some implementations are noisy (ie., add junk to the end of the
|
||||
file). Thus, concerned users may decide to write a NetReadFixup() function
|
||||
@@ -456,7 +459,7 @@ additional commands available.
|
||||
|
||||
|
||||
==============================================================================
|
||||
7. 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:
|
||||
@@ -588,7 +591,7 @@ To handle the SSL certificate dialog for untrusted servers, one may pull
|
||||
down the certificate and place it into /usr/ssl/cert.pem. This operation
|
||||
renders the server treatment as "trusted".
|
||||
|
||||
*netrw-fixup* *netreadfixup*
|
||||
*netrw-fixup* *netreadfixup*
|
||||
If your ftp for whatever reason generates unwanted lines (such as AUTH
|
||||
messages) you may write a NetReadFixup(tmpfile) function:
|
||||
>
|
||||
@@ -628,8 +631,8 @@ itself:
|
||||
==============================================================================
|
||||
8. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
|
||||
|
||||
MAPS *netrw-maps*
|
||||
?................Help.......................................|netrw-help|
|
||||
MAPS *netrw-maps*
|
||||
<F1>.............Help.......................................|netrw-help|
|
||||
<cr>.............Browsing...................................|netrw-cr|
|
||||
<del>............Deleting Files or Directories..............|netrw-delete|
|
||||
-................Going Up...................................|netrw--|
|
||||
@@ -663,12 +666,12 @@ MAPS *netrw-maps*
|
||||
:Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
|
||||
:NetrwSettings.............................................|netrw-settings|
|
||||
|
||||
QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
|
||||
QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
|
||||
>
|
||||
------- -----------
|
||||
Command Explanation
|
||||
------- -----------
|
||||
< ? Causes Netrw to issue help
|
||||
< <F1> Causes Netrw to issue help
|
||||
<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--|
|
||||
@@ -712,13 +715,14 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
default: =0
|
||||
|
||||
*g:netrw_altv* change from left splitting to right splitting
|
||||
by setting this variable (see |netrw-v|)
|
||||
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"
|
||||
@@ -727,7 +731,27 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
< is used, then netrwFileHandler() will look for
|
||||
a script/function to handle the given
|
||||
extension. (see |netrw_filehandler|).
|
||||
<
|
||||
|
||||
*g:netrw_fastbrowse* =0: slow speed browsing, never re-use
|
||||
directory listings; always obtain
|
||||
directory listings.
|
||||
=1: medium speed browsing, re-use directory
|
||||
listings only when remote browsing.
|
||||
(default value)
|
||||
=2: fast browsing, only obtains directory
|
||||
listings when the directory hasn't been
|
||||
seen before (or |netrw-ctrl-l| is used).
|
||||
Fast browsing retains old directory listing
|
||||
buffers so that they don't need to be
|
||||
re-acquired. This feature is especially
|
||||
important for remote browsing. However, if
|
||||
a file is introduced or deleted into or from
|
||||
such directories, the old directory buffer
|
||||
becomes out-of-date. One may always refresh
|
||||
such a directory listing with |netrw-ctrl-l|.
|
||||
This option gives the choice of the trade-off
|
||||
between accuracy and speed to the user.
|
||||
|
||||
*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
|
||||
@@ -802,7 +826,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
\.info$,\.swp$,\.obj$'
|
||||
|
||||
*g:netrw_ssh_cmd* One may specify an executable command
|
||||
to use instead of ssh for remote actions
|
||||
to use instead of ssh for remote actions
|
||||
such as listing, file removal, etc.
|
||||
default: ssh
|
||||
|
||||
@@ -811,7 +835,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
want masquerading as "directories" and "files".
|
||||
Use this pattern to remove such embedded
|
||||
messages. By default its value is:
|
||||
'^total\s\+\d\+$'
|
||||
'^total\s\+\d\+$'
|
||||
|
||||
*g:netrw_timefmt* specify format string to strftime() (%c)
|
||||
default: "%c"
|
||||
@@ -819,6 +843,12 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
*g:netrw_winsize* specify initial size of new o/v windows
|
||||
default: ""
|
||||
|
||||
*g:DrChipTopLvlMenu* This variable specifies the top level
|
||||
submenu name; by default, its "DrChip.".
|
||||
If you wish to change this, do so in your
|
||||
.vimrc. It affects all of my plugins which
|
||||
have menus.
|
||||
|
||||
INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
|
||||
|
||||
Netrw supports the browsing of directories on the local system and on remote
|
||||
@@ -843,6 +873,18 @@ For local directories, the trailing slash is not required.
|
||||
If you'd like to avoid entering the password in for remote directory listings
|
||||
with ssh or scp, see |netrw-listhack|.
|
||||
|
||||
|
||||
NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible*
|
||||
|
||||
Netrw will not work properly with >
|
||||
|
||||
:set acd
|
||||
:set fo=...ta...
|
||||
<
|
||||
If either of these options are present when browsing is attempted, netrw
|
||||
will change them by using noacd and removing the ta suboptions from the
|
||||
|'formatoptions'|.
|
||||
|
||||
*netrw-explore* *netrw-pexplore*
|
||||
*netrw-hexplore* *netrw-sexplore*
|
||||
DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore*
|
||||
@@ -931,7 +973,7 @@ preferred. The NetList function which implements remote directory browsing
|
||||
expects that directories will be flagged by a trailing slash.
|
||||
|
||||
|
||||
BROWSING *netrw-cr*
|
||||
BROWSING *netrw-cr*
|
||||
|
||||
Browsing is simple: move the cursor onto a file or directory of interest.
|
||||
Hitting the <cr> (the return key) will select the file or directory.
|
||||
@@ -1271,6 +1313,9 @@ For Linux/Unix systems, I suggest looking into
|
||||
It gives a tip for setting up password-less use of ssh and scp, and discusses
|
||||
the associated security issues.
|
||||
|
||||
For Windows, the vim mailing list has mentioned that Pageant helps with
|
||||
avoiding the constant need to enter the password.
|
||||
|
||||
|
||||
NETRW SETTINGS *netrw-settings*
|
||||
|
||||
@@ -1344,7 +1389,7 @@ help on what each of the variables do.
|
||||
P6. I want my current directory to track my browsing.
|
||||
How do I do that?
|
||||
|
||||
let g:netrw_keepdir= 0
|
||||
let g:netrw_keepdir= 0
|
||||
|
||||
|
||||
==============================================================================
|
||||
@@ -1399,6 +1444,18 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
==============================================================================
|
||||
11. History *netrw-history* {{{1
|
||||
|
||||
v81: * FocusGained also used to refresh/wipe local browser directory
|
||||
buffers
|
||||
* (bugfix) netrw was leaving [Scratch] buffers behind when the
|
||||
the user had the "hidden" option set. The 'hidden' option is
|
||||
now bypassed.
|
||||
v80: * ShellCmdPost event used in conjunction with g:netrw_fastbrowse
|
||||
to refresh/wipe local browser directory buffers.
|
||||
v79: * directories are now displayed with nowrap
|
||||
* (bugfix) if the column width was smaller than the largest
|
||||
file's name, then netrw would hang when using wide-listing
|
||||
mode - fixed
|
||||
* g:netrw_fastbrowse introduced
|
||||
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
|
||||
|
||||
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,4 +1,4 @@
|
||||
*zip.txt* Zip File Interface Nov 28, 2005
|
||||
*zip.txt* Zip File Interface Mar 22, 2006
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
@@ -29,6 +29,8 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
|
||||
|
||||
==============================================================================
|
||||
3. History *zip-history*
|
||||
v7 Mar 22, 2006 * escaped some characters that can cause filename handling
|
||||
problems.
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -189,6 +189,15 @@ command with 'l'.
|
||||
:lb[uffer] [bufnr] Same as ":cbuffer", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cgetb* *:cgetbuffer*
|
||||
:cgetb[uffer] [bufnr] Read the error list from the current buffer. Just
|
||||
like ":cbuffer" but don't jump to the first error.
|
||||
|
||||
*:lgetb* *:lgetbuffer*
|
||||
:lgetb[uffer] [bufnr] Same as ":cgetbuffer", 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
|
||||
@@ -229,6 +238,14 @@ command with 'l'.
|
||||
<
|
||||
*:lad* *:laddexpr*
|
||||
:lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cgete* *:cgetexpr*
|
||||
:cgete[xpr][!] {expr} Create a quickfix list using the result of {expr}.
|
||||
Just like ":cexpr", but don't jump to the first error.
|
||||
|
||||
*:lgete* *:lgetexpr*
|
||||
:lgete[xpr][!] {expr} Same as ":cgetexpr", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cl* *:clist*
|
||||
@@ -478,8 +495,13 @@ advantages are:
|
||||
- Uses Vim search patterns. Multi-line patterns can be used.
|
||||
- When plugins are enabled: compressed and remote files can be searched.
|
||||
|gzip| |netrw|
|
||||
- When 'hidden' is set the files are kept loaded, thus repeating a search is
|
||||
much faster. Uses a lot of memory though!
|
||||
|
||||
To be able to do this Vim loads each file as if it is being edited. When
|
||||
there is no match in the file the associated buffer is wiped out again. The
|
||||
'hidden' option is ignored here to avoid running out of memory or file
|
||||
descriptors when searching many files. However, when the |:hide| command
|
||||
modifier is used the buffers are kept loaded. This makes following searches
|
||||
in the same files a lot faster.
|
||||
|
||||
|
||||
5.1 using Vim's internal grep
|
||||
@@ -499,6 +521,12 @@ advantages are:
|
||||
pattern to ignore case or |/\C| to match case.
|
||||
'smartcase' is not used.
|
||||
|
||||
When a number is put before the command this is used
|
||||
as the maximum number of matches to find. Use
|
||||
":1vimgrep pattern file" to find only the first.
|
||||
Useful if you only want to check if there is a match
|
||||
and quit quickly when it's found.
|
||||
|
||||
Without the 'j' flag Vim jumps to the first match.
|
||||
With 'j' only the quickfix list is updated.
|
||||
With the [!] any changes in the current buffer are
|
||||
@@ -867,17 +895,20 @@ prefixes are:
|
||||
%W start of a multi-line warning message
|
||||
%I start of a multi-line informational message
|
||||
%A start of a multi-line message (unspecified type)
|
||||
%> for next line start with current pattern again |efm-%>|
|
||||
%C continuation of a multi-line message
|
||||
%Z end of a multi-line message
|
||||
These can be used with '+' and '-', see |efm-ignore| below.
|
||||
|
||||
Using "\n" in the pattern won't work to match multi-line messages.
|
||||
|
||||
Example: Your compiler happens to write out errors in the following format
|
||||
(leading line numbers not being part of the actual output):
|
||||
|
||||
1 Error 275
|
||||
2 line 42
|
||||
3 column 3
|
||||
4 ' ' expected after '--'
|
||||
1 Error 275 ~
|
||||
2 line 42 ~
|
||||
3 column 3 ~
|
||||
4 ' ' expected after '--' ~
|
||||
|
||||
The appropriate error format string has to look like this: >
|
||||
:set efm=%EError\ %n,%Cline\ %l,%Ccolumn\ %c,%Z%m
|
||||
@@ -916,6 +947,27 @@ starting with a space, followed by any characters to the end of the line,
|
||||
it also hides line 7 which would trigger a separate error message otherwise.
|
||||
Error format strings are always parsed pattern by pattern until the first
|
||||
match occurs.
|
||||
*efm-%>*
|
||||
The %> item can be used to avoid trying patterns that appear earlier in
|
||||
'errorformat'. This is useful for patterns that match just about anything.
|
||||
For example, if the error looks like this:
|
||||
|
||||
Error in line 123 of foo.c: ~
|
||||
unknown variable "i" ~
|
||||
|
||||
This can be found with: >
|
||||
:set efm=xxx,%E%>Error in line %l of %f:,%Z%m
|
||||
Where "xxx" has a pattern that would also match the second line.
|
||||
|
||||
Important: There is no memory of what part of the errorformat matched before;
|
||||
every line in the error file gets a complete new run through the error format
|
||||
lines. For example, if one has: >
|
||||
setlocal efm=aa,bb,cc,dd,ee
|
||||
Where aa, bb, etc. are error format strings. Each line of the error file will
|
||||
be matched to the pattern aa, then bb, then cc, etc. Just because cc matched
|
||||
the previous error line does _not_ mean that dd will be tried first on the
|
||||
current line, even if cc and dd are multi-line errorformat strings.
|
||||
|
||||
|
||||
|
||||
Separate file name *errorformat-separate-filename*
|
||||
@@ -983,14 +1035,16 @@ with previous versions of Vim. However, it is also possible to specify
|
||||
Since meta characters of the regular expression language can be part of
|
||||
ordinary matching strings or file names (and therefore internally have to
|
||||
be escaped), meta symbols have to be written with leading '%':
|
||||
%\ the single '\' character. Note that this has to be
|
||||
%\ The single '\' character. Note that this has to be
|
||||
escaped ("%\\") in ":set errorformat=" definitions.
|
||||
%. the single '.' character.
|
||||
%# the single '*'(!) character.
|
||||
%^ the single '^' character.
|
||||
%$ the single '$' character.
|
||||
%[ the single '[' character for a [] character range.
|
||||
%~ the single '~' character.
|
||||
%. The single '.' character.
|
||||
%# The single '*'(!) character.
|
||||
%^ The single '^' character. Note that this is not
|
||||
useful, the pattern already matches start of line.
|
||||
%$ The single '$' character. Note that this is not
|
||||
useful, the pattern already matches end of line.
|
||||
%[ The single '[' character for a [] character range.
|
||||
%~ The single '~' character.
|
||||
When using character classes in expressions (see |/\i| for an overview),
|
||||
terms containing the "\+" quantifier can be written in the scanf() "%*"
|
||||
notation. Example: "%\\d%\\+" ("\d\+", "any number") is equivalent to "%*\\d".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -588,336 +588,346 @@ In Insert or Command-line mode:
|
||||
the help.
|
||||
|
||||
Short explanation of each option: *option-list*
|
||||
|'aleph'| |'al'| ASCII code of the letter Aleph (Hebrew)
|
||||
|'allowrevins'| |'ari'| allow CTRL-_ in Insert and Command-line mode
|
||||
|'altkeymap'| |'akm'| for default second language (Farsi/Hebrew)
|
||||
|'ambiwidth'| |'ambw'| what to do with Unicode chars of ambiguous width
|
||||
|'antialias'| |'anti'| Mac OS X: use smooth, antialiased fonts
|
||||
|'autochdir'| |'acd'| change directory to the file in the current window
|
||||
|'arabic'| |'arab'| for Arabic as a default second language
|
||||
|'arabicshape'| |'arshape'| do shaping for Arabic characters
|
||||
|'autoindent'| |'ai'| take indent for new line from previous line
|
||||
|'autoread'| |'ar'| autom. read file when changed outside of Vim
|
||||
|'autowrite'| |'aw'| automatically write file if changed
|
||||
|'autowriteall'| |'awa'| as 'autowrite', but works with more commands
|
||||
|'background'| |'bg'| "dark" or "light", used for highlight colors
|
||||
|'backspace'| |'bs'| how backspace works at start of line
|
||||
|'backup'| |'bk'| keep backup file after overwriting a file
|
||||
|'backupcopy'| |'bkc'| make backup as a copy, don't rename the file
|
||||
|'backupdir'| |'bdir'| list of directories for the backup file
|
||||
|'backupext'| |'bex'| extension used for the backup file
|
||||
|'backupskip'| |'bsk'| no backup for files that match these patterns
|
||||
|'balloondelay'| |'bdlay'| delay in mS before a balloon may pop up
|
||||
|'ballooneval'| |'beval'| switch on balloon evaluation
|
||||
|'balloonexpr'| |'bexpr'| expression to show in balloon
|
||||
|'binary'| |'bin'| read/write/edit file in binary mode
|
||||
|'bioskey'| |'biosk'| MS-DOS: use bios calls for input characters
|
||||
|'bomb'| prepend a Byte Order Mark to the file
|
||||
|'breakat'| |'brk'| characters that may cause a line break
|
||||
|'browsedir'| |'bsdir'| which directory to start browsing in
|
||||
|'bufhidden'| |'bh'| what to do when buffer is no longer in window
|
||||
|'buflisted'| |'bl'| whether the buffer shows up in the buffer list
|
||||
|'buftype'| |'bt'| special type of buffer
|
||||
|'casemap'| |'cmp'| specifies how case of letters is changed
|
||||
|'cdpath'| |'cd'| list of directories searched with ":cd"
|
||||
|'cedit'| key used to open the command-line window
|
||||
|'charconvert'| |'ccv'| expression for character encoding conversion
|
||||
|'cindent'| |'cin'| do C program indenting
|
||||
|'cinkeys'| |'cink'| keys that trigger indent when 'cindent' is set
|
||||
|'cinoptions'| |'cino'| how to do indenting when 'cindent' is set
|
||||
|'cinwords'| |'cinw'| words where 'si' and 'cin' add an indent
|
||||
|'clipboard'| |'cb'| use the clipboard as the unnamed register
|
||||
|'cmdheight'| |'ch'| number of lines to use for the command-line
|
||||
|'cmdwinheight'| |'cwh'| height of the command-line window
|
||||
|'columns'| |'co'| number of columns in the display
|
||||
|'comments'| |'com'| patterns that can start a comment line
|
||||
|'commentstring'| |'cms'| template for comments; used for fold marker
|
||||
|'compatible'| |'cp'| behave Vi-compatible as much as possible
|
||||
|'complete'| |'cpt'| specify how Insert mode completion works
|
||||
|'completefunc'| |'cfu'| function to be used for Insert mode completion
|
||||
|'completeopt'| |'cot'| options for Insert mode completion
|
||||
|'confirm'| |'cf'| ask what to do about unsaved/read-only files
|
||||
|'conskey'| |'consk'| get keys directly from console (MS-DOS only)
|
||||
|'copyindent'| |'ci'| make 'autoindent' use existing indent structure
|
||||
|'cpoptions'| |'cpo'| flags for Vi-compatible behavior
|
||||
|'cscopepathcomp'| |'cspc'| how many components of the path to show
|
||||
|'cscopeprg'| |'csprg'| command to execute cscope
|
||||
|'cscopequickfix'| |'csqf'| use quickfix window for cscope results
|
||||
|'cscopetag'| |'cst'| use cscope for tag commands
|
||||
|'cscopetagorder'| |'csto'| determines ":cstag" search order
|
||||
|'cscopeverbose'| |'csverb'| give messages when adding a cscope database
|
||||
|'debug'| set to "msg" to see all error messages
|
||||
|'define'| |'def'| pattern to be used to find a macro definition
|
||||
|'delcombine'| |'deco'| delete combining characters on their own
|
||||
|'dictionary'| |'dict'| list of file names used for keyword completion
|
||||
|'diff'| use diff mode for the current window
|
||||
|'diffexpr'| |'dex'| expression used to obtain a diff file
|
||||
|'diffopt'| |'dip'| options for using diff mode
|
||||
|'digraph'| |'dg'| enable the entering of digraphs in Insert mode
|
||||
|'directory'| |'dir'| list of directory names for the swap file
|
||||
|'display'| |'dy'| list of flags for how to display text
|
||||
|'eadirection'| |'ead'| in which direction 'equalalways' works
|
||||
|'edcompatible'| |'ed'| toggle flags of ":substitute" command
|
||||
|'encoding'| |'enc'| encoding used internally
|
||||
|'endofline'| |'eol'| write <EOL> for last line in file
|
||||
|'equalalways'| |'ea'| windows are automatically made the same size
|
||||
|'equalprg'| |'ep'| external program to use for "=" command
|
||||
|'errorbells'| |'eb'| ring the bell for error messages
|
||||
|'errorfile'| |'ef'| name of the errorfile for the QuickFix mode
|
||||
|'errorformat'| |'efm'| description of the lines in the error file
|
||||
|'esckeys'| |'ek'| recognize function keys in Insert mode
|
||||
|'eventignore'| |'ei'| autocommand events that are ignored
|
||||
|'expandtab'| |'et'| use spaces when <Tab> is inserted
|
||||
|'exrc'| |'ex'| read .vimrc and .exrc in the current directory
|
||||
|'fileencoding'| |'fenc'| file encoding for multi-byte text
|
||||
|'fileencodings'| |'fencs'| automatically detected character encodings
|
||||
|'fileformat'| |'ff'| file format used for file I/O
|
||||
|'fileformats'| |'ffs'| automatically detected values for 'fileformat'
|
||||
|'filetype'| |'ft'| type of file, used for autocommands
|
||||
|'fillchars'| |'fcs'| characters to use for displaying special items
|
||||
|'fkmap'| |'fk'| Farsi keyboard mapping
|
||||
|'foldclose'| |'fcl'| close a fold when the cursor leaves it
|
||||
|'foldcolumn'| |'fdc'| width of the column used to indicate folds
|
||||
|'foldenable'| |'fen'| set to display all folds open
|
||||
|'foldexpr'| |'fde'| expression used when 'foldmethod' is "expr"
|
||||
|'foldignore'| |'fdi'| ignore lines when 'foldmethod' is "indent"
|
||||
|'foldlevel'| |'fdl'| close folds with a level higher than this
|
||||
|'foldlevelstart'| |'fdls'| 'foldlevel' when starting to edit a file
|
||||
|'foldmarker'| |'fmr'| markers used when 'foldmethod' is "marker"
|
||||
|'foldmethod'| |'fdm'| folding type
|
||||
|'foldminlines'| |'fml'| minimum number of lines for a fold to be closed
|
||||
|'foldnestmax'| |'fdn'| maximum fold depth
|
||||
|'foldopen'| |'fdo'| for which commands a fold will be opened
|
||||
|'foldtext'| |'fdt'| expression used to display for a closed fold
|
||||
|'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
|
||||
|'fsync'| |'fs'| whether to invoke fsync() after file write
|
||||
|'gdefault'| |'gd'| the ":substitute" flag 'g' is default on
|
||||
|'grepformat'| |'gfm'| format of 'grepprg' output
|
||||
|'grepprg'| |'gp'| program to use for ":grep"
|
||||
|'guicursor'| |'gcr'| GUI: settings for cursor shape and blinking
|
||||
|'guifont'| |'gfn'| GUI: Name(s) of font(s) to be used
|
||||
|'guifontset'| |'gfs'| GUI: Names of multi-byte fonts to be used
|
||||
|'guifontwide'| |'gfw'| list of font names for double-wide characters
|
||||
|'guiheadroom'| |'ghr'| GUI: pixels room for window decorations
|
||||
|'guioptions'| |'go'| GUI: Which components and options are used
|
||||
|'guipty'| GUI: try to use a pseudo-tty for ":!" commands
|
||||
|'helpfile'| |'hf'| full path name of the main help file
|
||||
|'helpheight'| |'hh'| minimum height of a new help window
|
||||
|'helplang'| |'hlg'| preferred help languages
|
||||
|'hidden'| |'hid'| don't unload buffer when it is |abandon|ed
|
||||
|'highlight'| |'hl'| sets highlighting mode for various occasions
|
||||
|'hlsearch'| |'hls'| highlight matches with last search pattern
|
||||
|'history'| |'hi'| number of command-lines that are remembered
|
||||
|'hkmap'| |'hk'| Hebrew keyboard mapping
|
||||
|'hkmapp'| |'hkp'| phonetic Hebrew keyboard mapping
|
||||
|'icon'| let Vim set the text of the window icon
|
||||
|'iconstring'| string to use for the Vim icon text
|
||||
|'ignorecase'| |'ic'| ignore case in search patterns
|
||||
|'imactivatekey'| |'imak'| key that activates the X input method
|
||||
|'imcmdline'| |'imc'| use IM when starting to edit a command line
|
||||
|'imdisable'| |'imd'| do not use the IM in any mode
|
||||
|'iminsert'| |'imi'| use :lmap or IM in Insert mode
|
||||
|'imsearch'| |'ims'| use :lmap or IM when typing a search pattern
|
||||
|'include'| |'inc'| pattern to be used to find an include file
|
||||
|'includeexpr'| |'inex'| expression used to process an include line
|
||||
|'incsearch'| |'is'| highlight match while typing search pattern
|
||||
|'indentexpr'| |'inde'| expression used to obtain the indent of a line
|
||||
|'indentkeys'| |'indk'| keys that trigger indenting with 'indentexpr'
|
||||
|'infercase'| |'inf'| adjust case of match for keyword completion
|
||||
|'insertmode'| |'im'| start the edit of a file in Insert mode
|
||||
|'isfname'| |'isf'| characters included in file names and pathnames
|
||||
|'isident'| |'isi'| characters included in identifiers
|
||||
|'iskeyword'| |'isk'| characters included in keywords
|
||||
|'isprint'| |'isp'| printable characters
|
||||
|'joinspaces'| |'js'| two spaces after a period with a join command
|
||||
|'key'| encryption key
|
||||
|'keymap'| |'kmp'| name of a keyboard mapping
|
||||
|'keymodel'| |'km'| enable starting/stopping selection with keys
|
||||
|'keywordprg'| |'kp'| program to use for the "K" command
|
||||
|'langmap'| |'lmap'| alphabetic characters for other language mode
|
||||
|'langmenu'| |'lm'| language to be used for the menus
|
||||
|'laststatus'| |'ls'| tells when last window has status lines
|
||||
|'lazyredraw'| |'lz'| don't redraw while executing macros
|
||||
|'linebreak'| |'lbr'| wrap long lines at a blank
|
||||
|'lines'| number of lines in the display
|
||||
|'linespace'| |'lsp'| number of pixel lines to use between characters
|
||||
|'lisp'| automatic indenting for Lisp
|
||||
|'lispwords'| |'lw'| words that change how lisp indenting works
|
||||
|'list'| show <Tab> and <EOL>
|
||||
|'listchars'| |'lcs'| characters for displaying in list mode
|
||||
|'loadplugins'| |'lpl'| load plugin scripts when starting up
|
||||
|'magic'| changes special characters in search patterns
|
||||
|'makeef'| |'mef'| name of the errorfile for ":make"
|
||||
|'makeprg'| |'mp'| program to use for the ":make" command
|
||||
|'matchpairs'| |'mps'| pairs of characters that "%" can match
|
||||
|'matchtime'| |'mat'| tenths of a second to show matching paren
|
||||
|'maxfuncdepth'| |'mfd'| maximum recursive depth for user functions
|
||||
|'maxmapdepth'| |'mmd'| maximum recursive depth for mapping
|
||||
|'maxmem'| |'mm'| maximum memory (in Kbyte) used for one buffer
|
||||
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search
|
||||
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers
|
||||
|'menuitems'| |'mis'| maximum number of items in a menu
|
||||
|'mkspellmem'| |'msm'| memory used before |:mkspell| compresses the tree
|
||||
|'modeline'| |'ml'| recognize modelines at start or end of file
|
||||
|'modelines'| |'mls'| number of lines checked for modelines
|
||||
|'modifiable'| |'ma'| changes to the text are not possible
|
||||
|'modified'| |'mod'| buffer has been modified
|
||||
|'more'| pause listings when the whole screen is filled
|
||||
|'mouse'| enable the use of mouse clicks
|
||||
|'mousefocus'| |'mousef'| keyboard focus follows the mouse
|
||||
|'mousehide'| |'mh'| hide mouse pointer while typing
|
||||
|'mousemodel'| |'mousem'| changes meaning of mouse buttons
|
||||
|'mouseshape'| |'mouses'| shape of the mouse pointer in different modes
|
||||
|'mousetime'| |'mouset'| max time between mouse double-click
|
||||
|'mzquantum'| |'mzq'| the interval between polls for MzScheme threads
|
||||
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|
||||
|'number'| |'nu'| print the line number in front of each line
|
||||
|'numberwidth'| |'nuw'| number of columns used for the line number
|
||||
|'omnifunc'| |'ofu'| function for filetype-specific completion
|
||||
|'operatorfunc'| |'opfunc'| funtion to be called for |g@| operator
|
||||
|'osfiletype'| |'oft'| operating system-specific filetype information
|
||||
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|
||||
|'paste'| allow pasting text
|
||||
|'pastetoggle'| |'pt'| key code that causes 'paste' to toggle
|
||||
|'patchexpr'| |'pex'| expression used to patch a file
|
||||
|'patchmode'| |'pm'| keep the oldest version of a file
|
||||
|'path'| |'pa'| list of directories searched with "gf" et.al.
|
||||
|'preserveindent'| |'pi'| preserve the indent structure when reindenting
|
||||
|'previewheight'| |'pvh'| height of the preview window
|
||||
|'previewwindow'| |'pvw'| identifies the preview window
|
||||
|'printdevice'| |'pdev'| name of the printer to be used for :hardcopy
|
||||
|'printencoding'| |'penc'| encoding to be used for printing
|
||||
|'printexpr'| |'pexpr'| expression used to print PostScript for :hardcopy
|
||||
|'printfont'| |'pfn'| name of the font to be used for :hardcopy
|
||||
|'printheader'| |'pheader'| format of the header used for :hardcopy
|
||||
|'printmbcharset'| |'pmbcs'| CJK character set to be used for :hardcopy
|
||||
|'printmbfont'| |'pmbfn'| font names to be used for CJK output of :hardcopy
|
||||
|'printoptions'| |'popt'| controls the format of :hardcopy output
|
||||
|'quoteescape'| |'qe'| escape characters used in a string
|
||||
|'readonly'| |'ro'| disallow writing the buffer
|
||||
|'remap'| allow mappings to work recursively
|
||||
|'report'| threshold for reporting nr. of lines changed
|
||||
|'restorescreen'| |'rs'| Win32: restore screen when exiting
|
||||
|'revins'| |'ri'| inserting characters will work backwards
|
||||
|'rightleft'| |'rl'| window is right-to-left oriented
|
||||
|'rightleftcmd'| |'rlc'| commands for which editing works right-to-left
|
||||
|'ruler'| |'ru'| show cursor line and column in the status line
|
||||
|'rulerformat'| |'ruf'| custom format for the ruler
|
||||
|'runtimepath'| |'rtp'| list of directories used for runtime files
|
||||
|'scroll'| |'scr'| lines to scroll with CTRL-U and CTRL-D
|
||||
|'scrollbind'| |'scb'| scroll in window as other windows scroll
|
||||
|'scrolljump'| |'sj'| minimum number of lines to scroll
|
||||
|'scrolloff'| |'so'| minimum nr. of lines above and below cursor
|
||||
|'scrollopt'| |'sbo'| how 'scrollbind' should behave
|
||||
|'sections'| |'sect'| nroff macros that separate sections
|
||||
|'secure'| secure mode for reading .vimrc in current dir
|
||||
|'selection'| |'sel'| what type of selection to use
|
||||
|'selectmode'| |'slm'| when to use Select mode instead of Visual mode
|
||||
|'sessionoptions'| |'ssop'| options for |:mksession|
|
||||
|'shell'| |'sh'| name of shell to use for external commands
|
||||
|'shellcmdflag'| |'shcf'| flag to shell to execute one command
|
||||
|'shellpipe'| |'sp'| string to put output of ":make" in error file
|
||||
|'shellquote'| |'shq'| quote character(s) for around shell command
|
||||
|'shellredir'| |'srr'| string to put output of filter in a temp file
|
||||
|'shellslash'| |'ssl'| use forward slash for shell file names
|
||||
|'shelltemp'| |'stmp'| whether to use a temp file for shell commands
|
||||
|'shelltype'| |'st'| Amiga: influences how to use a shell
|
||||
|'shellxquote'| |'sxq'| like 'shellquote', but include redirection
|
||||
|'shiftround'| |'sr'| round indent to multiple of shiftwidth
|
||||
|'shiftwidth'| |'sw'| number of spaces to use for (auto)indent step
|
||||
|'shortmess'| |'shm'| list of flags, reduce length of messages
|
||||
|'shortname'| |'sn'| non-MS-DOS: Filenames assumed to be 8.3 chars
|
||||
|'showbreak'| |'sbr'| string to use at the start of wrapped lines
|
||||
|'showcmd'| |'sc'| show (partial) command in status line
|
||||
|'showfulltag'| |'sft'| show full tag pattern when completing tag
|
||||
|'showmatch'| |'sm'| briefly jump to matching bracket if insert one
|
||||
|'showmode'| |'smd'| message on status line to show current mode
|
||||
|'sidescroll'| |'ss'| minimum number of columns to scroll horizontal
|
||||
|'sidescrolloff'| |'siso'| min. nr. of columns to left and right of cursor
|
||||
|'smartcase'| |'scs'| no ignore case when pattern has uppercase
|
||||
|'smartindent'| |'si'| smart autoindenting for C programs
|
||||
|'smarttab'| |'sta'| use 'shiftwidth' when inserting <Tab>
|
||||
|'softtabstop'| |'sts'| number of spaces that <Tab> uses while editing
|
||||
|'spell'| enable spell checking
|
||||
|'spellcapcheck'| |'spc'| pattern to locate end of a sentence
|
||||
|'spellfile'| |'spf'| files where |zg| and |zw| store words
|
||||
|'spelllang'| |'spl'| language(s) to do spell checking for
|
||||
|'spellsuggest'| |'sps'| method(s) used to suggest spelling corrections
|
||||
|'splitbelow'| |'sb'| new window from split is below the current one
|
||||
|'splitright'| |'spr'| new window is put right of the current one
|
||||
|'startofline'| |'sol'| commands move cursor to first blank in line
|
||||
|'statusline'| |'stl'| custom format for the status line
|
||||
|'suffixes'| |'su'| suffixes that are ignored with multiple match
|
||||
|'suffixesadd'| |'sua'| suffixes added when searching for a file
|
||||
|'swapfile'| |'swf'| whether to use a swapfile for a buffer
|
||||
|'swapsync'| |'sws'| how to sync the swap file
|
||||
|'switchbuf'| |'swb'| sets behavior when switching to another buffer
|
||||
|'synmaxcol'| |'smc'| maximum column to find syntax items
|
||||
|'syntax'| |'syn'| syntax to be loaded for current buffer
|
||||
|'tabstop'| |'ts'| number of spaces that <Tab> in file uses
|
||||
|'tagbsearch'| |'tbs'| use binary searching in tags files
|
||||
|'taglength'| |'tl'| number of significant characters for a tag
|
||||
|'tagrelative'| |'tr'| file names in tag file are relative
|
||||
|'tags'| |'tag'| list of file names used by the tag command
|
||||
|'tagstack'| |'tgst'| push tags onto the tag stack
|
||||
|'term'| name of the terminal
|
||||
|'termbidi'| |'tbidi'| terminal takes care of bi-directionality
|
||||
|'termencoding'| |'tenc'| character encoding used by the terminal
|
||||
|'terse'| shorten some messages
|
||||
|'textauto'| |'ta'| obsolete, use 'fileformats'
|
||||
|'textmode'| |'tx'| obsolete, use 'fileformat'
|
||||
|'textwidth'| |'tw'| maximum width of text that is being inserted
|
||||
|'thesaurus'| |'tsr'| list of thesaurus files for keyword completion
|
||||
|'tildeop'| |'top'| tilde command "~" behaves like an operator
|
||||
|'timeout'| |'to'| time out on mappings and key codes
|
||||
|'timeoutlen'| |'tm'| time out time in milliseconds
|
||||
|'title'| let Vim set the title of the window
|
||||
|'titlelen'| percentage of 'columns' used for window title
|
||||
|'titleold'| old title, restored when exiting
|
||||
|'titlestring'| string to use for the Vim window title
|
||||
|'toolbar'| |'tb'| GUI: which items to show in the toolbar
|
||||
|'toolbariconsize'| |'tbis'| size of the toolbar icons (for GTK 2 only)
|
||||
|'ttimeout'| time out on mappings
|
||||
|'ttimeoutlen'| |'ttm'| time out time for key codes in milliseconds
|
||||
|'ttybuiltin'| |'tbi'| use built-in termcap before external termcap
|
||||
|'ttyfast'| |'tf'| indicates a fast terminal connection
|
||||
|'ttymouse'| |'ttym'| type of mouse codes generated
|
||||
|'ttyscroll'| |'tsl'| maximum number of lines for a scroll
|
||||
|'ttytype'| |'tty'| alias for 'term'
|
||||
|'undolevels'| |'ul'| maximum number of changes that can be undone
|
||||
|'updatecount'| |'uc'| after this many characters flush swap file
|
||||
|'updatetime'| |'ut'| after this many milliseconds flush swap file
|
||||
|'verbose'| |'vbs'| give informative messages
|
||||
|'verbosefile'| |'vfile'| file to write messages in
|
||||
|'viewdir'| |'vdir'| directory where to store files with :mkview
|
||||
|'viewoptions'| |'vop'| specifies what to save for :mkview
|
||||
|'viminfo'| |'vi'| use .viminfo file upon startup and exiting
|
||||
|'virtualedit'| |'ve'| when to use virtual editing
|
||||
|'visualbell'| |'vb'| use visual bell instead of beeping
|
||||
|'warn'| warn for shell command when buffer was changed
|
||||
|'weirdinvert'| |'wi'| for terminals that have weird inversion method
|
||||
|'whichwrap'| |'ww'| allow specified keys to cross line boundaries
|
||||
|'wildchar'| |'wc'| command-line character for wildcard expansion
|
||||
|'wildcharm'| |'wcm'| like 'wildchar' but also works when mapped
|
||||
|'wildignore'| |'wig'| files matching these patterns are not completed
|
||||
|'wildmenu'| |'wmnu'| use menu for command line completion
|
||||
|'wildmode'| |'wim'| mode for 'wildchar' command-line expansion
|
||||
|'wildoptions'| |'wop'| specifies how command line completion is done.
|
||||
|'winaltkeys'| |'wak'| when the windows system handles ALT keys
|
||||
|'winheight'| |'wh'| minimum number of lines for the current window
|
||||
|'winfixheight'| |'wfh'| keep window height when opening/closing windows
|
||||
|'winminheight'| |'wmh'| minimum number of lines for any window
|
||||
|'winminwidth'| |'wmw'| minimal number of columns for any window
|
||||
|'winwidth'| |'wiw'| minimal number of columns for current window
|
||||
|'wrap'| long lines wrap and continue on the next line
|
||||
|'wrapmargin'| |'wm'| chars from the right where wrapping starts
|
||||
|'wrapscan'| |'ws'| searches wrap around the end of the file
|
||||
|'write'| writing to a file is allowed
|
||||
|'writeany'| |'wa'| write to file with no need for "!" override
|
||||
|'writebackup'| |'wb'| make a backup before overwriting a file
|
||||
|'writedelay'| |'wd'| delay this many msec for each char (for debug)
|
||||
'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
|
||||
'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
|
||||
'altkeymap' 'akm' for default second language (Farsi/Hebrew)
|
||||
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
|
||||
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
|
||||
'autochdir' 'acd' change directory to the file in the current window
|
||||
'arabic' 'arab' for Arabic as a default second language
|
||||
'arabicshape' 'arshape' do shaping for Arabic characters
|
||||
'autoindent' 'ai' take indent for new line from previous line
|
||||
'autoread' 'ar' autom. read file when changed outside of Vim
|
||||
'autowrite' 'aw' automatically write file if changed
|
||||
'autowriteall' 'awa' as 'autowrite', but works with more commands
|
||||
'background' 'bg' "dark" or "light", used for highlight colors
|
||||
'backspace' 'bs' how backspace works at start of line
|
||||
'backup' 'bk' keep backup file after overwriting a file
|
||||
'backupcopy' 'bkc' make backup as a copy, don't rename the file
|
||||
'backupdir' 'bdir' list of directories for the backup file
|
||||
'backupext' 'bex' extension used for the backup file
|
||||
'backupskip' 'bsk' no backup for files that match these patterns
|
||||
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
|
||||
'ballooneval' 'beval' switch on balloon evaluation
|
||||
'balloonexpr' 'bexpr' expression to show in balloon
|
||||
'binary' 'bin' read/write/edit file in binary mode
|
||||
'bioskey' 'biosk' MS-DOS: use bios calls for input characters
|
||||
'bomb' prepend a Byte Order Mark to the file
|
||||
'breakat' 'brk' characters that may cause a line break
|
||||
'browsedir' 'bsdir' which directory to start browsing in
|
||||
'bufhidden' 'bh' what to do when buffer is no longer in window
|
||||
'buflisted' 'bl' whether the buffer shows up in the buffer list
|
||||
'buftype' 'bt' special type of buffer
|
||||
'casemap' 'cmp' specifies how case of letters is changed
|
||||
'cdpath' 'cd' list of directories searched with ":cd"
|
||||
'cedit' key used to open the command-line window
|
||||
'charconvert' 'ccv' expression for character encoding conversion
|
||||
'cindent' 'cin' do C program indenting
|
||||
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
|
||||
'cinoptions' 'cino' how to do indenting when 'cindent' is set
|
||||
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
|
||||
'clipboard' 'cb' use the clipboard as the unnamed register
|
||||
'cmdheight' 'ch' number of lines to use for the command-line
|
||||
'cmdwinheight' 'cwh' height of the command-line window
|
||||
'columns' 'co' number of columns in the display
|
||||
'comments' 'com' patterns that can start a comment line
|
||||
'commentstring' 'cms' template for comments; used for fold marker
|
||||
'compatible' 'cp' behave Vi-compatible as much as possible
|
||||
'complete' 'cpt' specify how Insert mode completion works
|
||||
'completefunc' 'cfu' function to be used for Insert mode completion
|
||||
'completeopt' 'cot' options for Insert mode completion
|
||||
'confirm' 'cf' ask what to do about unsaved/read-only files
|
||||
'conskey' 'consk' get keys directly from console (MS-DOS only)
|
||||
'copyindent' 'ci' make 'autoindent' use existing indent structure
|
||||
'cpoptions' 'cpo' flags for Vi-compatible behavior
|
||||
'cscopepathcomp' 'cspc' how many components of the path to show
|
||||
'cscopeprg' 'csprg' command to execute cscope
|
||||
'cscopequickfix' 'csqf' use quickfix window for cscope results
|
||||
'cscopetag' 'cst' use cscope for tag commands
|
||||
'cscopetagorder' 'csto' determines ":cstag" search order
|
||||
'cscopeverbose' 'csverb' give messages when adding a cscope database
|
||||
'cursorcolumn' 'cuc' highlight the screen column of the cursor
|
||||
'cursorline' 'cul' highlight the screen line of the cursor
|
||||
'debug' set to "msg" to see all error messages
|
||||
'define' 'def' pattern to be used to find a macro definition
|
||||
'delcombine' 'deco' delete combining characters on their own
|
||||
'dictionary' 'dict' list of file names used for keyword completion
|
||||
'diff' use diff mode for the current window
|
||||
'diffexpr' 'dex' expression used to obtain a diff file
|
||||
'diffopt' 'dip' options for using diff mode
|
||||
'digraph' 'dg' enable the entering of digraphs in Insert mode
|
||||
'directory' 'dir' list of directory names for the swap file
|
||||
'display' 'dy' list of flags for how to display text
|
||||
'eadirection' 'ead' in which direction 'equalalways' works
|
||||
'edcompatible' 'ed' toggle flags of ":substitute" command
|
||||
'encoding' 'enc' encoding used internally
|
||||
'endofline' 'eol' write <EOL> for last line in file
|
||||
'equalalways' 'ea' windows are automatically made the same size
|
||||
'equalprg' 'ep' external program to use for "=" command
|
||||
'errorbells' 'eb' ring the bell for error messages
|
||||
'errorfile' 'ef' name of the errorfile for the QuickFix mode
|
||||
'errorformat' 'efm' description of the lines in the error file
|
||||
'esckeys' 'ek' recognize function keys in Insert mode
|
||||
'eventignore' 'ei' autocommand events that are ignored
|
||||
'expandtab' 'et' use spaces when <Tab> is inserted
|
||||
'exrc' 'ex' read .vimrc and .exrc in the current directory
|
||||
'fileencoding' 'fenc' file encoding for multi-byte text
|
||||
'fileencodings' 'fencs' automatically detected character encodings
|
||||
'fileformat' 'ff' file format used for file I/O
|
||||
'fileformats' 'ffs' automatically detected values for 'fileformat'
|
||||
'filetype' 'ft' type of file, used for autocommands
|
||||
'fillchars' 'fcs' characters to use for displaying special items
|
||||
'fkmap' 'fk' Farsi keyboard mapping
|
||||
'foldclose' 'fcl' close a fold when the cursor leaves it
|
||||
'foldcolumn' 'fdc' width of the column used to indicate folds
|
||||
'foldenable' 'fen' set to display all folds open
|
||||
'foldexpr' 'fde' expression used when 'foldmethod' is "expr"
|
||||
'foldignore' 'fdi' ignore lines when 'foldmethod' is "indent"
|
||||
'foldlevel' 'fdl' close folds with a level higher than this
|
||||
'foldlevelstart' 'fdls' 'foldlevel' when starting to edit a file
|
||||
'foldmarker' 'fmr' markers used when 'foldmethod' is "marker"
|
||||
'foldmethod' 'fdm' folding type
|
||||
'foldminlines' 'fml' minimum number of lines for a fold to be closed
|
||||
'foldnestmax' 'fdn' maximum fold depth
|
||||
'foldopen' 'fdo' for which commands a fold will be opened
|
||||
'foldtext' 'fdt' expression used to display for a closed fold
|
||||
'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
|
||||
'grepprg' 'gp' program to use for ":grep"
|
||||
'guicursor' 'gcr' GUI: settings for cursor shape and blinking
|
||||
'guifont' 'gfn' GUI: Name(s) of font(s) to be used
|
||||
'guifontset' 'gfs' GUI: Names of multi-byte fonts to be used
|
||||
'guifontwide' 'gfw' list of font names for double-wide characters
|
||||
'guiheadroom' 'ghr' GUI: pixels room for window decorations
|
||||
'guioptions' 'go' GUI: Which components and options are used
|
||||
'guipty' GUI: try to use a pseudo-tty for ":!" commands
|
||||
'guitablabel' 'gtl' GUI: custom label for a tab page
|
||||
'helpfile' 'hf' full path name of the main help file
|
||||
'helpheight' 'hh' minimum height of a new help window
|
||||
'helplang' 'hlg' preferred help languages
|
||||
'hidden' 'hid' don't unload buffer when it is |abandon|ed
|
||||
'highlight' 'hl' sets highlighting mode for various occasions
|
||||
'hlsearch' 'hls' highlight matches with last search pattern
|
||||
'history' 'hi' number of command-lines that are remembered
|
||||
'hkmap' 'hk' Hebrew keyboard mapping
|
||||
'hkmapp' 'hkp' phonetic Hebrew keyboard mapping
|
||||
'icon' let Vim set the text of the window icon
|
||||
'iconstring' string to use for the Vim icon text
|
||||
'ignorecase' 'ic' ignore case in search patterns
|
||||
'imactivatekey' 'imak' key that activates the X input method
|
||||
'imcmdline' 'imc' use IM when starting to edit a command line
|
||||
'imdisable' 'imd' do not use the IM in any mode
|
||||
'iminsert' 'imi' use :lmap or IM in Insert mode
|
||||
'imsearch' 'ims' use :lmap or IM when typing a search pattern
|
||||
'include' 'inc' pattern to be used to find an include file
|
||||
'includeexpr' 'inex' expression used to process an include line
|
||||
'incsearch' 'is' highlight match while typing search pattern
|
||||
'indentexpr' 'inde' expression used to obtain the indent of a line
|
||||
'indentkeys' 'indk' keys that trigger indenting with 'indentexpr'
|
||||
'infercase' 'inf' adjust case of match for keyword completion
|
||||
'insertmode' 'im' start the edit of a file in Insert mode
|
||||
'isfname' 'isf' characters included in file names and pathnames
|
||||
'isident' 'isi' characters included in identifiers
|
||||
'iskeyword' 'isk' characters included in keywords
|
||||
'isprint' 'isp' printable characters
|
||||
'joinspaces' 'js' two spaces after a period with a join command
|
||||
'key' encryption key
|
||||
'keymap' 'kmp' name of a keyboard mapping
|
||||
'keymodel' 'km' enable starting/stopping selection with keys
|
||||
'keywordprg' 'kp' program to use for the "K" command
|
||||
'langmap' 'lmap' alphabetic characters for other language mode
|
||||
'langmenu' 'lm' language to be used for the menus
|
||||
'laststatus' 'ls' tells when last window has status lines
|
||||
'lazyredraw' 'lz' don't redraw while executing macros
|
||||
'linebreak' 'lbr' wrap long lines at a blank
|
||||
'lines' number of lines in the display
|
||||
'linespace' 'lsp' number of pixel lines to use between characters
|
||||
'lisp' automatic indenting for Lisp
|
||||
'lispwords' 'lw' words that change how lisp indenting works
|
||||
'list' show <Tab> and <EOL>
|
||||
'listchars' 'lcs' characters for displaying in list mode
|
||||
'loadplugins' 'lpl' load plugin scripts when starting up
|
||||
'magic' changes special characters in search patterns
|
||||
'makeef' 'mef' name of the errorfile for ":make"
|
||||
'makeprg' 'mp' program to use for the ":make" command
|
||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
||||
'matchtime' 'mat' tenths of a second to show matching paren
|
||||
'maxcombine' 'mco' maximum nr of combining characters displayed
|
||||
'maxfuncdepth' 'mfd' maximum recursive depth for user functions
|
||||
'maxmapdepth' 'mmd' maximum recursive depth for mapping
|
||||
'maxmem' 'mm' maximum memory (in Kbyte) used for one buffer
|
||||
'maxmempattern' 'mmp' maximum memory (in Kbyte) used for pattern search
|
||||
'maxmemtot' 'mmt' maximum memory (in Kbyte) used for all buffers
|
||||
'menuitems' 'mis' maximum number of items in a menu
|
||||
'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
|
||||
'modeline' 'ml' recognize modelines at start or end of file
|
||||
'modelines' 'mls' number of lines checked for modelines
|
||||
'modifiable' 'ma' changes to the text are not possible
|
||||
'modified' 'mod' buffer has been modified
|
||||
'more' pause listings when the whole screen is filled
|
||||
'mouse' enable the use of mouse clicks
|
||||
'mousefocus' 'mousef' keyboard focus follows the mouse
|
||||
'mousehide' 'mh' hide mouse pointer while typing
|
||||
'mousemodel' 'mousem' changes meaning of mouse buttons
|
||||
'mouseshape' 'mouses' shape of the mouse pointer in different modes
|
||||
'mousetime' 'mouset' max time between mouse double-click
|
||||
'mzquantum' 'mzq' the interval between polls for MzScheme threads
|
||||
'nrformats' 'nf' number formats recognized for CTRL-A command
|
||||
'number' 'nu' print the line number in front of each line
|
||||
'numberwidth' 'nuw' number of columns used for the line number
|
||||
'omnifunc' 'ofu' function for filetype-specific completion
|
||||
'operatorfunc' 'opfunc' funtion to be called for |g@| operator
|
||||
'osfiletype' 'oft' operating system-specific filetype information
|
||||
'paragraphs' 'para' nroff macros that separate paragraphs
|
||||
'paste' allow pasting text
|
||||
'pastetoggle' 'pt' key code that causes 'paste' to toggle
|
||||
'patchexpr' 'pex' expression used to patch a file
|
||||
'patchmode' 'pm' keep the oldest version of a file
|
||||
'path' 'pa' list of directories searched with "gf" et.al.
|
||||
'preserveindent' 'pi' preserve the indent structure when reindenting
|
||||
'previewheight' 'pvh' height of the preview window
|
||||
'previewwindow' 'pvw' identifies the preview window
|
||||
'printdevice' 'pdev' name of the printer to be used for :hardcopy
|
||||
'printencoding' 'penc' encoding to be used for printing
|
||||
'printexpr' 'pexpr' expression used to print PostScript for :hardcopy
|
||||
'printfont' 'pfn' name of the font to be used for :hardcopy
|
||||
'printheader' 'pheader' format of the header used for :hardcopy
|
||||
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
|
||||
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
|
||||
'printoptions' 'popt' controls the format of :hardcopy output
|
||||
'pumheight'' 'ph' maximum height of the popup menu
|
||||
'quoteescape' 'qe' escape characters used in a string
|
||||
'readonly' 'ro' disallow writing the buffer
|
||||
'remap' allow mappings to work recursively
|
||||
'report' threshold for reporting nr. of lines changed
|
||||
'restorescreen' 'rs' Win32: restore screen when exiting
|
||||
'revins' 'ri' inserting characters will work backwards
|
||||
'rightleft' 'rl' window is right-to-left oriented
|
||||
'rightleftcmd' 'rlc' commands for which editing works right-to-left
|
||||
'ruler' 'ru' show cursor line and column in the status line
|
||||
'rulerformat' 'ruf' custom format for the ruler
|
||||
'runtimepath' 'rtp' list of directories used for runtime files
|
||||
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
||||
'scrollbind' 'scb' scroll in window as other windows scroll
|
||||
'scrolljump' 'sj' minimum number of lines to scroll
|
||||
'scrolloff' 'so' minimum nr. of lines above and below cursor
|
||||
'scrollopt' 'sbo' how 'scrollbind' should behave
|
||||
'sections' 'sect' nroff macros that separate sections
|
||||
'secure' secure mode for reading .vimrc in current dir
|
||||
'selection' 'sel' what type of selection to use
|
||||
'selectmode' 'slm' when to use Select mode instead of Visual mode
|
||||
'sessionoptions' 'ssop' options for |:mksession|
|
||||
'shell' 'sh' name of shell to use for external commands
|
||||
'shellcmdflag' 'shcf' flag to shell to execute one command
|
||||
'shellpipe' 'sp' string to put output of ":make" in error file
|
||||
'shellquote' 'shq' quote character(s) for around shell command
|
||||
'shellredir' 'srr' string to put output of filter in a temp file
|
||||
'shellslash' 'ssl' use forward slash for shell file names
|
||||
'shelltemp' 'stmp' whether to use a temp file for shell commands
|
||||
'shelltype' 'st' Amiga: influences how to use a shell
|
||||
'shellxquote' 'sxq' like 'shellquote', but include redirection
|
||||
'shiftround' 'sr' round indent to multiple of shiftwidth
|
||||
'shiftwidth' 'sw' number of spaces to use for (auto)indent step
|
||||
'shortmess' 'shm' list of flags, reduce length of messages
|
||||
'shortname' 'sn' non-MS-DOS: Filenames assumed to be 8.3 chars
|
||||
'showbreak' 'sbr' string to use at the start of wrapped lines
|
||||
'showcmd' 'sc' show (partial) command in status line
|
||||
'showfulltag' 'sft' show full tag pattern when completing tag
|
||||
'showmatch' 'sm' briefly jump to matching bracket if insert one
|
||||
'showmode' 'smd' message on status line to show current mode
|
||||
'showtabline' 'stal' tells when the tab pages line is displayed
|
||||
'sidescroll' 'ss' minimum number of columns to scroll horizontal
|
||||
'sidescrolloff' 'siso' min. nr. of columns to left and right of cursor
|
||||
'smartcase' 'scs' no ignore case when pattern has uppercase
|
||||
'smartindent' 'si' smart autoindenting for C programs
|
||||
'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
|
||||
'softtabstop' 'sts' number of spaces that <Tab> uses while editing
|
||||
'spell' enable spell checking
|
||||
'spellcapcheck' 'spc' pattern to locate end of a sentence
|
||||
'spellfile' 'spf' files where |zg| and |zw| store words
|
||||
'spelllang' 'spl' language(s) to do spell checking for
|
||||
'spellsuggest' 'sps' method(s) used to suggest spelling corrections
|
||||
'splitbelow' 'sb' new window from split is below the current one
|
||||
'splitright' 'spr' new window is put right of the current one
|
||||
'startofline' 'sol' commands move cursor to first blank in line
|
||||
'statusline' 'stl' custom format for the status line
|
||||
'suffixes' 'su' suffixes that are ignored with multiple match
|
||||
'suffixesadd' 'sua' suffixes added when searching for a file
|
||||
'swapfile' 'swf' whether to use a swapfile for a buffer
|
||||
'swapsync' 'sws' how to sync the swap file
|
||||
'switchbuf' 'swb' sets behavior when switching to another buffer
|
||||
'synmaxcol' 'smc' maximum column to find syntax items
|
||||
'syntax' 'syn' syntax to be loaded for current buffer
|
||||
'tabstop' 'ts' number of spaces that <Tab> in file uses
|
||||
'tabline' 'tal' custom format for the console tab pages line
|
||||
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
|
||||
'tagbsearch' 'tbs' use binary searching in tags files
|
||||
'taglength' 'tl' number of significant characters for a tag
|
||||
'tagrelative' 'tr' file names in tag file are relative
|
||||
'tags' 'tag' list of file names used by the tag command
|
||||
'tagstack' 'tgst' push tags onto the tag stack
|
||||
'term' name of the terminal
|
||||
'termbidi' 'tbidi' terminal takes care of bi-directionality
|
||||
'termencoding' 'tenc' character encoding used by the terminal
|
||||
'terse' shorten some messages
|
||||
'textauto' 'ta' obsolete, use 'fileformats'
|
||||
'textmode' 'tx' obsolete, use 'fileformat'
|
||||
'textwidth' 'tw' maximum width of text that is being inserted
|
||||
'thesaurus' 'tsr' list of thesaurus files for keyword completion
|
||||
'tildeop' 'top' tilde command "~" behaves like an operator
|
||||
'timeout' 'to' time out on mappings and key codes
|
||||
'timeoutlen' 'tm' time out time in milliseconds
|
||||
'title' let Vim set the title of the window
|
||||
'titlelen' percentage of 'columns' used for window title
|
||||
'titleold' old title, restored when exiting
|
||||
'titlestring' string to use for the Vim window title
|
||||
'toolbar' 'tb' GUI: which items to show in the toolbar
|
||||
'toolbariconsize' 'tbis' size of the toolbar icons (for GTK 2 only)
|
||||
'ttimeout' time out on mappings
|
||||
'ttimeoutlen' 'ttm' time out time for key codes in milliseconds
|
||||
'ttybuiltin' 'tbi' use built-in termcap before external termcap
|
||||
'ttyfast' 'tf' indicates a fast terminal connection
|
||||
'ttymouse' 'ttym' type of mouse codes generated
|
||||
'ttyscroll' 'tsl' maximum number of lines for a scroll
|
||||
'ttytype' 'tty' alias for 'term'
|
||||
'undolevels' 'ul' maximum number of changes that can be undone
|
||||
'updatecount' 'uc' after this many characters flush swap file
|
||||
'updatetime' 'ut' after this many milliseconds flush swap file
|
||||
'verbose' 'vbs' give informative messages
|
||||
'verbosefile' 'vfile' file to write messages in
|
||||
'viewdir' 'vdir' directory where to store files with :mkview
|
||||
'viewoptions' 'vop' specifies what to save for :mkview
|
||||
'viminfo' 'vi' use .viminfo file upon startup and exiting
|
||||
'virtualedit' 've' when to use virtual editing
|
||||
'visualbell' 'vb' use visual bell instead of beeping
|
||||
'warn' warn for shell command when buffer was changed
|
||||
'weirdinvert' 'wi' for terminals that have weird inversion method
|
||||
'whichwrap' 'ww' allow specified keys to cross line boundaries
|
||||
'wildchar' 'wc' command-line character for wildcard expansion
|
||||
'wildcharm' 'wcm' like 'wildchar' but also works when mapped
|
||||
'wildignore' 'wig' files matching these patterns are not completed
|
||||
'wildmenu' 'wmnu' use menu for command line completion
|
||||
'wildmode' 'wim' mode for 'wildchar' command-line expansion
|
||||
'wildoptions' 'wop' specifies how command line completion is done.
|
||||
'winaltkeys' 'wak' when the windows system handles ALT keys
|
||||
'winheight' 'wh' minimum number of lines for the current window
|
||||
'winfixheight' 'wfh' keep window height when opening/closing windows
|
||||
'winfixwidth' 'wfw' keep window width when opening/closing windows
|
||||
'winminheight' 'wmh' minimum number of lines for any window
|
||||
'winminwidth' 'wmw' minimal number of columns for any window
|
||||
'winwidth' 'wiw' minimal number of columns for current window
|
||||
'wrap' long lines wrap and continue on the next line
|
||||
'wrapmargin' 'wm' chars from the right where wrapping starts
|
||||
'wrapscan' 'ws' searches wrap around the end of the file
|
||||
'write' writing to a file is allowed
|
||||
'writeany' 'wa' write to file with no need for "!" override
|
||||
'writebackup' 'wb' make a backup before overwriting a file
|
||||
'writedelay' 'wd' delay this many msec for each char (for debug)
|
||||
------------------------------------------------------------------------------
|
||||
*Q_ur* Undo/Redo commands
|
||||
|
||||
@@ -939,7 +949,9 @@ Short explanation of each option: *option-list*
|
||||
|:cprevious| :cp display the previous error
|
||||
|:clist| :cl list all errors
|
||||
|:cfile| :cf read errors from the file 'errorfile'
|
||||
|:cgetbuffer| :cgetb like :cbuffer but don't jump to the first error
|
||||
|:cgetfile| :cg like :cfile but don't jump to the first error
|
||||
|:cgetexpr| :cgete like :cexpr but don't jump to the first error
|
||||
|:caddfile| :caddf add errors from the error file to the current
|
||||
quickfix list
|
||||
|:caddexpr| :cad add errors from an expression to the current
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*remote.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*remote.txt* For Vim version 7.0aa. Last change: 2006 Mar 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -45,6 +45,19 @@ The following command line arguments are available:
|
||||
--remote-wait-silent [+{cmd}] {file} ... *--remote-wait-silent*
|
||||
As --remote-wait, but don't complain if there
|
||||
is no server.
|
||||
*--remote-tab*
|
||||
--remote-tab Like --remote but open each file in a new
|
||||
tabpage.
|
||||
*--remote-tab-silent*
|
||||
--remote-tab-silent Like --remote-silent but open each file in a
|
||||
new tabpage.
|
||||
*--remote-tab-wait*
|
||||
--remote-tab-wait Like --remote-wait but open each file in a new
|
||||
tabpage.
|
||||
|
||||
*--remote-tab-wait-silent*
|
||||
--remote-tab-wait-silent Like --remote-wait-silent but open each file
|
||||
in a new tabpage.
|
||||
*--servername*
|
||||
--servername {name} Become the server {name}. When used together
|
||||
with one of the --remote commands: connect to
|
||||
@@ -53,8 +66,8 @@ The following command line arguments are available:
|
||||
*--remote-send*
|
||||
--remote-send {keys} Send {keys} to server and exit.
|
||||
*--remote-expr*
|
||||
--remote-expr {expr} Evaluate {expr} in server and
|
||||
print the result on stdout.
|
||||
--remote-expr {expr} Evaluate {expr} in server and print the result
|
||||
on stdout.
|
||||
*--serverlist*
|
||||
--serverlist Output a list of server names.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.0aa. Last change: 2005 Jun 26
|
||||
*repeat.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -144,6 +144,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
*:so* *:source* *load-vim-script*
|
||||
:so[urce] {file} Read Ex commands from {file}. These are commands that
|
||||
start with a ":".
|
||||
Triggers the |SourcePre| autocommand.
|
||||
|
||||
:so[urce]! {file} Read Vim commands from {file}. These are commands
|
||||
that are executed from Normal mode, like you type
|
||||
@@ -560,11 +561,22 @@ functions and/or scripts. The |+profile| feature is required for this.
|
||||
It is only included when Vim was compiled with "huge" features.
|
||||
{Vi does not have profiling}
|
||||
|
||||
You can also use the |reltime()| function to measure time. This only requires
|
||||
the |+reltime| feature, which is present more often.
|
||||
|
||||
:prof[ile] start {fname} *:prof* *:profile* *E750*
|
||||
Start profiling, write the output in {fname} upon exit.
|
||||
If {fname} already exists it will be overwritten.
|
||||
If {fname} already exists it will be silently overwritten.
|
||||
The variable |v:profiling| is set to one.
|
||||
|
||||
:prof[ile] pause
|
||||
Don't profile until the following ":profile continue". Can be
|
||||
used when doing something that should not be counted (e.g., an
|
||||
external command). Does not nest.
|
||||
|
||||
:prof[ile] continue
|
||||
Continue profiling after ":profile pause".
|
||||
|
||||
:prof[ile] func {pattern}
|
||||
Profile function that matches the pattern {pattern}.
|
||||
See |:debug-name| for how {pattern} is used.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -84,28 +84,45 @@ zG Like "zg" but add the word to the internal word list
|
||||
|
||||
*zw*
|
||||
zw Like "zg" but mark the word as a wrong (bad) word.
|
||||
If the word already appears in 'spellfile' it is
|
||||
turned into a comment line. See |spellfile-cleanup|
|
||||
for getting rid of those.
|
||||
|
||||
*zW*
|
||||
zW Like "zw" but add the word to the internal word list
|
||||
|internal-wordlist|.
|
||||
|
||||
zuw *zug* *zuw*
|
||||
zug Undo |zw| and |zg|, remove the word from the entry in
|
||||
'spellfile'. Count used as with |zg|.
|
||||
|
||||
zuW *zuG* *zuW*
|
||||
zuG Undo |zW| and |zG|, remove the word from the internal
|
||||
word list. Count used as with |zg|.
|
||||
|
||||
*:spe* *:spellgood*
|
||||
:[count]spe[llgood] {word}
|
||||
Add {word} as a good word to 'spellfile', like with
|
||||
"zg". Without count the first name is used, with a
|
||||
|zg|. Without count the first name is used, with a
|
||||
count of two the second entry, etc.
|
||||
|
||||
:spe[llgood]! {word} Add {word} as a good word to the internal word list,
|
||||
like with "zG".
|
||||
like with |zG|.
|
||||
|
||||
*:spellw* *:spellwrong*
|
||||
:[count]spellw[rong] {word}
|
||||
Add {word} as a wrong (bad) word to 'spellfile', as
|
||||
with "zw". Without count the first name is used, with
|
||||
with |zw|. Without count the first name is used, with
|
||||
a count of two the second entry, etc.
|
||||
|
||||
:spellw[rong]! {word} Add {word} as a wrong (bad) word to the internal word
|
||||
list.
|
||||
list, like with |zW|.
|
||||
|
||||
:[count]spellu[ndo] {word} *:spellu* *:spellundo*
|
||||
Like |zuw|. [count] used as with |:spellgood|.
|
||||
|
||||
:spellu[ndo]! {word} Like |zuW|. [count] used as with |:spellgood|.
|
||||
|
||||
|
||||
After adding a word to 'spellfile' with the above commands its associated
|
||||
".spl" file will automatically be updated and reloaded. If you change
|
||||
@@ -319,6 +336,25 @@ get an error the file may be truncated, modified or intended for another Vim
|
||||
version.
|
||||
|
||||
|
||||
SPELLFILE CLEANUP *spellfile-cleanup*
|
||||
|
||||
The |zw| command turns existing entries in 'spellfile' into comment lines.
|
||||
This avoids having to write a new file every time, but results in the file
|
||||
only getting longer, never shorter. To clean up the comment lines in all
|
||||
".add" spell files do this: >
|
||||
:runtime spell/cleanadd.vim
|
||||
|
||||
This deletes all comment lines, except the ones that start with "##". Use
|
||||
"##" lines to add comments that you want to keep.
|
||||
|
||||
You can invoke this script as often as you like. A variable is provided to
|
||||
skip updating files that have been changed recently. Set it to the number of
|
||||
seconds that has passed since a file was changed before it will be cleaned.
|
||||
For example, to clean only files that were not changed in the last hour: >
|
||||
let g:spell_clean_limit = 60 * 60
|
||||
The default is one second.
|
||||
|
||||
|
||||
WORDS
|
||||
|
||||
Vim uses a fixed method to recognize a word. This is independent of
|
||||
@@ -805,6 +841,29 @@ flags. But Myspell doesn't support that, thus you may not want to use it
|
||||
anyway. For compatibility use an 8-bit encoding.
|
||||
|
||||
|
||||
INFORMATION
|
||||
|
||||
These entries in the affix file can be used to add information to the spell
|
||||
file. There are no restrictions on the format, but they should be in the
|
||||
right encoding.
|
||||
|
||||
*spell-NAME* *spell-VERSION* *spell-HOME*
|
||||
*spell-AUTHOR* *spell-EMAIL* *spell-COPYRIGHT*
|
||||
NAME Name of the language
|
||||
VERSION 1.0.1 with fixes
|
||||
HOME http://www.myhome.eu
|
||||
AUTHOR John Doe
|
||||
EMAIL john AT Doe DOT net
|
||||
COPYRIGHT LGPL
|
||||
|
||||
These fields are put in the .spl file as-is. The |:spellinfo| command can be
|
||||
used to view the info.
|
||||
|
||||
*:spellinfo* *:spelli*
|
||||
:spelli[nfo] Display the information for the spell file(s) used for
|
||||
the current buffer.
|
||||
|
||||
|
||||
CHARACTER TABLES
|
||||
*spell-affix-chars*
|
||||
When using an 8-bit encoding the affix file should define what characters are
|
||||
@@ -1121,12 +1180,12 @@ words with this flag combine in any order. This means there is no control
|
||||
over which word comes first. Example:
|
||||
COMPOUNDFLAG c ~
|
||||
|
||||
*spell-COMPOUNDFLAGS*
|
||||
*spell-COMPOUNDRULE*
|
||||
A more advanced method to specify how compound words can be formed uses
|
||||
multiple items with multiple flags. This is not compatible with Myspell 3.0.
|
||||
Let's start with an example:
|
||||
COMPOUNDFLAGS c+ ~
|
||||
COMPOUNDFLAGS se ~
|
||||
COMPOUNDRULE c+ ~
|
||||
COMPOUNDRULE se ~
|
||||
|
||||
The first line defines that words with the "c" flag can be concatenated in any
|
||||
order. The second line defines compound words that are made of one word with
|
||||
@@ -1144,7 +1203,7 @@ You can make these words:
|
||||
soup
|
||||
onionsoup
|
||||
|
||||
The COMPOUNDFLAGS item may appear multiple times. The argument is made out of
|
||||
The COMPOUNDRULE item may appear multiple times. The argument is made out of
|
||||
one or more groups, where each group can be:
|
||||
one flag e.g., c
|
||||
alternate flags inside [] e.g., [abc]
|
||||
@@ -1154,20 +1213,20 @@ Optionally this may be followed by:
|
||||
|
||||
This is similar to the regexp pattern syntax (but not the same!). A few
|
||||
examples with the sequence of word flags they require:
|
||||
COMPOUNDFLAGS x+ x xx xxx etc.
|
||||
COMPOUNDFLAGS yz yz
|
||||
COMPOUNDFLAGS x+z xz xxz xxxz etc.
|
||||
COMPOUNDFLAGS yx+ yx yxx yxxx etc.
|
||||
COMPOUNDRULE x+ x xx xxx etc.
|
||||
COMPOUNDRULE yz yz
|
||||
COMPOUNDRULE x+z xz xxz xxxz etc.
|
||||
COMPOUNDRULE yx+ yx yxx yxxx etc.
|
||||
|
||||
COMPOUNDFLAGS [abc]z az bz cz
|
||||
COMPOUNDFLAGS [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
|
||||
COMPOUNDFLAGS a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
|
||||
COMPOUNDFLAGS sm*e se sme smme smmme etc.
|
||||
COMPOUNDFLAGS s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
|
||||
COMPOUNDRULE [abc]z az bz cz
|
||||
COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
|
||||
COMPOUNDRULE a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
|
||||
COMPOUNDRULE sm*e se sme smme smmme etc.
|
||||
COMPOUNDRULE s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
|
||||
|
||||
A specific example: Allow a compound to be made of two words and a dash:
|
||||
In the .aff file:
|
||||
COMPOUNDFLAGS sde ~
|
||||
COMPOUNDRULE sde ~
|
||||
NEEDAFFIX x ~
|
||||
COMPOUNDMAX 3 ~
|
||||
COMPOUNDMIN 1 ~
|
||||
@@ -1201,7 +1260,7 @@ specified with COMPOUNDMAX. Example:
|
||||
When omitted there is no maximum. It applies to all compound words.
|
||||
|
||||
To set a limit for words with specific flags make sure the items in
|
||||
COMPOUNDFLAGS where they appear don't allow too many words.
|
||||
COMPOUNDRULE where they appear don't allow too many words.
|
||||
|
||||
*spell-COMPOUNDSYLMAX*
|
||||
The maximum number of syllables that a compound word may contain is specified
|
||||
@@ -1254,45 +1313,6 @@ 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
|
||||
@@ -1305,7 +1325,9 @@ When multiple regions are specified in a ":mkspell" command the common words
|
||||
for all regions are combined and used for all regions.
|
||||
|
||||
*spell-NOSPLITSUGS*
|
||||
This item indicates that suggestions for splitting a word will not appear:
|
||||
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 ~
|
||||
|
||||
@@ -1315,8 +1337,6 @@ suggested. Can be used for obscene words.
|
||||
|
||||
NOSUGGEST % ~
|
||||
|
||||
NOT IMPLEMENTED YET.
|
||||
|
||||
|
||||
REPLACEMENTS *spell-REP*
|
||||
|
||||
@@ -1461,14 +1481,20 @@ CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
|
||||
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
|
||||
Enables using two prefixes. Not supported.
|
||||
|
||||
COMPOUND (Hunspell) *spell-COMPOUND*
|
||||
This is one line with the count of COMPOUND items, followd by
|
||||
that many COMPOUND lines with a pattern.
|
||||
Remove the first line with the count and rename the other
|
||||
items to COMPOUNDRULE |spell-COMPOUNDRULE|
|
||||
|
||||
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
||||
|
||||
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
||||
|
||||
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
||||
|
||||
COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT*
|
||||
Flag for words in the dictionary that are already a compound.
|
||||
@@ -1484,9 +1510,6 @@ COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX*
|
||||
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,
|
||||
@@ -1499,9 +1522,6 @@ LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
|
||||
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|
|
||||
|
||||
@@ -1516,10 +1536,8 @@ SYLLABLENUM (Hunspell) *spell-SYLLABLENUM*
|
||||
|
||||
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.
|
||||
suggestions the actual characters in the words are used, that
|
||||
is much more efficient.
|
||||
|
||||
WORDCHARS (Hunspell) *spell-WORDCHARS*
|
||||
Used to recognize words. Vim doesn't need it, because there
|
||||
|
||||
298
runtime/doc/sql.txt
Normal file
298
runtime/doc/sql.txt
Normal file
@@ -0,0 +1,298 @@
|
||||
*sql.txt* For Vim version 7.0aa. Last change: Fri Jan 06 2006 8:09:25 AM
|
||||
|
||||
by David Fishburn
|
||||
|
||||
This is a filetype plugin to work with SQL files.
|
||||
|
||||
The Structured Query Language (SQL) is a standard which specifies statements
|
||||
that allow a user to interact with a relational database. Vim includes
|
||||
features for navigation, indentation and syntax highlighting.
|
||||
|
||||
1. Navigation |sql-navigation|
|
||||
1.1 Matchit |sql-matchit|
|
||||
1.2 Text Object Motions |sql-object-motions|
|
||||
1.3 Predefined Object Motions |sql-predefined-objects|
|
||||
1.4 Macros |sql-macros|
|
||||
2. SQL Dialects |sql-dialects|
|
||||
2.1 SQLSetType |SQLSetType|
|
||||
2.2 SQL Dialect Default |sql-type-default|
|
||||
3. Adding new SQL Dialects |sql-adding-dialects|
|
||||
|
||||
==============================================================================
|
||||
1. Navigation *sql-navigation*
|
||||
|
||||
The SQL ftplugin provides a number of options to assist with file
|
||||
navigation.
|
||||
|
||||
|
||||
1.1 Matchit *sql-matchit*
|
||||
-----------
|
||||
The matchit plugin (http://www.vim.org/scripts/script.php?script_id=39)
|
||||
provides many additional features and can be customized for different
|
||||
languages. The matchit plugin is configured by defining a local
|
||||
buffer variable, b:match_words. Pressing the % key while on various
|
||||
keywords will move the cursor to its match. For example, if the cursor
|
||||
is on an "if", pressing % will cycle between the "else", "elseif" and
|
||||
"end if" keywords.
|
||||
|
||||
The following keywords are supported: >
|
||||
if
|
||||
elseif | elsif
|
||||
else [if]
|
||||
end if
|
||||
|
||||
[while condition] loop
|
||||
leave
|
||||
break
|
||||
continue
|
||||
exit
|
||||
end loop
|
||||
|
||||
for
|
||||
leave
|
||||
break
|
||||
continue
|
||||
exit
|
||||
end loop
|
||||
|
||||
do
|
||||
statements
|
||||
doend
|
||||
|
||||
case
|
||||
when
|
||||
when
|
||||
default
|
||||
end case
|
||||
|
||||
merge
|
||||
when not matched
|
||||
when matched
|
||||
|
||||
create[ or replace] procedure|function|event
|
||||
returns
|
||||
<
|
||||
|
||||
1.2 Text Object Motions *sql-object-motions*
|
||||
-----------------------
|
||||
Vim has a number of predefined keys for working with text |object-motions|.
|
||||
This filetype plugin attempts to translate these keys to maps which make sense
|
||||
for the SQL language.
|
||||
|
||||
The following |Normal| mode and |Visual| mode maps exist (when you edit a SQL
|
||||
file): >
|
||||
]] move forward to the next 'begin'
|
||||
[[ move backwards to the previous 'begin'
|
||||
][ move forward to the next 'end'
|
||||
[] move backwards to the previous 'end'
|
||||
<
|
||||
|
||||
1.3 Predefined Object Motions *sql-predefined-objects*
|
||||
-----------------------------
|
||||
Most relational databases support various standard features, tables, indicies,
|
||||
triggers and stored procedures. Each vendor also has a variety of proprietary
|
||||
objects. The next set of maps have been created to help move between these
|
||||
objects. Depends on which database vendor you are using, the list of objects
|
||||
must be configurable. The filetype plugin attempts to define many of the
|
||||
standard objects, plus many additional ones. In order to make this as
|
||||
flexible as possible, you can override the list of objects from within your
|
||||
|vimrc| with the following: >
|
||||
let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' .
|
||||
\ ',schema,service,publication,database,datatype,domain' .
|
||||
\ ',index,subscription,synchronization,view,variable'
|
||||
<
|
||||
The following |Normal| mode and |Visual| mode maps have been created which use
|
||||
the above list: >
|
||||
]} move forward to the next 'create <object name>'
|
||||
[{ move backward to the previous 'create <object name>'
|
||||
|
||||
Repeatedly pressing ]} will cycle through each of these create statements: >
|
||||
create table t1 (
|
||||
...
|
||||
);
|
||||
|
||||
create procedure p1
|
||||
begin
|
||||
...
|
||||
end;
|
||||
|
||||
create index i1 on t1 (c1);
|
||||
<
|
||||
The default setting for g:ftplugin_sql_objects is: >
|
||||
let g:ftplugin_sql_objects = 'function,procedure,event,' .
|
||||
\ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' .
|
||||
\ 'table,trigger' .
|
||||
\ ',schema,service,publication,database,datatype,domain' .
|
||||
\ ',index,subscription,synchronization,view,variable'
|
||||
<
|
||||
The above will also handle these cases: >
|
||||
create table t1 (
|
||||
...
|
||||
);
|
||||
create existing table t2 (
|
||||
...
|
||||
);
|
||||
create global temporary table t3 (
|
||||
...
|
||||
);
|
||||
<
|
||||
By default, the ftplugin only searches for CREATE statements. You can also
|
||||
override this via your |vimrc| with the following: >
|
||||
let g:ftplugin_sql_statements = 'create,alter'
|
||||
|
||||
The filetype plugin defines three types of comments: >
|
||||
1. --
|
||||
2. //
|
||||
3. /*
|
||||
*
|
||||
*/
|
||||
<
|
||||
The following |Normal| mode and |Visual| mode maps have been created to work
|
||||
with comments: >
|
||||
]" move forward to the beginning of a comment
|
||||
[" move forward to the end of a comment
|
||||
|
||||
|
||||
|
||||
1.4 Macros *sql-macros*
|
||||
----------
|
||||
Vim's feature to find macro definitions, |'define'|, is supported using this
|
||||
regular expression: >
|
||||
\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>
|
||||
<
|
||||
This addresses the following code: >
|
||||
CREATE VARIABLE myVar1 INTEGER;
|
||||
|
||||
CREATE PROCEDURE sp_test(
|
||||
IN myVar2 INTEGER,
|
||||
OUT myVar3 CHAR(30),
|
||||
INOUT myVar4 NUMERIC(20,0)
|
||||
)
|
||||
BEGIN
|
||||
DECLARE myVar5 INTEGER;
|
||||
|
||||
SELECT c1, c2, c3
|
||||
INTO myVar2, myVar3, myVar4
|
||||
FROM T1
|
||||
WHERE c4 = myVar1;
|
||||
END;
|
||||
<
|
||||
Place your cursor on "myVar1" on this line: >
|
||||
WHERE c4 = myVar1;
|
||||
^
|
||||
<
|
||||
Press any of the following keys: >
|
||||
[d
|
||||
[D
|
||||
[CTRL-D
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. SQL Dialects *sql-dialects* *sql-types*
|
||||
*sybase* *TSQL* *Transact-SQL*
|
||||
*sqlanywhere*
|
||||
*oracle* *plsql* *sqlj*
|
||||
*sqlserver*
|
||||
*mysql* *postgress* *psql*
|
||||
*informix*
|
||||
|
||||
All relational databases support SQL. There is a portion of SQL that is
|
||||
portable across vendors (ex. CREATE TABLE, CREATE INDEX), but there is a
|
||||
great deal of vendor specific extensions to SQL. Oracle supports the
|
||||
"CREATE OR REPLACE" syntax, column defaults specified in the CREATE TABLE
|
||||
statement and the procedural language (for stored procedures and triggers).
|
||||
|
||||
The default Vim distribution ships with syntax highlighting based on Oracle's
|
||||
PL/SQL. The default SQL indent script works for Oracle and SQL Anywhere.
|
||||
The default filetype plugin works for all vendors and should remain vendor
|
||||
neutral, but extendable.
|
||||
|
||||
Vim currently has support for a variety of different vendors, currently this
|
||||
is via syntax scripts. Unfortunately, to flip between different syntax rules
|
||||
you must either create:
|
||||
1. New filetypes
|
||||
2. Custom autocmds
|
||||
3. Manual steps / commands
|
||||
|
||||
The majority of people work with only one vendor's database product, it would
|
||||
be nice to specify a default in your |vimrc|.
|
||||
|
||||
|
||||
2.1 SQLSetType *sqlsettype* *SQLSetType*
|
||||
--------------
|
||||
For the people that work with many different databases, it would be nice to be
|
||||
able to flip between the various vendors rules (indent, syntax) on a per
|
||||
buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
|
||||
SQLSetType
|
||||
<
|
||||
Executing this function without any parameters will set the indent and syntax
|
||||
scripts back to their defaults, see |sql-type-default|. If you have turned
|
||||
off Vi's compatibility mode, |'compatible'|, you can use the <Tab> key to
|
||||
complete the optional parameter.
|
||||
|
||||
After typing the function name and a space, you can use the completion to
|
||||
supply a parameter. The function takes the name of the Vim script you want to
|
||||
source. Using the |cmdline-completion| feature, the SQLSetType function will
|
||||
search the |'runtimepath'| for all Vim scripts with a name containing 'sql'.
|
||||
This takes the guess work out of the spelling of the names. The following are
|
||||
examples: >
|
||||
:SQLSetType
|
||||
:SQLSetType sqloracle
|
||||
:SQLSetType sqlanywhere
|
||||
:SQLSetType sqlinformix
|
||||
:SQLSetType mysql
|
||||
<
|
||||
The easiest approach is to the use <Tab> character which will first complete
|
||||
the command name (SQLSetType), after a space and another <Tab>, display a list
|
||||
of available Vim script names: >
|
||||
:SQL<Tab><space><Tab>
|
||||
<
|
||||
|
||||
2.2 SQL Dialect Default *sql-type-default*
|
||||
-----------------------
|
||||
As mentioned earlier, the default syntax rules for Vim is based on Oracle
|
||||
(PL/SQL). You can override this default by placing one of the following in
|
||||
your |vimrc|: >
|
||||
let g:sql_type_default = 'sqlanywhere'
|
||||
let g:sql_type_default = 'sqlinformix'
|
||||
let g:sql_type_default = 'mysql'
|
||||
<
|
||||
If you added the following to your |vimrc|: >
|
||||
let g:sql_type_default = 'sqlinformix'
|
||||
<
|
||||
The next time edit a SQL file the following scripts will be automatically
|
||||
loaded by Vim: >
|
||||
ftplugin/sql.vim
|
||||
syntax/sqlinformix.vim
|
||||
indent/sql.vim
|
||||
>
|
||||
Notice indent/sqlinformix.sql was not loaded. There is no indent file
|
||||
for Informix, Vim loads the default files if the specified files does not
|
||||
exist.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Adding new SQL Dialects *sql-adding-dialects*
|
||||
|
||||
If you begin working with a SQL dialect which does not have any customizations
|
||||
available with the default Vim distribution you can check http://www.vim.org
|
||||
to see if any customization currently exist. If not, you can begin by cloning
|
||||
an existing script. Read |filetype-plugins| for more details.
|
||||
|
||||
To help identify these scripts, try to create the files with a "sql" prefix.
|
||||
If you decide you wish to create customizations for the SQLite database, you
|
||||
can create any of the following: >
|
||||
Unix
|
||||
~/.vim/syntax/sqlite.vim
|
||||
~/.vim/indent/sqlite.vim
|
||||
Windows
|
||||
$VIM/vimfiles/syntax/sqlite.vim
|
||||
$VIM/vimfiles/indent/sqlite.vim
|
||||
<
|
||||
No changes are necessary to the SQLSetType function. It will automatically
|
||||
pickup the new SQL files and load them when you issue the SQLSetType command.
|
||||
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:ff=unix:
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
|
||||
*starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
|
||||
|
||||
|
||||
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
|
||||
@@ -830,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.
|
||||
@@ -1118,6 +1129,7 @@ you want to make this file your default .vimrc, move it to your home directory
|
||||
(on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use
|
||||
autocommands |autocommand| and/or modelines |modeline|.
|
||||
|
||||
*vimrc-option-example*
|
||||
If you only want to add a single option setting to your vimrc, you can use
|
||||
these steps:
|
||||
1. Edit your vimrc file with Vim.
|
||||
@@ -1127,6 +1139,7 @@ these steps:
|
||||
'=' to enter the value. E.g., for the 'guifont' option: >
|
||||
o:set guifont=<C-R>=&guifont<CR><Esc>
|
||||
< [<C-R> is a CTRL-R, <CR> is a return, <Esc> is the escape key]
|
||||
You need to escape special characters, esp. spaces.
|
||||
|
||||
Note that when you create a .vimrc file, this can influence the 'compatible'
|
||||
option, which has several side effects. See |'compatible'|.
|
||||
@@ -1202,6 +1215,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: 2006 Jan 23
|
||||
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Mar 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2374,13 +2374,18 @@ the syntax file.
|
||||
|
||||
SQL *sql.vim* *ft-sql-syntax*
|
||||
*sqlinformix.vim* *ft-sqlinformix-syntax*
|
||||
*sqlanywhere.vim* *ft-sqlanywhere-syntax*
|
||||
|
||||
While there is an ANSI standard for SQL, most database engines add their
|
||||
own custom extensions. Vim currently supports the Oracle and Informix
|
||||
dialects of SQL. Vim assumes "*.sql" files are Oracle SQL by default.
|
||||
While there is an ANSI standard for SQL, most database engines add their own
|
||||
custom extensions. Vim currently supports the Oracle and Informix dialects of
|
||||
SQL. Vim assumes "*.sql" files are Oracle SQL by default.
|
||||
|
||||
If you want to use the Informix dialect, put this in your startup vimrc: >
|
||||
:let g:filetype_sql = "sqlinformix"
|
||||
Vim currently has SQL support for a variety of different vendors via syntax
|
||||
scripts. You can change Vim's default from Oracle to any of the current SQL
|
||||
supported types. You can also easily alter the SQL dialect being used on a
|
||||
buffer by buffer basis.
|
||||
|
||||
For more detailed instructions see |sql.txt|.
|
||||
|
||||
|
||||
TCSH *tcsh.vim* *ft-tcsh-syntax*
|
||||
@@ -3944,6 +3949,12 @@ command.
|
||||
Cursor the character under the cursor
|
||||
*hl-CursorIM*
|
||||
CursorIM like Cursor, but used when in IME mode |CursorIM|
|
||||
*hl-CursorColumn*
|
||||
CursorColumn the screen column that the cursor is in when 'cursorcolumn' is
|
||||
set
|
||||
*hl-CursorLine*
|
||||
CursorLine the screen line that the cursor is in when 'cursorline' is
|
||||
set
|
||||
*hl-Directory*
|
||||
Directory directory names (and other special names in listings)
|
||||
*hl-DiffAdd*
|
||||
@@ -3968,8 +3979,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*
|
||||
@@ -4020,6 +4035,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*
|
||||
@@ -4257,9 +4278,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:
|
||||
256
runtime/doc/tags
256
runtime/doc/tags
@@ -142,6 +142,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'cst' options.txt /*'cst'*
|
||||
'csto' options.txt /*'csto'*
|
||||
'csverb' options.txt /*'csverb'*
|
||||
'cuc' options.txt /*'cuc'*
|
||||
'cul' options.txt /*'cul'*
|
||||
'cursorcolumn' options.txt /*'cursorcolumn'*
|
||||
'cursorline' options.txt /*'cursorline'*
|
||||
'cwh' options.txt /*'cwh'*
|
||||
'debug' options.txt /*'debug'*
|
||||
'deco' options.txt /*'deco'*
|
||||
@@ -202,6 +206,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 +236,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 +258,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 +266,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'*
|
||||
@@ -352,11 +360,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'mat' options.txt /*'mat'*
|
||||
'matchpairs' options.txt /*'matchpairs'*
|
||||
'matchtime' options.txt /*'matchtime'*
|
||||
'maxcombine' options.txt /*'maxcombine'*
|
||||
'maxfuncdepth' options.txt /*'maxfuncdepth'*
|
||||
'maxmapdepth' options.txt /*'maxmapdepth'*
|
||||
'maxmem' options.txt /*'maxmem'*
|
||||
'maxmempattern' options.txt /*'maxmempattern'*
|
||||
'maxmemtot' options.txt /*'maxmemtot'*
|
||||
'mco' options.txt /*'mco'*
|
||||
'mef' options.txt /*'mef'*
|
||||
'menuitems' options.txt /*'menuitems'*
|
||||
'mesg' vi_diff.txt /*'mesg'*
|
||||
@@ -439,6 +449,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'nocscopeverbose' options.txt /*'nocscopeverbose'*
|
||||
'nocst' options.txt /*'nocst'*
|
||||
'nocsverb' options.txt /*'nocsverb'*
|
||||
'nocuc' options.txt /*'nocuc'*
|
||||
'nocul' options.txt /*'nocul'*
|
||||
'nocursorcolumn' options.txt /*'nocursorcolumn'*
|
||||
'nocursorline' options.txt /*'nocursorline'*
|
||||
'nodeco' options.txt /*'nodeco'*
|
||||
'nodelcombine' options.txt /*'nodelcombine'*
|
||||
'nodg' options.txt /*'nodg'*
|
||||
@@ -594,8 +608,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'nowb' options.txt /*'nowb'*
|
||||
'noweirdinvert' options.txt /*'noweirdinvert'*
|
||||
'nowfh' options.txt /*'nowfh'*
|
||||
'nowfw' options.txt /*'nowfw'*
|
||||
'nowildmenu' options.txt /*'nowildmenu'*
|
||||
'nowinfixheight' options.txt /*'nowinfixheight'*
|
||||
'nowinfixwidth' options.txt /*'nowinfixwidth'*
|
||||
'nowiv' options.txt /*'nowiv'*
|
||||
'nowmnu' options.txt /*'nowmnu'*
|
||||
'nowrap' options.txt /*'nowrap'*
|
||||
@@ -632,6 +648,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'pex' options.txt /*'pex'*
|
||||
'pexpr' options.txt /*'pexpr'*
|
||||
'pfn' options.txt /*'pfn'*
|
||||
'ph' options.txt /*'ph'*
|
||||
'pheader' options.txt /*'pheader'*
|
||||
'pi' options.txt /*'pi'*
|
||||
'pm' options.txt /*'pm'*
|
||||
@@ -651,6 +668,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'printoptions' options.txt /*'printoptions'*
|
||||
'prompt' options.txt /*'prompt'*
|
||||
'pt' options.txt /*'pt'*
|
||||
'pumheight' options.txt /*'pumheight'*
|
||||
'pvh' options.txt /*'pvh'*
|
||||
'pvw' options.txt /*'pvw'*
|
||||
'qe' options.txt /*'qe'*
|
||||
@@ -716,6 +734,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 +775,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 +910,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 +919,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 +949,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'*
|
||||
@@ -974,6 +998,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'wd' options.txt /*'wd'*
|
||||
'weirdinvert' options.txt /*'weirdinvert'*
|
||||
'wfh' options.txt /*'wfh'*
|
||||
'wfw' options.txt /*'wfw'*
|
||||
'wh' options.txt /*'wh'*
|
||||
'whichwrap' options.txt /*'whichwrap'*
|
||||
'wi' options.txt /*'wi'*
|
||||
@@ -988,6 +1013,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'winaltkeys' options.txt /*'winaltkeys'*
|
||||
'window' options.txt /*'window'*
|
||||
'winfixheight' options.txt /*'winfixheight'*
|
||||
'winfixwidth' options.txt /*'winfixwidth'*
|
||||
'winheight' options.txt /*'winheight'*
|
||||
'winminheight' options.txt /*'winminheight'*
|
||||
'winminwidth' options.txt /*'winminwidth'*
|
||||
@@ -1102,6 +1128,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
+python various.txt /*+python*
|
||||
+python/dyn various.txt /*+python\/dyn*
|
||||
+quickfix various.txt /*+quickfix*
|
||||
+reltime various.txt /*+reltime*
|
||||
+rightleft various.txt /*+rightleft*
|
||||
+ruby various.txt /*+ruby*
|
||||
+ruby/dyn various.txt /*+ruby\/dyn*
|
||||
@@ -1160,6 +1187,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
--remote-expr remote.txt /*--remote-expr*
|
||||
--remote-send remote.txt /*--remote-send*
|
||||
--remote-silent remote.txt /*--remote-silent*
|
||||
--remote-tab remote.txt /*--remote-tab*
|
||||
--remote-tab-silent remote.txt /*--remote-tab-silent*
|
||||
--remote-tab-wait remote.txt /*--remote-tab-wait*
|
||||
--remote-tab-wait-silent remote.txt /*--remote-tab-wait-silent*
|
||||
--remote-wait remote.txt /*--remote-wait*
|
||||
--remote-wait-silent remote.txt /*--remote-wait-silent*
|
||||
--role starting.txt /*--role*
|
||||
@@ -1222,6 +1253,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*
|
||||
@@ -1474,6 +1506,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*
|
||||
@@ -1586,6 +1619,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
41.13 usr_41.txt /*41.13*
|
||||
41.14 usr_41.txt /*41.14*
|
||||
41.15 usr_41.txt /*41.15*
|
||||
41.16 usr_41.txt /*41.16*
|
||||
41.2 usr_41.txt /*41.2*
|
||||
41.3 usr_41.txt /*41.3*
|
||||
41.4 usr_41.txt /*41.4*
|
||||
@@ -1619,6 +1653,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
45.4 usr_45.txt /*45.4*
|
||||
45.5 usr_45.txt /*45.5*
|
||||
755 spell.txt /*755*
|
||||
8g8 various.txt /*8g8*
|
||||
90.1 usr_90.txt /*90.1*
|
||||
90.2 usr_90.txt /*90.2*
|
||||
90.3 usr_90.txt /*90.3*
|
||||
@@ -1667,6 +1702,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:Explore pi_netrw.txt /*:Explore*
|
||||
:Hexplore pi_netrw.txt /*:Hexplore*
|
||||
:Man filetype.txt /*:Man*
|
||||
:MkVimball vimball.txt /*:MkVimball*
|
||||
:N editing.txt /*:N*
|
||||
:Nexplore pi_netrw.txt /*:Nexplore*
|
||||
:Next editing.txt /*:Next*
|
||||
@@ -1813,6 +1849,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:cfir quickfix.txt /*:cfir*
|
||||
:cfirst quickfix.txt /*:cfirst*
|
||||
:cg quickfix.txt /*:cg*
|
||||
:cgetb quickfix.txt /*:cgetb*
|
||||
:cgetbuffer quickfix.txt /*:cgetbuffer*
|
||||
:cgete quickfix.txt /*:cgete*
|
||||
:cgetexpr quickfix.txt /*:cgetexpr*
|
||||
:cgetfile quickfix.txt /*:cgetfile*
|
||||
:ch change.txt /*:ch*
|
||||
:change change.txt /*:change*
|
||||
@@ -1939,6 +1979,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:dsp tagsrch.txt /*:dsp*
|
||||
:dsplit tagsrch.txt /*:dsplit*
|
||||
:e editing.txt /*:e*
|
||||
:ea undo.txt /*:ea*
|
||||
:earlier undo.txt /*:earlier*
|
||||
:ec eval.txt /*:ec*
|
||||
:echo eval.txt /*:echo*
|
||||
:echoe eval.txt /*:echoe*
|
||||
@@ -2116,6 +2158,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:lang mlang.txt /*:lang*
|
||||
:language mlang.txt /*:language*
|
||||
:last editing.txt /*:last*
|
||||
:lat undo.txt /*:lat*
|
||||
:later undo.txt /*:later*
|
||||
:lb quickfix.txt /*:lb*
|
||||
:lbuffer quickfix.txt /*:lbuffer*
|
||||
:lc editing.txt /*:lc*
|
||||
@@ -2148,6 +2192,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:lfir quickfix.txt /*:lfir*
|
||||
:lfirst quickfix.txt /*:lfirst*
|
||||
:lg quickfix.txt /*:lg*
|
||||
:lgetb quickfix.txt /*:lgetb*
|
||||
:lgetbuffer quickfix.txt /*:lgetbuffer*
|
||||
:lgete quickfix.txt /*:lgete*
|
||||
:lgetexpr quickfix.txt /*:lgetexpr*
|
||||
:lgetfile quickfix.txt /*:lgetfile*
|
||||
:lgr quickfix.txt /*:lgr*
|
||||
:lgrep quickfix.txt /*:lgrep*
|
||||
@@ -2213,12 +2261,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:map map.txt /*:map*
|
||||
:map! map.txt /*:map!*
|
||||
:map-<buffer> map.txt /*:map-<buffer>*
|
||||
:map-<expr> map.txt /*:map-<expr>*
|
||||
:map-<script> map.txt /*:map-<script>*
|
||||
:map-<silent> map.txt /*:map-<silent>*
|
||||
:map-<unique> map.txt /*:map-<unique>*
|
||||
:map-alt-keys map.txt /*:map-alt-keys*
|
||||
:map-arguments map.txt /*:map-arguments*
|
||||
:map-commands map.txt /*:map-commands*
|
||||
:map-expression map.txt /*:map-expression*
|
||||
:map-local map.txt /*:map-local*
|
||||
:map-modes map.txt /*:map-modes*
|
||||
:map-operator map.txt /*:map-operator*
|
||||
@@ -2519,12 +2569,22 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:sleep various.txt /*:sleep*
|
||||
:sm change.txt /*:sm*
|
||||
:smagic change.txt /*:smagic*
|
||||
:smap map.txt /*:smap*
|
||||
:smap_l map.txt /*:smap_l*
|
||||
:smapc map.txt /*:smapc*
|
||||
:smapclear map.txt /*:smapclear*
|
||||
:sme gui.txt /*:sme*
|
||||
:smenu gui.txt /*:smenu*
|
||||
:sn windows.txt /*:sn*
|
||||
:snext windows.txt /*:snext*
|
||||
:sni if_sniff.txt /*:sni*
|
||||
:sniff if_sniff.txt /*:sniff*
|
||||
:sno change.txt /*:sno*
|
||||
:snomagic change.txt /*:snomagic*
|
||||
:snor map.txt /*:snor*
|
||||
:snoremap map.txt /*:snoremap*
|
||||
:snoreme gui.txt /*:snoreme*
|
||||
:snoremenu gui.txt /*:snoremenu*
|
||||
:so repeat.txt /*:so*
|
||||
:sor change.txt /*:sor*
|
||||
:sort change.txt /*:sort*
|
||||
@@ -2535,8 +2595,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:spelld spell.txt /*:spelld*
|
||||
:spelldump spell.txt /*:spelldump*
|
||||
:spellgood spell.txt /*:spellgood*
|
||||
:spelli spell.txt /*:spelli*
|
||||
:spellinfo spell.txt /*:spellinfo*
|
||||
:spellr spell.txt /*:spellr*
|
||||
:spellrepall spell.txt /*:spellrepall*
|
||||
:spellu spell.txt /*:spellu*
|
||||
:spellundo spell.txt /*:spellundo*
|
||||
:spellw spell.txt /*:spellw*
|
||||
:spellwrong spell.txt /*:spellwrong*
|
||||
:split windows.txt /*:split*
|
||||
@@ -2564,6 +2628,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:substitute change.txt /*:substitute*
|
||||
:sun windows.txt /*:sun*
|
||||
:sunhide windows.txt /*:sunhide*
|
||||
:sunm map.txt /*:sunm*
|
||||
:sunmap map.txt /*:sunmap*
|
||||
:sunme gui.txt /*:sunme*
|
||||
:sunmenu gui.txt /*:sunmenu*
|
||||
:sus starting.txt /*:sus*
|
||||
:suspend starting.txt /*:suspend*
|
||||
:sv windows.txt /*:sv*
|
||||
@@ -2636,6 +2704,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*
|
||||
@@ -2673,6 +2768,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:una map.txt /*:una*
|
||||
:unabbreviate map.txt /*:unabbreviate*
|
||||
:undo undo.txt /*:undo*
|
||||
:undoj undo.txt /*:undoj*
|
||||
:undojoin undo.txt /*:undojoin*
|
||||
:undol undo.txt /*:undol*
|
||||
:undolist undo.txt /*:undolist*
|
||||
:unh windows.txt /*:unh*
|
||||
:unhide windows.txt /*:unhide*
|
||||
:unl eval.txt /*:unl*
|
||||
@@ -2765,6 +2864,21 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:xa editing.txt /*:xa*
|
||||
:xall editing.txt /*:xall*
|
||||
:xit editing.txt /*:xit*
|
||||
:xm map.txt /*:xm*
|
||||
:xmap map.txt /*:xmap*
|
||||
:xmap_l map.txt /*:xmap_l*
|
||||
:xmapc map.txt /*:xmapc*
|
||||
:xmapclear map.txt /*:xmapclear*
|
||||
:xme gui.txt /*:xme*
|
||||
:xmenu gui.txt /*:xmenu*
|
||||
:xn map.txt /*:xn*
|
||||
:xnoremap map.txt /*:xnoremap*
|
||||
:xnoreme gui.txt /*:xnoreme*
|
||||
:xnoremenu gui.txt /*:xnoremenu*
|
||||
:xu map.txt /*:xu*
|
||||
:xunmap map.txt /*:xunmap*
|
||||
:xunme gui.txt /*:xunme*
|
||||
:xunmenu gui.txt /*:xunmenu*
|
||||
:y change.txt /*:y*
|
||||
:yank change.txt /*:yank*
|
||||
:z various.txt /*:z*
|
||||
@@ -3059,6 +3173,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*
|
||||
@@ -3149,6 +3264,7 @@ E113 eval.txt /*E113*
|
||||
E114 eval.txt /*E114*
|
||||
E115 eval.txt /*E115*
|
||||
E116 eval.txt /*E116*
|
||||
E117 eval.txt /*E117*
|
||||
E118 eval.txt /*E118*
|
||||
E119 eval.txt /*E119*
|
||||
E12 message.txt /*E12*
|
||||
@@ -3873,6 +3989,8 @@ E780 spell.txt /*E780*
|
||||
E781 spell.txt /*E781*
|
||||
E782 spell.txt /*E782*
|
||||
E783 spell.txt /*E783*
|
||||
E784 tabpage.txt /*E784*
|
||||
E785 eval.txt /*E785*
|
||||
E79 message.txt /*E79*
|
||||
E80 message.txt /*E80*
|
||||
E800 arabic.txt /*E800*
|
||||
@@ -3911,6 +4029,7 @@ FileAppendPost autocmd.txt /*FileAppendPost*
|
||||
FileAppendPre autocmd.txt /*FileAppendPre*
|
||||
FileChangedRO autocmd.txt /*FileChangedRO*
|
||||
FileChangedShell autocmd.txt /*FileChangedShell*
|
||||
FileChangedShellPost autocmd.txt /*FileChangedShellPost*
|
||||
FileEncoding autocmd.txt /*FileEncoding*
|
||||
FileReadCmd autocmd.txt /*FileReadCmd*
|
||||
FileReadPost autocmd.txt /*FileReadPost*
|
||||
@@ -3935,6 +4054,7 @@ GTK+ gui_x11.txt /*GTK+*
|
||||
GUI gui.txt /*GUI*
|
||||
GUI-X11 gui_x11.txt /*GUI-X11*
|
||||
GUIEnter autocmd.txt /*GUIEnter*
|
||||
GetLatestVimScripts-copyright getscript.txt /*GetLatestVimScripts-copyright*
|
||||
Gnome gui_x11.txt /*Gnome*
|
||||
H motion.txt /*H*
|
||||
I insert.txt /*I*
|
||||
@@ -4068,12 +4188,16 @@ Ruby if_ruby.txt /*Ruby*
|
||||
Russian russian.txt /*Russian*
|
||||
S change.txt /*S*
|
||||
SHELL starting.txt /*SHELL*
|
||||
SQLSetType sql.txt /*SQLSetType*
|
||||
Select visual.txt /*Select*
|
||||
Select-mode visual.txt /*Select-mode*
|
||||
Select-mode-mapping visual.txt /*Select-mode-mapping*
|
||||
Session starting.txt /*Session*
|
||||
SessionLoad-variable starting.txt /*SessionLoad-variable*
|
||||
SessionLoadPost autocmd.txt /*SessionLoadPost*
|
||||
ShellCmdPost autocmd.txt /*ShellCmdPost*
|
||||
ShellFilterPost autocmd.txt /*ShellFilterPost*
|
||||
SourcePre autocmd.txt /*SourcePre*
|
||||
SpellFileMissing autocmd.txt /*SpellFileMissing*
|
||||
StdinReadPost autocmd.txt /*StdinReadPost*
|
||||
StdinReadPre autocmd.txt /*StdinReadPre*
|
||||
@@ -4082,11 +4206,15 @@ Syntax autocmd.txt /*Syntax*
|
||||
T motion.txt /*T*
|
||||
TCL if_tcl.txt /*TCL*
|
||||
TERM starting.txt /*TERM*
|
||||
TSQL sql.txt /*TSQL*
|
||||
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*
|
||||
Transact-SQL sql.txt /*Transact-SQL*
|
||||
U undo.txt /*U*
|
||||
UTF-8 mbyte.txt /*UTF-8*
|
||||
UTF8-xterm mbyte.txt /*UTF8-xterm*
|
||||
@@ -4105,6 +4233,8 @@ View starting.txt /*View*
|
||||
VimEnter autocmd.txt /*VimEnter*
|
||||
VimLeave autocmd.txt /*VimLeave*
|
||||
VimLeavePre autocmd.txt /*VimLeavePre*
|
||||
VimResized autocmd.txt /*VimResized*
|
||||
Vimball-copyright vimball.txt /*Vimball-copyright*
|
||||
Virtual-Replace-mode insert.txt /*Virtual-Replace-mode*
|
||||
VisVim if_ole.txt /*VisVim*
|
||||
Visual visual.txt /*Visual*
|
||||
@@ -4520,6 +4650,7 @@ changed-6.3 version6.txt /*changed-6.3*
|
||||
changed-6.4 version6.txt /*changed-6.4*
|
||||
changelist motion.txt /*changelist*
|
||||
changelog.vim syntax.txt /*changelog.vim*
|
||||
changenr() eval.txt /*changenr()*
|
||||
changetick eval.txt /*changetick*
|
||||
changing change.txt /*changing*
|
||||
char2nr() eval.txt /*char2nr()*
|
||||
@@ -4583,7 +4714,9 @@ 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() eval.txt /*complete()*
|
||||
complete-functions insert.txt /*complete-functions*
|
||||
complete-items insert.txt /*complete-items*
|
||||
complete_add() eval.txt /*complete_add()*
|
||||
complete_check() eval.txt /*complete_check()*
|
||||
complex-change change.txt /*complex-change*
|
||||
@@ -4799,6 +4932,7 @@ dip motion.txt /*dip*
|
||||
dircolors.vim syntax.txt /*dircolors.vim*
|
||||
dis motion.txt /*dis*
|
||||
disable-menus gui.txt /*disable-menus*
|
||||
distribute-script usr_41.txt /*distribute-script*
|
||||
distribution intro.txt /*distribution*
|
||||
diw motion.txt /*diw*
|
||||
dl change.txt /*dl*
|
||||
@@ -4840,6 +4974,7 @@ edit-files editing.txt /*edit-files*
|
||||
edit-intro editing.txt /*edit-intro*
|
||||
edit-no-break usr_25.txt /*edit-no-break*
|
||||
editing.txt editing.txt /*editing.txt*
|
||||
efm-%> quickfix.txt /*efm-%>*
|
||||
efm-entries quickfix.txt /*efm-entries*
|
||||
efm-ignore quickfix.txt /*efm-ignore*
|
||||
eiffel.vim syntax.txt /*eiffel.vim*
|
||||
@@ -5143,6 +5278,7 @@ ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax*
|
||||
ft-papp-syntax syntax.txt /*ft-papp-syntax*
|
||||
ft-pascal-syntax syntax.txt /*ft-pascal-syntax*
|
||||
ft-perl-syntax syntax.txt /*ft-perl-syntax*
|
||||
ft-php-omni insert.txt /*ft-php-omni*
|
||||
ft-php-syntax syntax.txt /*ft-php-syntax*
|
||||
ft-php3-syntax syntax.txt /*ft-php3-syntax*
|
||||
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
|
||||
@@ -5164,11 +5300,14 @@ ft-sgml-syntax syntax.txt /*ft-sgml-syntax*
|
||||
ft-sh-syntax syntax.txt /*ft-sh-syntax*
|
||||
ft-spec-plugin filetype.txt /*ft-spec-plugin*
|
||||
ft-spup-syntax syntax.txt /*ft-spup-syntax*
|
||||
ft-sql filetype.txt /*ft-sql*
|
||||
ft-sql-syntax syntax.txt /*ft-sql-syntax*
|
||||
ft-sqlanywhere-syntax syntax.txt /*ft-sqlanywhere-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-plugin filetype.txt /*ft-tex-plugin*
|
||||
ft-tex-syntax syntax.txt /*ft-tex-syntax*
|
||||
ft-tf-syntax syntax.txt /*ft-tf-syntax*
|
||||
ft-vb-syntax syntax.txt /*ft-vb-syntax*
|
||||
@@ -5204,15 +5343,19 @@ g$ motion.txt /*g$*
|
||||
g& change.txt /*g&*
|
||||
g' motion.txt /*g'*
|
||||
g'a motion.txt /*g'a*
|
||||
g+ undo.txt /*g+*
|
||||
g, motion.txt /*g,*
|
||||
g- undo.txt /*g-*
|
||||
g0 motion.txt /*g0*
|
||||
g8 various.txt /*g8*
|
||||
g:DrChipTopLvlMenu pi_netrw.txt /*g:DrChipTopLvlMenu*
|
||||
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_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
|
||||
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
|
||||
g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
|
||||
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
|
||||
@@ -5263,12 +5406,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*
|
||||
@@ -5300,11 +5445,20 @@ getfperm() eval.txt /*getfperm()*
|
||||
getfsize() eval.txt /*getfsize()*
|
||||
getftime() eval.txt /*getftime()*
|
||||
getftype() eval.txt /*getftype()*
|
||||
getlatestvimscripts getscript.txt /*getlatestvimscripts*
|
||||
getlatestvimscripts-algorithm getscript.txt /*getlatestvimscripts-algorithm*
|
||||
getlatestvimscripts-autoinstall getscript.txt /*getlatestvimscripts-autoinstall*
|
||||
getlatestvimscripts-data getscript.txt /*getlatestvimscripts-data*
|
||||
getlatestvimscripts-history getscript.txt /*getlatestvimscripts-history*
|
||||
getlatestvimscripts-plugins getscript.txt /*getlatestvimscripts-plugins*
|
||||
getline() eval.txt /*getline()*
|
||||
getloclist() eval.txt /*getloclist()*
|
||||
getpos() eval.txt /*getpos()*
|
||||
getqflist() eval.txt /*getqflist()*
|
||||
getreg() eval.txt /*getreg()*
|
||||
getregtype() eval.txt /*getregtype()*
|
||||
getscript getscript.txt /*getscript*
|
||||
getscript.txt getscript.txt /*getscript.txt*
|
||||
getwinposx() eval.txt /*getwinposx()*
|
||||
getwinposy() eval.txt /*getwinposy()*
|
||||
getwinvar() eval.txt /*getwinvar()*
|
||||
@@ -5320,6 +5474,13 @@ global-ime mbyte.txt /*global-ime*
|
||||
global-local options.txt /*global-local*
|
||||
global-variable eval.txt /*global-variable*
|
||||
globpath() eval.txt /*globpath()*
|
||||
glvs getscript.txt /*glvs*
|
||||
glvs-alg getscript.txt /*glvs-alg*
|
||||
glvs-autoinstall getscript.txt /*glvs-autoinstall*
|
||||
glvs-contents getscript.txt /*glvs-contents*
|
||||
glvs-data getscript.txt /*glvs-data*
|
||||
glvs-hist getscript.txt /*glvs-hist*
|
||||
glvs-plugins getscript.txt /*glvs-plugins*
|
||||
gm motion.txt /*gm*
|
||||
gnome-session gui_x11.txt /*gnome-session*
|
||||
go motion.txt /*go*
|
||||
@@ -5338,6 +5499,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*
|
||||
@@ -5467,7 +5629,9 @@ hit-return message.txt /*hit-return*
|
||||
hitest.vim syntax.txt /*hitest.vim*
|
||||
hjkl usr_02.txt /*hjkl*
|
||||
hl-Cursor syntax.txt /*hl-Cursor*
|
||||
hl-CursorColumn syntax.txt /*hl-CursorColumn*
|
||||
hl-CursorIM syntax.txt /*hl-CursorIM*
|
||||
hl-CursorLine syntax.txt /*hl-CursorLine*
|
||||
hl-DiffAdd syntax.txt /*hl-DiffAdd*
|
||||
hl-DiffChange syntax.txt /*hl-DiffChange*
|
||||
hl-DiffDelete syntax.txt /*hl-DiffDelete*
|
||||
@@ -5478,6 +5642,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*
|
||||
@@ -5498,6 +5663,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*
|
||||
@@ -5673,6 +5841,7 @@ index() eval.txt /*index()*
|
||||
index.txt index.txt /*index.txt*
|
||||
info-message starting.txt /*info-message*
|
||||
inform.vim syntax.txt /*inform.vim*
|
||||
informix sql.txt /*informix*
|
||||
initialization starting.txt /*initialization*
|
||||
input() eval.txt /*input()*
|
||||
inputdialog() eval.txt /*inputdialog()*
|
||||
@@ -5863,20 +6032,26 @@ 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-s map.txt /*mapmode-s*
|
||||
mapmode-v map.txt /*mapmode-v*
|
||||
mapmode-x map.txt /*mapmode-x*
|
||||
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*
|
||||
mbyte-XIM mbyte.txt /*mbyte-XIM*
|
||||
mbyte-combining mbyte.txt /*mbyte-combining*
|
||||
mbyte-composing mbyte.txt /*mbyte-composing*
|
||||
mbyte-conversion mbyte.txt /*mbyte-conversion*
|
||||
mbyte-encoding mbyte.txt /*mbyte-encoding*
|
||||
mbyte-first mbyte.txt /*mbyte-first*
|
||||
@@ -5954,6 +6129,7 @@ multilang-messages mlang.txt /*multilang-messages*
|
||||
multilang-scripts mlang.txt /*multilang-scripts*
|
||||
myfiletypefile syntax.txt /*myfiletypefile*
|
||||
myscriptsfile syntax.txt /*myscriptsfile*
|
||||
mysql sql.txt /*mysql*
|
||||
mysyntaxfile syntax.txt /*mysyntaxfile*
|
||||
mysyntaxfile-add syntax.txt /*mysyntaxfile-add*
|
||||
mysyntaxfile-replace syntax.txt /*mysyntaxfile-replace*
|
||||
@@ -6042,6 +6218,7 @@ netrw-hexplore pi_netrw.txt /*netrw-hexplore*
|
||||
netrw-history pi_netrw.txt /*netrw-history*
|
||||
netrw-horiz pi_netrw.txt /*netrw-horiz*
|
||||
netrw-i pi_netrw.txt /*netrw-i*
|
||||
netrw-incompatible pi_netrw.txt /*netrw-incompatible*
|
||||
netrw-list pi_netrw.txt /*netrw-list*
|
||||
netrw-listbookmark pi_netrw.txt /*netrw-listbookmark*
|
||||
netrw-listhack pi_netrw.txt /*netrw-listhack*
|
||||
@@ -6067,6 +6244,8 @@ 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-pscp pi_netrw.txt /*netrw-pscp*
|
||||
netrw-putty pi_netrw.txt /*netrw-putty*
|
||||
netrw-q pi_netrw.txt /*netrw-q*
|
||||
netrw-r pi_netrw.txt /*netrw-r*
|
||||
netrw-read pi_netrw.txt /*netrw-read*
|
||||
@@ -6133,11 +6312,16 @@ 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-map-expression version7.txt /*new-map-expression*
|
||||
new-map-select version7.txt /*new-map-select*
|
||||
new-more-highlighting version7.txt /*new-more-highlighting*
|
||||
new-more-unicode version7.txt /*new-more-unicode*
|
||||
new-multi-byte version5.txt /*new-multi-byte*
|
||||
new-multi-lang version6.txt /*new-multi-lang*
|
||||
new-netrw-explore version7.txt /*new-netrw-explore*
|
||||
new-network-files version6.txt /*new-network-files*
|
||||
new-omni-completion version7.txt /*new-omni-completion*
|
||||
new-onemore version7.txt /*new-onemore*
|
||||
new-operator-mod version6.txt /*new-operator-mod*
|
||||
new-options-5.2 version5.txt /*new-options-5.2*
|
||||
new-options-5.4 version5.txt /*new-options-5.4*
|
||||
@@ -6154,6 +6338,8 @@ new-search-path version6.txt /*new-search-path*
|
||||
new-searchpat version6.txt /*new-searchpat*
|
||||
new-session-files version5.txt /*new-session-files*
|
||||
new-spell version7.txt /*new-spell*
|
||||
new-tab-pages version7.txt /*new-tab-pages*
|
||||
new-undo-branches version7.txt /*new-undo-branches*
|
||||
new-unlisted-buffers version6.txt /*new-unlisted-buffers*
|
||||
new-user-defined version5.txt /*new-user-defined*
|
||||
new-user-manual version6.txt /*new-user-manual*
|
||||
@@ -6202,6 +6388,7 @@ option-summary options.txt /*option-summary*
|
||||
options options.txt /*options*
|
||||
options-changed version5.txt /*options-changed*
|
||||
options.txt options.txt /*options.txt*
|
||||
oracle sql.txt /*oracle*
|
||||
os2 os_os2.txt /*os2*
|
||||
os2ansi os_os2.txt /*os2ansi*
|
||||
os390 os_390.txt /*os390*
|
||||
@@ -6235,6 +6422,7 @@ pattern-multi-items pattern.txt /*pattern-multi-items*
|
||||
pattern-overview pattern.txt /*pattern-overview*
|
||||
pattern-searches pattern.txt /*pattern-searches*
|
||||
pattern.txt pattern.txt /*pattern.txt*
|
||||
patterns-composing pattern.txt /*patterns-composing*
|
||||
pdev-option print.txt /*pdev-option*
|
||||
penc-option print.txt /*penc-option*
|
||||
perl if_perl.txt /*perl*
|
||||
@@ -6271,7 +6459,9 @@ 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*
|
||||
plsql sql.txt /*plsql*
|
||||
plugin usr_05.txt /*plugin*
|
||||
plugin-details filetype.txt /*plugin-details*
|
||||
plugin-filetype usr_41.txt /*plugin-filetype*
|
||||
@@ -6282,11 +6472,13 @@ 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*
|
||||
popupmenu-keys insert.txt /*popupmenu-keys*
|
||||
ports-5.2 version5.txt /*ports-5.2*
|
||||
ports-6 version6.txt /*ports-6*
|
||||
posix vi_diff.txt /*posix*
|
||||
posix-compliance vi_diff.txt /*posix-compliance*
|
||||
posix-screen-size vi_diff.txt /*posix-screen-size*
|
||||
postgress sql.txt /*postgress*
|
||||
postscr.vim syntax.txt /*postscr.vim*
|
||||
postscript-cjk-printing print.txt /*postscript-cjk-printing*
|
||||
postscript-print-encoding print.txt /*postscript-print-encoding*
|
||||
@@ -6310,8 +6502,10 @@ profiling repeat.txt /*profiling*
|
||||
profiling-variable eval.txt /*profiling-variable*
|
||||
progname-variable eval.txt /*progname-variable*
|
||||
progress.vim syntax.txt /*progress.vim*
|
||||
psql sql.txt /*psql*
|
||||
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*
|
||||
@@ -6401,6 +6595,7 @@ recursive_mapping map.txt /*recursive_mapping*
|
||||
redo undo.txt /*redo*
|
||||
redo-register undo.txt /*redo-register*
|
||||
ref intro.txt /*ref*
|
||||
ref-toc help.txt /*ref-toc*
|
||||
reference intro.txt /*reference*
|
||||
regexp pattern.txt /*regexp*
|
||||
regexp-changes-5.4 version5.txt /*regexp-changes-5.4*
|
||||
@@ -6409,6 +6604,8 @@ register-faq sponsor.txt /*register-faq*
|
||||
register-variable eval.txt /*register-variable*
|
||||
registers change.txt /*registers*
|
||||
regular-expression pattern.txt /*regular-expression*
|
||||
reltime() eval.txt /*reltime()*
|
||||
reltimestr() eval.txt /*reltimestr()*
|
||||
remote.txt remote.txt /*remote.txt*
|
||||
remote_expr() eval.txt /*remote_expr()*
|
||||
remote_foreground() eval.txt /*remote_foreground()*
|
||||
@@ -6525,6 +6722,7 @@ scrolling scroll.txt /*scrolling*
|
||||
scrollstart-variable eval.txt /*scrollstart-variable*
|
||||
sdl.vim syntax.txt /*sdl.vim*
|
||||
search() eval.txt /*search()*
|
||||
search()-sub-match eval.txt /*search()-sub-match*
|
||||
search-commands pattern.txt /*search-commands*
|
||||
search-offset pattern.txt /*search-offset*
|
||||
search-pattern pattern.txt /*search-pattern*
|
||||
@@ -6532,6 +6730,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*
|
||||
@@ -6549,9 +6749,12 @@ 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*
|
||||
@@ -6593,6 +6796,7 @@ special-buffers windows.txt /*special-buffers*
|
||||
speed-up tips.txt /*speed-up*
|
||||
spell spell.txt /*spell*
|
||||
spell-ACCENT spell.txt /*spell-ACCENT*
|
||||
spell-AUTHOR spell.txt /*spell-AUTHOR*
|
||||
spell-BAD spell.txt /*spell-BAD*
|
||||
spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE*
|
||||
spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
|
||||
@@ -6600,22 +6804,24 @@ spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
|
||||
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
|
||||
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
|
||||
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
|
||||
spell-CMP spell.txt /*spell-CMP*
|
||||
spell-COMMON spell.txt /*spell-COMMON*
|
||||
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
|
||||
spell-COMPOUND spell.txt /*spell-COMPOUND*
|
||||
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-COMPOUNDRULE spell.txt /*spell-COMPOUNDRULE*
|
||||
spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE*
|
||||
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
|
||||
spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX*
|
||||
spell-COPYRIGHT spell.txt /*spell-COPYRIGHT*
|
||||
spell-EMAIL spell.txt /*spell-EMAIL*
|
||||
spell-FLAG spell.txt /*spell-FLAG*
|
||||
spell-FOL spell.txt /*spell-FOL*
|
||||
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
|
||||
@@ -6679,6 +6885,7 @@ 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-cleanup spell.txt /*spellfile-cleanup*
|
||||
spellfile.vim spell.txt /*spellfile.vim*
|
||||
spellsuggest() eval.txt /*spellsuggest()*
|
||||
split() eval.txt /*split()*
|
||||
@@ -6689,8 +6896,23 @@ sponsor-faq sponsor.txt /*sponsor-faq*
|
||||
sponsor.txt sponsor.txt /*sponsor.txt*
|
||||
spoon os_unix.txt /*spoon*
|
||||
spup.vim syntax.txt /*spup.vim*
|
||||
sql-adding-dialects sql.txt /*sql-adding-dialects*
|
||||
sql-dialects sql.txt /*sql-dialects*
|
||||
sql-macros sql.txt /*sql-macros*
|
||||
sql-matchit sql.txt /*sql-matchit*
|
||||
sql-navigation sql.txt /*sql-navigation*
|
||||
sql-object-motions sql.txt /*sql-object-motions*
|
||||
sql-predefined-objects sql.txt /*sql-predefined-objects*
|
||||
sql-type-default sql.txt /*sql-type-default*
|
||||
sql-types sql.txt /*sql-types*
|
||||
sql.txt sql.txt /*sql.txt*
|
||||
sql.vim syntax.txt /*sql.vim*
|
||||
sqlanywhere sql.txt /*sqlanywhere*
|
||||
sqlanywhere.vim syntax.txt /*sqlanywhere.vim*
|
||||
sqlinformix.vim syntax.txt /*sqlinformix.vim*
|
||||
sqlj sql.txt /*sqlj*
|
||||
sqlserver sql.txt /*sqlserver*
|
||||
sqlsettype sql.txt /*sqlsettype*
|
||||
sscanf eval.txt /*sscanf*
|
||||
standard-plugin usr_05.txt /*standard-plugin*
|
||||
standard-plugin-list help.txt /*standard-plugin-list*
|
||||
@@ -6708,6 +6930,7 @@ startup-terminal term.txt /*startup-terminal*
|
||||
static-tag tagsrch.txt /*static-tag*
|
||||
status-line windows.txt /*status-line*
|
||||
statusmsg-variable eval.txt /*statusmsg-variable*
|
||||
str2nr() eval.txt /*str2nr()*
|
||||
strcasestr() eval.txt /*strcasestr()*
|
||||
strchr() eval.txt /*strchr()*
|
||||
strcspn() eval.txt /*strcspn()*
|
||||
@@ -6744,6 +6967,7 @@ swapchoice-variable eval.txt /*swapchoice-variable*
|
||||
swapcommand-variable eval.txt /*swapcommand-variable*
|
||||
swapfile-changed version4.txt /*swapfile-changed*
|
||||
swapname-variable eval.txt /*swapname-variable*
|
||||
sybase sql.txt /*sybase*
|
||||
syn-sync-grouphere syntax.txt /*syn-sync-grouphere*
|
||||
syn-sync-groupthere syntax.txt /*syn-sync-groupthere*
|
||||
syn-sync-linecont syntax.txt /*syn-sync-linecont*
|
||||
@@ -6922,6 +7146,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*
|
||||
@@ -7014,6 +7248,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*
|
||||
@@ -7067,6 +7302,8 @@ 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-branches undo.txt /*undo-branches*
|
||||
undo-commands undo.txt /*undo-commands*
|
||||
undo-redo undo.txt /*undo-redo*
|
||||
undo-remarks undo.txt /*undo-remarks*
|
||||
@@ -7242,6 +7479,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]*
|
||||
@@ -7326,6 +7564,13 @@ vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
vim.vim syntax.txt /*vim.vim*
|
||||
vim: options.txt /*vim:*
|
||||
vimball vimball.txt /*vimball*
|
||||
vimball-contents vimball.txt /*vimball-contents*
|
||||
vimball-extract vimball.txt /*vimball-extract*
|
||||
vimball-history vimball.txt /*vimball-history*
|
||||
vimball-manual vimball.txt /*vimball-manual*
|
||||
vimball-vimballlist vimball.txt /*vimball-vimballlist*
|
||||
vimball.txt vimball.txt /*vimball.txt*
|
||||
vimdev intro.txt /*vimdev*
|
||||
vimdiff diff.txt /*vimdiff*
|
||||
vimfiles options.txt /*vimfiles*
|
||||
@@ -7340,6 +7585,7 @@ viminfo-write starting.txt /*viminfo-write*
|
||||
vimrc starting.txt /*vimrc*
|
||||
vimrc-filetype usr_05.txt /*vimrc-filetype*
|
||||
vimrc-intro usr_05.txt /*vimrc-intro*
|
||||
vimrc-option-example starting.txt /*vimrc-option-example*
|
||||
vimrc_example.vim usr_05.txt /*vimrc_example.vim*
|
||||
vimtutor usr_01.txt /*vimtutor*
|
||||
virtcol() eval.txt /*virtcol()*
|
||||
@@ -7431,6 +7677,8 @@ winheight() eval.txt /*winheight()*
|
||||
winline() eval.txt /*winline()*
|
||||
winnr() eval.txt /*winnr()*
|
||||
winrestcmd() eval.txt /*winrestcmd()*
|
||||
winrestview() eval.txt /*winrestview()*
|
||||
winsaveview() eval.txt /*winsaveview()*
|
||||
winwidth() eval.txt /*winwidth()*
|
||||
word motion.txt /*word*
|
||||
word-count editing.txt /*word-count*
|
||||
@@ -7559,6 +7807,10 @@ zo fold.txt /*zo*
|
||||
zr fold.txt /*zr*
|
||||
zs scroll.txt /*zs*
|
||||
zt scroll.txt /*zt*
|
||||
zuG spell.txt /*zuG*
|
||||
zuW spell.txt /*zuW*
|
||||
zug spell.txt /*zug*
|
||||
zuw spell.txt /*zuw*
|
||||
zv fold.txt /*zv*
|
||||
zw spell.txt /*zw*
|
||||
zx fold.txt /*zx*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: 2006 Feb 10
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,486 +30,121 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Crash with X command server (Ciaran McCreesh).
|
||||
Include patch for recognizing TeX flavor. (Benji Fisher)
|
||||
And new tex.vim and plaintex.vim.
|
||||
|
||||
ccomplete / omnicomplete:
|
||||
- For C add tag "kind" field to each match?
|
||||
- Flickering because of syntax highlighting redrawing further lines.
|
||||
- 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?
|
||||
- When a typedef or struct is local to a file only use it in that file?
|
||||
- Special mappings for when the popup menu is visible? Would allow for making
|
||||
a specific selection (e.g, methods vs variables).
|
||||
Win32: Describe how to do debugging. (George Reilly)
|
||||
|
||||
spelling:
|
||||
- Also use the spelling dictionary for dictionary completion.
|
||||
When 'dictionary' is empty and/or when "kspell" is in 'complete'.
|
||||
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
|
||||
After deleting a word with "zw" and some timestamp difference perhaps?
|
||||
Store it as spell/cleanadd.vim.
|
||||
- suggestion for "KG" to "kg" when it's keepcase.
|
||||
- Using KEEPCASE flag still allows all-upper word, docs say it doesn't.
|
||||
Don't allow it, because there is no other way to do this.
|
||||
- Implement NOSUGGEST flag (used for obscene words).
|
||||
- Implement NOSPLITSUGS.
|
||||
- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE?
|
||||
Hunspell now uses COMPOUND with a count.
|
||||
- Check out Hunspell 1.1.3.
|
||||
what does MAXNGRAMSUGS do?
|
||||
See announcement (Nemeth, 5 jan)
|
||||
is COMPLEXPREFIXES necessary now that we have flags for affixes?
|
||||
- Look into hungarian dictionary:
|
||||
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
|
||||
- Support flags on a suffix. Used for second level affixes, rare and
|
||||
nocomp. The flags may also be used for compounding. Default is an OR
|
||||
mechanism with the flags of the word. Adding "compset" on the affixes
|
||||
means the compound flags of the word are not used.
|
||||
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
|
||||
support both).
|
||||
- When compounding Hunspell doesn't allow affixes inside the compound word,
|
||||
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
|
||||
Check Myspell and Aspell if they also work this way.
|
||||
Thus a word + suffix needs a flag that it can't be used with a following
|
||||
compound, and word + prefix can't be after another word in a compound.
|
||||
- Implement COMPOUNDFORBIDFLAG.
|
||||
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to use
|
||||
same wordlist for hyphenation.
|
||||
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
|
||||
obtain). But new Myspell wordlist will come (Hagen)
|
||||
- Finding suggestions with sound folding is slow. Somehow store the
|
||||
sound-folded words and link to the words it comes from?
|
||||
- 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 "zug" command that undoes "zg"? Deletes the good word instead of
|
||||
adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio
|
||||
Colombo)
|
||||
|
||||
7 Add plugins for formatting. Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
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)
|
||||
|
||||
An error in a function uses a line number that doesn't take line continuation
|
||||
into account. (Mikolaj Machowski) Store line count in an extra array?
|
||||
|
||||
Is it possible to keep the command-line window open? Would actually work like
|
||||
closing it, executing the command and re-opening it (at the same position).
|
||||
|
||||
":keepundo": add change to existing undo chain, so that one "u" undoes them
|
||||
all. (Gautam Iyer)
|
||||
|
||||
Mac unicode patch (Da Woon Jung):
|
||||
Mac unicode patch (Da Woon Jung, Eckehard Berns):
|
||||
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
|
||||
New patch 2004 Jun 16
|
||||
- selecting proportional font breaks display
|
||||
- UTF-8 text causes display problems. Font replacement causes this.
|
||||
- Command-key mappings do not work. (Alan Schmitt)
|
||||
- Add default key mappings for the command key (Alan Schmitt)
|
||||
use http://macvim.org/OSX/files/gvimrc
|
||||
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
|
||||
(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.
|
||||
Darren is including the patch in ctags. Test it when it's ready. Change
|
||||
"typename" to "typeref" in C complete code.
|
||||
|
||||
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.
|
||||
HTML indenting can be slow. Caused by using searchpair(). Can search() be
|
||||
used instead?
|
||||
|
||||
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
|
||||
install the scripts in the user's directories.
|
||||
Use findfile(), so that only file names need to be given:
|
||||
script plugin/myscript.vim
|
||||
script autoload/mylib.vim
|
||||
script autoload/yourlib.vim
|
||||
helpfile doc/myscript.txt
|
||||
For the "helpfile" item ":helptags" is run.
|
||||
|
||||
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
|
||||
mappings for normal keys can be removed from Select mode.
|
||||
|
||||
When expanding on the command line, recognize shell commands, such as ":!cmd".
|
||||
Complete command names by searching in $PATH. When completing file names
|
||||
escape special characters ";&<>(){}". (Adri Verhoef)
|
||||
|
||||
Are there more commands where v:swapcommand can be set to something useful?
|
||||
|
||||
Put autocommand event names in a hashtable for faster lookup?
|
||||
|
||||
Awaiting response:
|
||||
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
||||
the screen.
|
||||
- mblen(NULL, 0) also in Vim 6.3?
|
||||
|
||||
|
||||
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.
|
||||
|
||||
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)
|
||||
- GUI implementation of the popup menu.
|
||||
- When using tags, show match in preview window (function prototype,
|
||||
struct member, etc.).
|
||||
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
|
||||
or http://insenvim.sourceforge.net
|
||||
Java, XML, HTML, C++, JSP, SQL, C#
|
||||
MS-Windows only, lots of dependencies (e.g. Perl, Internet
|
||||
explorer), uses .dll shared libraries.
|
||||
For C++ uses $INCLUDE environment var.
|
||||
Uses Perl for C++.
|
||||
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/
|
||||
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
|
||||
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?
|
||||
- Provide a function to popup the menu, so that an insert mode mapping can
|
||||
start it (with a specific selection).
|
||||
|
||||
- UNDO TREE: keep all states of the text, don't delete undo info.
|
||||
When making a change, instead of clearing any future undo (thus redo)
|
||||
info, make a new branch.
|
||||
To navigate through the undo tree number the states of the text
|
||||
sequentially and make it possible to go through the tree in that order.
|
||||
Use "g+++" to go forward, "g---" to go backward. Can mix - and +.
|
||||
Could also use timestamps (to show the time and/or jump to a state five
|
||||
minutes ago). (David Schweikert)
|
||||
To go from one state to another: backtrack to a common state, then forward
|
||||
again.
|
||||
Only difficult thing: When going back in time, how to find the previous
|
||||
text state in the tree?
|
||||
Show the list of changes in a window to be able to select a version?
|
||||
Also: See ":e" as a change operation, find the changes and add them to the
|
||||
undo info. Needed for when an external tool changes the file.
|
||||
- PERSISTENT UNDO: store undo in a file.
|
||||
Use timestamps, so that a version a certain time ago can be found and info
|
||||
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 the current tab.
|
||||
Implementation: keep the list of windows as-is. When switching to another
|
||||
tab make the buffers in the current windows hidden, save the window
|
||||
layout, buildup the other window layout and fill with buffers.
|
||||
Need to be able to search the windows in inactive tabs, e.g. for the
|
||||
quickfix window.
|
||||
Use "1gt" - "99gt" to switch to a tab?
|
||||
Also hidden tabs? Useful for messing with a temp buffer without changing
|
||||
the window layout.
|
||||
- EMBEDDING: Make it possible to run Vim inside a window of another program.
|
||||
For Xwindows this can be done with XReparentWindow().
|
||||
For GTK Neil Bird has a patch to use Vim like a widget.
|
||||
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
|
||||
can be selected with CTRL-V. Allow '$' (end of line) for col2.
|
||||
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye.
|
||||
Should work like an IDE. Try to keep it generic. Now found here:
|
||||
http://clewn.sf.net.
|
||||
And the idevim plugin/script.
|
||||
To be able to start the debugger from inside Vim: For GUI run a program
|
||||
with a netbeans connection; for console: start a program that splits the
|
||||
terminal, runs the debugger in one window and reconnect Vim I/O to the
|
||||
other window.
|
||||
Wishes for NetBeans commands:
|
||||
- make it possible to have 'defineAnnoType' also handle terminal colors.
|
||||
- send 'balloonText' events for the cursor position (using CursorHold ?)
|
||||
in terminal mode.
|
||||
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
|
||||
implement part in Java and then connect to Vim. Some hints from Alexandru
|
||||
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
|
||||
198 standard http://www.jcp.org/en/jsr/detail?id=198.
|
||||
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
|
||||
Plugin that uses a terminal emulator: http://vimplugin.sf.net
|
||||
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
|
||||
Especially when using the scrollbar. Typing a cursor-movement command
|
||||
scrolls back to where the cursor is.
|
||||
- Execute a function with standard option values. No need to save and
|
||||
restore option values. Especially useful for new options. Problem: how
|
||||
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).
|
||||
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",
|
||||
"foldcolumn". (Benji Fisher, 2004 Jun 21)
|
||||
- FileChangedShellPost autocommand event: after (not) reloading a changed
|
||||
file. Can be used to update statusline oslt.
|
||||
- VimResized autocmd event: When the Vim window has been resized (SIGWINCH)
|
||||
patch from Yakov Lerner, 2003 July 24.
|
||||
It's not clear that this doesn't cause problems when the executed
|
||||
commands do something like changing 'lines'. Esp. because the
|
||||
screen has not yet been allocated with the new size.
|
||||
- Running a shell command from the GUI still has limitations. Look into how
|
||||
the Vim shell project can help: http://vimshell.wana.at
|
||||
- Displaying size of Visual area: use 24-33 column display.
|
||||
When selecting multiple lines, up to about a screenful, also count the
|
||||
characters.
|
||||
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
|
||||
Other patch from Da Woon Jung, 2005 Jan 16.
|
||||
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
|
||||
New patch 2004 Jun 16
|
||||
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
|
||||
set highlighting with "CursorColumn" group. Useful for aligning text.
|
||||
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
|
||||
underlining the cursor line: 2004 Jun 17. Should use highlight group
|
||||
instead.
|
||||
Alternative: when 'number' is set highlight the number of the current
|
||||
line.
|
||||
7 Make ":startinsert" command work directly for functions and scripts?
|
||||
Also make it possible to append (it's difficult at end of line).
|
||||
- When using 'incsearch" CTRL-R CTRL-W gets the word under the cursor, but
|
||||
the part that already matched is doubled then. Remove the part of the
|
||||
word that would be doubled. Make it work line CTRL-N in Insert mode.
|
||||
- Add Lua interface? (Wolfgang Oertl)
|
||||
- "onemore" flag in 'virtualedit': move cursor past end of line. Patch by
|
||||
Mattias Flodin (2004 Jul 30)
|
||||
- In a :s command multi-byte characters should also be upper/lower cased
|
||||
with \u, \U, etc.
|
||||
8 Add a command to jump to a certain kind of tag. Allow the user to specify
|
||||
values for the optional fields. E.g., ":tag size type=m".
|
||||
Also allow specifying the file and command, so that the result of
|
||||
taglist() can be used.
|
||||
|
||||
Adjust src/main.aap for installing manpages like in Makefile.
|
||||
|
||||
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?
|
||||
:unmix utf-8,latin1 filename
|
||||
Would only work when 'encoding' is utf-8.
|
||||
Also: command to search for illegal utf-8 byte sequence?
|
||||
|
||||
Also generate the .pdb file that can be used to generate a useful crash report
|
||||
on MS-Windows. (George Reilly)
|
||||
|
||||
Add strtol() to avoid the problems with leading zero causing octal conversion.
|
||||
|
||||
Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
|
||||
Version 1.5 is in ~/src/posix/1.5. (Lynne Canal)
|
||||
|
||||
Add a 'tool' window: behaves like a preview window but there can be several.
|
||||
Don't count it in only_one_window(). (Alexei Alexandrov)
|
||||
|
||||
Win32: Patch for Korean IME. (Yusung, 2005 March 21)
|
||||
|
||||
When "= evaluation results in a List, use it as a sequence of lines.
|
||||
|
||||
Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
|
||||
2004). Should also work for 'filetype'.
|
||||
|
||||
For manipulating buffers without opening a new window, support Virtual
|
||||
windows. Example:
|
||||
:virtwin let l = GetBufLine(4, 10)
|
||||
:fun GetBufLine(bufnr, lnum)
|
||||
: exe "buffer " . a:bufnr
|
||||
: return getline(lnum)
|
||||
:endfun
|
||||
The getline() and setline() functions could work for other buffers, using a
|
||||
Virtual window.
|
||||
A Virtual window only exists for one command. There can be several (for
|
||||
nested commands). The window works as if it comes after the last window, size
|
||||
is the Vim window size, but it's never displayed.
|
||||
|
||||
Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by
|
||||
Mathias Michaelis (2004 Sep 6)
|
||||
Also place vimtutor.bat in %windir%?
|
||||
|
||||
Add gui_mch_browsedir() for Motif, Mac OS/X.
|
||||
|
||||
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]])
|
||||
reltime().sec == seconds, reltime().usec = microseconds
|
||||
reltime(start) current time relative to [start]
|
||||
echo timestring(reltime(start), 3) (3 is nr of digits after dot)
|
||||
reltime(start, end) difference between start and end
|
||||
Real Profiling:
|
||||
- :profile start /tmp/somefile (append if exists)
|
||||
- :profile pause
|
||||
- :profile resume
|
||||
- :profile stop
|
||||
- per function line
|
||||
- self, Vim and total time (incl system time)
|
||||
- dump results in file on exit or when stopped.
|
||||
ccomplete: use "signature:" field from tags file when it's present.
|
||||
Or list all the fields? (Martin Stubenschrott)
|
||||
|
||||
Add more tests for all new functionality in Vim 7. Especially new functions.
|
||||
|
||||
Updated Ruby interface. (Ryan Paul)
|
||||
Add text in user manual for using the undo tree. Example with finding the
|
||||
text of a previous change.
|
||||
|
||||
Links in docs to GetLatestVimScripts (getscript) plugin.
|
||||
|
||||
'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.
|
||||
Aric Blumer has a patch for this.
|
||||
He will update the patch for 6.3.
|
||||
Autocommands:
|
||||
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)
|
||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||
Aric Blumer has a patch for this.
|
||||
He will update the patch for 6.3.
|
||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||
Update 2004 Sep 6.
|
||||
How does this work? Missing comments.
|
||||
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
|
||||
Smilauer, 2004 Sep 13, fix Oct 31)
|
||||
Asked for improvements 2004 Dec 20.
|
||||
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
|
||||
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
|
||||
line should delete the last line. Patch from greenx 2002 Apr 11.
|
||||
8 Add a few more command names to the menus. Patch from Jiri Brezina
|
||||
(28 feb 2002).
|
||||
7 ATTENTION dialog choices are more logical when "Delete it' appears
|
||||
before "Quit". Patch by Robert Webb, 2004 May 3.
|
||||
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
|
||||
for multi-byte characters.
|
||||
- Win32: add options to print dialog. Patch from Vipin Aravind.
|
||||
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
|
||||
use the patch that keeps using HLF_8 if HLF_WS has not
|
||||
been given values.
|
||||
Add section in help files for these highlight groups?
|
||||
8 "fg" and "bg" don't work in an xterm. Get default colors from xterm
|
||||
with an ESC sequence. Ideas in: ~/vim/patches/vikas.xtermcolors .
|
||||
7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin
|
||||
Dalecki has a patch for Motif and Carbon)
|
||||
- Add possibility to highlight specific columns (for Fortran). Or put a
|
||||
line in between columns (e.g., for 'textwidth').
|
||||
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
|
||||
8 Add functions:
|
||||
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
|
||||
Update 2004 Sep 10
|
||||
Another patch from Edward L. Fox (2005 Nov 24)
|
||||
Search in 'runtimepath'?
|
||||
More docs about how to use this.
|
||||
How to get the messages into the .po files?
|
||||
--- did not respond (yet) --
|
||||
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
|
||||
Smilauer, 2004 Sep 13, fix Oct 31)
|
||||
Asked for improvements 2004 Dec 20.
|
||||
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
|
||||
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
|
||||
line should delete the last line. Patch from greenx 2002 Apr 11.
|
||||
8 Add a few more command names to the menus. Patch from Jiri Brezina
|
||||
(28 feb 2002).
|
||||
7 ATTENTION dialog choices are more logical when "Delete it' appears
|
||||
before "Quit". Patch by Robert Webb, 2004 May 3.
|
||||
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
|
||||
for multi-byte characters.
|
||||
- Win32: add options to print dialog. Patch from Vipin Aravind.
|
||||
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
|
||||
use the patch that keeps using HLF_8 if HLF_WS has not
|
||||
been given values.
|
||||
Add section in help files for these highlight groups?
|
||||
8 "fg" and "bg" don't work in an xterm. Get default colors from xterm
|
||||
with an ESC sequence. Ideas in: ~/vim/patches/vikas.xtermcolors .
|
||||
7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin
|
||||
Dalecki has a patch for Motif and Carbon)
|
||||
- Add possibility to highlight specific columns (for Fortran). Or put a
|
||||
line in between columns (e.g., for 'textwidth').
|
||||
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
|
||||
8 Add functions:
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
layout and 'c' for console dialog. (Haegg)
|
||||
Flemming Madsen has a patch for the 'c' flag
|
||||
(2003 May 13)
|
||||
raisewin() raise gvim window (see HierAssist patch for
|
||||
Tcl implementation ~/vim/HierAssist/ )
|
||||
7 Make globpath() also work with upwards search. (Brian Medley)
|
||||
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
|
||||
better. Now also works for Ruby (2001 Nov 10)
|
||||
- Patch from Herculano de Lima Einloft Neto for better formatting of the
|
||||
quickfix window (2004 dec 2)
|
||||
7 When 'rightleft' is set, the search pattern should be displayed right
|
||||
to left as well? See patch of Dec 26. (Nadim Shaikli)
|
||||
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
|
||||
Patch by Jason Holt, 2003 May 23. Uses mlock.
|
||||
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
|
||||
7 Add ! register, for shell commands. (patch from Grenie)
|
||||
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
|
||||
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
|
||||
7 Add a "-@ filelist" argument: read file names from a file. (David
|
||||
Kotchan has a patch for it)
|
||||
8 Include a connection to an external program through a pipe? See
|
||||
patches from Felbinger for a mathematica interface.
|
||||
Or use emacs server kind of thing?
|
||||
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
|
||||
- findmatch() should be adjusted for Lisp. See remark at
|
||||
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
|
||||
incomplete patch Mar 18)
|
||||
- Set user variables to the names of the actually used user vimrc file,
|
||||
the first directory looked for user plugins/syntax files.
|
||||
$MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for
|
||||
runtime files?
|
||||
Also: when the environment variable exists, use it. If it doesn't
|
||||
exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR
|
||||
- The Replace dialog takes "\r" literal, unless "replace all" is used.
|
||||
Need to escape backslashes.
|
||||
Win32: the text to replace with isn't remembered.
|
||||
- For GUI Find/Replace dialog support using a regexp. Patch for Motif
|
||||
and GTK by degreneir (nov 10 and nov 18).
|
||||
|
||||
Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
|
||||
|
||||
Check if file explorer can handle directory names and links with a single
|
||||
quote. (Nieko Maatjes, 2005 Jan 4)
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
layout and 'c' for console dialog. (Haegg)
|
||||
Flemming Madsen has a patch for the 'c' flag
|
||||
(2003 May 13)
|
||||
raisewin() raise gvim window (see HierAssist patch for
|
||||
Tcl implementation ~/vim/HierAssist/ )
|
||||
7 Make globpath() also work with upwards search. (Brian Medley)
|
||||
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
|
||||
better. Now also works for Ruby (2001 Nov 10)
|
||||
- Patch from Herculano de Lima Einloft Neto for better formatting of the
|
||||
quickfix window (2004 dec 2)
|
||||
7 When 'rightleft' is set, the search pattern should be displayed right
|
||||
to left as well? See patch of Dec 26. (Nadim Shaikli)
|
||||
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
|
||||
Patch by Jason Holt, 2003 May 23. Uses mlock.
|
||||
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
|
||||
7 Add ! register, for shell commands. (patch from Grenie)
|
||||
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
|
||||
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
|
||||
7 Add a "-@ filelist" argument: read file names from a file. (David
|
||||
Kotchan has a patch for it)
|
||||
8 Include a connection to an external program through a pipe? See
|
||||
patches from Felbinger for a mathematica interface.
|
||||
Or use emacs server kind of thing?
|
||||
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
|
||||
- findmatch() should be adjusted for Lisp. See remark at
|
||||
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
|
||||
incomplete patch Mar 18)
|
||||
- Set user variables to the names of the actually used user vimrc file,
|
||||
the first directory looked for user plugins/syntax files.
|
||||
$MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for
|
||||
runtime files?
|
||||
Also: when the environment variable exists, use it. If it doesn't
|
||||
exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR
|
||||
Add a menu item "Preferences" that does "sp $MYVIMRC".
|
||||
- The Replace dialog takes "\r" literal, unless "replace all" is used.
|
||||
Need to escape backslashes.
|
||||
Win32: the text to replace with isn't remembered.
|
||||
- For GUI Find/Replace dialog support using a regexp. Patch for Motif
|
||||
and GTK by degreneir (nov 10 and nov 18).
|
||||
- Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
|
||||
|
||||
|
||||
Vi incompatibility:
|
||||
- Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
|
||||
Version 1.5 is in ~/src/posix/1.5. (Lynne Canal)
|
||||
8 With undo/redo only marks in the changed lines should be changed. Other
|
||||
marks should be kept. Vi keeps each mark at the same text, even when it
|
||||
is deleted or restored. (Webb)
|
||||
@@ -586,6 +221,7 @@ GTK+ 1 (OK in GTK 2):
|
||||
appending "bold" when there are not 14 dashes.
|
||||
|
||||
GTK+ GUI known bugs:
|
||||
9 Crash with X command server over ssh. (Ciaran McCreesh, 2006 Feb 6)
|
||||
8 GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj
|
||||
Machowski) They are displayed as separate characters. Problem in
|
||||
creating a label?
|
||||
@@ -596,8 +232,14 @@ GTK+ GUI known bugs:
|
||||
when it is longer than 4000 characters. Works OK from gvim to gvim and
|
||||
vim to vim. Pasting through xterm (using the shift key) also works.
|
||||
It starts working after GTK gvim loses the selection and gains it again.
|
||||
- Gnome2: When moving the toolbar out of the dock, so that it becomes
|
||||
floating, it can no longer be moved. Therefore making it float has been
|
||||
blocked for now.
|
||||
|
||||
|
||||
Win32 GUI known bugs:
|
||||
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
||||
the screen.
|
||||
8 On Windows 98 the unicows library is needed to support functions with UCS2
|
||||
file names. Can we load unicows.dll dynamically?
|
||||
8 The -P argument doesn't work very well with many MDI applications.
|
||||
@@ -733,6 +375,7 @@ Athena GUI:
|
||||
|
||||
|
||||
Motif GUI:
|
||||
- gui_mch_browsedir() is missing.
|
||||
7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()?
|
||||
David Harrison says it's OK (it exists in Motif 1.2).
|
||||
8 Lesstif: When deleting a menu that's torn off, the torn off menu becomes
|
||||
@@ -760,6 +403,9 @@ GUI:
|
||||
8 When fontset support is enabled, setting 'guifont' to a single font
|
||||
doesn't work.
|
||||
8 Menu priority for sub-menus for: Amiga, BeOS.
|
||||
8 When translating menus ignore the part after the Tab, the shortcut. So
|
||||
that the same menu item with a different shortcut (e.g., for the Mac) are
|
||||
still translated.
|
||||
8 Add menu separators for Amiga, RISCOS.
|
||||
8 Add way to specify the file filter for the browse dialog. At least for
|
||||
browse().
|
||||
@@ -937,6 +583,7 @@ Amiga:
|
||||
|
||||
|
||||
Macintosh:
|
||||
- GUI: gui_mch_browsedir() is missing.
|
||||
7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
|
||||
Berns, 2004 May 9) http://ecki.to/vim/TransBack-2004-05-09.diff
|
||||
Needs more work. Add when someone really wants it.
|
||||
@@ -1331,6 +978,42 @@ Problems that will (probably) not be solved:
|
||||
--------------------- extensions and improvements ----------------------
|
||||
*extensions-improvements*
|
||||
|
||||
Didn't make it into Vim 7.0:
|
||||
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
|
||||
can be selected with CTRL-V. Allow '$' (end of line) for col2.
|
||||
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye.
|
||||
Should work like an IDE. Try to keep it generic. Now found here:
|
||||
http://clewn.sf.net.
|
||||
And the idevim plugin/script.
|
||||
To be able to start the debugger from inside Vim: For GUI run a program
|
||||
with a netbeans connection; for console: start a program that splits the
|
||||
terminal, runs the debugger in one window and reconnect Vim I/O to the
|
||||
other window.
|
||||
Wishes for NetBeans commands:
|
||||
- make it possible to have 'defineAnnoType' also handle terminal colors.
|
||||
- send 'balloonText' events for the cursor position (using CursorHold ?)
|
||||
in terminal mode.
|
||||
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
|
||||
implement part in Java and then connect to Vim. Some hints from Alexandru
|
||||
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
|
||||
198 standard http://www.jcp.org/en/jsr/detail?id=198.
|
||||
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
|
||||
Plugin that uses a terminal emulator: http://vimplugin.sf.net
|
||||
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
|
||||
Especially when using the scrollbar. Typing a cursor-movement command
|
||||
scrolls back to where the cursor is.
|
||||
- Running a shell command from the GUI still has limitations. Look into how
|
||||
the terminal emulator of the Vim shell project can help:
|
||||
http://vimshell.wana.at
|
||||
- Add Lua interface? (Wolfgang Oertl)
|
||||
8 Add a command to jump to a certain kind of tag. Allow the user to specify
|
||||
values for the optional fields. E.g., ":tag size type=m".
|
||||
Also allow specifying the file and command, so that the result of
|
||||
taglist() can be used.
|
||||
- X11: Make it possible to run Vim inside a window of another program.
|
||||
This can be done with XReparentWindow(). But how exactly?
|
||||
|
||||
|
||||
Documentation:
|
||||
8 The GUI help should explain the Find and Find/Replace dialogs. Add a link
|
||||
to it from ":promptrepl" and ":promptfind".
|
||||
@@ -1411,9 +1094,46 @@ User Friendlier:
|
||||
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?
|
||||
- Implement COMPOUNDFORBIDFLAG .
|
||||
- Check out Hunspell 1.1.4.
|
||||
The manpage doesn't match the source code...
|
||||
Try to make the newly added features compatible.
|
||||
what does MAXNGRAMSUGS do?
|
||||
is COMPLEXPREFIXES necessary when we have flags for affixes?
|
||||
- Look into Hungarian dictionary: hu_HU-1.0.tar.gz
|
||||
This one doesn't match with Hunspell 1.1.4.
|
||||
- Add CHECKCOMPOUNDCASE: when compounding make leading capital lower case.
|
||||
How is it supposed to work?
|
||||
- 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.
|
||||
- suggestion for "KG" to "kg" when it's keepcase.
|
||||
- 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).
|
||||
- Support breakpoint character ? 0xb7 and ignore it? Makes it possible to
|
||||
use same wordlist for hyphenation.
|
||||
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
|
||||
syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file?
|
||||
- COMPOUNDMAX -> COMPOUNDWORDMAX?
|
||||
@@ -1430,6 +1150,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
|
||||
@@ -1452,7 +1174,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/
|
||||
@@ -1509,13 +1230,18 @@ Folding:
|
||||
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.
|
||||
|
||||
|
||||
Multi-byte characters:
|
||||
- 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?
|
||||
:unmix utf-8,latin1 filename
|
||||
Would only work when 'encoding' is utf-8.
|
||||
9 When the tail byte of a double-byte character is illegal (e.g., a CR), the
|
||||
display is messed up (Yasuhiro Matsumoto). Should check for illegal
|
||||
double-byte characters and display them differently (display each single
|
||||
@@ -1622,6 +1348,8 @@ Syntax highlighting:
|
||||
used in a wrong way. I can't reproduce it...
|
||||
7 Be able to change only the background highlighting. Useful for Diff* and
|
||||
Search highlighting.
|
||||
7 When 'number' is set highlight the number of the current line.
|
||||
Must be enabled with an option, because it slows down display updating.
|
||||
8 Allow the user to add items to the Syntax menu sorted, without having to
|
||||
change this for each release.
|
||||
8 Add a "matchcontains" for regions: items contained in the start or end
|
||||
@@ -1638,7 +1366,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
|
||||
@@ -1702,7 +1430,6 @@ Syntax highlighting:
|
||||
7 CTRL-] checks the highlight group for finding out what the tag is.
|
||||
7 Add an explanation how a list of words can be used to highlight misspelled
|
||||
words.
|
||||
7 Command line completion for ":find" should search in 'path'.
|
||||
8 Add more command line completion for :syntax.
|
||||
8 Add more command line completion for :highlight.
|
||||
8 Add more command line completion for :sign.
|
||||
@@ -1756,6 +1483,18 @@ Syntax highlighting:
|
||||
|
||||
|
||||
Built-in script language:
|
||||
9 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 install the scripts in the user's directories.
|
||||
Use findfile(), so that only file names need to be given:
|
||||
script plugin/myscript.vim
|
||||
script autoload/mylib.vim
|
||||
script autoload/yourlib.vim
|
||||
helpfile doc/myscript.txt
|
||||
For the "helpfile" item ":helptags" is run.
|
||||
7 Execute a function with standard option values. No need to save and
|
||||
restore option values. Especially useful for new options. Problem: how
|
||||
to avoid a performance penalty (esp. for string options)?
|
||||
8 Add referring to key options with "&t_xx". Both for "echo &t_xx" and
|
||||
":let &t_xx =". Useful for making portable mappings.
|
||||
8 exists("&&option") tests if 'option' is actually implemented. Useful for
|
||||
@@ -1764,6 +1503,8 @@ Built-in script language:
|
||||
Alternative: Allow range for ":exec", pass it on to the executed command.
|
||||
(Webb)
|
||||
You can already yank lines and use :@" to execute them.
|
||||
7 ":include" command: just like ":source" but doesn't start a new scriptID?
|
||||
Will be tricky for the list of script names.
|
||||
8 Have a look at VSEL. Would it be useful to include? (Bigham)
|
||||
8 Add ":fungroup" command, to group function definitions together. When
|
||||
encountered, all functions in the group are removed. Suggest using an
|
||||
@@ -1773,13 +1514,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
|
||||
@@ -1831,17 +1565,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.
|
||||
@@ -2085,7 +1818,9 @@ Shared libraries:
|
||||
|
||||
|
||||
Tags:
|
||||
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.
|
||||
@@ -2242,6 +1977,7 @@ GUI:
|
||||
|
||||
|
||||
Autocommands:
|
||||
- Put autocommand event names in a hashtable for faster lookup?
|
||||
7 For autocommand events that trigger multiple times per buffer (e.g.,
|
||||
CursorHold), go through the list once and cache the result for a specific
|
||||
buffer. Invalidate the cache when adding/deleting autocommands or
|
||||
@@ -2325,7 +2061,38 @@ Autocommands:
|
||||
them save the file itself besides the swapfile.
|
||||
|
||||
|
||||
Omni completion:
|
||||
- Ideas from the Vim 7 BOF at SANE:
|
||||
- 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.
|
||||
- Ideas from others:
|
||||
http://www.wholetomato.com/
|
||||
http://www.vim.org/scripts/script.php?script_id=747
|
||||
http://sourceforge.net/projects/insenvim
|
||||
or http://insenvim.sourceforge.net
|
||||
Java, XML, HTML, C++, JSP, SQL, C#
|
||||
MS-Windows only, lots of dependencies (e.g. Perl, Internet
|
||||
explorer), uses .dll shared libraries.
|
||||
For C++ uses $INCLUDE environment var.
|
||||
Uses Perl for C++.
|
||||
Uses ctags to find the info:
|
||||
ctags -f $allTagsFile --fields=+aiKmnsSz --language-force=C++ --C++-kinds=+cefgmnpsut-dlux -u $files
|
||||
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/
|
||||
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
|
||||
Ivan Villanueva has something for Java.
|
||||
Emads: http://www.xref-tech.com/xrefactory/more_c_completion.html
|
||||
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
- Pre-expand abbreviations, show which abbrevs would match?
|
||||
|
||||
|
||||
Insert mode completion/expansion:
|
||||
- GUI implementation of the popup menu.
|
||||
8 When there is no word before the cursor but something like "sys." complete
|
||||
with "sys.". Works well for C and similar languages.
|
||||
9 ^X^L completion doesn't repeat correctly. It uses the first match with
|
||||
@@ -2669,6 +2436,9 @@ Visual mode:
|
||||
- When dragging the Visual selection with the mouse and 'scrolloff' is zero,
|
||||
behave like 'scrolloff' is one, so that the text scrolls when the pointer
|
||||
is in the top line.
|
||||
- Displaying size of Visual area: use 24-33 column display.
|
||||
When selecting multiple lines, up to about a screenful, also count the
|
||||
characters.
|
||||
8 When using "I" or "A" in Visual block mode, short lines do not get the new
|
||||
text. Make it possible to add the text to short lines too, with padding
|
||||
where needed.
|
||||
@@ -2740,6 +2510,7 @@ Mappings and Abbreviations:
|
||||
8 To make a mapping work with a prepended "x to select a register, store the
|
||||
last _typed_ register name and access it with "&.
|
||||
8 Add ":amap", like ":amenu".
|
||||
7 Add a mapping that works always, for remapping the keyboard.
|
||||
8 Add ":cab!", abbreviations that only apply to Command-line mode and not to
|
||||
entering search strings.
|
||||
8 Add a flag to ":abbrev" to eat the character that triggers the
|
||||
@@ -2760,12 +2531,17 @@ Mappings and Abbreviations:
|
||||
7 Make it possible to map 'wildchar', but only when it's a special character
|
||||
(like CTRL-E). Currently it's only recognized when typed. Useful for
|
||||
mapping a key to do something and then completion.
|
||||
7 Add a mapping that works always, for remapping the keyboard.
|
||||
6 Context-sensitive abbreviations: Specify syntax group(s) in which the
|
||||
abbreviations are to be used.
|
||||
- Add mappings that take arguments. Could work like the ":s" command. For
|
||||
example, for a mouse escape sequence:
|
||||
:mapexp <Esc>{\([0-9]*\),\([0-9]*\); H\1j\2l
|
||||
- Add optional <Number> argument for mappings:
|
||||
:map <Number>q ^W^W<Number>G
|
||||
:map <Number>q<Number>t ^W^W<Number1-1>G<Number2>l
|
||||
:map q<Char> :s/<Char>/\u\0/g
|
||||
Or implicit:
|
||||
:map q <Register>d<Number>$
|
||||
- Make it possible to include a <Nul> in the lhs and rhs of a mapping.
|
||||
- Add command to repeat a whole mapping ("." only repeats the last change in
|
||||
a mapping). Also: Repeat a whole insert command, including any mappings
|
||||
@@ -2780,17 +2556,9 @@ Mappings and Abbreviations:
|
||||
mappings first, then remove them again when a mapping matches. Avoids
|
||||
that characters that are the start of some mapping are not shown until you
|
||||
hit another character.
|
||||
- Add optional <Number> argument for mappings:
|
||||
:map <Number>q ^W^W<Number>G
|
||||
:map <Number>q<Number>t ^W^W<Number1-1>G<Number2>l
|
||||
:map q<Char> :s/<Char>/\u\0/g
|
||||
Or implicit:
|
||||
:map q <Register>d<Number>$
|
||||
- Add mappings for replace mode: ":rmap". How do we then enter mappings for
|
||||
non-replace Insert mode?
|
||||
- Add separate mappings for Visual-character/block/line mode?
|
||||
6 Alias for Normal mode commands, works like :substitute? Would allow
|
||||
mappings with arguments.
|
||||
- Add 'mapstop' command, to stop recursive mappings.
|
||||
- List mappings that have a raw escape sequence both with the name of the key
|
||||
for that escape sequence (if there is one) and the sequence itself.
|
||||
@@ -2934,6 +2702,13 @@ Searching:
|
||||
|
||||
|
||||
Undo:
|
||||
- Persistent undo: store undo in a file.
|
||||
Use timestamps, so that a version a certain time ago can be found and info
|
||||
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").
|
||||
8 See ":e" as a change operation, find the changes and add them to the
|
||||
undo info. Needed for when an external tool changes the file.
|
||||
- Make it possible to undo all the commands from a mapping, including a
|
||||
trailing unfinished command, e.g. for ":map K iX^[r".
|
||||
- When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not
|
||||
@@ -2958,9 +2733,6 @@ Undo:
|
||||
[-99].
|
||||
- With undo with simple line delete/insert: optimize screen updating.
|
||||
- When executing macro's: Save each line for undo only once.
|
||||
- Store undo info in a file that survives until the next edit. Then it's
|
||||
possible to undo to before the current editing session. Combined with
|
||||
viminfo?
|
||||
- When doing a global substitute, causing almost all lines to be changed,
|
||||
undo info becomes very big. Put undo info in swap file??
|
||||
|
||||
@@ -3114,7 +2886,8 @@ Multiple Windows:
|
||||
7 Use CTRL-W <Tab>, like alt-tab, to switch between buffers. Repeat <Tab>
|
||||
to select another buffer (only loaded ones?), <BS> to go back, <Enter> to
|
||||
select buffer, <Esc> to go back to original buffer.
|
||||
7 Add a 'winfixwidth' option, similar to 'winfixheight'.
|
||||
7 Add a 'tool' window: behaves like a preview window but there can be
|
||||
several. Don't count it in only_one_window(). (Alexei Alexandrov)
|
||||
6 Add an option to resize the shell when splitting and/or closing a window.
|
||||
":vsp" would make the shell wider by as many columns as needed for the new
|
||||
window. Specify a maximum size (or use the screen size). ":close" would
|
||||
@@ -3288,6 +3061,13 @@ 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
|
||||
@@ -3419,9 +3199,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
|
||||
|
||||
@@ -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 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,7 +10,9 @@ 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. Undo branches |undo-branches|
|
||||
5. Remarks about undo |undo-remarks|
|
||||
|
||||
==============================================================================
|
||||
1. Undo and redo commands *undo-commands*
|
||||
@@ -21,6 +23,9 @@ u Undo [count] changes. {Vi: only one level}
|
||||
*:u* *:un* *:undo*
|
||||
:u[ndo] Undo one change. {Vi: only one level}
|
||||
|
||||
:u[ndo] {N} Jump to after change number {N}. See |undo-branches|
|
||||
for the meaning of {N}. {not in Vi}
|
||||
|
||||
*CTRL-R*
|
||||
CTRL-R Redo [count] changes which were undone. {Vi: redraw
|
||||
screen}
|
||||
@@ -72,7 +77,128 @@ 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. Undo branches *undo-branches*
|
||||
|
||||
Above we only discussed one line of undo/redo. But it is also possible to
|
||||
branch off. This happens when you undo a few changes and then make a new
|
||||
change. The undone changes become a branch. You can go to that branch with
|
||||
the following commands.
|
||||
|
||||
What matters here is the order in which the changes are made. Undo and redo
|
||||
are not considered changes in this context. After each change you have a new
|
||||
state of the text.
|
||||
|
||||
*:undol* *:undolist*
|
||||
:undol[ist] List the leafs in the tree of changes. Example:
|
||||
number changes time ~
|
||||
4 10 10:34:11
|
||||
18 4 11:01:46
|
||||
|
||||
The "number" column is the change number. This number
|
||||
continuously increases and can be used to identify a
|
||||
specific undo-able change, see |:undo|.
|
||||
The "changes" column is the number of changes to this
|
||||
leaf from the root of the tree.
|
||||
The "time" column is the time this change was made.
|
||||
|
||||
*g-*
|
||||
g- Go to older text state. With a count repeat that many
|
||||
times. {not in Vi}
|
||||
*:ea* *:earlier*
|
||||
:earlier {count} Go to older text state {count} times.
|
||||
:earlier {N}s Go to older text state about {N} seconds before.
|
||||
:earlier {N}m Go to older text state about {N} minutes before.
|
||||
:earlier {N}h Go to older text state about {N} hours before.
|
||||
|
||||
*g+*
|
||||
g+ Go to newer text state. With a count repeat that many
|
||||
times. {not in Vi}
|
||||
*:lat* *:later*
|
||||
:later {count} Go to newer text state {count} times.
|
||||
:later {N}s Go to newer text state about {N} seconds later.
|
||||
:later {N}m Go to newer text state about {N} minutes later.
|
||||
:later {N}h Go to newer text state about {N} hours later.
|
||||
|
||||
|
||||
Note that text states will become unreachable when undo information is cleared
|
||||
for 'undolevels'.
|
||||
|
||||
Don't be surprised when moving through time shows multiple changes to take
|
||||
place at a time. This happens when moving through the undo tree and then
|
||||
making a new change.
|
||||
|
||||
EXAMPLE
|
||||
|
||||
Start with this text:
|
||||
one two three ~
|
||||
|
||||
Delete the first word by pressing "x" three times:
|
||||
ne two three ~
|
||||
e two three ~
|
||||
two three ~
|
||||
|
||||
Now undo that by pressing "u" three times:
|
||||
e two three ~
|
||||
ne two three ~
|
||||
one two three ~
|
||||
|
||||
Delete the second word by pressing "x" three times:
|
||||
one wo three ~
|
||||
one o three ~
|
||||
one three ~
|
||||
|
||||
Now undo that by using "g-" three times:
|
||||
one o three ~
|
||||
one wo three ~
|
||||
two three ~
|
||||
|
||||
You are now back in the first undo branch, after deleting "one". Repeating
|
||||
"g-" will now bring you back to the original text:
|
||||
e two three ~
|
||||
ne two three ~
|
||||
one two three ~
|
||||
|
||||
Jump to the last change with ":later 1h":
|
||||
one three ~
|
||||
|
||||
And back to the start again with ":earlier 1h":
|
||||
one two three ~
|
||||
|
||||
|
||||
Note that using "u" and CTRL-R will not get you to all possible text states
|
||||
while repeating "g-" and "g+" does.
|
||||
|
||||
==============================================================================
|
||||
5. 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 Mar 21
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -24,6 +24,7 @@ script. There are a lot of them, thus this is a long chapter.
|
||||
|41.13| Writing a compiler plugin
|
||||
|41.14| Writing a plugin that loads quickly
|
||||
|41.15| Writing library scripts
|
||||
|41.16| Distributing Vim scripts
|
||||
|
||||
Next chapter: |usr_42.txt| Add new menus
|
||||
Previous chapter: |usr_40.txt| Make new commands
|
||||
@@ -654,7 +655,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
|
||||
@@ -832,7 +835,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: >
|
||||
|
||||
@@ -2153,6 +2156,9 @@ mean is that it loads quickly the first time, postponing the bulk of the
|
||||
script to the second time, which only happens when you actually use it. When
|
||||
you always use the functionality it actually gets slower!
|
||||
|
||||
Note that since Vim 7 there is an alternative: use the |autoload|
|
||||
functionality |41.15|.
|
||||
|
||||
The following example shows how it's done: >
|
||||
|
||||
" Vim global plugin for demonstrating quick loading
|
||||
@@ -2243,7 +2249,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')
|
||||
@@ -2274,6 +2280,19 @@ like: >
|
||||
|
||||
Further reading: |autoload|.
|
||||
|
||||
==============================================================================
|
||||
*41.16* Distributing Vim scripts *distribute-script*
|
||||
|
||||
Vim users will look for scripts on the Vim website: http://www.vim.org.
|
||||
If you made something that is useful for others, share it!
|
||||
|
||||
Vim scripts can be used on any system. There might not be a tar or gzip
|
||||
command. If you want to pack files together and/or compress them the "zip"
|
||||
utility is recommended.
|
||||
|
||||
For utmost portability use Vim itself to pack scripts together. This can be
|
||||
done with the Vimball utility. See |vimball|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Next chapter: |usr_42.txt| Add new menus
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_toc.txt* For Vim version 7.0aa. Last change: 2005 Feb 22
|
||||
*usr_toc.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -47,6 +47,8 @@ Making Vim Run
|
||||
|usr_90.txt| Installing Vim
|
||||
|
||||
|
||||
More detailed information in the reference manual: |ref-toc|
|
||||
|
||||
The user manual is available as a single, ready to print HTML and PDF file
|
||||
here:
|
||||
http://vimdoc.sf.net
|
||||
@@ -294,6 +296,7 @@ Make Vim work as you like it.
|
||||
|41.13| Writing a compiler plugin
|
||||
|41.14| Writing a plugin that loads quickly
|
||||
|41.15| Writing library scripts
|
||||
|41.16| Distributing Vim scripts
|
||||
|
||||
|usr_42.txt| Add new menus
|
||||
|42.1| Introduction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -55,16 +55,35 @@ ga Print the ascii value of the character under the
|
||||
The <Nul> character in a file is stored internally as
|
||||
<NL>, but it will be shown as:
|
||||
<^@> 0, Hex 00, Octal 000 ~
|
||||
If the character has composing characters these are
|
||||
also shown. The value of 'maxcombine' doesn't matter.
|
||||
Mnemonic: Get Ascii value. {not in Vi}
|
||||
|
||||
*g8*
|
||||
g8 Print the hex values of the bytes used in the
|
||||
character under the cursor, assuming it is in |UTF-8|
|
||||
encoding. This also shows composing characters.
|
||||
Example of a character with three composing
|
||||
characters:
|
||||
encoding. This also shows composing characters. The
|
||||
value of 'maxcombine' doesn't matter.
|
||||
Example of a character with two composing characters:
|
||||
e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
|
||||
{not in Vi}
|
||||
{not in Vi} {only when compiled with the |+multi_byte|
|
||||
feature}
|
||||
|
||||
*8g8*
|
||||
8g8 Find an illegal UTF-8 byte sequence at or after the
|
||||
cursor. This works in two situations:
|
||||
1. when 'encoding' is any 8-bit encoding
|
||||
2. when 'encoding' is "utf-8" and 'fileencoding' is
|
||||
any 8-bit encoding
|
||||
Thus it can be used when editing a file that was
|
||||
supposed to be UTF-8 but was read as if it is an 8-bit
|
||||
encoding because it contains illegal bytes.
|
||||
Does not wrap around the end of the file.
|
||||
Note that when the cursor is on an illegal byte or the
|
||||
cursor is halfway a multi-byte character the command
|
||||
won't move the cursor.
|
||||
{not in Vi} {only when compiled with the |+multi_byte|
|
||||
feature}
|
||||
|
||||
*:p* *:pr* *:print*
|
||||
:[range]p[rint] [flags]
|
||||
@@ -94,7 +113,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].
|
||||
|
||||
*:#*
|
||||
@@ -335,6 +355,7 @@ H *+profile* |:profile| command
|
||||
m *+python* Python interface |python|
|
||||
m *+python/dyn* Python interface |python-dynamic| |/dyn|
|
||||
N *+quickfix* |:make| and |quickfix| commands
|
||||
N *+reltime* |reltime()| function
|
||||
B *+rightleft* Right to left typing |'rightleft'|
|
||||
m *+ruby* Ruby interface |ruby|
|
||||
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
|
||||
@@ -735,6 +756,13 @@ It is possible to add translated help files, next to the original English help
|
||||
files. Vim will search for all help in "doc" directories in 'runtimepath'.
|
||||
This is only available when compiled with the |+multi_lang| feature.
|
||||
|
||||
At this moment translations are available for:
|
||||
Chinese - multiple authors
|
||||
French - translated by David Blanchet
|
||||
Italian - translated by Antonio Colombo
|
||||
Russian - translated by Vassily Ragosin
|
||||
See the Vim website to find them: http://www.vim.org/translations.php
|
||||
|
||||
A set of translated help files consists of these files:
|
||||
|
||||
help.abx
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -23,13 +23,20 @@ Spell checking |new-spell|
|
||||
Omni completion |new-omni-completion|
|
||||
MzScheme interface |new-MzScheme|
|
||||
Printing multi-byte text |new-print-multi-byte|
|
||||
Tab pages |new-tab-pages|
|
||||
Undo branches |new-undo-branches|
|
||||
Extended Unicode support |new-more-unicode|
|
||||
More highlighting |new-more-highlighting|
|
||||
Translated manual pages |new-manpage-trans|
|
||||
Internal grep |new-vimgrep|
|
||||
Scroll back in messages |new-scroll-back|
|
||||
Cursor past end of the line |new-onemore|
|
||||
POSIX compatibility |new-posix|
|
||||
Debugger support |new-debug-support|
|
||||
Remote file explorer |new-netrw-explore|
|
||||
Define an operator |new-define-operator|
|
||||
Mapping to an expression |new-map-expression|
|
||||
Visual and Select mode mappings |new-map-select|
|
||||
Location list |new-location-list|
|
||||
Various new items |new-items-7|
|
||||
|
||||
@@ -131,6 +138,16 @@ 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.
|
||||
|
||||
When defining a user command with |:command| the special items could be
|
||||
abbreviated. This caused unexpected behavior, such as <li> being recognized
|
||||
as <line1>. The items can no longer be abbreviated.
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-7*
|
||||
|
||||
@@ -149,8 +166,8 @@ The |string()| function can be used to get a string representation of a
|
||||
variable. Works for Numbers, Strings and composites of them. Then |eval()|
|
||||
can be used to turn the string back into the variable value.
|
||||
|
||||
The |:let| command can now use ":let var += expr" like using ":let var = var +
|
||||
expr". "-=" and ".=" works in a similar way.
|
||||
The |:let| command can now use "+=". ":let var += expr" works like
|
||||
":let var = var + expr". "-=" and ".=" works in a similar way.
|
||||
|
||||
With the |:profile| command you can find out where your function or script
|
||||
wastes its time.
|
||||
@@ -158,6 +175,13 @@ wastes its time.
|
||||
In the Python interface vim.eval() also handles Dictionaries and Lists.
|
||||
|python-eval| (G. Sumner Hayes)
|
||||
|
||||
The |getscript| plugin was added as a convenient way to update scripts from
|
||||
www.vim.org automatically. (Charles Campbell)
|
||||
|
||||
The |vimball| plugin was added as a convenient way to distribute a set of
|
||||
files for a plugin (plugin file, autoload script, documentation). (Charles
|
||||
Campbell)
|
||||
|
||||
|
||||
Spell checking *new-spell*
|
||||
--------------
|
||||
@@ -227,6 +251,102 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
|
||||
Also see |postscript-cjk-printing|. (Mike Williams)
|
||||
|
||||
|
||||
Tab pages *new-tab-pages*
|
||||
---------
|
||||
|
||||
A tab page is page with one or more windows with a label (aka tab) at the top.
|
||||
By clicking on the label you can quickly switch between the tab pages. And
|
||||
with the keyboard, using the |gt| (Goto Tab) command. This is a convenient
|
||||
way to work with many windows.
|
||||
|
||||
To start Vim with each file argument in a separate tab page use the |-p|
|
||||
argument. The maximum number of pages can be set with 'tabpagemax'.
|
||||
|
||||
The line with tab labels is either made with plain text an highlighting or
|
||||
with a GUI mechanism. The GUI labels look better but are only available on a
|
||||
few systems. The line can be customized with 'tabline' and 'guitablabel'.
|
||||
Whether it is displayed is set with 'showtabline'. Whether to use the GUI
|
||||
labels is set with the "e" flag in 'guioptions'.
|
||||
|
||||
The |:tab| command modifier can be used to have most commands that open a new
|
||||
window open a new tab instead.
|
||||
|
||||
The |--remote-tab| argument can be used to edit a file in a new tab page in an
|
||||
already running Vim server.
|
||||
|
||||
More info here: |tabpage|
|
||||
|
||||
|
||||
Undo branches *new-undo-branches*
|
||||
-------------
|
||||
|
||||
Previously there was only one line of undo-redo. If, after undoing a number
|
||||
of changes, a new change was made all the undone changes were lost. This
|
||||
could lead to accidentally losing work.
|
||||
|
||||
Vim now makes an undo branch in this situation. Thus you can go back to the
|
||||
text after any change, even if they were undone. So long as you do not run
|
||||
into 'undolevels', undo information is freed up to limit the memory used.
|
||||
|
||||
To be able to navigate the undo branches each change is numbered sequentially.
|
||||
The commands |g-| and |:earlier| go back in time, to older changes. The
|
||||
commands |g+| and |:later| go forward in time, to newer changes.
|
||||
|
||||
The changes are also timestamped. Use ":earlier 10m" to go to the text as it
|
||||
was about ten minutes earlier.
|
||||
|
||||
The |:undolist| command can be used to get an idea of which undo branches
|
||||
exist. The |:undo| command now takes an argument to directly jump to a
|
||||
specific position in this list. The |changenr()| function can be used to
|
||||
obtain the change number.
|
||||
|
||||
There is no graphical display of the tree with changes, navigation can be
|
||||
quite confusing.
|
||||
|
||||
|
||||
Extended Unicode support *new-more-unicode*
|
||||
------------------------
|
||||
|
||||
Previously only two combining characters were displayed. The limit is now
|
||||
raised to 6. This can be set with the 'maxcombine' option. The default is
|
||||
still 2.
|
||||
|
||||
|ga| now shows all combining characters, not just the first two.
|
||||
|
||||
Previously only 16 bit Unicode characters were supported for displaying. Now
|
||||
the full 32 bit character set can be used. Unless manually disabled at
|
||||
compile time.
|
||||
|
||||
For pattern matching it is now possible to search for individual composing
|
||||
characters. |patterns-composing|
|
||||
|
||||
The |8g8| command searches for an illegal UTF-8 byte sequence.
|
||||
|
||||
|
||||
More highlighting *new-more-highlighting*
|
||||
-----------------
|
||||
|
||||
Highlighting matching parens
|
||||
|
||||
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.
|
||||
|
||||
Highlighting the cursor line and column
|
||||
|
||||
The 'cursorline' and 'cursorcolumn' options have been added. These highlight
|
||||
the screen line and screen column of the cursor. This makes the cursor
|
||||
position easier to spot. 'cursorcolumn' is also useful to align text. The
|
||||
CursorColumn and CursorLine highlighting allow changing the colors used.
|
||||
|hl-CursorColumn| |hl-CursorLine|
|
||||
|
||||
|
||||
Translated manual pages *new-manpage-trans*
|
||||
-----------------------
|
||||
|
||||
@@ -278,6 +398,19 @@ The |g<| command can be used to see the last page of messages after you have
|
||||
hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back.
|
||||
|
||||
|
||||
Cursor past end of the line *new-onemore*
|
||||
---------------------------
|
||||
|
||||
When the 'virtualedit' option contains "onemore" the cursor can move just past
|
||||
the end of the line. As if it's on top of the line break.
|
||||
|
||||
This makes some commands more consistent. Previously the cursor was always
|
||||
past the end of the line if the line was empty. But it is far from Vi
|
||||
compatible. It may also break some plugins or Vim scripts. Use with care!
|
||||
|
||||
The patch was provided by Mattias Flodin.
|
||||
|
||||
|
||||
POSIX compatibility *new-posix*
|
||||
-------------------
|
||||
|
||||
@@ -361,6 +494,31 @@ through the |g@| operator.
|
||||
See |:map-operator| for the explanation and an example.
|
||||
|
||||
|
||||
Mapping to an expression *new-map-expression*
|
||||
------------------------
|
||||
|
||||
The {rhs} argument of a mapping can be an expression. That means the
|
||||
resulting characters can depend on the context. Example: >
|
||||
:inoremap <expr> . InsertDot()
|
||||
Here the dot will be mapped to whatever InsertDot() returns.
|
||||
|
||||
Also works for abbreviations. See |:map-<expr>| for the details.
|
||||
|
||||
|
||||
Visual and Select mode mappings *new-map-select*
|
||||
-------------------------------
|
||||
|
||||
Previously Visual mode mappings applied both to Visual and Select mode. With
|
||||
a trick to have the mappings work in Select mode like they would in Visual
|
||||
mode.
|
||||
|
||||
Commands have been added to define mappings for Visual and Select mode
|
||||
separately: |:xmap| and |:smap|. With the associated "noremap" and "unmap"
|
||||
commands.
|
||||
|
||||
The same is done for menus: |:xmenu|, |:smenu|, etc.
|
||||
|
||||
|
||||
Location list *new-location-list*
|
||||
-------------
|
||||
|
||||
@@ -388,6 +546,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
|
||||
@@ -414,12 +580,15 @@ 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
|
||||
'synmaxcol' maximum column to look for syntax items; avoids very
|
||||
slow redrawing when there are very long lines
|
||||
'verbosefile' Log messages in a file.
|
||||
'winfixwidth' window with fixed width, similar to 'winfixheight'
|
||||
|
||||
|
||||
Ex commands: ~
|
||||
@@ -440,24 +609,27 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|
||||
|
||||
|:viusage| Help for Vi commands (Nvi command).
|
||||
|
||||
|:cbuffer| Read error lines from a buffer. (partly by Yegappan
|
||||
Lakshmanan)
|
||||
|
||||
|:sort| Sort lines in the buffer without depending on an
|
||||
external command.
|
||||
|
||||
|:caddfile| Add error messages to an existing quickfix list
|
||||
(Yegappan Lakshmanan).
|
||||
|
||||
|: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).
|
||||
|:cbuffer| Read error lines from a buffer. (partly by Yegappan
|
||||
Lakshmanan)
|
||||
|:cgetbuffer| Create a quickfix list from a buffer but don't jump to
|
||||
the first error.
|
||||
|:caddbuffer| Add errors from the current buffer to the quickfix
|
||||
list.
|
||||
|: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).
|
||||
|:cgetexpr| Create a quickfix list from a Vim expression, but
|
||||
don't jump to the first error. (Yegappan Lakshmanan).
|
||||
|
||||
|:lfile| Like |:cfile| but use the location list.
|
||||
|:lgetbuffer| Like |:cgetbuffer| but use the location list.
|
||||
|:lgetexpr| Like |:cgetexpr| 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.
|
||||
@@ -489,6 +661,8 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|
||||
|: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: ~
|
||||
|
||||
@@ -520,6 +694,8 @@ 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)
|
||||
@@ -540,6 +716,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
|
||||
@@ -554,10 +731,14 @@ New and extended functions: ~
|
||||
|mkdir()| create a directory
|
||||
|printf()| format text
|
||||
|readfile()| read a file into a list of lines
|
||||
|reltime()| get time value, possibly relative
|
||||
|reltimestr()| turn a time value into a string
|
||||
|remove()| remove one or more items from a List or Dictionary
|
||||
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|
||||
|reverse()| reverse the order of a List
|
||||
|searchdecl()| search for declaration of variable
|
||||
|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
|
||||
@@ -565,11 +746,14 @@ New and extended functions: ~
|
||||
|split()| split a String into a List
|
||||
|spellbadword()| get a badly spelled word
|
||||
|spellsuggest()| get suggestions for correct spelling
|
||||
|str2nr()| convert a string to a number, base 8, 10 or 16
|
||||
|string()| string representation of a List or Dictionary
|
||||
|system()| filters {input} through a shell command
|
||||
|taglist()| get list of matching tags (Yegappan Lakshmanan)
|
||||
|tr()| translate characters (Ron Aaron)
|
||||
|values()| get List of Dictionary values
|
||||
|winrestview()| restore the view of the current window
|
||||
|winsaveview()| save the view of the current window
|
||||
|writefile()| write a list of lines into a file
|
||||
|
||||
User defined functions can now be loaded automatically from the "autoload"
|
||||
@@ -589,6 +773,15 @@ New autocommand events: ~
|
||||
|
||||
|SpellFileMissing| when a spell file can't be found
|
||||
|
||||
|ShellCmdPost| after executing a shell command
|
||||
|ShellFilterPost| after filtering with a shell command
|
||||
|
||||
|VimResized| after the Vim window size changed (Yakov Lerner)
|
||||
|
||||
|FileChangedShellPost| after handling a file changed outside of Vim
|
||||
|
||||
|SourcePre| before sourcing a Vim script
|
||||
|
||||
|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
|
||||
@@ -629,6 +822,8 @@ ABAB/4 syntax file. (Marius van Wyk)
|
||||
|
||||
SQL-Informix syntax file. (Dean L Hill)
|
||||
|
||||
Handling of various SQL variants. (David Fishburn)
|
||||
|
||||
PHP compiler plugin. (Doug Kearns)
|
||||
|
||||
Sive syntax file. (Nikolai Weibull)
|
||||
@@ -645,11 +840,16 @@ 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: ~
|
||||
|
||||
@@ -662,6 +862,12 @@ Vietnamese message translations and menu. (Phan Vinh Thinh)
|
||||
|
||||
Others: ~
|
||||
|
||||
The Netbeans interface was updated for Sun Studio 10. The protocol number
|
||||
goes from 2.2 to 2.3. (Gordon Prieur)
|
||||
|
||||
Mac: When starting up Vim will load the $VIMRUNTIME/macmap.vim script to
|
||||
define default command-key mappings. (mostly by Benji Fisher)
|
||||
|
||||
Mac: Add the selection type to the clipboard, so that Block, line and
|
||||
character selections can be used between two Vims. (Eckehard Berns)
|
||||
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
|
||||
@@ -719,6 +925,15 @@ 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.
|
||||
|
||||
When editing a search pattern for a "/" or "?" command and 'incsearch' is set
|
||||
CTRL-L can be used to add a character from the current match. CTRL-R CTRL-W
|
||||
will add a word, but exclude the part of the word that was already typed.
|
||||
|
||||
Ruby interface: add line number methods. (Ryan Paul)
|
||||
|
||||
==============================================================================
|
||||
IMPROVEMENTS *improvements-7*
|
||||
|
||||
@@ -726,6 +941,9 @@ IMPROVEMENTS *improvements-7*
|
||||
|
||||
Move the help for printing to a separate help file. It's quite a lot now.
|
||||
|
||||
When doing completion for ":!cmd", ":r !cmd" or ":w !cmd" executable files are
|
||||
found in $PATH instead of looking for ordinary files in the current directlry.
|
||||
|
||||
When ":silent" is used and a backwards range is given for an Ex command the
|
||||
range is swapped automatically instead of asking if that is OK.
|
||||
|
||||
@@ -746,6 +964,9 @@ 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.
|
||||
|
||||
@@ -772,16 +993,25 @@ Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
|
||||
winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
|
||||
Lakshmanan)
|
||||
|
||||
Added 's' flag to search(): set ' mark if cursor moved. (Yegappan Lakshmanan)
|
||||
Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
|
||||
Added 'c' flag to search(): accept match at the cursor.
|
||||
Added 'e' flag to search(): move to end of the match. (Benji Fisher)
|
||||
Added 'p' flag to search(): return number of sub-pattern. (Benji Fisher)
|
||||
These also apply to searchpos(), searchpair() and searchpairpos().
|
||||
The search() and searchpair() functions have an extra argument to specify
|
||||
where to stop searching. Speeds up searches that should not continue too far.
|
||||
|
||||
When uncompressing fails in the gzip plugin, give an error message but don't
|
||||
delete the raw text. Helps if the file has a .gz extension but is not
|
||||
actually compressed. (Andrew Pimlott)
|
||||
|
||||
When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
|
||||
Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
|
||||
(Michael Geddes)
|
||||
|
||||
Support setting 'filetype' and 'syntax' to "aaa.bbb" for "aaa" plus "bbb"
|
||||
filetype or syntax.
|
||||
|
||||
The ":registers" command now displays multi-byte characters properly.
|
||||
|
||||
VMS: In the usage message mention that a slash can be used to make a flag
|
||||
@@ -791,9 +1021,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)
|
||||
|
||||
@@ -807,6 +1034,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 "/*".
|
||||
@@ -882,6 +1113,9 @@ When completing buffer names, match with "\(^\|[\/]\)" instead of "^", so that
|
||||
To count items (pattern matches) without changing the buffer the 'n' flag has
|
||||
been added to |:substitute|. See |count-items|.
|
||||
|
||||
In a |:substitute| command the \u, \U, \l and \L items now also work for
|
||||
multi-byte characters.
|
||||
|
||||
The "screen.linux" $TERM name is recognized to set the default for
|
||||
'background' to "dark". (Ciaran McCreesh) Also for "cygwin" and "putty".
|
||||
|
||||
@@ -900,6 +1134,13 @@ getwinvar() now also works to obtain a buffer-local option from the specified
|
||||
window.
|
||||
|
||||
Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan)
|
||||
Added the "%>" item to 'errorformat'.
|
||||
|
||||
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
|
||||
pattern matches. In the example a ":" not followed by a line number is
|
||||
included in the file name. (suggested by Emanuele Giaquinta)
|
||||
|
||||
GTK GUI: use the GTK file dialog when it's available. Mix from patches by
|
||||
Grahame Bowland and Evan Webb.
|
||||
@@ -930,15 +1171,6 @@ Lakshmanan)
|
||||
Win32: Balloons can have multiple lines if common controls supports it.
|
||||
(Sergey Khorev)
|
||||
|
||||
The 's' flag is added to the search() and searchpair() function to set the
|
||||
' mark if the cursor is moved. (Yegappan Lakshmanan)
|
||||
|
||||
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
|
||||
pattern matches. In the example a ":" not followed by a line number is
|
||||
included in the file name. (suggested by Emanuele Giaquinta)
|
||||
|
||||
For command-line completion the matches for various types of arguments are now
|
||||
sorted: user commands, variables, syntax names, etc.
|
||||
|
||||
@@ -959,6 +1191,9 @@ completion supported for the input. (Yegappan Lakshmanan)
|
||||
"dp" works with more than two buffers in diff mode if there is only one where
|
||||
'modifiable' is set.
|
||||
|
||||
The 'diffopt' option has three new values: "horizontal", "vertical" and
|
||||
"foldcolumn".
|
||||
|
||||
When the 'include' option contains \zs the file name found is what is being
|
||||
matched from \zs to the end or \ze. Useful to pass more to 'includeexpr'.
|
||||
|
||||
@@ -1004,6 +1239,36 @@ 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' and 'titlestring'. ":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)
|
||||
|
||||
Win32: In the batch files generated by the install program, use $VIMRUNTIME or
|
||||
$VIM if it's set. Example provided by Mathias Michaelis.
|
||||
Also create a vimtutor.bat batch file.
|
||||
|
||||
The 'balloonexpr' option is now |global-local|.
|
||||
|
||||
The system() function now runs in cooked mode, thus can be interrupted by
|
||||
CTRL-C.
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
@@ -1012,13 +1277,6 @@ Dropped the support for the BeOS and Amiga GUI. They were not maintained and
|
||||
probably didn't work. If you want to work on this: get the Vim 6.x version
|
||||
and merge it back in.
|
||||
|
||||
Mac: "make" now creates the Vim.app directory and "make install" copies it to
|
||||
its final destination. (Raf)
|
||||
|
||||
Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
|
||||
still being able to use the MacRoman conversion. Added the os_mac_conv.c
|
||||
file.
|
||||
|
||||
When running the tests and one of them fails to produce "test.out" the
|
||||
following tests are still executed. This helps when running out of memory.
|
||||
|
||||
@@ -1036,10 +1294,37 @@ functions.
|
||||
Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c
|
||||
without copying the code.
|
||||
|
||||
Mac: When running "make install" the runtime files are installed as for Unix.
|
||||
--- Mac ---
|
||||
|
||||
"make" now creates the Vim.app directory and "make install" copies it to its
|
||||
final destination. (Raf)
|
||||
|
||||
Put the runtime directory not directly in Vim.app but in
|
||||
Vim.app/Contents/Resources/vim, so that it's according to Mac specs.
|
||||
|
||||
Made it possible to compile with Motif, Athena or GTK without tricks and still
|
||||
being able to use the MacRoman conversion. Added the os_mac_conv.c file.
|
||||
|
||||
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.
|
||||
|
||||
Configure will attempt to build Vim for both Intel and PowerPC. The
|
||||
--with-mac-arch configure argument can change it.
|
||||
|
||||
--- Win32 ---
|
||||
|
||||
The Make_mvc.mak file was adjusted to work with the latest MS compilers,
|
||||
including the free version of Visual Studio 2005. (George Reilly)
|
||||
|
||||
INSTALLpc.txt was updated for the recent changes. (George Reilly)
|
||||
|
||||
The distributed executable is now produced with the free Visual C++ Toolkit
|
||||
2003 and other free SDK chunks. msvcsetup.bat was added to support this.
|
||||
|
||||
Also generate the .pdb file that can be used to generate a useful crash report
|
||||
on MS-Windows. (George Reilly)
|
||||
|
||||
==============================================================================
|
||||
BUG FIXES *bug-fixes-7*
|
||||
|
||||
@@ -1482,6 +1767,9 @@ change the window size ourselves, but they may come at an unexpected moment.
|
||||
Peek for a character to get any window resize events and fix 'columns' and
|
||||
'lines' to undo this.
|
||||
|
||||
When using the GTK plug mechanism, resizing and focus was not working
|
||||
properly. (Neil Bird)
|
||||
|
||||
After deleting files from the argument list a session file generated with
|
||||
":mksession" may contain invalid ":next" commands.
|
||||
|
||||
@@ -1686,4 +1974,91 @@ 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.
|
||||
|
||||
When 'whichwrap' includes "l" then "dl" and "yl" on a single letter line
|
||||
worked differently. Now recognize all operators when using "l" at the end of
|
||||
a line.
|
||||
|
||||
GTK GUI: when the font selector returned a font name with a comma in it then
|
||||
it would be handled like two font names. Now put a backslash before the
|
||||
comma.
|
||||
|
||||
MS-DOS, Win32: When 'encoding' defaults to "latin1" then the value for
|
||||
'iskeyword' was still for CPxxx. And when 'nocompatible' was set 'isprint'
|
||||
would also be the wrong value.
|
||||
|
||||
When a command was defined not to take arguments and no '|' no warning message
|
||||
would be given for using a '|'. Also with ":loadkeymap".
|
||||
|
||||
Motif: When using a fontset and 'encoding' is "utf-8" and sizeof(wchar_t) !=
|
||||
sizeof(XChar2b) then display was wrong. (Yukihiro Nakadaira)
|
||||
|
||||
":all" always set the current window to the first window, even when it
|
||||
contains a buffer that is not in the argument list (can't be closed because it
|
||||
is modified). Now go to the window that has the first item of the argument
|
||||
list.
|
||||
|
||||
GUI: To avoid left-over pixels from bold text all characters after a character
|
||||
with special attributes were redrawn. Now only do this for characters that
|
||||
actually are bold. Speeds up displaying considerably.
|
||||
|
||||
When only highlighting changes and the text is scrolled at the same time
|
||||
everything is redraw instead of using a scroll and updating the changed text.
|
||||
E.g., when using ":match" to highlight a paren that the cursor landed on.
|
||||
Added SOME_VALID: Redraw the whole window but also try to scroll to minimize
|
||||
redrawing.
|
||||
|
||||
Win32: When using Korean IME making it active didn't work properly. (Moon,
|
||||
Yu-sung, 2005 March 21)
|
||||
|
||||
Ruby interface: when inserting/deleting lines display wasn't updated. (Ryan
|
||||
Paul)
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -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.
|
||||
|
||||
66
runtime/doc/vimball.txt
Normal file
66
runtime/doc/vimball.txt
Normal file
@@ -0,0 +1,66 @@
|
||||
*vimball.txt* Vimball Archiver Mar 20, 2006
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
(see |copyright|) except use "Vimball" instead of "Vim".
|
||||
No warranty, express or implied.
|
||||
Use At-Your-Own-Risk!
|
||||
|
||||
==============================================================================
|
||||
1. Contents *vimball* *vimball-contents*
|
||||
|
||||
1. Contents......................................: |vimball-contents|
|
||||
2. Vimball Manual................................: |vimball-manual|
|
||||
3. Vimball History...............................: |vimball-history|
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Vimball Manual *vimball-manual*
|
||||
|
||||
*:MkVimball*
|
||||
:[range]MkVimball[!] filename
|
||||
|
||||
This command takes lines holding a path to files to be included in
|
||||
your vimball; as an example: >
|
||||
plugin/something.vim
|
||||
doc/something.txt
|
||||
< using MkVimball on this range will create a file called
|
||||
"filename.vba" which can be used by Vimball.vim to re-create these
|
||||
files. If the "filename.vba" file already exists, then MkVimball
|
||||
will issue a warning and not create the file.
|
||||
|
||||
However, if you use the exclamation point (!), then MkVimball will
|
||||
create the "filename.vba" file, overwriting it if it already exists.
|
||||
This behavior resembles that for |:w|.
|
||||
|
||||
*vimball-extract*
|
||||
vim filename.vba
|
||||
|
||||
Simply editing a Vimball will cause Vimball.vim to tell the user to
|
||||
source the file to extract its contents.
|
||||
|
||||
Extraction will only proceed if the first line of a putative vimball
|
||||
file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D."
|
||||
line.
|
||||
|
||||
:VimballList *vimball-vimballlist*
|
||||
|
||||
This command will tell Vimball to list the files in the archive, along
|
||||
with their lengths in lines.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Vimball History *vimball-history*
|
||||
|
||||
3 : Mar 20, 2006 * removed query, now requires sourcing to be
|
||||
extracted (:so %). Message to that effect
|
||||
included.
|
||||
* :VimballList now shows files that would be
|
||||
extracted.
|
||||
2 : Mar 20, 2006 * query, :UseVimball included
|
||||
1 : Mar 20, 2006 * initial release
|
||||
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:fdm=marker
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
|
||||
*visual.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -460,9 +460,10 @@ example, when a whole line is deleted, it can later be pasted halfway a line.
|
||||
|
||||
Mappings and menus in Select mode. *Select-mode-mapping*
|
||||
|
||||
In Select mode the mappings and menus of Visual mode are used. Before it is
|
||||
executed, Vim automatically switches to Visual mode, so that the same
|
||||
behavior as in Visual mode is effective.
|
||||
When mappings and menus are defined with the |:vmap| or |:vmenu| command they
|
||||
work both in Visual mode and in Select mode. When these are used in Select
|
||||
mode Vim automatically switches to Visual mode, so that the same behavior as
|
||||
in Visual mode is effective. If you don't want this use |:xmap| or |:smap|.
|
||||
|
||||
After the mapping or menu finishes, the selection is enabled again and Select
|
||||
mode entered, unless the selected area was deleted, another buffer became
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2006 Mar 11
|
||||
|
||||
|
||||
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.
|
||||
|
||||
@@ -715,11 +732,12 @@ normally a small window used to show an include file or definition of a
|
||||
function.
|
||||
{not available when compiled without the |+quickfix| feature}
|
||||
|
||||
There can be only one preview window. It is created with one of the commands
|
||||
below. The 'previewheight' option can be set to specify the height of the
|
||||
preview window when it's opened. The 'previewwindow' option is set in the
|
||||
preview window to be able to recognize it. The 'winfixheight' option is set
|
||||
to have it keep the same height when opening/closing other windows.
|
||||
There can be only one preview window (per tab page). It is created with one
|
||||
of the commands below. The 'previewheight' option can be set to specify the
|
||||
height of the preview window when it's opened. The 'previewwindow' option is
|
||||
set in the preview window to be able to recognize it. The 'winfixheight'
|
||||
option is set to have it keep the same height when opening/closing other
|
||||
windows.
|
||||
|
||||
*:pta* *:ptag*
|
||||
:pta[g][!] [tagname]
|
||||
@@ -939,9 +957,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]
|
||||
@@ -1073,6 +1092,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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Jan 12
|
||||
" Last Change: 2006 Mar 23
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -638,7 +638,7 @@ au BufNewFile,BufRead *.t.html setf tilde
|
||||
" HTML (.shtml and .stm for server side)
|
||||
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml()
|
||||
|
||||
" Distinguish between HTML and XHTML
|
||||
" Distinguish between HTML, XHTML and Django
|
||||
fun! s:FThtml()
|
||||
let n = 1
|
||||
while n < 10 && n < line("$")
|
||||
@@ -646,6 +646,10 @@ fun! s:FThtml()
|
||||
setf xhtml
|
||||
return
|
||||
endif
|
||||
if getline(n) =~ '{%\s*\(extends\|block\)\>'
|
||||
setf htmldjango
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf html
|
||||
@@ -891,6 +895,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()
|
||||
|
||||
@@ -1294,6 +1301,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 rhelp
|
||||
|
||||
" Rexx, Rebol or R
|
||||
au BufNewFile,BufRead *.r,*.R call s:FTr()
|
||||
|
||||
@@ -1655,19 +1665,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
|
||||
@@ -1732,7 +1752,7 @@ au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
|
||||
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
|
||||
|
||||
" Vim script
|
||||
au BufNewFile,BufRead *.vim,.exrc,_exrc setf vim
|
||||
au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
|
||||
|
||||
" Viminfo file
|
||||
au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
|
||||
@@ -1764,6 +1784,9 @@ au BufNewFile,BufRead *.wml setf wml
|
||||
" Winbatch
|
||||
au BufNewFile,BufRead *.wbt setf winbatch
|
||||
|
||||
" WSML
|
||||
au BufNewFile,BufRead *.wsml setf wsml
|
||||
|
||||
" WvDial
|
||||
au BufNewFile,BufRead wvdial.conf,.wvdialrc setf wvdial
|
||||
|
||||
@@ -1906,6 +1929,7 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
|
||||
|
||||
" Asterisk config file
|
||||
au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
|
||||
au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
|
||||
|
||||
" BIND zone
|
||||
au BufNewFile,BufRead /var/named/* call s:StarSetf('bindzone')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to switch on loading plugins for file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2005 Mar 25
|
||||
" Last change: 2006 Mar 18
|
||||
|
||||
if exists("did_load_ftplugin")
|
||||
finish
|
||||
@@ -10,18 +10,26 @@ let did_load_ftplugin = 1
|
||||
|
||||
augroup filetypeplugin
|
||||
au FileType * call s:LoadFTPlugin()
|
||||
|
||||
func! s:LoadFTPlugin()
|
||||
if exists("b:undo_ftplugin")
|
||||
exe b:undo_ftplugin
|
||||
unlet! b:undo_ftplugin b:did_ftplugin
|
||||
endif
|
||||
if expand("<amatch>") != ""
|
||||
|
||||
let s = expand("<amatch>")
|
||||
if s != ""
|
||||
if &cpo =~# "S" && exists("b:did_ftplugin")
|
||||
" In compatible mode options are reset to the global values, need to
|
||||
" set the local values also when a plugin was already used.
|
||||
unlet b:did_ftplugin
|
||||
endif
|
||||
runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim
|
||||
|
||||
" When there is a dot it is used to separate filetype names. Thus for
|
||||
" "aaa.bbb" load "aaa" and then "bbb".
|
||||
for name in split(s, '\.')
|
||||
exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
|
||||
endfor
|
||||
endif
|
||||
endfunc
|
||||
augroup END
|
||||
|
||||
@@ -51,6 +51,11 @@ if exists("loaded_matchit")
|
||||
endif
|
||||
" ###
|
||||
|
||||
if exists('&ofu')
|
||||
setlocal ofu=phpcomplete#CompletePHP
|
||||
endif
|
||||
|
||||
|
||||
setlocal commentstring=/*%s*/
|
||||
|
||||
" Undo the stuff we changed.
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
" SQL filetype plugin file
|
||||
" Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
|
||||
" Version: 0.08
|
||||
" Version: 1.0
|
||||
" Maintainer: David Fishburn <fishburn at ianywhere dot com>
|
||||
" Last Change: Mon Feb 21 2005 7:27:36 AM
|
||||
" Last Change: Wed Jan 11 2006 10:04:55 AM
|
||||
" Download: http://vim.sourceforge.net/script.php?script_id=454
|
||||
|
||||
" For more details please use:
|
||||
" :h sql.txt
|
||||
"
|
||||
" This file should only contain values that are common to all SQL languages
|
||||
" Oracle, Microsoft SQL Server, Sybase ASA/ASE, MySQL, and so on
|
||||
" If additional features are required create:
|
||||
@@ -12,6 +15,22 @@
|
||||
" .vim/after/ftplugin/sql.vim (Unix)
|
||||
" to override and add any of your own settings.
|
||||
|
||||
|
||||
" This file also creates a command, SQLSetType, which allows you to change
|
||||
" SQL dialects on the fly. For example, if I open an Oracle SQL file, it
|
||||
" is color highlighted appropriately. If I open an Informix SQL file, it
|
||||
" will still be highlighted according to Oracles settings. By running:
|
||||
" :SQLSetType sqlinformix
|
||||
"
|
||||
" All files called sqlinformix.vim will be loaded from the indent and syntax
|
||||
" directories. This allows you to easily flip SQL dialects on a per file
|
||||
" basis. NOTE: you can also use completion:
|
||||
" :SQLSetType <tab>
|
||||
"
|
||||
" To change the default dialect, add the following to your vimrc:
|
||||
" let g:sql_type_default = 'sqlanywhere'
|
||||
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -20,8 +39,146 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo=
|
||||
|
||||
" Functions/Commands to allow the user to change SQL syntax dialects
|
||||
" through the use of :SQLSetType <tab> for completion.
|
||||
" This works with both Vim 6 and 7.
|
||||
|
||||
if !exists("*SQL_SetType")
|
||||
" NOTE: You cannot use function! since this file can be
|
||||
" sourced from within this function. That will result in
|
||||
" an error reported by Vim.
|
||||
function SQL_GetList(ArgLead, CmdLine, CursorPos)
|
||||
|
||||
if !exists('s:sql_list')
|
||||
" Grab a list of files that contain "sql" in their names
|
||||
let list_indent = globpath(&runtimepath, 'indent/*sql*')
|
||||
let list_syntax = globpath(&runtimepath, 'syntax/*sql*')
|
||||
let list_ftplugin = globpath(&runtimepath, 'ftplugin/*sql*')
|
||||
|
||||
let sqls = "\n".list_indent."\n".list_syntax."\n".list_ftplugin."\n"
|
||||
|
||||
" Strip out everything (path info) but the filename
|
||||
" Regex
|
||||
" From between two newline characters
|
||||
" Non-greedily grab all characters
|
||||
" Followed by a valid filename \w\+\.\w\+ (sql.vim)
|
||||
" Followed by a newline, but do not include the newline
|
||||
"
|
||||
" Replace it with just the filename (get rid of PATH)
|
||||
"
|
||||
" Recursively, since there are many filenames that contain
|
||||
" the word SQL in the indent, syntax and ftplugin directory
|
||||
let sqls = substitute( sqls,
|
||||
\ '[\n]\%(.\{-}\)\(\w\+\.\w\+\)\n\@=',
|
||||
\ '\1\n',
|
||||
\ 'g'
|
||||
\ )
|
||||
|
||||
" Remove duplicates, since sqlanywhere.vim can exist in the
|
||||
" sytax, indent and ftplugin directory, yet we only want
|
||||
" to display the option once
|
||||
let index = match(sqls, '.\{-}\ze\n')
|
||||
while index > -1
|
||||
" Get the first filename
|
||||
let file = matchstr(sqls, '.\{-}\ze\n', index)
|
||||
" Recursively replace any *other* occurrence of that
|
||||
" filename with nothing (ie remove it)
|
||||
let sqls = substitute(sqls, '\%>'.(index+strlen(file)).'c\<'.file.'\>\n', '', 'g')
|
||||
" Move on to the next filename
|
||||
let index = match(sqls, '.\{-}\ze\n', (index+strlen(file)+1))
|
||||
endwhile
|
||||
|
||||
" Sort the list if using version 7
|
||||
if v:version >= 700
|
||||
let mylist = split(sqls, "\n")
|
||||
let mylist = sort(mylist)
|
||||
let sqls = join(mylist, "\n")
|
||||
endif
|
||||
|
||||
let s:sql_list = sqls
|
||||
endif
|
||||
|
||||
return s:sql_list
|
||||
|
||||
endfunction
|
||||
|
||||
function SQL_SetType(name)
|
||||
|
||||
" User has decided to override default SQL scripts and
|
||||
" specify a vendor specific version
|
||||
" (ie Oracle, Informix, SQL Anywhere, ...)
|
||||
" So check for an remove any settings that prevent the
|
||||
" scripts from being executed, and then source the
|
||||
" appropriate Vim scripts.
|
||||
if exists("b:did_ftplugin")
|
||||
unlet b:did_ftplugin
|
||||
endif
|
||||
if exists("b:current_syntax")
|
||||
" echomsg 'SQLSetType - clearing syntax'
|
||||
syntax clear
|
||||
endif
|
||||
if exists("b:did_indent")
|
||||
" echomsg 'SQLSetType - clearing indent'
|
||||
unlet b:did_indent
|
||||
" Set these values to their defaults
|
||||
setlocal indentkeys&
|
||||
setlocal indentexpr&
|
||||
endif
|
||||
|
||||
" Ensure the name is in the correct format
|
||||
let new_sql_type = substitute(a:name,
|
||||
\ '\s*\([^\.]\+\)\(\.\w\+\)\?', '\L\1', '')
|
||||
|
||||
" Do not specify a buffer local variable if it is
|
||||
" the default value
|
||||
if new_sql_type == 'sql'
|
||||
let new_sql_type = 'sqloracle'
|
||||
endif
|
||||
let b:sql_type_override = new_sql_type
|
||||
|
||||
" Vim will automatically source the correct files if we
|
||||
" change the filetype. You cannot do this with setfiletype
|
||||
" since that command will only execute if a filetype has
|
||||
" not already been set. In this case we want to override
|
||||
" the existing filetype.
|
||||
let &filetype = 'sql'
|
||||
endfunction
|
||||
command! -nargs=* -complete=custom,SQL_GetList SQLSetType :call SQL_SetType(<q-args>)
|
||||
|
||||
endif
|
||||
|
||||
if exists("b:sql_type_override")
|
||||
" echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim'
|
||||
if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != ''
|
||||
exec 'runtime ftplugin/'.b:sql_type_override.'.vim'
|
||||
" else
|
||||
" echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
|
||||
endif
|
||||
elseif exists("g:sql_type_default")
|
||||
" echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim'
|
||||
if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != ''
|
||||
exec 'runtime ftplugin/'.g:sql_type_default.'.vim'
|
||||
" else
|
||||
" echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the above runtime command succeeded, do not load the default settings
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl comments<"
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
let b:did_ftplugin = 1
|
||||
let b:current_ftplugin = 'sql'
|
||||
|
||||
" Win32 can filter files in the browse dialog
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Some standard expressions for use with the matchit strings
|
||||
let s:notend = '\%(\<end\s\+\)\@<!'
|
||||
@@ -112,69 +269,78 @@ endif
|
||||
" [d, [D, [_CTRL_D and so on features
|
||||
" Match these values ignoring case
|
||||
" ie DECLARE varname INTEGER
|
||||
let &l:define = '\c\(DECLARE\|IN\|OUT\|INOUT\)\s*'
|
||||
let &l:define = '\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>'
|
||||
|
||||
|
||||
" Mappings to move to the next BEGIN ... END block
|
||||
" \W - no characters or digits
|
||||
nmap <buffer> <silent> ]] :call search('\c^\s*begin\>', 'W' )<CR>
|
||||
nmap <buffer> <silent> [[ :call search('\c^\s*begin\>', 'bW' )<CR>
|
||||
nmap <buffer> <silent> ][ :call search('\c^\s*end\W*$', 'W' )<CR>
|
||||
nmap <buffer> <silent> [] :call search('\c^\s*end\W*$', 'bW' )<CR>
|
||||
vmap <buffer> <silent> ]] /\c^\s*begin\><CR>
|
||||
vmap <buffer> <silent> [[ ?\c^\s*begin<CR>
|
||||
vmap <buffer> <silent> ][ /\c^\s*end\W*$<CR>
|
||||
vmap <buffer> <silent> [] ?\c^\s*end\W*$<CR>
|
||||
nmap <buffer> <silent> ]] :call search('\\c^\\s*begin\\>', 'W' )<CR>
|
||||
nmap <buffer> <silent> [[ :call search('\\c^\\s*begin\\>', 'bW' )<CR>
|
||||
nmap <buffer> <silent> ][ :call search('\\c^\\s*end\\W*$', 'W' )<CR>
|
||||
nmap <buffer> <silent> [] :call search('\\c^\\s*end\\W*$', 'bW' )<CR>
|
||||
vmap <buffer> <silent> ]] /\\c^\\s*begin\\><CR>
|
||||
vmap <buffer> <silent> [[ ?\\c^\\s*begin\\><CR>
|
||||
vmap <buffer> <silent> ][ /\\c^\\s*end\\W*$<CR>
|
||||
vmap <buffer> <silent> [] ?\\c^\\s*end\\W*$<CR>
|
||||
|
||||
|
||||
" By default only look for CREATE statements, but allow
|
||||
" the user to override
|
||||
if !exists('g:ftplugin_sql_statements')
|
||||
let g:ftplugin_sql_statements = 'create'
|
||||
endif
|
||||
|
||||
" Predefined SQL objects what are used by the below mappings using
|
||||
" the ]} style maps.
|
||||
" This global variable allows the users to override it's value
|
||||
" from within their vimrc.
|
||||
" Note, you cannot use \?, since these patterns can be used to search
|
||||
" backwards, you must use \{,1}
|
||||
if !exists('g:ftplugin_sql_objects')
|
||||
let g:ftplugin_sql_objects = 'function,procedure,event,' .
|
||||
\ '\(existing\\|global\s\+temporary\s\+\)\?table,trigger' .
|
||||
\ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' .
|
||||
\ 'table,trigger' .
|
||||
\ ',schema,service,publication,database,datatype,domain' .
|
||||
\ ',index,subscription,synchronization,view,variable'
|
||||
endif
|
||||
|
||||
" Replace all ,'s with bars, except ones with numbers after them.
|
||||
" This will most likely be a \{,1} string.
|
||||
let s:ftplugin_sql_objects =
|
||||
\ '\c^\s*' .
|
||||
\ '\(create\s\+\(or\s\+replace\s\+\)\?\)\?' .
|
||||
\ '\<\(' .
|
||||
\ substitute(g:ftplugin_sql_objects, ',', '\\\\|', 'g') .
|
||||
\ '\)\>'
|
||||
\ '\\c^\\s*' .
|
||||
\ '\\(\\(' .
|
||||
\ substitute(g:ftplugin_sql_statements, ',\d\@!', '\\\\\\|', 'g') .
|
||||
\ '\\)\\s\\+\\(or\\s\\+replace\\\s\+\\)\\{,1}\\)\\{,1}' .
|
||||
\ '\\<\\(' .
|
||||
\ substitute(g:ftplugin_sql_objects, ',\d\@!', '\\\\\\|', 'g') .
|
||||
\ '\\)\\>'
|
||||
|
||||
" Mappings to move to the next CREATE ... block
|
||||
" map <buffer> <silent> ]} :call search(g:ftplugin_sql_objects, 'W' )<CR>
|
||||
" nmap <buffer> <silent> [{ :call search('\c^\s*\(create\s\+\(or\s\+replace\s\+\)\?\)\?\<\(function\\|procedure\\|event\\|table\\|trigger\\|schema\)\>', 'bW' )<CR>
|
||||
" exec 'nmap <buffer> <silent> ]} /'.s:ftplugin_sql_objects.'<CR>'
|
||||
exec "nmap <buffer> <silent> ]} :call search('".s:ftplugin_sql_objects."', 'W')<CR>"
|
||||
exec "nmap <buffer> <silent> [{ :call search('".s:ftplugin_sql_objects."', 'bW')<CR>"
|
||||
" Could not figure out how to use a :call search() string in visual mode
|
||||
" without it ending visual mode
|
||||
" Unfortunately, this will add a entry to the search history
|
||||
exec 'vmap <buffer> <silent> ]} /'.s:ftplugin_sql_objects.'<CR>'
|
||||
exec 'vmap <buffer> <silent> [{ ?'.s:ftplugin_sql_objects.'<CR>'
|
||||
" vmap <buffer> <silent> ]} /\c^\s*\(create\s\+\(or\s\+replace\s\+\)\?\)\?\<\(function\\|procedure\\|event\\|table\\|trigger\\|schema\)\><CR>
|
||||
" vmap <buffer> <silent> [{ ?\c^\s*\(create\s\+\(or\s\+replace\s\+\)\?\)\?\<\(function\\|procedure\\|event\\|table\\|trigger\\|schema\)\><CR>
|
||||
|
||||
" Mappings to move to the next COMMENT
|
||||
"
|
||||
" Had to double the \ for the \| separator since this has a special
|
||||
" meaning on maps
|
||||
let b:comment_leader = '\(--\\|\/\/\\|\*\\|\/\*\\|\*\/\)'
|
||||
let b:comment_leader = '\\(--\\\|\\/\\/\\\|\\*\\\|\\/\\*\\\|\\*\\/\\)'
|
||||
" Find the start of the next comment
|
||||
let b:comment_start = '^\(\s*'.b:comment_leader.'.*\n\)\@<!'.
|
||||
\ '\(\s*'.b:comment_leader.'\)'
|
||||
let b:comment_start = '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'.
|
||||
\ '\\(\\s*'.b:comment_leader.'\\)'
|
||||
" Find the end of the previous comment
|
||||
let b:comment_end = '\(^\s*'.b:comment_leader.'.*\n\)'.
|
||||
\ '\(^\s*'.b:comment_leader.'\)\@!'
|
||||
let b:comment_end = '\\(^\\s*'.b:comment_leader.'.*\\n\\)'.
|
||||
\ '\\(^\\s*'.b:comment_leader.'\\)\\@!'
|
||||
" Skip over the comment
|
||||
let b:comment_jump_over = "call search('".
|
||||
\ '^\(\s*'.b:comment_leader.'.*\n\)\@<!'.
|
||||
\ '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'.
|
||||
\ "', 'W')"
|
||||
let b:comment_skip_back = "call search('".
|
||||
\ '^\(\s*'.b:comment_leader.'.*\n\)\@<!'.
|
||||
\ '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'.
|
||||
\ "', 'bW')"
|
||||
" Move to the start and end of comments
|
||||
exec 'nnoremap <silent><buffer> ]" /'.b:comment_start.'<CR>'
|
||||
@@ -187,11 +353,29 @@ exec 'vnoremap <silent><buffer> [" /'.b:comment_end.'<CR>'
|
||||
" *
|
||||
" */
|
||||
" or
|
||||
" //
|
||||
" or
|
||||
" --
|
||||
" or
|
||||
" //
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:--,://
|
||||
|
||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||
if exists('&omnifunc')
|
||||
" This is used by the sqlcomplete.vim plugin
|
||||
" Source it for it's global functions
|
||||
runtime autoload/syntaxcomplete.vim
|
||||
|
||||
setlocal omnifunc=sqlcomplete#Complete
|
||||
" Prevent the intellisense plugin from loading
|
||||
let b:sql_vis = 1
|
||||
imap <buffer> <c-space>t <C-O>:let b:sql_compl_type='table'<CR><C-X><C-O>
|
||||
imap <buffer> <c-space>p <C-O>:let b:sql_compl_type='procedure'<CR><C-X><C-O>
|
||||
imap <buffer> <c-space>v <C-O>:let b:sql_compl_type='view'<CR><C-X><C-O>
|
||||
imap <buffer> <c-space>c <C-O>:let b:sql_compl_type='column'<CR><C-X><C-O>
|
||||
imap <buffer> <c-space>f <C-O>:let b:sql_compl_type='function'<CR><C-X><C-O>
|
||||
imap <buffer> <c-space>o <C-O>:let b:sql_compl_type='option'<CR><C-X><C-O>
|
||||
imap <buffer> <c-right> <C-O>:let b:sql_compl_type='column'<CR><C-X><C-O>
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
" vim:sw=4:ff=unix:
|
||||
|
||||
@@ -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>
|
||||
|
||||
39
runtime/indent/sql.vim
Normal file
39
runtime/indent/sql.vim
Normal file
@@ -0,0 +1,39 @@
|
||||
" Vim indent file loader
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <fishburn at ianywhere dot com>
|
||||
" Last Change: Thu Sep 15 2005 10:27:51 AM
|
||||
" Version: 1.0
|
||||
" Download: http://vim.sourceforge.net/script.php?script_id=495
|
||||
|
||||
" Description: Checks for a:
|
||||
" buffer local variable,
|
||||
" global variable,
|
||||
" If the above exist, it will source the type specified.
|
||||
" If none exist, it will source the default sqlanywhere.vim file.
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Default to the standard Vim distribution file
|
||||
let filename = 'sqlanywhere'
|
||||
|
||||
" Check for overrides. Buffer variables have the highest priority.
|
||||
if exists("b:sql_type_override")
|
||||
" Check the runtimepath to see if the file exists
|
||||
if globpath(&runtimepath, 'indent/'.b:sql_type_override.'.vim') != ''
|
||||
let filename = b:sql_type_override
|
||||
endif
|
||||
elseif exists("g:sql_type_default")
|
||||
if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != ''
|
||||
let filename = g:sql_type_default
|
||||
endif
|
||||
endif
|
||||
|
||||
" Source the appropriate file
|
||||
exec 'runtime indent/'.filename.'.vim'
|
||||
|
||||
|
||||
" vim:sw=4:ff=unix:
|
||||
384
runtime/indent/sqlanywhere.vim
Normal file
384
runtime/indent/sqlanywhere.vim
Normal file
@@ -0,0 +1,384 @@
|
||||
" Vim indent file
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <fishburn at ianywhere dot com>
|
||||
" Last Change: Wed Sep 14 2005 10:21:15 PM
|
||||
" Version: 1.4
|
||||
" Download: http://vim.sourceforge.net/script.php?script_id=495
|
||||
|
||||
" Notes:
|
||||
" Indenting keywords are based on Oracle and Sybase Adaptive Server
|
||||
" Anywhere (ASA). Test indenting was done with ASA stored procedures and
|
||||
" fuctions and Oracle packages which contain stored procedures and
|
||||
" functions.
|
||||
" This has not been tested against Microsoft SQL Server or
|
||||
" Sybase Adaptive Server Enterprise (ASE) which use the Transact-SQL
|
||||
" syntax. That syntax does not have end tags for IF's, which makes
|
||||
" indenting more difficult.
|
||||
"
|
||||
" Known Issues:
|
||||
" The Oracle MERGE statement does not have an end tag associated with
|
||||
" it, this can leave the indent hanging to the right one too many.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let b:current_indent = "sqlanywhere"
|
||||
|
||||
setlocal indentkeys-=0{
|
||||
setlocal indentkeys-=0}
|
||||
setlocal indentkeys-=:
|
||||
setlocal indentkeys-=0#
|
||||
setlocal indentkeys-=e
|
||||
|
||||
" This indicates formatting should take place when one of these
|
||||
" expressions is used. These expressions would normally be something
|
||||
" you would type at the BEGINNING of a line
|
||||
" SQL is generally case insensitive, so this files assumes that
|
||||
" These keywords are something that would trigger an indent LEFT, not
|
||||
" an indent right, since the SQLBlockStart is used for those keywords
|
||||
setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=)
|
||||
|
||||
" GetSQLIndent is executed whenever one of the expressions
|
||||
" in the indentkeys is typed
|
||||
setlocal indentexpr=GetSQLIndent()
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetSQLIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" List of all the statements that start a new block.
|
||||
" These are typically words that start a line.
|
||||
" IS is excluded, since it is difficult to determine when the
|
||||
" ending block is (especially for procedures/functions).
|
||||
let s:SQLBlockStart = '^\s*\%('.
|
||||
\ 'if\|else\|elseif\|elsif\|'.
|
||||
\ 'while\|loop\|do\|'.
|
||||
\ 'begin\|'.
|
||||
\ 'case\|when\|merge\|exception'.
|
||||
\ '\)\>'
|
||||
let s:SQLBlockEnd = '^\s*\(end\)\>'
|
||||
|
||||
" The indent level is also based on unmatched paranethesis
|
||||
" If a line has an extra "(" increase the indent
|
||||
" If a line has an extra ")" decrease the indent
|
||||
function s:CountUnbalancedParan( line, paran_to_check )
|
||||
let l = a:line
|
||||
let lp = substitute(l, '[^(]', '', 'g')
|
||||
let l = a:line
|
||||
let rp = substitute(l, '[^)]', '', 'g')
|
||||
|
||||
if a:paran_to_check =~ ')'
|
||||
" echom 'CountUnbalancedParan ) returning: ' .
|
||||
" \ (strlen(rp) - strlen(lp))
|
||||
return (strlen(rp) - strlen(lp))
|
||||
elseif a:paran_to_check =~ '('
|
||||
" echom 'CountUnbalancedParan ( returning: ' .
|
||||
" \ (strlen(lp) - strlen(rp))
|
||||
return (strlen(lp) - strlen(rp))
|
||||
else
|
||||
" echom 'CountUnbalancedParan unknown paran to check: ' .
|
||||
" \ a:paran_to_check
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Unindent commands based on previous indent level
|
||||
function s:CheckToIgnoreRightParan( prev_lnum, num_levels )
|
||||
let lnum = a:prev_lnum
|
||||
let line = getline(lnum)
|
||||
let ends = 0
|
||||
let num_right_paran = a:num_levels
|
||||
let ignore_paran = 0
|
||||
let vircol = 1
|
||||
|
||||
while num_right_paran > 0
|
||||
silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>"
|
||||
let right_paran = search( ')', 'W' )
|
||||
if right_paran != lnum
|
||||
" This should not happen since there should be at least
|
||||
" num_right_paran matches for this line
|
||||
break
|
||||
endif
|
||||
let vircol = virtcol(".")
|
||||
|
||||
" if getline(".") =~ '^)'
|
||||
let matching_paran = searchpair('(', '', ')', 'bW',
|
||||
\ 'IsColComment(line("."), col("."))')
|
||||
|
||||
if matching_paran < 1
|
||||
" No match found
|
||||
" echom 'CTIRP - no match found, ignoring'
|
||||
break
|
||||
endif
|
||||
|
||||
if matching_paran == lnum
|
||||
" This was not an unmatched parantenses, start the search again
|
||||
" again after this column
|
||||
" echom 'CTIRP - same line match, ignoring'
|
||||
continue
|
||||
endif
|
||||
|
||||
" echom 'CTIRP - match: ' . line(".") . ' ' . getline(".")
|
||||
|
||||
if getline(matching_paran) =~? '\(if\|while\)\>'
|
||||
" echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".")
|
||||
let ignore_paran = ignore_paran + 1
|
||||
endif
|
||||
|
||||
" One match found, decrease and check for further matches
|
||||
let num_right_paran = num_right_paran - 1
|
||||
|
||||
endwhile
|
||||
|
||||
" Fallback - just move back one
|
||||
" return a:prev_indent - &sw
|
||||
return ignore_paran
|
||||
endfunction
|
||||
|
||||
" Based on the keyword provided, loop through previous non empty
|
||||
" non comment lines to find the statement that initated the keyword.
|
||||
" Return its indent level
|
||||
" CASE ..
|
||||
" WHEN ...
|
||||
" Should return indent level of CASE
|
||||
" EXCEPTION ..
|
||||
" WHEN ...
|
||||
" something;
|
||||
" WHEN ...
|
||||
" Should return indent level of exception.
|
||||
function s:GetStmtStarterIndent( keyword, curr_lnum )
|
||||
let lnum = a:curr_lnum
|
||||
|
||||
" Default - reduce indent by 1
|
||||
let ind = indent(a:curr_lnum) - &sw
|
||||
|
||||
if a:keyword =~? 'end'
|
||||
exec 'normal! ^'
|
||||
let stmts = '^\s*\%('.
|
||||
\ '\<begin\>\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<loop\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<case\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<for\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<if\>\)'.
|
||||
\ '\)'
|
||||
let matching_lnum = searchpair(stmts, '', '\<end\>\zs', 'bW',
|
||||
\ 'IsColComment(line("."), col(".")) == 1')
|
||||
exec 'normal! $'
|
||||
if matching_lnum > 0 && matching_lnum < a:curr_lnum
|
||||
let ind = indent(matching_lnum)
|
||||
endif
|
||||
elseif a:keyword =~? 'when'
|
||||
exec 'normal! ^'
|
||||
let matching_lnum = searchpair(
|
||||
\ '\%(\<end\s\+\)\@<!\<case\>\|\<exception\>\|\<merge\>',
|
||||
\ '',
|
||||
\ '\%(\%(\<when\s\+others\>\)\|\%(\<end\s\+case\>\)\)',
|
||||
\ 'bW',
|
||||
\ 'IsColComment(line("."), col(".")) == 1')
|
||||
exec 'normal! $'
|
||||
if matching_lnum > 0 && matching_lnum < a:curr_lnum
|
||||
let ind = indent(matching_lnum)
|
||||
else
|
||||
let ind = indent(a:curr_lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
" Check if the line is a comment
|
||||
function IsLineComment(lnum)
|
||||
let rc = synIDattr(
|
||||
\ synID(a:lnum,
|
||||
\ match(getline(a:lnum), '\S')+1, 0)
|
||||
\ , "name")
|
||||
\ =~? "comment"
|
||||
|
||||
return rc
|
||||
endfunction
|
||||
|
||||
|
||||
" Check if the column is a comment
|
||||
function IsColComment(lnum, cnum)
|
||||
let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name")
|
||||
\ =~? "comment"
|
||||
|
||||
return rc
|
||||
endfunction
|
||||
|
||||
|
||||
" Check if the column is a comment
|
||||
function ModuloIndent(ind)
|
||||
let ind = a:ind
|
||||
|
||||
if ind > 0
|
||||
let modulo = ind % &shiftwidth
|
||||
|
||||
if modulo > 0
|
||||
let ind = ind - modulo
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
" Find correct indent of a new line based upon the previous line
|
||||
function GetSQLIndent()
|
||||
let lnum = v:lnum
|
||||
let ind = indent(lnum)
|
||||
|
||||
" If the current line is a comment, leave the indent as is
|
||||
" Comment out this additional check since it affects the
|
||||
" indenting of =, and will not reindent comments as it should
|
||||
" if IsLineComment(lnum) == 1
|
||||
" return ind
|
||||
" endif
|
||||
|
||||
" while 1
|
||||
" Get previous non-blank line
|
||||
let prevlnum = prevnonblank(lnum - 1)
|
||||
if prevlnum <= 0
|
||||
return ind
|
||||
endif
|
||||
|
||||
if IsLineComment(prevlnum) == 1
|
||||
if getline(v:lnum) =~ '^\s*\*'
|
||||
let ind = ModuloIndent(indent(prevlnum))
|
||||
return ind + 1
|
||||
endif
|
||||
" If the previous line is a comment, then return -1
|
||||
" to tell Vim to use the formatoptions setting to determine
|
||||
" the indent to use
|
||||
" But only if the next line is blank. This would be true if
|
||||
" the user is typing, but it would not be true if the user
|
||||
" is reindenting the file
|
||||
if getline(v:lnum) =~ '^\s*$'
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
|
||||
" let prevline = getline(prevlnum)
|
||||
" if prevline !~ '^\s*$'
|
||||
" " echom 'previous non blank - break: ' . prevline
|
||||
" break
|
||||
" endif
|
||||
" endwhile
|
||||
|
||||
" echom 'PREVIOUS INDENT: ' . indent(prevlnum) . ' LINE: ' . getline(prevlnum)
|
||||
|
||||
" This is the line you just hit return on, it is not the current line
|
||||
" which is new and empty
|
||||
" Based on this line, we can determine how much to indent the new
|
||||
" line
|
||||
|
||||
" Get default indent (from prev. line)
|
||||
let ind = indent(prevlnum)
|
||||
let prevline = getline(prevlnum)
|
||||
|
||||
" Now check what's on the previous line to determine if the indent
|
||||
" should be changed, for example IF, BEGIN, should increase the indent
|
||||
" where END IF, END, should decrease the indent.
|
||||
if prevline =~? s:SQLBlockStart
|
||||
" Move indent in
|
||||
let ind = ind + &sw
|
||||
" echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline
|
||||
elseif prevline =~ '[()]'
|
||||
if prevline =~ '('
|
||||
let num_unmatched_left = s:CountUnbalancedParan( prevline, '(' )
|
||||
else
|
||||
let num_unmatched_left = 0
|
||||
endif
|
||||
if prevline =~ ')'
|
||||
let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' )
|
||||
else
|
||||
let num_unmatched_right = 0
|
||||
" let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' )
|
||||
endif
|
||||
if num_unmatched_left > 0
|
||||
" There is a open left paranethesis
|
||||
" increase indent
|
||||
let ind = ind + ( &sw * num_unmatched_left )
|
||||
elseif num_unmatched_right > 0
|
||||
" if it is an unbalanced paranethesis only unindent if
|
||||
" it was part of a command (ie create table(..) )
|
||||
" instead of part of an if (ie if (....) then) which should
|
||||
" maintain the indent level
|
||||
let ignore = s:CheckToIgnoreRightParan( prevlnum, num_unmatched_right )
|
||||
" echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore
|
||||
|
||||
if prevline =~ '^\s*)'
|
||||
let ignore = ignore + 1
|
||||
" echom 'prevl - begins ) unbalanced ignore: ' . ignore
|
||||
endif
|
||||
|
||||
if (num_unmatched_right - ignore) > 0
|
||||
let ind = ind - ( &sw * (num_unmatched_right - ignore) )
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" echom 'CURRENT INDENT: ' . ind . ' LINE: ' . getline(v:lnum)
|
||||
|
||||
" This is a new blank line since we just typed a carriage return
|
||||
" Check current line; search for simplistic matching start-of-block
|
||||
let line = getline(v:lnum)
|
||||
|
||||
if line =~? '^\s*els'
|
||||
" Any line when you type else will automatically back up one
|
||||
" ident level (ie else, elseif, elsif)
|
||||
let ind = ind - &sw
|
||||
" echom 'curr - else - indent ' . ind
|
||||
elseif line =~? '^\s*end\>'
|
||||
let ind = s:GetStmtStarterIndent('end', v:lnum)
|
||||
" General case for end
|
||||
" let ind = ind - &sw
|
||||
" echom 'curr - end - indent ' . ind
|
||||
elseif line =~? '^\s*when\>'
|
||||
let ind = s:GetStmtStarterIndent('when', v:lnum)
|
||||
" If the WHEN clause is used with a MERGE or EXCEPTION
|
||||
" clause, do not change the indent level, since these
|
||||
" statements do not have a corresponding END statement.
|
||||
" if stmt_starter =~? 'case'
|
||||
" let ind = ind - &sw
|
||||
" endif
|
||||
" elseif line =~ '^\s*)\s*;\?\s*$'
|
||||
" elseif line =~ '^\s*)'
|
||||
elseif line =~ '^\s*)'
|
||||
let num_unmatched_right = s:CountUnbalancedParan( line, ')' )
|
||||
let ignore = s:CheckToIgnoreRightParan( v:lnum, num_unmatched_right )
|
||||
" If the line ends in a ), then reduce the indent
|
||||
" This catches items like:
|
||||
" CREATE TABLE T1(
|
||||
" c1 int,
|
||||
" c2 int
|
||||
" );
|
||||
" But we do not want to unindent a line like:
|
||||
" IF ( c1 = 1
|
||||
" AND c2 = 3 ) THEN
|
||||
" let num_unmatched_right = s:CountUnbalancedParan( line, ')' )
|
||||
" if num_unmatched_right > 0
|
||||
" elseif strpart( line, strlen(line)-1, 1 ) =~ ')'
|
||||
" let ind = ind - &sw
|
||||
if line =~ '^\s*)'
|
||||
" let ignore = ignore + 1
|
||||
" echom 'curr - begins ) unbalanced ignore: ' . ignore
|
||||
endif
|
||||
|
||||
if (num_unmatched_right - ignore) > 0
|
||||
let ind = ind - ( &sw * (num_unmatched_right - ignore) )
|
||||
endif
|
||||
" endif
|
||||
endif
|
||||
|
||||
" echom 'final - indent ' . ind
|
||||
return ModuloIndent(ind)
|
||||
endfunction
|
||||
|
||||
" vim:sw=4:ff=unix:
|
||||
@@ -1,8 +1,8 @@
|
||||
" VHDL indent ('93 syntax)
|
||||
" Language: VHDL
|
||||
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
|
||||
" Version: 1.3
|
||||
" Last Change: 2006 Jan 31
|
||||
" 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
|
||||
@@ -17,13 +17,35 @@ setlocal indentkeys=!^F,o,O,e,0(,0)
|
||||
setlocal indentkeys+==~if,=~then,=~elsif,=~else
|
||||
setlocal indentkeys+==~begin,=~is,=~select,=~--
|
||||
|
||||
" move around
|
||||
" 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\)'
|
||||
nnoremap <silent><buffer>[[ :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','bW')<CR>
|
||||
nnoremap <silent><buffer>]] :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','W')<CR>
|
||||
nnoremap <silent><buffer>[] :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','bW')<CR>
|
||||
nnoremap <silent><buffer>][ :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','W')<CR>
|
||||
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
|
||||
|
||||
104
runtime/keymap/greek_cp737.vim
Normal file
104
runtime/keymap/greek_cp737.vim
Normal file
@@ -0,0 +1,104 @@
|
||||
" Vim Keymap file for greek DOS cp737
|
||||
" Maintainer: Panagiotis Louridas <louridas@acm.org>
|
||||
" Last Updated: Thu Mar 23 14:05:45 EET 2006
|
||||
|
||||
" This keyboard layout allows all Greek symbols to be typed,
|
||||
" including accented capitals and diaeresis. It does not
|
||||
" include diaeresis and accent on the same vowel, nor
|
||||
" the greek quotes, as these were not included in the codepage.
|
||||
" It includes the Greek semicolon sign.
|
||||
|
||||
"
|
||||
" accent ";" + letter
|
||||
" diaeresis ":" + letter
|
||||
" diaeresis + accent ";" + ":" (or ":" + ";") + letter
|
||||
" semicolon "q"
|
||||
" colon "Q"
|
||||
" greek semicolon "W"
|
||||
" sigma at end of word "w"
|
||||
|
||||
" Use this short name in the status line.
|
||||
let b:keymap_name = "greek"
|
||||
|
||||
loadkeymap
|
||||
" capital
|
||||
A <char-128> " <20>
|
||||
B <char-129> " <20>
|
||||
G <char-130> " <20>
|
||||
D <char-131> " <20>
|
||||
E <char-132> " <20>
|
||||
Z <char-133> " <20>
|
||||
H <char-134> " <20>
|
||||
U <char-135> " <20>
|
||||
I <char-136> " <20>
|
||||
K <char-137> " <20>
|
||||
L <char-138> " <20>
|
||||
M <char-139> " <20>
|
||||
N <char-140> " <20>
|
||||
J <char-141> " <20>
|
||||
O <char-142> " <20>
|
||||
P <char-143> " <20>
|
||||
R <char-144> " <20>
|
||||
S <char-145> " <20>
|
||||
T <char-146> " <20>
|
||||
Y <char-147> " <20>
|
||||
F <char-148> " <20>
|
||||
X <char-149> " <20>
|
||||
C <char-150> " <20>
|
||||
V <char-151> " <20>
|
||||
|
||||
" small
|
||||
a <char-152> " <20>
|
||||
b <char-153> " <20>
|
||||
g <char-154> " <20>
|
||||
d <char-155> " <20>
|
||||
e <char-156> " <20>
|
||||
z <char-157> " <20>
|
||||
h <char-158> " <20>
|
||||
u <char-159> " <20>
|
||||
i <char-160> " <20>
|
||||
k <char-161> " <20>
|
||||
l <char-162> " <20>
|
||||
m <char-163> " <20>
|
||||
n <char-164> " <20>
|
||||
j <char-165> " <20>
|
||||
o <char-166> " <20>
|
||||
p <char-167> " <20>
|
||||
r <char-168> " <20>
|
||||
s <char-169> " <20>
|
||||
w <char-170> " <20>
|
||||
t <char-171> " <20>
|
||||
y <char-172> " <20>
|
||||
f <char-173> " <20>
|
||||
x <char-174> " <20>
|
||||
c <char-175> " <20>
|
||||
v <char-224> " <20>
|
||||
|
||||
" accented capital
|
||||
;A <char-234> " <20>
|
||||
;E <char-235> " <20>
|
||||
;H <char-236> " <20>
|
||||
;I <char-237> " <20>
|
||||
;O <char-238> " <20>
|
||||
;Y <char-239> " <20>
|
||||
;V <char-240> " <20>
|
||||
"
|
||||
:I <char-244> " <20>
|
||||
:Y <char-245> " <20>
|
||||
|
||||
" accented small
|
||||
;a <char-225> " <20>
|
||||
;e <char-226> " <20>
|
||||
;h <char-227> " <20>
|
||||
;i <char-229> " <20>
|
||||
;o <char-230> " <20>
|
||||
;y <char-231> " <20>
|
||||
;v <char-233> " <20>
|
||||
"
|
||||
:i <char-228> " <20>
|
||||
:y <char-232> " <20>
|
||||
"
|
||||
" symbols
|
||||
q ; " ;
|
||||
Q : " :
|
||||
W <char-250> " <20>
|
||||
90
runtime/keymap/ukrainian-jcuken.vim
Normal file
90
runtime/keymap/ukrainian-jcuken.vim
Normal file
@@ -0,0 +1,90 @@
|
||||
" Vim Keymap file for ukrainian characters, layout 'jcuken', classical variant
|
||||
" (compatible with XFree86 'uk' keymap)
|
||||
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
|
||||
" Useful mainly with utf-8 but may work with other encodings
|
||||
|
||||
" Maintainer: Anatoli Sakhnik <sakhnik@gmail.com>
|
||||
" Last Changed: 2006 Mar 15
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "uk"
|
||||
|
||||
loadkeymap
|
||||
~ ~
|
||||
` '
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
} Ї CYRILLIC CAPITAL LETTER YI
|
||||
S І CYRILLIC CAPITAL LETTER BYELORUSSION-UKRAINIAN I
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
| Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
] ї CYRILLIC SMALL LETTER YI
|
||||
s і CYRILLIC SMALL LETTER BYELORUSSION-UKRAINIAN I
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' є CYRILLIC SMALL LETTER UKRAINIAN IE
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
\\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN
|
||||
@ "
|
||||
# '
|
||||
$ *
|
||||
% :
|
||||
^ ,
|
||||
& .
|
||||
* ;
|
||||
@@ -2,7 +2,7 @@
|
||||
" Maintainer: Georg Dahn <gorgyd@yahoo.co.uk>
|
||||
" Originally By: Marcin Dalecki <dalecki@cs.net.pl>
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Sun, 17 Apr 2005 18:28:58 CEST
|
||||
" Last Change: Sat, 11 Mar 2006 22:40:00 CEST
|
||||
" vim:set foldmethod=marker tabstop=8:
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -21,6 +21,7 @@ endif
|
||||
menutrans &File &Datei
|
||||
menutrans &Open\.\.\.<Tab>:e &<26>ffnen\.\.\.<Tab>:e
|
||||
menutrans Sp&lit-Open\.\.\.<Tab>:sp In\ geteiltem\ &Fenster\ <20>ffnen\.\.\.<Tab>:sp
|
||||
menutrans Open\ Tab\.\.\.<Tab>:tabnew In\ neuem\ &Tab\ <20>ffnen\.\.\.<Tab>:tabnew
|
||||
menutrans &New<Tab>:enew &Neue\ Datei<Tab>:enew
|
||||
menutrans &Close<Tab>:close S&chlie<EFBFBD>en<Tab>:close
|
||||
menutrans &Save<Tab>:w &Speichern<Tab>:w
|
||||
@@ -100,6 +101,23 @@ menutrans &Keymap &Tastatur-Belegung
|
||||
" }}} EDIT / EDITIEREN
|
||||
|
||||
" {{{ TOOLS / WERKZEUGE
|
||||
if has("spell")
|
||||
menutrans &Spelling &Rechtschreibpr<EFBFBD>fung
|
||||
menutrans &Spell\ Check\ On &Rechtschreibpr<EFBFBD>fung\ An
|
||||
menutrans Spell\ Check\ &Off Rechtschreibpr<EFBFBD>fung\ &Aus
|
||||
menutrans To\ &Next\ error<Tab>]s Zum\ &N<EFBFBD>chsten\ Fehler<Tab>]s
|
||||
menutrans To\ &Previous\ error<Tab>[s Zum\ &Letzten\ Fehler<Tab>[s
|
||||
menutrans Suggest\ &Corrections<Tab>z= &Korrekturvorschl<EFBFBD>ge<Tab>z=
|
||||
menutrans &Repeat\ correction<Tab>:spellrepall &Wiederhole\ Korrektur<Tab>:spellrepall
|
||||
menutrans Set\ language\ to\ "en" Verwende\ W<EFBFBD>rterbuch\ "en"
|
||||
menutrans Set\ language\ to\ "en_au" Verwende\ W<EFBFBD>rterbuch\ "en_au"
|
||||
menutrans Set\ language\ to\ "en_ca" Verwende\ W<EFBFBD>rterbuch\ "en_ca"
|
||||
menutrans Set\ language\ to\ "en_gb" Verwende\ W<EFBFBD>rterbuch\ "en_gb"
|
||||
menutrans Set\ language\ to\ "en_nz" Verwende\ W<EFBFBD>rterbuch\ "en_nz"
|
||||
menutrans Set\ language\ to\ "en_us" Verwende\ W<EFBFBD>rterbuch\ "en_us"
|
||||
menutrans Set\ language\ to\ "de" Verwende\ W<EFBFBD>rterbuch\ "de"
|
||||
menutrans &Find\ More\ Languages &Suche\ nach\ W<EFBFBD>rterb<EFBFBD>chern
|
||||
endif
|
||||
if has("folding")
|
||||
menutrans &Folding Fa<ung
|
||||
" open close folds
|
||||
@@ -147,7 +165,8 @@ menutrans &Older\ List<Tab>:cold &
|
||||
menutrans N&ewer\ List<Tab>:cnew &Neuere\ Liste<Tab>:cnew
|
||||
|
||||
menutrans Error\ &Window Feh&ler-Fenster
|
||||
menutrans &Set\ Compiler &Compiler
|
||||
menutrans Se&t\ Compiler &Compiler
|
||||
menutrans Se&T\ Compiler &Compiler
|
||||
menutrans &Update<Tab>:cwin &Aktualisieren<Tab>:cwin
|
||||
menutrans &Open<Tab>:copen &<26>ffnen<Tab>:copen
|
||||
menutrans &Close<Tab>:cclose &Schlie<EFBFBD>en<Tab>:cclose
|
||||
@@ -177,14 +196,13 @@ menutrans Delete L
|
||||
menutrans &Alternate &Wechseln
|
||||
menutrans &Next &N<EFBFBD>chster
|
||||
menutrans &Previous &Vorheriger
|
||||
menutrans [No\ File] [Keine\ Datei]
|
||||
" }}} BUFFERS / PUFFER
|
||||
|
||||
" {{{ WINDOW / ANSICHT
|
||||
menutrans &Window &Ansicht
|
||||
menutrans &New<Tab>^Wn &Neu<Tab>^Wn
|
||||
menutrans S&plit<Tab>^Ws Aufs&palten<Tab>^Ws
|
||||
menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Ws
|
||||
menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Wv
|
||||
menutrans Split\ File\ E&xplorer Ver&zeichnis
|
||||
menutrans Sp&lit\ To\ #<Tab>^W^^ Aufspa<en\ in\ #<Tab>^W^^
|
||||
menutrans &Close<Tab>^Wc &Schlie<EFBFBD>en<Tab>^Wc
|
||||
@@ -226,8 +244,10 @@ menutrans Cu&t Aus&schneiden
|
||||
menutrans &Copy &Kopieren
|
||||
menutrans &Paste &Einf<EFBFBD>gen
|
||||
menutrans &Delete &L<EFBFBD>schen
|
||||
menutrans Select\ Blockwise Auswahl\ Blockartig
|
||||
menutrans Select\ Blockwise Auswahl\ blockartig
|
||||
menutrans Select\ &Word Auswahl\ des\ &Wortes
|
||||
menutrans Select\ &Sentence Auswahl\ des\ Sa&tzes
|
||||
menutrans Select\ Pa&ragraph Auswahl\ des\ Absatzes
|
||||
menutrans Select\ &Line Auswahl\ der\ &Zeile
|
||||
menutrans Select\ &Block Auswahl\ des\ &Blocks
|
||||
menutrans Select\ &All &Alles\ Ausw<EFBFBD>hlen
|
||||
|
||||
83
runtime/macmap.vim
Normal file
83
runtime/macmap.vim
Normal file
@@ -0,0 +1,83 @@
|
||||
" System gvimrc file for Mac OS X
|
||||
" Author: Benji Fisher <benji@member.AMS.org>
|
||||
" Last Change: Thu Mar 09 09:00 AM 2006 EST
|
||||
"
|
||||
" Define Mac-standard keyboard shortcuts.
|
||||
|
||||
" Save and restore compatible mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
nnoremap <D-n> :confirm enew<CR>
|
||||
vmap <D-n> <Esc><D-n>gv
|
||||
imap <D-n> <C-O><D-n>
|
||||
cmap <D-n> <C-C><D-n>
|
||||
omap <D-n> <Esc><D-n>
|
||||
|
||||
nnoremap <D-o> :browse confirm e<CR>
|
||||
vmap <D-o> <Esc><D-o>gv
|
||||
imap <D-o> <C-O><D-o>
|
||||
cmap <D-o> <C-C><D-o>
|
||||
omap <D-o> <Esc><D-o>
|
||||
|
||||
nnoremap <silent> <D-w> :if winheight(2) < 0 <Bar>
|
||||
\ confirm enew <Bar>
|
||||
\ else <Bar>
|
||||
\ confirm close <Bar>
|
||||
\ endif<CR>
|
||||
vmap <D-w> <Esc><D-w>gv
|
||||
imap <D-w> <C-O><D-w>
|
||||
cmap <D-w> <C-C><D-w>
|
||||
omap <D-w> <Esc><D-w>
|
||||
|
||||
nnoremap <silent> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar>
|
||||
\ else<Bar>confirm w<Bar>endif<CR>
|
||||
vmap <D-s> <Esc><D-s>gv
|
||||
imap <D-s> <C-O><D-s>
|
||||
cmap <D-s> <C-C><D-s>
|
||||
omap <D-s> <Esc><D-s>
|
||||
|
||||
nnoremap <D-S-s> :browse confirm saveas<CR>
|
||||
vmap <D-S-s> <Esc><D-s>gv
|
||||
imap <D-S-s> <C-O><D-s>
|
||||
cmap <D-S-s> <C-C><D-s>
|
||||
omap <D-S-s> <Esc><D-s>
|
||||
|
||||
" From the Edit menu of SimpleText:
|
||||
nnoremap <D-z> u
|
||||
vmap <D-z> <Esc><D-z>gv
|
||||
imap <D-z> <C-O><D-z>
|
||||
cmap <D-z> <C-C><D-z>
|
||||
omap <D-z> <Esc><D-z>
|
||||
|
||||
vnoremap <D-x> "+x
|
||||
|
||||
vnoremap <D-c> "+y
|
||||
|
||||
cnoremap <D-c> <C-Y>
|
||||
|
||||
nnoremap <D-v> "+gP
|
||||
cnoremap <D-v> <C-R>+
|
||||
execute 'vnoremap <script> <D-v>' paste#paste_cmd['v']
|
||||
execute 'inoremap <script> <D-v>' paste#paste_cmd['i']
|
||||
|
||||
nnoremap <silent> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar>
|
||||
\ else<Bar>exe ":norm ggVG"<Bar>endif<CR>
|
||||
vmap <D-a> <Esc><D-a>
|
||||
imap <D-a> <Esc><D-a>
|
||||
cmap <D-a> <C-C><D-a>
|
||||
omap <D-a> <Esc><D-a>
|
||||
|
||||
nnoremap <D-f> /
|
||||
vmap <D-f> <Esc><D-f>
|
||||
imap <D-f> <Esc><D-f>
|
||||
cmap <D-f> <C-C><D-f>
|
||||
omap <D-f> <Esc><D-f>
|
||||
|
||||
nnoremap <D-g> n
|
||||
vmap <D-g> <Esc><D-g>
|
||||
imap <D-g> <C-O><D-g>
|
||||
cmap <D-g> <C-C><D-g>
|
||||
omap <D-g> <Esc><D-g>
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
@@ -1,6 +1,6 @@
|
||||
" Script to define the syntax menu in synmenu.vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Jan 12
|
||||
" Last Change: 2006 Mar 23
|
||||
|
||||
" This is used by "make menu" in the src directory.
|
||||
edit <sfile>:p:h/synmenu.vim
|
||||
@@ -136,6 +136,7 @@ SynMenu DE.Desktop:desktop
|
||||
SynMenu DE.Diff:diff
|
||||
SynMenu DE.Digital\ Command\ Lang:dcl
|
||||
SynMenu DE.Dircolors:dircolors
|
||||
SynMenu DE.Django\ template:django
|
||||
SynMenu DE.DNS/BIND\ zone:dns
|
||||
SynMenu DE.DocBook.auto-detect:docbk
|
||||
SynMenu DE.DocBook.SGML:docbksgml
|
||||
@@ -201,6 +202,7 @@ SynMenu HIJK.HTML.HTML:html
|
||||
SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4
|
||||
SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby
|
||||
SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah
|
||||
SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango
|
||||
SynMenu HIJK.HTML.HTML/OS:htmlos
|
||||
SynMenu HIJK.HTML.XHTML:xhtml
|
||||
SynMenu HIJK.Hyper\ Builder:hb
|
||||
|
||||
@@ -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: 2006 Feb 02
|
||||
" Last Change: 2006 Mar 09
|
||||
|
||||
" 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>
|
||||
@@ -130,41 +131,6 @@ an 10.600 &File.-SEP4- <Nop>
|
||||
an 10.610 &File.Sa&ve-Exit<Tab>:wqa :confirm wqa<CR>
|
||||
an 10.620 &File.E&xit<Tab>:qa :confirm qa<CR>
|
||||
|
||||
" Pasting blockwise and linewise selections is not possible in Insert and
|
||||
" Visual mode without the +virtualedit feature. They are pasted as if they
|
||||
" were characterwise instead. Add to that some tricks to leave the cursor in
|
||||
" the right position, also for "gi".
|
||||
" Note: the same stuff appears in mswin.vim.
|
||||
if has("virtualedit")
|
||||
let s:paste_cmd = ":call <SID>Paste()<CR>"
|
||||
func! <SID>Paste()
|
||||
let ove = &ve
|
||||
set ve=all
|
||||
normal! `^
|
||||
if @+ != ''
|
||||
normal! "+gP
|
||||
endif
|
||||
let c = col(".")
|
||||
normal! i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
normal! l
|
||||
endif
|
||||
let &ve = ove
|
||||
endfunc
|
||||
else
|
||||
let s:paste_cmd = "\"=@+.'xy'<CR>gPFx\"_2x"
|
||||
endif
|
||||
|
||||
" Define the string to use for items that are present both in Edit, Popup and
|
||||
" Toolbar menu.
|
||||
if has("virtualedit")
|
||||
let s:paste_v_cmd = '"-c<Esc>' . s:paste_cmd
|
||||
let s:paste_i_cmd = '<Esc>' . s:paste_cmd . 'gi'
|
||||
else
|
||||
let s:paste_v_cmd = '"-c<Esc>gix<Esc>' . s:paste_cmd . '"_x'
|
||||
let s:paste_i_cmd = 'x<Esc>' . s:paste_cmd . '"_s'
|
||||
endif
|
||||
|
||||
func! <SID>SelectAll()
|
||||
exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
|
||||
endfunc
|
||||
@@ -181,8 +147,8 @@ vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y
|
||||
cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y>
|
||||
nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP
|
||||
cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+
|
||||
exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . s:paste_v_cmd
|
||||
exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . s:paste_i_cmd
|
||||
exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v']
|
||||
exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['i']
|
||||
nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p
|
||||
inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p
|
||||
nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p
|
||||
@@ -198,10 +164,10 @@ an 20.405 &Edit.-SEP2- <Nop>
|
||||
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
|
||||
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
|
||||
vunmenu &Edit.&Find\.\.\.
|
||||
vnoremenu <silent> &Edit.&Find\.\.\. y:call <SID>FixFText()<CR>:promptfind <C-R>"<CR>
|
||||
vnoremenu <silent> &Edit.&Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
|
||||
an 20.420 &Edit.Find\ and\ Rep&lace\.\.\. :promptrepl<CR>
|
||||
vunmenu &Edit.Find\ and\ Rep&lace\.\.\.
|
||||
vnoremenu <silent> &Edit.Find\ and\ Rep&lace\.\.\. y:call <SID>FixFText()<CR>:promptrepl <C-R>"<CR>
|
||||
vnoremenu <silent> &Edit.Find\ and\ Rep&lace\.\.\. y:promptrepl <C-R>=<SID>FixFText()<CR><CR>
|
||||
else
|
||||
an 20.410 &Edit.&Find<Tab>/ /
|
||||
an 20.420 &Edit.Find\ and\ Rep&lace<Tab>:%s :%s/
|
||||
@@ -214,7 +180,7 @@ an 20.430 &Edit.Settings\ &Window :options<CR>
|
||||
|
||||
fun! s:FixFText()
|
||||
" Fix text in nameless register to be used with :promptfind.
|
||||
let @" = substitute(@", "[\r\n]", '\\n', 'g')
|
||||
return substitute(@", "[\r\n]", '\\n', 'g')
|
||||
endfun
|
||||
|
||||
" Edit/Global Settings
|
||||
@@ -418,7 +384,7 @@ if has("spell")
|
||||
an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR>
|
||||
an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s
|
||||
an 40.335.130 &Tools.&Spelling.To\ &Previous\ error<Tab>[s [s
|
||||
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z? z?
|
||||
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z=
|
||||
an 40.335.150 &Tools.&Spelling.&Repeat\ correction<Tab>:spellrepall :spellrepall<CR>
|
||||
an 40.335.200 &Tools.&Spelling.-SEP1- <Nop>
|
||||
an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR>
|
||||
@@ -850,8 +816,8 @@ vnoremenu 1.30 PopUp.&Copy "+y
|
||||
cnoremenu 1.30 PopUp.&Copy <C-Y>
|
||||
nnoremenu 1.40 PopUp.&Paste "+gP
|
||||
cnoremenu 1.40 PopUp.&Paste <C-R>+
|
||||
exe 'vnoremenu <script> 1.40 PopUp.&Paste ' . s:paste_v_cmd
|
||||
exe 'inoremenu <script> 1.40 PopUp.&Paste ' . s:paste_i_cmd
|
||||
exe 'vnoremenu <script> 1.40 PopUp.&Paste ' . paste#paste_cmd['v']
|
||||
exe 'inoremenu <script> 1.40 PopUp.&Paste ' . paste#paste_cmd['i']
|
||||
vnoremenu 1.50 PopUp.&Delete x
|
||||
an 1.55 PopUp.-SEP2- <Nop>
|
||||
vnoremenu 1.60 PopUp.Select\ Blockwise <C-V>
|
||||
@@ -975,14 +941,14 @@ if has("toolbar")
|
||||
cnoremenu 1.80 ToolBar.Copy <C-Y>
|
||||
nnoremenu 1.90 ToolBar.Paste "+gP
|
||||
cnoremenu ToolBar.Paste <C-R>+
|
||||
exe 'vnoremenu <script> ToolBar.Paste ' . s:paste_v_cmd
|
||||
exe 'inoremenu <script> ToolBar.Paste ' . s:paste_i_cmd
|
||||
exe 'vnoremenu <script> ToolBar.Paste ' . paste#paste_cmd['v']
|
||||
exe 'inoremenu <script> ToolBar.Paste ' . paste#paste_cmd['i']
|
||||
|
||||
if !has("gui_athena")
|
||||
an 1.95 ToolBar.-sep3- <Nop>
|
||||
an 1.100 ToolBar.Replace :promptrepl<CR>
|
||||
vunmenu ToolBar.Replace
|
||||
vnoremenu ToolBar.Replace y:promptrepl <C-R>"<CR>
|
||||
vnoremenu ToolBar.Replace y:promptrepl <C-R>=<SID>FixFText()<CR><CR>
|
||||
an 1.110 ToolBar.FindNext n
|
||||
an 1.120 ToolBar.FindPrev N
|
||||
endif
|
||||
@@ -1098,8 +1064,6 @@ an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR>
|
||||
|
||||
endif " !exists("did_install_syntax_menu")
|
||||
|
||||
unlet! s:paste_i_cmd s:paste_v_cmd s:paste_cmd
|
||||
|
||||
" Restore the previous value of 'cpoptions'.
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -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: 2006 Feb 02
|
||||
" Last change: 2006 Mar 09
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
@@ -41,36 +41,11 @@ cmap <S-Insert> <C-R>+
|
||||
" Pasting blockwise and linewise selections is not possible in Insert and
|
||||
" Visual mode without the +virtualedit feature. They are pasted as if they
|
||||
" were characterwise instead.
|
||||
" Note: the same stuff appears in menu.vim.
|
||||
if has("virtualedit")
|
||||
nnoremap <silent> <SID>Paste :call <SID>Paste()<CR>
|
||||
func! <SID>Paste()
|
||||
let ove = &ve
|
||||
set ve=all
|
||||
normal! `^
|
||||
if @+ != ''
|
||||
normal! "+gP
|
||||
endif
|
||||
let c = col(".")
|
||||
normal! i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
" 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
|
||||
inoremap <script> <C-V> x<BS><Esc><SID>Pastegi
|
||||
vnoremap <script> <C-V> "-c<Esc><SID>Paste
|
||||
else
|
||||
nnoremap <silent> <SID>Paste "=@+.'xy'<CR>gPFx"_2x
|
||||
inoremap <script> <C-V> x<Esc><SID>Paste"_s
|
||||
vnoremap <script> <C-V> "-c<Esc>gix<Esc><SID>Paste"_x
|
||||
endif
|
||||
" Uses the paste.vim autoload script.
|
||||
|
||||
exe 'inoremap <script> <C-V>' paste#paste_cmd['i']
|
||||
exe 'vnoremap <script> <C-V>' paste#paste_cmd['v']
|
||||
|
||||
imap <S-Insert> <C-V>
|
||||
vmap <S-Insert> <C-V>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Jan 13
|
||||
" Last Change: 2006 Mar 18
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -389,6 +389,12 @@ call <SID>OptionG("hl", &hl)
|
||||
call append("$", "hlsearch\thighlight all matches for the last used search pattern")
|
||||
call <SID>BinOptionG("hls", &hls)
|
||||
if has("syntax")
|
||||
call append("$", "cursorcolumn\thighlight the screen column of the cursor")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("cuc")
|
||||
call append("$", "cursorline\thighlight the screen line of the cursor")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("cul")
|
||||
call append("$", "spell\thighlight spelling mistakes")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("spell")
|
||||
@@ -429,6 +435,9 @@ call append("$", "winfixheight\tkeep the height of the window")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("wfh")
|
||||
if has("vertsplit")
|
||||
call append("$", "winfixwidth\tkeep the width of the window")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("wfw")
|
||||
call append("$", "winwidth\tminimal number of columns used for the current window")
|
||||
call append("$", " \tset wiw=" . &wiw)
|
||||
call append("$", "winminwidth\tminimal number of columns used for any window")
|
||||
@@ -463,6 +472,17 @@ if has("scrollbind")
|
||||
endif
|
||||
|
||||
|
||||
call <SID>Header("multiple tab pages")
|
||||
call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line")
|
||||
call append("$", " \tset stal=" . &stal)
|
||||
call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"")
|
||||
call append("$", " \tset tpm=" . &tpm)
|
||||
call append("$", "tabline\tcustom tab pages line")
|
||||
call <SID>OptionG("tal", &tal)
|
||||
call append("$", "guitablabel\tcustom tab page label for the GUI")
|
||||
call <SID>OptionG("gtl", >l)
|
||||
|
||||
|
||||
call <SID>Header("terminal")
|
||||
call append("$", "term\tname of the used terminal")
|
||||
call <SID>OptionG("term", &term)
|
||||
@@ -697,12 +717,19 @@ call <SID>OptionL("fo")
|
||||
call append("$", "formatlistpat\tpattern to recognize a numbered list")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("flp")
|
||||
if has("eval")
|
||||
call append("$", "formatexpr\texpression used for \"gq\" to format lines")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("fex")
|
||||
endif
|
||||
if has("insert_expand")
|
||||
call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("cpt")
|
||||
call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
|
||||
call <SID>OptionG("cot", &cot)
|
||||
call append("$", "pumheight\tmaximum height of the popup menu")
|
||||
call <SID>OptionG("ph", &ph)
|
||||
call append("$", "completefunc\tuser defined function for Insert mode completion")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("cfu")
|
||||
@@ -1147,6 +1174,8 @@ if has("multi_byte")
|
||||
call <SID>OptionG("ccv", &ccv)
|
||||
call append("$", "delcombine\tDelete combining (composing) characters on their own")
|
||||
call <SID>BinOptionG("deco", &deco)
|
||||
call append("$", "maxcombine\tMaximum number of combining (composing) characters displayed")
|
||||
call <SID>OptionG("mco", &mco)
|
||||
if has("xim") && has("gui_gtk")
|
||||
call append("$", "imactivatekey\tkey that activates the X input method")
|
||||
call <SID>OptionG("imak", &imak)
|
||||
|
||||
@@ -8,6 +8,7 @@ netrw.vim edit files over a network and browse (remote) directories
|
||||
rrhelper.vim used for --remote-wait editing
|
||||
tar.vim edit (compressed) tar files
|
||||
tohtml.vim convert a file with syntax highlighting to HTML
|
||||
vimball.vim create and unpack .vba files
|
||||
|
||||
Note: the explorer.vim plugin is no longer here, the netrw.vim plugin has
|
||||
taken over browsing directories (also over ftp).
|
||||
|
||||
470
runtime/plugin/getscript.vim
Normal file
470
runtime/plugin/getscript.vim
Normal file
@@ -0,0 +1,470 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Feb 15, 2006
|
||||
" Version: 20
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: GetLatestVimScripts.vim
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" if you're sourcing this file, surely you can't be
|
||||
" expecting vim to be in its vi-compatible mode
|
||||
if &cp
|
||||
if &verbose
|
||||
echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
endif
|
||||
finish
|
||||
endif
|
||||
let s:keepfo = &fo
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("loaded_GetLatestVimScripts")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_GetLatestVimScripts= "v20"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Variables: {{{1
|
||||
" allow user to change the command for obtaining scripts (does fetch work?)
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
endif
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
endif
|
||||
if !exists("g:GetLatestVimScripts_allowautoinstall")
|
||||
let g:GetLatestVimScripts_allowautoinstall= 1
|
||||
endif
|
||||
|
||||
"" For debugging:
|
||||
"let g:GetLatestVimScripts_wget = "echo"
|
||||
"let g:GetLatestVimScripts_options = "options"
|
||||
|
||||
" check if s:autoinstall is possible
|
||||
let s:autoinstall= ""
|
||||
if g:GetLatestVimScripts_allowautoinstall
|
||||
|
||||
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
|
||||
" windows (but not cygwin/bash)
|
||||
let s:dotvim= "vimfiles"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "ren"
|
||||
endif
|
||||
|
||||
else
|
||||
" unix
|
||||
let s:dotvim= ".vim"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "mv"
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
|
||||
let s:autoinstall= $HOME."/".s:dotvim
|
||||
endif
|
||||
" call Decho("s:autoinstall<".s:autoinstall.">")
|
||||
else
|
||||
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=0 GetLatestVimScripts call <SID>GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call <SID>GetLatestVimScripts()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
|
||||
" on the current line, interpreting two numbers and text as
|
||||
" ScriptID, SourceID, and Filename.
|
||||
" It downloads any scripts that have newer versions from vim.sf.net.
|
||||
fun! <SID>GetOneScript(...)
|
||||
" call Dfunc("GetOneScript()")
|
||||
|
||||
" set options to allow progress to be shown on screen
|
||||
let t_ti= &t_ti
|
||||
let t_te= &t_te
|
||||
let rs = &rs
|
||||
set t_ti= t_te= nors
|
||||
|
||||
" put current line on top-of-screen and interpret it into
|
||||
" a script identifer : used to obtain webpage
|
||||
" source identifier : used to identify current version
|
||||
" and an associated comment: used to report on what's being considered
|
||||
if a:0 >= 3
|
||||
let scriptid = a:1
|
||||
let srcid = a:2
|
||||
let cmmnt = a:3
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("cmmnt <".cmmnt.">")
|
||||
else
|
||||
let curline = getline(".")
|
||||
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)$'
|
||||
try
|
||||
let scriptid = substitute(curline,parsepat,'\1','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let scriptid= 0
|
||||
endtry
|
||||
try
|
||||
let srcid = substitute(curline,parsepat,'\2','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let srcid= 0
|
||||
endtry
|
||||
try
|
||||
let cmmnt = substitute(curline,parsepat,'\3','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let cmmnt= ""
|
||||
endtry
|
||||
" call Decho("curline <".curline.">")
|
||||
" call Decho("parsepat<".parsepat.">")
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("cmmnt <".cmmnt.">")
|
||||
endif
|
||||
|
||||
if scriptid == 0 || srcid == 0
|
||||
" When looking for :AutoInstall: lines, skip scripts that
|
||||
" have 0 0 scriptname
|
||||
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
|
||||
return
|
||||
endif
|
||||
|
||||
let doautoinstall= 0
|
||||
if cmmnt =~ ":AutoInstall:"
|
||||
" call Decho("cmmnt<".cmmnt."> has :AutoInstall:...")
|
||||
let aicmmnt= substitute(cmmnt,'\s\+:AutoInstall:\s\+',' ','')
|
||||
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
|
||||
if s:autoinstall != ""
|
||||
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
|
||||
endif
|
||||
else
|
||||
let aicmmnt= cmmnt
|
||||
endif
|
||||
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
|
||||
|
||||
exe "norm z\<CR>"
|
||||
redraw!
|
||||
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
|
||||
echomsg 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
|
||||
|
||||
" grab a copy of the plugin's vim.sf.net webpage
|
||||
let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid
|
||||
let tmpfile = tempname()
|
||||
let v:errmsg = ""
|
||||
|
||||
" make three tries at downloading the description
|
||||
let itry= 1
|
||||
while itry <= 3
|
||||
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
|
||||
if has("win32") || has("win16") || has("win95")
|
||||
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"')
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"'
|
||||
else
|
||||
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'")
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'"
|
||||
endif
|
||||
if itry == 1
|
||||
exe "silent vsplit ".tmpfile
|
||||
else
|
||||
silent! e %
|
||||
endif
|
||||
|
||||
" find the latest source-id in the plugin's webpage
|
||||
silent! 1
|
||||
let findpkg= search('Click on the package to download','W')
|
||||
if findpkg > 0
|
||||
break
|
||||
endif
|
||||
let itry= itry + 1
|
||||
endwhile
|
||||
" call Decho(" --- end downloading tries while loop --- itry=".itry)
|
||||
|
||||
" testing: did finding /Click on the package.../ fail?
|
||||
if findpkg == 0 || itry >= 4
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /Click on the package/ failed")
|
||||
return
|
||||
endif
|
||||
" call Decho('found "Click on the package to download"')
|
||||
|
||||
let findsrcid= search('src_id=','W')
|
||||
if findsrcid == 0
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /src_id/ failed")
|
||||
return
|
||||
endif
|
||||
" call Decho('found "src_id=" in description page')
|
||||
|
||||
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
|
||||
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
|
||||
let fname = substitute(getline("."),srcidpat,'\2','')
|
||||
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> fname<".fname.">")
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
|
||||
" convert the strings-of-numbers into numbers
|
||||
let srcid = srcid + 0
|
||||
let latestsrcid = latestsrcid + 0
|
||||
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." fname<".fname.">")
|
||||
|
||||
" has the plugin's most-recent srcid increased, which indicates
|
||||
" that it has been updated
|
||||
if latestsrcid > srcid
|
||||
let s:downloads= s:downloads + 1
|
||||
if fname == bufname("%")
|
||||
" GetLatestVimScript has to be careful about downloading itself
|
||||
let fname= "NEW_".fname
|
||||
endif
|
||||
|
||||
" the plugin has been updated since we last obtained it, so download a new copy
|
||||
" call Decho("...downloading new <".fname.">")
|
||||
echomsg "...downloading new <".fname.">"
|
||||
if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
|
||||
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
|
||||
else
|
||||
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
|
||||
endif
|
||||
|
||||
" AutoInstall: only if doautoinstall is so indicating
|
||||
if doautoinstall
|
||||
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname))
|
||||
if filereadable(fname)
|
||||
" call Decho("move <".fname."> to ".s:autoinstall)
|
||||
" call Decho("DISABLED for testing")
|
||||
exe "silent !"g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall
|
||||
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||
exe "cd ".s:autoinstall
|
||||
if fname =~ '\.bz2$'
|
||||
" call Decho("attempt to bunzip2 ".fname)
|
||||
exe "silent !bunzip2 ".fname
|
||||
let fname= substitute(fname,'\.bz2$','','')
|
||||
elseif fname =~ '\.gz$'
|
||||
" call Decho("attempt to gunzip ".fname)
|
||||
exe "silent !gunzip ".fname
|
||||
let fname= substitute(fname,'\.gz$','','')
|
||||
endif
|
||||
if fname =~ '\.zip$'
|
||||
" call Decho("attempt to unzip ".fname)
|
||||
exe "silent !unzip -o".fname
|
||||
elseif fname =~ '\.tar$'
|
||||
" call Decho("attempt to untar ".fname)
|
||||
exe "silent !tar -oxvf ".fname
|
||||
endif
|
||||
if fname =~ '.vim$'
|
||||
" call Decho("attempt to simply move ".fname." to plugin")
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin"
|
||||
endif
|
||||
exe "helptags ../".s:dotvim."/doc"
|
||||
exe "cd ".curdir
|
||||
endif
|
||||
endif
|
||||
|
||||
" update the data in the <GetLatestVimScripts.dat> file
|
||||
let modline=scriptid." ".latestsrcid." ".cmmnt
|
||||
call setline(line("."),modline)
|
||||
" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)")
|
||||
endif
|
||||
|
||||
" restore options
|
||||
let &t_ti= t_ti
|
||||
let &t_te= t_te
|
||||
let &rs = rs
|
||||
|
||||
" call Dret("GetOneScript")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
||||
" scripts based on the list in
|
||||
"
|
||||
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
fun! <SID>GetLatestVimScripts()
|
||||
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
|
||||
|
||||
" insure that wget is executable
|
||||
if executable(g:GetLatestVimScripts_wget) != 1
|
||||
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
|
||||
" call Dret("GetLatestVimScripts : wget not executable/availble")
|
||||
return
|
||||
endif
|
||||
|
||||
" Find the .../GetLatest sudirectory under the runtimepath
|
||||
let rtplist= &rtp
|
||||
while rtplist != ""
|
||||
let datadir= substitute(rtplist,',.*$','','e')."/GetLatest"
|
||||
if isdirectory(datadir)
|
||||
" call Decho("found directory<".datadir.">")
|
||||
break
|
||||
endif
|
||||
unlet datadir
|
||||
if rtplist =~ ','
|
||||
let rtplist= substitute(rtplist,'^.\{-},','','e')
|
||||
else
|
||||
let rtplist= ""
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Sanity checks: readability and writability
|
||||
if !exists("datadir")
|
||||
echoerr "Unable to find a GetLatest subdirectory on your runtimepath"
|
||||
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
||||
return
|
||||
endif
|
||||
if filewritable(datadir) != 2
|
||||
echoerr "Your ".datadir." isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
||||
return
|
||||
endif
|
||||
let datafile= datadir."/GetLatestVimScripts.dat"
|
||||
if !filereadable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't readable"
|
||||
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
if !filewritable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
" call Decho("datadir <".datadir.">")
|
||||
" call Decho("datafile <".datafile.">")
|
||||
|
||||
" don't let any events interfere (like winmanager's, taglist's, etc)
|
||||
let eikeep= &ei
|
||||
set ei=all
|
||||
|
||||
" record current directory, change to datadir, open split window with
|
||||
" datafile
|
||||
let origdir= getcwd()
|
||||
exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #")
|
||||
split
|
||||
exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #")
|
||||
res 1000
|
||||
let s:downloads = 0
|
||||
let s:downerrors= 0
|
||||
|
||||
" Check on dependencies mentioned in plugins
|
||||
" call Decho(" ")
|
||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||
let lastline = line("$")
|
||||
let plugins = globpath(&rtp,"plugin/*.vim")
|
||||
let foundscript = 0
|
||||
|
||||
" call Decho("plugins<".plugins."> lastline#".lastline)
|
||||
while plugins != ""
|
||||
let plugin = substitute(plugins,'\n.*$','','e')
|
||||
let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : ""
|
||||
$
|
||||
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
||||
exe "silent r ".plugin
|
||||
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
|
||||
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
||||
let llp1 = lastline+1
|
||||
|
||||
if newscript !~ '^"'
|
||||
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
|
||||
let curline = line(".")
|
||||
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
|
||||
exe llp1
|
||||
let srchline = search('\<'.noai_script.'\>','bW')
|
||||
" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline)
|
||||
|
||||
if srchline == 0
|
||||
" found a new script to permanently include in the datafile
|
||||
let keep_rega = @a
|
||||
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
||||
exe lastline."put a"
|
||||
echomsg "Appending <".@a."> to ".datafile." for ".newscript
|
||||
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
|
||||
let @a = keep_rega
|
||||
let lastline = llp1
|
||||
let curline = curline + 1
|
||||
let foundscript = foundscript + 1
|
||||
" else " Decho
|
||||
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
||||
endif
|
||||
|
||||
let curline = curline + 1
|
||||
exe curline
|
||||
endif
|
||||
|
||||
endwhile
|
||||
let llp1= lastline + 1
|
||||
" call Decho(".deleting lines: ".llp1.",$d")
|
||||
exe "silent! ".llp1.",$d"
|
||||
endwhile
|
||||
|
||||
if foundscript == 0
|
||||
set nomod
|
||||
endif
|
||||
|
||||
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
||||
set lz
|
||||
" call Decho(" --- end of dependency checking loop --- ")
|
||||
" call Decho("call GetOneScript on lines at end of datafile<".datafile.">")
|
||||
1
|
||||
/^-----/,$g/^\s*\d/call <SID>GetOneScript()
|
||||
|
||||
" Final report (an echomsg)
|
||||
try
|
||||
silent! ?^-------?
|
||||
catch /^Vim\%((\a\+)\)\=:E114/
|
||||
" call Dret("GetLatestVimScripts : nothing done!")
|
||||
return
|
||||
endtry
|
||||
exe "norm! kz\<CR>"
|
||||
let s:msg = ""
|
||||
if s:downloads == 1
|
||||
let s:msg = "Downloaded one updated script to <".datadir.">"
|
||||
elseif s:downloads == 2
|
||||
let s:msg= "Downloaded two updated scripts to <".datadir.">"
|
||||
elseif s:downloads > 1
|
||||
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
|
||||
else
|
||||
let s:msg= "Everything was already current"
|
||||
endif
|
||||
if s:downerrors > 0
|
||||
let s:msg= s:msg." (".s:downerrors." downloading errors)"
|
||||
endif
|
||||
echomsg s:msg
|
||||
" save the file
|
||||
if &mod
|
||||
wq
|
||||
else
|
||||
q
|
||||
endif
|
||||
|
||||
" restore events and current directory
|
||||
exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
|
||||
let &ei= eikeep
|
||||
set nolz
|
||||
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
|
||||
endfun
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
" Restore Options: {{{1
|
||||
let &fo = s:keepfo
|
||||
let &cpo= s:keepcpo
|
||||
|
||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
||||
109
runtime/plugin/matchparen.vim
Normal file
109
runtime/plugin/matchparen.vim
Normal file
@@ -0,0 +1,109 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Mar 14
|
||||
|
||||
" 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
|
||||
|
||||
let cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
" 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
|
||||
|
||||
" Avoid that we remove the popup menu.
|
||||
if pumvisible()
|
||||
return
|
||||
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
|
||||
|
||||
let &cpo = cpo_save
|
||||
@@ -47,16 +47,17 @@ 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 BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.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
|
||||
com! -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<f-args>)<bar>call netrw#NetRestorePosn()
|
||||
com! -count=1 -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetRestorePosn()
|
||||
com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()
|
||||
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
|
||||
com! -nargs=+ Ncopy call netrw#NetObtain(<f-args>)
|
||||
|
||||
" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2
|
||||
com! -nargs=? -bar -bang -count=0 Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
|
||||
@@ -90,8 +91,8 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwStatusLine: {{{1
|
||||
fun! NetrwStatusLine()
|
||||
" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr(".")." Xline#".w:netrw_explore_line." line#".line(".")
|
||||
if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr(".") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
|
||||
" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".")
|
||||
if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
|
||||
let &stl= s:netrw_explore_stl
|
||||
if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
|
||||
if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
|
||||
|
||||
30
runtime/plugin/vimballPlugin.vim
Normal file
30
runtime/plugin/vimballPlugin.vim
Normal file
@@ -0,0 +1,30 @@
|
||||
" vimball : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
" (see |copyright|) except use "Vimball" instead of "Vim".
|
||||
" No warranty, express or implied.
|
||||
" *** *** Use At-Your-Own-Risk! *** ***
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -ra -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
|
||||
com! -na=0 UseVimball call vimball#Vimball(1)
|
||||
com! -na=0 VimballList call vimball#Vimball(0)
|
||||
au BufReadPost *.vba echohl WarningMsg | echo "Source this file to extract it! (:so %)" | echohl None
|
||||
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
@@ -1,8 +1,8 @@
|
||||
*** af_ZA.orig.aff Sun Aug 14 17:37:01 2005
|
||||
--- af_ZA.aff Sun Aug 14 17:38:11 2005
|
||||
--- af_ZA.aff Sun Jan 22 14:21:54 2006
|
||||
***************
|
||||
*** 23,24 ****
|
||||
--- 23,34 ----
|
||||
--- 23,33 ----
|
||||
|
||||
+ 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>
|
||||
@@ -12,11 +12,10 @@
|
||||
+ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
|
||||
+
|
||||
+ MIDWORD '-
|
||||
+ SLASH ,
|
||||
+
|
||||
MAP 3
|
||||
*** af_ZA.orig.dic Sun Aug 14 17:37:01 2005
|
||||
--- af_ZA.dic Sun Aug 14 17:38:54 2005
|
||||
--- af_ZA.dic Sun Jan 22 14:22:17 2006
|
||||
***************
|
||||
*** 1861,1864 ****
|
||||
T-skyf
|
||||
@@ -25,8 +24,8 @@
|
||||
TLA
|
||||
--- 1861,1864 ----
|
||||
T-skyf
|
||||
! TCP,IP
|
||||
! TCP,IP-bondel
|
||||
! TCP\/IP
|
||||
! TCP\/IP-bondel
|
||||
TLA
|
||||
***************
|
||||
*** 124109,124111 ****
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** ca_ES.orig.aff Sat Aug 13 18:33:44 2005
|
||||
--- ca_ES.aff Sat Aug 13 18:33:44 2005
|
||||
--- ca_ES.aff Tue Jan 10 18:06:05 2006
|
||||
***************
|
||||
*** 44,48 ****
|
||||
|
||||
@@ -31,7 +31,14 @@
|
||||
! REP l<>l l
|
||||
|
||||
*** ca_ES.orig.dic Sat Aug 13 18:33:44 2005
|
||||
--- ca_ES.dic Sat Aug 13 18:33:44 2005
|
||||
--- ca_ES.dic Thu Jan 12 21:55:39 2006
|
||||
***************
|
||||
*** 1,2 ****
|
||||
! 149661
|
||||
a/VY
|
||||
--- 1,2 ----
|
||||
! 149665
|
||||
a/VY
|
||||
***************
|
||||
*** 25312,25314 ****
|
||||
caos/E
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
" Last Update: 2006 Jan 19
|
||||
|
||||
" Time in seconds after last time an ll.xxxxx.add file was updated
|
||||
" Default is one hour.
|
||||
" Default is one second.
|
||||
" If you invoke this script often set it to something bigger, e.g. 60 * 60
|
||||
" (one hour)
|
||||
if !exists("g:spell_clean_limit")
|
||||
let g:spell_clean_limit = 60 * 60
|
||||
let g:spell_clean_limit = 1
|
||||
endif
|
||||
|
||||
" Loop over all the runtime/spell/*.add files.
|
||||
" Delete all comment lines, except the ones starting with ##.
|
||||
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, ' \')
|
||||
silent exe "tab split " . escape(s:fname, ' \')
|
||||
echo "Processing" s:fname
|
||||
silent! g/^#/d
|
||||
silent! g/^#[^#]/d
|
||||
silent update
|
||||
close
|
||||
endif
|
||||
|
||||
@@ -501,3 +501,14 @@
|
||||
+ SAL ZUR<55>CK^^ ZURIK
|
||||
+ SAL ZUVER^^ ZUFA # x
|
||||
+ SAL Z Z
|
||||
*** de_19.orig.dic Thu Aug 25 11:22:08 2005
|
||||
--- de_19.dic Sat Jan 7 12:32:09 2006
|
||||
***************
|
||||
*** 76258,76259 ****
|
||||
zynismusf<73>rdernd/A
|
||||
! zzgl
|
||||
\ No newline at end of file
|
||||
--- 76258,76260 ----
|
||||
zynismusf<73>rdernd/A
|
||||
! zzgl
|
||||
!
|
||||
|
||||
@@ -523,3 +523,11 @@
|
||||
+ SAL ZUR<55>CK^^ ZURIK
|
||||
+ SAL ZUVER^^ ZUFA # x
|
||||
+ SAL Z Z
|
||||
*** de_20.orig.dic Sat Nov 26 19:59:53 2005
|
||||
--- de_20.dic Mon Jan 2 20:19:18 2006
|
||||
***************
|
||||
*** 1,3 ****
|
||||
314626
|
||||
- 23394
|
||||
A-Bombe/N
|
||||
--- 1,2 ----
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user