Compare commits

..

11 Commits

Author SHA1 Message Date
Bram Moolenaar
779b74b2a2 updated for version 7.0d 2006-04-10 14:55:34 +00:00
Bram Moolenaar
c6fe919573 updated for version 7.0c13 2006-04-09 21:54:49 +00:00
Bram Moolenaar
61660eadce updated for version 7.0c12 2006-04-07 21:40:07 +00:00
Bram Moolenaar
5555acc08e updated for version 7.0c12 2006-04-07 21:33:12 +00:00
Bram Moolenaar
7b89edc62d updated for version 7.0c11 2006-04-06 20:21:51 +00:00
Bram Moolenaar
8dff818edf updated for version 7.0c11 2006-04-06 20:18:50 +00:00
Bram Moolenaar
910f66f90c updated for version 7.0c10 2006-04-05 20:41:53 +00:00
Bram Moolenaar
e2f98b95c8 updated for version 7.0c03 2006-03-29 21:18:24 +00:00
Bram Moolenaar
86ca6e3b8c updated for version 7.0c03 2006-03-29 21:06:37 +00:00
Bram Moolenaar
d2cec5b043 updated for version 7.0c02 2006-03-28 21:08:56 +00:00
Bram Moolenaar
607a95ed81 updated for version 7.0c02 2006-03-28 20:57:42 +00:00
292 changed files with 15575 additions and 3703 deletions

View File

@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
messages, shows current file name in window title, on-line
help, rectangular cut/paste, etc., etc., etc...
Version 7.0c. Also runs under UNIX, MSDOS and other systems.
vim70crt.tgz contains the documentation and syntax files.
vim70cbin.tgz contains the binaries.
vim70csrc.tgz contains the sources.
Version 7.0d. Also runs under UNIX, MSDOS and other systems.
vim70drt.tgz contains the documentation and syntax files.
vim70dbin.tgz contains the binaries.
vim70dsrc.tgz contains the sources.
Author: Bram Moolenaar et al.

View File

@@ -361,7 +361,7 @@ SRC_MAC = \
src/INSTALLmac.txt \
src/dehqx.py \
src/gui_mac.c \
src/gui_mac.icns \
src/os_mac_rsrc/*.icns \
src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac_conv.c \
@@ -521,7 +521,6 @@ RT_SCRIPTS = \
# Unix runtime
RT_UNIX = \
README_unix.txt \
runtime/KVim.desktop \
runtime/hi16-action-make.png \
runtime/hi22-action-make.png \
runtime/vim16x16.png \

View File

@@ -69,7 +69,7 @@ all install uninstall tools config configure proto depend lint tags types test t
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7
MINOR = 0c
MINOR = 0d
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
@@ -159,6 +159,7 @@ DOSBIN_S = dosbin_s
# - The produced uninstalw32.exe and vimrun.exe are used.
# Create the archives:
# - Copy all the "*.exe" files to where this Makefile is.
# - Copy all the "*.pdb" files to the dist directory.
# - "make dosbin".
# - Run make on Unix to update the ".mo" files.
# - "make doslang".

View File

@@ -1,4 +1,4 @@
README.txt for version 7.0c of Vim: Vi IMproved.
README.txt for version 7.0d of Vim: Vi IMproved.
WHAT IS VIM

View File

@@ -1,4 +1,4 @@
README_ami.txt for version 7.0c of Vim: Vi IMproved.
README_ami.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_amibin.txt for version 7.0c of Vim: Vi IMproved.
README_amibin.txt for version 7.0d of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.

View File

@@ -1,4 +1,4 @@
README_amisrc.txt for version 7.0c of Vim: Vi IMproved.
README_amisrc.txt for version 7.0d of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.

View File

@@ -1,4 +1,4 @@
README_bindos.txt for version 7.0c of Vim: Vi IMproved.
README_bindos.txt for version 7.0d of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.

View File

@@ -1,4 +1,4 @@
README_dos.txt for version 7.0c of Vim: Vi IMproved.
README_dos.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_extra.txt for version 7.0c of Vim: Vi IMproved.
README_extra.txt for version 7.0d of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-6.0-src.tar.gz). The extra archive is useless without it.

View File

@@ -1,4 +1,4 @@
README_lang.txt for version 7.0c of Vim: Vi IMproved.
README_lang.txt for version 7.0d of Vim: Vi IMproved.
This file contains files for non-English languages:
- Translated messages.

View File

@@ -1,4 +1,4 @@
README_mac.txt for version 7.0c of Vim: Vi IMproved.
README_mac.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on Macintosh systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_ole.txt for version 7.0c of Vim: Vi IMproved.
README_ole.txt for version 7.0d of Vim: Vi IMproved.
This archive contains gvim.exe with OLE interface and VisVim.
This version of gvim.exe can also load a number of interface dynamically (you

View File

@@ -1,4 +1,4 @@
README_os2.txt for version 7.0c of Vim: Vi IMproved.
README_os2.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_os_390.txt for version 7.0c of Vim: Vi IMproved.
README_os_390.txt for version 7.0d of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.

View File

@@ -1,4 +1,4 @@
README_src.txt for version 7.0c of Vim: Vi IMproved.
README_src.txt for version 7.0d of Vim: Vi IMproved.
The source archive contains the files needed to compile Vim on Unix systems.
It is packed for Unix systems (NL line separator). It is also used for other

View File

@@ -1,4 +1,4 @@
README_srcdos.txt for version 7.0c of Vim: Vi IMproved.
README_srcdos.txt for version 7.0d of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.

View File

@@ -1,4 +1,4 @@
README_unix.txt for version 7.0c of Vim: Vi IMproved.
README_unix.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_vms.txt for version 7.0c of Vim: Vi IMproved.
README_vms.txt for version 7.0d of Vim: Vi IMproved.
This file explains the installation of Vim on VMS systems.
See "README.txt" in the runtime archive for information about Vim.

View File

@@ -1,4 +1,4 @@
README_w32s.txt for version 7.0c of Vim: Vi IMproved.
README_w32s.txt for version 7.0d of Vim: Vi IMproved.
This archive contains the gvim.exe that was specifically compiled for use in
the Win32s subsystem in MS-Windows 3.1 and 3.11.

View File

@@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
!define VER_MINOR 0c
!define VER_MINOR 0d
# ----------- No configurable settings below this line -----------

View File

@@ -1,44 +0,0 @@
# KDE Config File
[Desktop Entry]
Type=Application
Exec=kvim -f %F
Icon=kvim
MiniIcon=kvim
DocPath=kvim/index.html
Comment=
Comment[xx]=xx
Terminal=0
Name=KVim
Name[eo]=VIM-fasado
Name[sv]=Kvim
Name[xx]=xx
Comment=Text Editor
Comment[ar]=محرر نصوص
Comment[bg]=Текст Редактор
Comment[de]=Texteditor
Comment[el]=Διορθωτής Κειμένου
Comment[eo]=Tekstredaktilo
Comment[et]=Tekstiredaktor
Comment[eu]=Testu Editorea
Comment[fi]=Tekstieditori
Comment[he]=עורך טקסט
Comment[is]=Textaritill
Comment[ja]=テキストエディタ
Comment[lt]=Teksto redaktorius
Comment[mt]=Editur tat-test
Comment[pt_BR]=Editor de Texto
Comment[ro]=Editor de text
Comment[ru]=редактор
Comment[sk]=Textový editor
Comment[sl]=Urejevalnik besedil
Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
Comment[tr]=Metin Düzenleyici
Comment[uk]=Редактор текстів
Comment[vi]=Trình soạn văn bản
Comment[xx]=xx
Comment[zh_CN]=文本编辑器
Comment[zh_TW]=文字編輯器
MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt
X-KDE-StartupNotify=true
X-KDE-AuthorizeAction=shell access

View File

@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 26
" Last Change: 2006 Mar 31
" These functions are used by the gzip plugin.
@@ -84,9 +84,14 @@ fun gzip#read(cmd)
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
execute "silent lockmarks " . l . "r " . tmp
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
else
execute "silent lockmarks " . l . "r " . tmp
endif
else
execute "silent " . l . "r " . tmp
endif

View File

@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION
" Date: Mar 22, 2006
" Version: 83
" Date: Apr 06, 2006
" Version: 86
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v83"
let g:loaded_netrw = "v86"
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish
@@ -404,8 +404,9 @@ fun! netrw#NetRead(mode,...)
call s:NetMethod(choice)
" Check if NetBrowse() should be handling this request
" call Decho("checking if netlist: choice<".choice."> netrw_list_cmd<".g:netrw_list_cmd.">")
" call Decho("checking if NetBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
if choice =~ "^.*[\/]$"
" call Decho("yes, choice matches '^.*[\/]$'")
keepjumps call s:NetBrowse(choice)
" call Dret("NetRead")
return
@@ -456,7 +457,7 @@ fun! netrw#NetRead(mode,...)
" ftp + <.netrc>: NetRead Method #2 {{{3
elseif b:netrw_method == 2 " read with ftp + <.netrc>
" call Decho("read via ftp+.netrc (method #2)")
let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
let netrw_fname= b:netrw_fname
new
setlocal ff=unix
exe "put ='".g:netrw_ftpmode."'"
@@ -780,7 +781,7 @@ fun! s:NetGetFile(readcmd, tfile, method)
" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
call NetReadFixup(a:method, line1, line2)
" else " Decho
" call Decho("NetReadFixup() not called, doesn't exist")
" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")")
endif
" update the Buffers menu
@@ -1239,7 +1240,6 @@ fun! s:NetBrowse(dirname)
exe "silent doau BufReadPre ".fname
silent call netrw#NetRead(2,method."://".user.machine."/".path)
exe "silent doau BufReadPost ".fname
keepjumps 1d
" save certain window-oriented variables into buffer-oriented variables
call s:SetBufWinVars()
@@ -1352,7 +1352,7 @@ fun! s:NetBrowse(dirname)
endif
let w:netrw_bannercnt= w:netrw_bannercnt + 1
endif
keepjumps put ='\" Quick Help: ?:help -:go up dir D:delete R:rename s:sort-by x:exec'
keepjumps put ='\" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec'
keepjumps put ='\" ==========================================================================='
" remote read the requested directory listing
@@ -2943,7 +2943,7 @@ fun! netrw#DirBrowse(dirname)
endif
let w:netrw_bannercnt= w:netrw_bannercnt + 1
endif
keepjumps put ='\" Quick Help: ?:help -:go up dir D:delete R:rename s:sort-by x:exec'
keepjumps put ='\" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec'
keepjumps put ='\" ============================================================================'
let w:netrw_bannercnt= w:netrw_bannercnt + 2
@@ -3387,6 +3387,7 @@ fun! s:LocalFastBrowser()
au!
au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()
augroup END
endif
" user must have changed fastbrowse to its fast setting, so remove
" the associated autocmd events
@@ -4097,7 +4098,12 @@ fun! s:SetSort()
let priority = priority + 1
endwhile
exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
" I'm afraid that I don't remember why the following line was present. It
" has something to do with priority -- items that satisfy a two or more
" priority patterns get preceded by two or more priority patterns: ###/
" So, I want to remove priority patterns, but not ###/ directory names.
" Following pattern retains just one priority pattern.
exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+\ze./\1/e'
" call Dret("SetSort")
endfun

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Mar ---
" Last Change: 2006 Apr 05
"
" TODO:
" - Class aware completion:
@@ -47,400 +47,594 @@ function! phpcomplete#CompletePHP(findstart, base)
" We can be also inside of phpString with HTML tags. Deal with
" it later (time, not lines).
endif
else
" If exists b:php_menu it means completion was already constructed we
" don't need to do anything more
if exists("b:php_menu")
return b:php_menu
endif
" Initialize base return lists
let res = []
" a:base is very short - we need context
if exists("b:compl_context")
let context = b:compl_context
unlet! b:compl_context
endif
if !exists('g:php_builtin_functions')
call phpcomplete#LoadData()
endif
endif
" If exists b:php_menu it means completion was already constructed we
" don't need to do anything more
if exists("b:php_menu")
return b:php_menu
endif
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
if exists("b:compl_context")
let context = b:compl_context
unlet! b:compl_context
endif
let scontext = substitute(context,
\ '\$\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*$', '', '')
if !exists('g:php_builtin_functions')
call phpcomplete#LoadData()
endif
if scontext =~ '\(=\s*new\|extends\)\s\+$'
" Complete class name
" Internal solution for finding classes in current file.
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'class\s\+')
let int_classes = {}
for i in int_values
let c_name = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
if c_name != ''
let int_classes[c_name] = ''
endif
endfor
let scontext = substitute(context, '\$\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*$', '', '')
" Prepare list of functions from tags file
let ext_classes = {}
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" [:space:] thing: we don't have to be so strict when
" dealing with tags files - entries there were already
" checked by ctags.
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_classes[item] = ''
endfor
if scontext =~ '\(=\s*new\|extends\)\s\+$'
" Complete class name
" Internal solution for finding classes in current file.
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'class\s\+')
let int_classes = {}
for i in int_values
let c_name = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
if c_name != ''
let int_classes[c_name] = ''
endif
endfor
call extend(int_classes, ext_classes)
for m in sort(keys(int_classes))
if m =~ '^'.a:base
call add(res, m)
endif
" Prepare list of functions from tags file
let ext_classes = {}
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" [:space:] thing: we don't have to be so strict when
" dealing with tags files - entries there were already
" checked by ctags.
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_classes[item] = ''
endfor
endif
let int_list = res
call extend(int_classes, ext_classes)
let final_menu = []
for i in int_list
let final_menu += [{'word':i, 'kind':'c'}]
endfor
for m in sort(keys(int_classes))
if m =~ '^'.a:base
call add(res, m)
endif
endfor
return final_menu
let int_list = res
elseif scontext =~ '\(->\|::\)$'
" Complete user functions and variables
" Internal solution for current file.
" That seems as unnecessary repeating of functions but there are
" few not so subtle differences as not appending of $ and addition
" of 'kind' tag (not necessary in regular completion)
if a:base =~ '^\$'
let adddollar = '$'
let final_menu = []
for i in int_list
let final_menu += [{'word':i, 'kind':'c'}]
endfor
return final_menu
elseif scontext =~ '\(->\|::\)$'
" Complete user functions and variables
" Internal solution for current file.
" That seems as unnecessary repeating of functions but there are
" few not so subtle differences as not appending of $ and addition
" of 'kind' tag (not necessary in regular completion)
if scontext =~ '->$' && scontext !~ '\$this->$'
" Get name of the class
let classname = phpcomplete#GetClassName(scontext)
" Get location of class definition, we have to iterate through all
" tags files separately because we need relative path from current
" file to the exact file (tags file can be in different dir)
if classname != ''
let classlocation = phpcomplete#GetClassLocation(classname)
else
let adddollar = ''
let classlocation = ''
endif
let file = getline(1, '$')
let jfile = join(file, ' ')
let sfile = split(jfile, '\$')
let int_vars = {}
for i in sfile
if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->'
else
let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
endif
if val !~ ''
let int_vars[adddollar.val] = ''
endif
endfor
" ctags has good support for PHP, use tags file for external
" variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
" Add -> if it is possible object declaration
let classname = ''
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let classname = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
let classcontent .= "\n".phpcomplete#GetClassContents(classfile, classname)
let sccontent = split(classcontent, "\n")
" YES, YES, YES! - we have whole content including extends!
" Now we need to get two elements: public functions and public
" vars
" NO, NO, NO! - third separate filtering looking for content
" :(, but all of them have differences. To squeeze them into
" one implementation would require many additional arguments
" and ifs. No good solution
" Functions declared with public keyword or without any
" keyword are public
let functions = filter(deepcopy(sccontent),
\ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"')
let jfuncs = join(functions, ' ')
let sfuncs = split(jfuncs, 'function\s\+')
let c_functions = {}
for i in sfuncs
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{')
if f_name != ''
let c_functions[f_name.'('] = f_args
endif
let ext_vars[adddollar.item] = classname
endfor
endif
" Now we have all variables in int_vars dictionary
call extend(int_vars, ext_vars)
" Internal solution for finding functions in current file.
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{')
let int_functions[f_name.'('] = f_args
endfor
" Prepare list of functions from tags file
let ext_functions = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
endif
let all_values = {}
call extend(all_values, int_functions)
call extend(all_values, ext_functions)
call extend(all_values, int_vars) " external variables are already in
call extend(all_values, g:php_builtin_object_functions)
for m in sort(keys(all_values))
if m =~ '\(^\|::\)'.a:base
call add(res, m)
endif
endfor
let start_list = res
let final_list = []
for i in start_list
if has_key(int_vars, i)
let class = ' '
if all_values[i] != ''
let class = i.' class '
" Variables declared with var or with public keyword are
" public
let variables = filter(deepcopy(sccontent),
\ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"')
let jvars = join(variables, ' ')
let svars = split(jvars, '\$')
let c_variables = {}
for i in svars
let c_var = matchstr(i,
\ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if c_var != ''
let c_variables[c_var] = ''
endif
let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}]
else
let final_list +=
\ [{'word':substitute(i, '.*::', '', ''),
\ 'info':i.all_values[i],
\ 'kind':'f'}]
endif
endfor
endfor
let all_values = {}
call extend(all_values, c_functions)
call extend(all_values, c_variables)
call extend(all_values, g:php_builtin_object_functions)
for m in sort(keys(all_values))
if m =~ '^'.a:base && m !~ '::'
call add(res, m)
elseif m =~ '::'.a:base
call add(res2, m)
endif
endfor
let start_list = res + res2
let final_list = []
for i in start_list
if has_key(c_variables, i)
let class = ' '
if all_values[i] != ''
let class = i.' class '
endif
let final_list +=
\ [{'word':i,
\ 'info':class.all_values[i],
\ 'kind':'v'}]
else
let final_list +=
\ [{'word':substitute(i, '.*::', '', ''),
\ 'info':i.all_values[i].')',
\ 'kind':'f'}]
endif
endfor
return final_list
endif
return final_list
endif
if a:base =~ '^\$'
" Complete variables
" Built-in variables {{{
let g:php_builtin_vars = {'$GLOBALS':'',
\ '$_SERVER':'',
\ '$_GET':'',
\ '$_POST':'',
\ '$_COOKIE':'',
\ '$_FILES':'',
\ '$_ENV':'',
\ '$_REQUEST':'',
\ '$_SESSION':'',
\ '$HTTP_SERVER_VARS':'',
\ '$HTTP_ENV_VARS':'',
\ '$HTTP_COOKIE_VARS':'',
\ '$HTTP_GET_VARS':'',
\ '$HTTP_POST_VARS':'',
\ '$HTTP_POST_FILES':'',
\ '$HTTP_SESSION_VARS':'',
\ '$php_errormsg':'',
\ '$this':''
\ }
" }}}
" Internal solution for current file.
let file = getline(1, '$')
let jfile = join(file, ' ')
let int_vals = split(jfile, '\ze\$')
let int_vars = {}
for i in int_vals
if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->'
else
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
endif
if val != ''
let int_vars[val] = ''
endif
endfor
call extend(int_vars,g:php_builtin_vars)
" ctags has good support for PHP, use tags file for external
" variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
let m_menu = ''
" Add -> if it is possible object declaration
" How to detect if previous line is help line?
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let m_menu = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[item] = m_menu
endfor
endif
call extend(int_vars, ext_vars)
let g:a0 = keys(int_vars)
for m in sort(keys(int_vars))
if m =~ '^\'.a:base
call add(res, m)
endif
endfor
let int_list = res
let int_dict = []
for i in int_list
if int_vars[i] != ''
let class = ' '
if int_vars[i] != ''
let class = i.' class '
endif
let int_dict += [{'word':i, 'info':class.int_vars[i], 'kind':'v'}]
else
let int_dict += [{'word':i, 'kind':'v'}]
endif
endfor
return int_dict
let adddollar = '$'
else
" Complete everything else -
" + functions, DONE
" + keywords of language DONE
" + defines (constant definitions), DONE
" + extend keywords for predefined constants, DONE
" + classes (after new), DONE
" + limit choice after -> and :: to funcs and vars DONE
" Internal solution for finding functions in current file.
let file = getline(1, '$')
call filter(file, 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\s*\zs.\{-}\ze\s*)\_s*{')
let int_functions[f_name.'('] = f_args.')'
endfor
" Prepare list of functions from tags file
let ext_functions = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
let adddollar = ''
endif
let file = getline(1, '$')
let jfile = join(file, ' ')
let sfile = split(jfile, '\$')
let int_vars = {}
for i in sfile
if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->'
else
let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
endif
" All functions
call extend(int_functions, ext_functions)
call extend(int_functions, g:php_builtin_functions)
" Internal solution for finding constants in current file
let file = getline(1, '$')
call filter(file, 'v:val =~ "define\\s*("')
let jfile = join(file, ' ')
let int_values = split(jfile, 'define\s*(\s*')
let int_constants = {}
for i in int_values
let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1')
" let c_value = matchstr(i,
" \ '\(["'']\)[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\1\s*,\s*\zs.\{-}\ze\s*)')
if c_name != ''
let int_constants[c_name] = '' " c_value
endif
endfor
" Prepare list of constants from tags file
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_constants = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_constants[item] = ''
endfor
if val !~ ''
let int_vars[adddollar.val] = ''
endif
" All constants
call extend(int_constants, ext_constants)
" Treat keywords as constants
let all_values = {}
" One big dictionary of functions
call extend(all_values, int_functions)
" Add constants
call extend(all_values, int_constants)
" Add keywords
call extend(all_values, b:php_keywords)
for m in sort(keys(all_values))
if m =~ '^'.a:base
call add(res, m)
endfor
" ctags has good support for PHP, use tags file for external
" variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
" Add -> if it is possible object declaration
let classname = ''
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let classname = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[adddollar.item] = classname
endfor
let int_list = res
let final_list = []
for i in int_list
if has_key(int_functions, i)
let final_list +=
\ [{'word':i,
\ 'info':i.int_functions[i],
\ 'kind':'f'}]
elseif has_key(int_constants, i)
let final_list += [{'word':i, 'kind':'d'}]
else
let final_list += [{'word':i}]
endif
endfor
return final_list
endif
" Now we have all variables in int_vars dictionary
call extend(int_vars, ext_vars)
" Internal solution for finding functions in current file.
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{')
let int_functions[f_name.'('] = f_args.')'
endfor
" Prepare list of functions from tags file
let ext_functions = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
endif
let all_values = {}
call extend(all_values, int_functions)
call extend(all_values, ext_functions)
call extend(all_values, int_vars) " external variables are already in
call extend(all_values, g:php_builtin_object_functions)
for m in sort(keys(all_values))
if m =~ '\(^\|::\)'.a:base
call add(res, m)
endif
endfor
let start_list = res
let final_list = []
for i in start_list
if has_key(int_vars, i)
let class = ' '
if all_values[i] != ''
let class = i.' class '
endif
let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}]
else
let final_list +=
\ [{'word':substitute(i, '.*::', '', ''),
\ 'info':i.all_values[i],
\ 'kind':'f'}]
endif
endfor
return final_list
endif
if a:base =~ '^\$'
" Complete variables
" Built-in variables {{{
let g:php_builtin_vars = {'$GLOBALS':'',
\ '$_SERVER':'',
\ '$_GET':'',
\ '$_POST':'',
\ '$_COOKIE':'',
\ '$_FILES':'',
\ '$_ENV':'',
\ '$_REQUEST':'',
\ '$_SESSION':'',
\ '$HTTP_SERVER_VARS':'',
\ '$HTTP_ENV_VARS':'',
\ '$HTTP_COOKIE_VARS':'',
\ '$HTTP_GET_VARS':'',
\ '$HTTP_POST_VARS':'',
\ '$HTTP_POST_FILES':'',
\ '$HTTP_SESSION_VARS':'',
\ '$php_errormsg':'',
\ '$this':''
\ }
" }}}
" Internal solution for current file.
let file = getline(1, '$')
let jfile = join(file, ' ')
let int_vals = split(jfile, '\ze\$')
let int_vars = {}
for i in int_vals
if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->'
else
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
endif
if val != ''
let int_vars[val] = ''
endif
endfor
call extend(int_vars,g:php_builtin_vars)
" ctags has support for PHP, use tags file for external variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
let m_menu = ''
" Add -> if it is possible object declaration
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let m_menu = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[item] = m_menu
endfor
endif
call extend(int_vars, ext_vars)
let g:a0 = keys(int_vars)
for m in sort(keys(int_vars))
if m =~ '^\'.a:base
call add(res, m)
endif
endfor
let int_list = res
let int_dict = []
for i in int_list
if int_vars[i] != ''
let class = ' '
if int_vars[i] != ''
let class = i.' class '
endif
let int_dict += [{'word':i, 'info':class.int_vars[i], 'kind':'v'}]
else
let int_dict += [{'word':i, 'kind':'v'}]
endif
endfor
return int_dict
else
" Complete everything else -
" + functions, DONE
" + keywords of language DONE
" + defines (constant definitions), DONE
" + extend keywords for predefined constants, DONE
" + classes (after new), DONE
" + limit choice after -> and :: to funcs and vars DONE
" Internal solution for finding functions in current file.
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\s*\zs.\{-}\ze\s*)\_s*{')
let int_functions[f_name.'('] = f_args.')'
endfor
" Prepare list of functions from tags file
let ext_functions = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
endif
" All functions
call extend(int_functions, ext_functions)
call extend(int_functions, g:php_builtin_functions)
" Internal solution for finding constants in current file
let file = getline(1, '$')
call filter(file, 'v:val =~ "define\\s*("')
let jfile = join(file, ' ')
let int_values = split(jfile, 'define\s*(\s*')
let int_constants = {}
for i in int_values
let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1')
" let c_value = matchstr(i,
" \ '\(["'']\)[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\1\s*,\s*\zs.\{-}\ze\s*)')
if c_name != ''
let int_constants[c_name] = '' " c_value
endif
endfor
" Prepare list of constants from tags file
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let ext_constants = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_constants[item] = ''
endfor
endif
" All constants
call extend(int_constants, ext_constants)
" Treat keywords as constants
let all_values = {}
" One big dictionary of functions
call extend(all_values, int_functions)
" Add constants
call extend(all_values, int_constants)
" Add keywords
call extend(all_values, g:php_keywords)
for m in sort(keys(all_values))
if m =~ '^'.a:base
call add(res, m)
endif
endfor
let int_list = res
let final_list = []
for i in int_list
if has_key(int_functions, i)
let final_list +=
\ [{'word':i,
\ 'info':i.int_functions[i],
\ 'kind':'f'}]
elseif has_key(int_constants, i)
let final_list += [{'word':i, 'kind':'d'}]
else
let final_list += [{'word':i}]
endif
endfor
return final_list
endif
endfunction
function! phpcomplete#GetClassName(scontext) " {{{
" Get class name
" Class name can be detected in few ways:
" @var $myVar class
" line above
" or line in tags file
let object = matchstr(a:scontext, '\zs[a-zA-Z_0-9\x7f-\xff]\+\ze->')
let i = 1
while i < line('.')
let line = getline(line('.')-i)
if line =~ '^\s*\*\/\?\s*$'
let i += 1
continue
else
if line =~ '@var\s\+\$'.object.'\s\+[a-zA-Z_0-9\x7f-\xff]\+'
let classname = matchstr(line, '@var\s\+\$'.object.'\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+')
return classname
else
break
endif
endif
endwhile
" OK, first way failed, now check tags file(s)
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
if len(qflist) == 0
return []
endif
" In all properly managed projects it should be one item list, even if it
" *is* longer we cannot solve conflicts, assume it is first element
let classname = matchstr(qflist[0]['text'], '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
return classname
endfunction
" }}}
function! phpcomplete#GetClassLocation(classname) " {{{
" Get class location
for fname in tagfiles()
let fhead = fnamemodify(fname, ":h")
if fhead != ''
let psep = '/'
let fhead .= psep
endif
let fname = escape(fname, " \\")
exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname
let qflist = getqflist()
" As in GetClassName we can manage only one element
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
" And only one class location
if classlocation != ''
let pset = '/' " Note: slash is potential problem!
let classlocation = fhead.classlocation
return classlocation
endif
endfor
endfunction
" }}}
function! phpcomplete#GetClassContents(file, name) " {{{
let cfile = join(a:file, "\n")
" We use new buffer and (later) normal! because
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
below 1new
0put =cfile
call search('class\s\+'.a:name)
let cfline = line('.')
" Catch extends
if getline('.') =~ 'extends'
let extends_class = matchstr(getline('.'),
\ 'class\s\+'.a:name.'\s\+extends\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
else
let extends_class = ''
endif
normal! %
let classc = getline(cfline, ".")
let classcontent = join(classc, "\n")
bw! %
if extends_class != ''
let classlocation = phpcomplete#GetClassLocation(extends_class)
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent .= "\n".phpcomplete#GetClassContents(classfile, extends_class)
endif
endif
return classcontent
endfunction
" }}}
function! phpcomplete#LoadData() " {{{
" Keywords/reserved words, all other special things {{{
" Later it is possible to add some help to values, or type of
" defined variable
let b:php_keywords = {
let g:php_keywords = {
\ 'PHP_SELF':'',
\ 'argv':'',
\ 'argc':'',

View File

@@ -0,0 +1,517 @@
" Vim completion script
" Language: SQL
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 2.0
" Last Change: Mon Apr 03 2006 10:21:36 PM
" Set completion with CTRL-X CTRL-O to autoloaded function.
" 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=sqlcomplete#Complete
endif
endif
if exists('g:loaded_sql_completion')
finish
endif
let g:loaded_sql_completion = 1
" Maintains filename of dictionary
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""
" Define various arrays to be used for caching
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
" Used in conjunction with the syntaxcomplete plugin
let s:save_inc = ""
let s:save_exc = ""
if exists('g:omni_syntax_group_include_sql')
let s:save_inc = g:omni_syntax_group_include_sql
endif
if exists('g:omni_syntax_group_exclude_sql')
let s:save_exc = g:omni_syntax_group_exclude_sql
endif
" Used with the column list
let s:save_prev_table = ""
" Default the option to verify table alias
if !exists('g:omni_sql_use_tbl_alias')
let g:omni_sql_use_tbl_alias = 'a'
endif
" Default syntax items to precache
if !exists('g:omni_sql_precache_syntax_groups')
let g:omni_sql_precache_syntax_groups = [
\ 'syntax',
\ 'sqlKeyword',
\ 'sqlFunction',
\ 'sqlOption',
\ 'sqlType',
\ 'sqlStatement'
\ ]
endif
" This function is used for the 'omnifunc' option.
function! sqlcomplete#Complete(findstart, base)
" Default to table name completion
let compl_type = 'table'
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
endif
" First pass through this function determines how much of the line should
" be replaced by whatever is chosen from the completion list
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w'
let start -= 1
elseif line[start - 1] =~ '\.' && compl_type =~ 'column'
" If the completion type is column then assume we are looking
" for column completion column_type can be either
" 'column' or 'column_csv'
if lastword == -1 && compl_type == 'column'
" Do not replace the table name prefix or alias
" if completing only a single column name
let lastword = start
endif
let start -= 1
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
endif
" Second pass through this function will determine what data to put inside
" of the completion list
" s:prepended is set by the first pass
let base = s:prepended . a:base
" Default the completion list to an empty list
let compl_list = []
" Default to table name completion
let compl_type = 'table'
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
unlet b:sql_compl_type
endif
if compl_type == 'tableReset'
let compl_type = 'table'
let base = ''
endif
if compl_type == 'table' ||
\ compl_type == 'procedure' ||
\ compl_type == 'view'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if s:sql_file_{compl_type} == ""
let compl_type = substitute(compl_type, '\w\+', '\u&', '')
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
let compl_list = readfile(s:sql_file_{compl_type})
endif
endif
elseif compl_type == 'column'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, '')
let s:save_prev_table = base
let base = ''
endif
elseif compl_type == 'column_csv'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, 'csv')
let s:save_prev_table = base
" Join the column array into 1 single element array
" but make the columns column separated
let compl_list = [join(compl_list, ', ')]
let base = ''
endif
elseif compl_type == 'resetCache'
" Reset all cached items
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
else
let compl_list = s:SQLCGetSyntaxList(compl_type)
endif
if base != ''
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val =~ "^'.base.'"'
let compl_list = filter(copy(compl_list), expr)
endif
if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != ""
let &omnifunc = b:sql_compl_savefunc
endif
return compl_list
endfunc
function! s:SQLCWarningMsg(msg)
echohl WarningMsg
echomsg a:msg
echohl None
endfunction
function! s:SQLCErrorMsg(msg)
echohl ErrorMsg
echomsg a:msg
echohl None
endfunction
function! sqlcomplete#PreCacheSyntax(...)
let syn_group_arr = []
if a:0 > 0
let syn_group_arr = a:1
else
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
if !empty(syn_group_arr)
for group_name in syn_group_arr
call s:SQLCGetSyntaxList(group_name)
endfor
endif
endfunction
function! sqlcomplete#Map(type)
" Tell the SQL plugin what you want to complete
let b:sql_compl_type=a:type
" Record previous omnifunc, if the SQL completion
" is being used in conjunction with other filetype
" completion plugins
if &omnifunc != "" && &omnifunc != 'sqlcomplete#Complete'
" Record the previous omnifunc, the plugin
" will automatically set this back so that it
" does not interfere with other ftplugins settings
let b:sql_compl_savefunc=&omnifunc
endif
" Set the OMNI func for the SQL completion plugin
let &omnifunc='sqlcomplete#Complete'
endfunction
function! s:SQLCGetSyntaxList(syn_group)
let syn_group = a:syn_group
let compl_list = []
" Check if we have already cached the syntax list
let list_idx = index(s:syn_list, syn_group, 0, &ignorecase)
if list_idx > -1
" Return previously cached value
let compl_list = s:syn_value[list_idx]
else
" Request the syntax list items from the
" syntax completion plugin
if syn_group == 'syntax'
" Handle this special case. This allows the user
" to indicate they want all the syntax items available,
" so do not specify a specific include list.
let g:omni_syntax_group_include_sql = ''
else
" The user has specified a specific syntax group
let g:omni_syntax_group_include_sql = syn_group
endif
let g:omni_syntax_group_exclude_sql = ''
let syn_value = OmniSyntaxList()
let g:omni_syntax_group_include_sql = s:save_inc
let g:omni_syntax_group_exclude_sql = s:save_exc
" Cache these values for later use
let s:syn_list = add( s:syn_list, syn_group )
let s:syn_value = add( s:syn_value, syn_value )
let compl_list = syn_value
endif
return compl_list
endfunction
function! s:SQLCCheck4dbext()
if !exists('g:loaded_dbext')
let msg = "The dbext plugin must be loaded for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
elseif g:loaded_dbext < 210
let msg = "The dbext plugin must be at least version 2.10 " .
\ " for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
endif
return 1
endfunction
function! s:SQLCAddAlias(table_name, table_alias, cols)
let table_name = a:table_name
let table_alias = a:table_alias
let cols = a:cols
if g:omni_sql_use_tbl_alias != 'n'
if table_alias == ''
if 'da' =~? g:omni_sql_use_tbl_alias
if table_name =~ '_'
" Treat _ as separators since people often use these
" for word separators
let save_keyword = &iskeyword
setlocal iskeyword-=_
" Get the first letter of each word
" [[:alpha:]] is used instead of \w
" to catch extended accented characters
"
let table_alias = substitute(
\ table_name,
\ '\<[[:alpha:]]\+\>_\?',
\ '\=strpart(submatch(0), 0, 1)',
\ 'g'
\ )
" Restore original value
let &iskeyword = save_keyword
elseif table_name =~ '\u\U'
let initials = substitute(
\ table_name, '\(\u\)\U*', '\1', 'g')
else
let table_alias = strpart(table_name, 0, 1)
endif
endif
endif
if table_alias != ''
" Following a word character, make sure there is a . and no spaces
let table_alias = substitute(table_alias, '\w\zs\.\?\s*$', '.', '')
if 'a' =~? g:omni_sql_use_tbl_alias && a:table_alias == ''
let table_alias = inputdialog("Enter table alias:", table_alias)
endif
endif
if table_alias != ''
let cols = substitute(cols, '\<\w', table_alias.'&', 'g')
endif
endif
return cols
endfunction
function! s:SQLCGetColumns(table_name, list_type)
let table_name = matchstr(a:table_name, '^\w\+')
let table_cols = []
let table_alias = ''
let move_to_top = 1
if g:loaded_dbext >= 210
let saveSettingAlias = DB_listOption('use_tbl_alias')
exec 'DBSetOption use_tbl_alias=n'
endif
" Check if we have already cached the column list for this table
" by its name
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
else
" Check if we have already cached the column list for this table
" by its alias, assuming the table_name provided was actually
" the alias for the table instead
" select *
" from area a
" where a.
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
if list_idx > -1
let table_alias = table_name
let table_name = s:tbl_name[list_idx]
let table_cols = split(s:tbl_cols[list_idx])
endif
endif
" If we have not found a cached copy of the table
" And the table ends in a "." or we are looking for a column list
" if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column')
" if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv')
if list_idx == -1
let saveY = @y
let saveSearch = @/
let saveWScan = &wrapscan
let curline = line(".")
let curcol = col(".")
" Do not let searchs wrap
setlocal nowrapscan
" If . was entered, look at the word just before the .
" We are looking for something like this:
" select *
" from customer c
" where c.
" So when . is pressed, we need to find 'c'
"
" Search backwards to the beginning of the statement
" and do NOT wrap
" exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy'
exec 'silent! normal! ?\<\(select\|update\|delete\|;\)\>'."\n"
" Start characterwise visual mode
" Advance right one character
" Search foward until one of the following:
" 1. Another select/update/delete statement
" 2. A ; at the end of a line (the delimiter)
" 3. The end of the file (incase no delimiter)
" Yank the visually selected text into the "y register.
exec 'silent! normal! vl/\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
let query = @y
let query = substitute(query, "\n", ' ', 'g')
let found = 0
" if query =~? '^\(select\|update\|delete\)'
if query =~? '^\(select\)'
let found = 1
" \(\(\<\w\+\>\)\.\)\? -
" 'from.\{-}' - Starting at the from clause
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
" '\<\w\+\>\ze' - Get the table name
" '\s\+\<'.table_name.'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
let table_name_new = matchstr(@y,
\ 'from.\{-}'.
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
\ '\<\w\+\>\ze'.
\ '\s\+\%(as\s\+\)\?\<'.table_name.'\>'.
\ '\s*\.\@!.*'.
\ '\(\<where\>\|$\)'.
\ '.*'
\ )
if table_name_new != ''
let table_alias = table_name
let table_name = table_name_new
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
else
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
endif
endif
endif
else
" Simply assume it is a table name provided with a . on the end
let found = 1
endif
let @y = saveY
let @/ = saveSearch
let &wrapscan = saveWScan
" Return to previous location
call cursor(curline, curcol)
if found == 0
if g:loaded_dbext > 201
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
" Not a SQL statement, do not display a list
return []
endif
endif
if empty(table_cols)
" Specify silent mode, no messages to the user (tbl, 1)
" Specify do not comma separate (tbl, 1, 1)
let table_cols_str = DB_getListColumn(table_name, 1, 1)
if table_cols_str != ""
let s:tbl_name = add( s:tbl_name, table_name )
let s:tbl_alias = add( s:tbl_alias, table_alias )
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
let table_cols = split(table_cols_str)
endif
endif
if g:loaded_dbext > 201
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
if a:list_type == 'csv' && !empty(table_cols)
let cols = join(table_cols, ', ')
let cols = s:SQLCAddAlias(table_name, table_alias, cols)
let table_cols = [cols]
endif
return table_cols
endfunction

View File

@@ -1,8 +1,8 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 1.2
" Last Change: Sat Mar 18 2006 8:25:30 PM
" Version: 1.3
" Last Change: Mon Mar 27 2006 9:29:35 PM
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
@@ -181,7 +181,7 @@ function! OmniSyntaxList()
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 extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
let syn_list = syn_list . extra_syn_list . "\n"
endif
@@ -212,7 +212,7 @@ function! OmniSyntaxList()
endif
endfunction
function! s:SyntaxGroupItems( group_name, syntax_full )
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
let syn_list = ""

View File

@@ -1,6 +1,6 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Dec 24, 2005
" Date: Mar 27, 2006
" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
@@ -25,6 +25,7 @@ if exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v7"
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
" Default Settings: {{{1
@@ -34,6 +35,9 @@ endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "OPxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
@@ -50,14 +54,15 @@ fun! tar#Browse(tarfile)
set report=10
" sanity checks
if !executable("tar")
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
if !executable(g:tar_cmd)
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
@@ -80,20 +85,33 @@ fun! tar#Browse(tarfile)
set ft=tar
" give header
" call Decho("printing header")
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
0d
$
if a:tarfile =~# '\.\(gz\|tgz\)$'
exe "silent r! gzip -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
elseif a:tarfile =~# '\.bz2$'
exe "silent r! bzip2 -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
else
exe "silent r! tar -".g:tar_browseoptions." '".a:tarfile."'"
let tarfile= a:tarfile
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
else
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'")
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'"
endif
if v:shell_error != 0
echohl Error | echo '***error*** (tar#Browse) while browsing; check your g:tar_browseoptions<".g:tar_browseoptions.">"
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
return
endif
silent %g@/$@d
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
@@ -121,12 +139,21 @@ fun! s:TarBrowseSelect()
" about to make a new window, need to use w:tarfile
let tarfile= w:tarfile
let curfile= expand("%")
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
new
wincmd _
let s:tblfile_{winnr()}= curfile
" call Decho("exe e tarfile:".tarfile.':'.fname)
exe "e tarfile:".tarfile.':'.fname
" if has("unix")
"" call Decho("exe e tarfile:".tarfile.':'.fname)
" exe "e tarfile:".tarfile.':'.fname
" elseif has("win32")
" call tar#Read("tarfile:".tarfile.':'.fname,1)
" endif
call tar#Read("tarfile:".tarfile.':'.fname,1)
filetype detect
let &report= repkeep
@@ -141,7 +168,12 @@ fun! tar#Read(fname,mode)
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
@@ -151,7 +183,7 @@ fun! tar#Read(fname,mode)
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
else
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
exe "silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'"
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." '".tarfile."' '".fname."'"
endif
let w:tarfile= a:fname
exe "file tarfile:".fname
@@ -172,8 +204,8 @@ fun! tar#Write(fname)
set report=10
" sanity checks
if !executable("tar")
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
if !executable(g:tar_cmd)
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")

View File

@@ -1,7 +1,7 @@
" vimball : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: Mar 22, 2006
" Version: 5
" Date: Mar 31, 2006
" Version: 6
" 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
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_vimball")
finish
endif
let s:keepcpo = &cpo
let g:loaded_vimball = "v5"
let g:loaded_vimball = "v6"
set cpo&vim
" =====================================================================
@@ -190,7 +190,7 @@ fun! vimball#Vimball(really)
" call Decho("yanked ".fsize." lines into register-a")
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
" call Decho("didhelp<".didhelp.">")
endif

View File

@@ -1,13 +1,13 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Mar 19
" Last Change: 2006 Mar 31
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
" descriptive to avoid any future conflicts. For example 'xhtml10s' should be
" name for data of XHTML 1.0 Strict and 'xhtml10t' for XHTML 1.0 Transitional
" User interface will be provided by XMLns command defined ...
" User interface will be provided by XMLns command defined in ftplugin/xml.vim
" Currently supported canonicals are:
" xhtml10s - XHTML 1.0 Strict
" xsl - XSL
@@ -224,8 +224,13 @@ function! xmlcomplete#CompleteTags(findstart, base)
let attrs = ['encoding', 'version="1.0"', 'version']
elseif tag =~ '^!'
" Don't make completion at all
"
return []
else
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag)
" Abandon when data file isn't complete
return []
endif
let attrs = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1])
endif
@@ -324,6 +329,10 @@ function! xmlcomplete#CompleteTags(findstart, base)
let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
call filter(tags, 'v:val !~ "^vimxml"')
else
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag)
" Abandon when data file isn't complete
return []
endif
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
endif

View File

@@ -75,11 +75,15 @@ fun! zip#Browse(zipfile)
0d
$
" call Decho("exe silent r! unzip -l '".escape(a:zipfile,s:zipfile_escape)."'")
exe "silent r! unzip -l ".escape(a:zipfile,s:zipfile_escape)
" call Decho("exe silent r! unzip -l '".a:zipfile."'")
exe "silent r! unzip -l '".a:zipfile."'"
" call Decho("line 6: ".getline(6))
let namecol= stridx(getline(6),'Name') + 1
" call Decho("namecol=".namecol)
4,$g/^\s*----/d
4,$g/^\s*\a/d
$d
silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
silent 4,$s/^\%(.*\)\s\+\(\S\)/\1/
exe 'silent 4,$s/^.*\%'.namecol.'c//'
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
@@ -114,15 +118,15 @@ fun! s:ZipBrowseSelect()
" get zipfile to the new-window
let zipfile= substitute(w:zipfile,'.zip$','','e')
let curfile= escape(expand("%"),s:zipfile_escape)
let curfile= expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
new
wincmd _
let s:zipfile_{winnr()}= curfile
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname)
exe "e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).':'.escape(fname,s:zipfile_escape))
exe "e zipfile:".escape(zipfile,s:zipfile_escape).':'.escape(fname,s:zipfile_escape)
filetype detect
let &report= repkeep
@@ -140,8 +144,8 @@ fun! zip#Read(fname,mode)
let fname = substitute(a:fname,'zipfile:.\{-}:\([^\\].*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">")
" call Decho("exe r! unzip -p '".escape(zipfile,s:zipfile_escape)."' ".fname)
exe "r! unzip -p ".escape(zipfile,s:zipfile_escape)." ".fname
" call Decho("exe r! unzip -p '".zipfile."' '".fname."'")
exe "silent r! unzip -p '".zipfile."' '".fname."'"
" cleanup
0d
@@ -154,7 +158,7 @@ endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
@@ -211,6 +215,7 @@ fun! zip#Write(fname)
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
endif
" call Decho("mkdir(dirpath<".dirpath.">,p)")
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
@@ -218,13 +223,13 @@ fun! zip#Write(fname)
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "w! ".fname
exe "w! ".escape(fname,s:zipfile_escape)
if executable("cygpath")
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
endif
" call Decho("zip -u ".zipfile.".zip ".fname)
call system("zip -u ".zipfile.".zip ".fname)
" call Decho("zip -u '".zipfile.".zip' '".fname."'")
call system("zip -u '".zipfile.".zip' '".fname."'")
if v:shell_error != 0
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()

55
runtime/colors/slate.vim Normal file
View File

@@ -0,0 +1,55 @@
"%% SiSU Vim color file
" Slate Maintainer: Ralph Amissah <ralph@amissah.com>
" (originally looked at desert Hans Fugal <hans@fugal.net> http://hans.fugal.net/vim/colors/desert.vim (2003/05/06 16:37:49)
:set background=dark
:highlight clear
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
:hi Normal guifg=White guibg=grey15
:hi Cursor guibg=khaki guifg=slategrey
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
:hi Folded guibg=black guifg=grey40 ctermfg=grey ctermbg=darkgrey
:hi FoldColumn guibg=black guifg=grey20 ctermfg=4 ctermbg=7
:hi IncSearch guifg=green guibg=black cterm=none ctermfg=yellow ctermbg=green
:hi ModeMsg guifg=goldenrod cterm=none ctermfg=brown
:hi MoreMsg guifg=SeaGreen ctermfg=darkgreen
:hi NonText guifg=RoyalBlue guibg=grey15 cterm=bold ctermfg=blue
:hi Question guifg=springgreen ctermfg=green
:hi Search guibg=peru guifg=wheat cterm=none ctermfg=grey ctermbg=blue
:hi SpecialKey guifg=yellowgreen ctermfg=darkgreen
:hi StatusLine guibg=#c2bfa5 guifg=black gui=none cterm=bold,reverse
:hi StatusLineNC guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
:hi Title guifg=gold gui=bold cterm=bold ctermfg=yellow
:hi Statement guifg=CornflowerBlue ctermfg=lightblue
:hi Visual gui=none guifg=khaki guibg=olivedrab cterm=reverse
:hi WarningMsg guifg=salmon ctermfg=1
:hi String guifg=SkyBlue ctermfg=darkcyan
:hi Comment term=bold ctermfg=11 guifg=#80a0ff
:hi Constant guifg=#ffa0a0 ctermfg=brown
:hi Special guifg=green ctermfg=brown
:hi Identifier guifg=salmon ctermfg=red
:hi Include guifg=red ctermfg=red
:hi PreProc guifg=red guibg=white ctermfg=red
:hi Operator guifg=Red ctermfg=Red
":hi Operator guifg=CornflowerBlue ctermfg=darkcyan
:hi Define guifg=gold gui=bold ctermfg=yellow
:hi Type guifg=darkkhaki ctermfg=2
:hi Function guifg=navajowhite ctermfg=brown
:hi LineNr guifg=grey50 ctermfg=3
:hi Ignore guifg=grey40 cterm=bold ctermfg=7
:hi Todo guifg=orangered guibg=yellow2
:hi Directory ctermfg=darkcyan
:hi ErrorMsg cterm=bold guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
:hi VisualNOS cterm=bold,underline
:hi WildMenu ctermfg=0 ctermbg=3
:hi DiffAdd ctermbg=4
:hi DiffChange ctermbg=5
:hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
:hi DiffText cterm=bold ctermbg=1
:hi Underlined cterm=underline ctermfg=5
:hi Error guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
:hi SpellErrors guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1

View File

@@ -1,4 +1,4 @@
*arabic.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*arabic.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Nadim Shaikli

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0c. Last change: 2006 Mar 15
*autocmd.txt* For Vim version 7.0d. Last change: 2006 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -506,10 +506,14 @@ FileChangedRO Before making the first change to a read-only
the change was caused by an autocommand.
This event is triggered when making the first
change in a buffer or the first change after
'readonly' was set,
just before the change is applied to the text.
'readonly' was set, just before the change is
applied to the text.
WARNING: If the autocommand moves the cursor
the effect of the change is undefined.
*E788*
It is not allowed to change to another buffer
here. You can reload the buffer but not edit
another one.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0c. Last change: 2006 Mar 16
*change.txt* For Vim version 7.0d. Last change: 2006 Apr 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1542,6 +1542,9 @@ found here: |sort()|.
< To sort on the text at virtual column 10 (thus
ignoring the difference between tabs and spaces): >
:sort /.*\%10v/
< To sort on the first number in the line, no matter
what is in front of it: >
:sort /.*\ze\d/
<
Note that using ":sort" with ":global" doesn't sort the matching lines, it's
quite useless.

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0c. Last change: 2006 Mar 16
*cmdline.txt* For Vim version 7.0d. Last change: 2006 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*debug.txt* For Vim version 7.0c. Last change: 2005 Dec 17
*debug.txt* For Vim version 7.0d. Last change: 2005 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*debugger.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*debugger.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0c. Last change: 2006 Mar 09
*develop.txt* For Vim version 7.0d. Last change: 2006 Mar 09
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0c. Last change: 2006 Mar 15
*diff.txt* For Vim version 7.0d. Last change: 2006 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -272,6 +272,10 @@ buffer: >
Note that deleted lines are displayed, but not counted as text lines. You
can't move the cursor into them. To fill the deleted lines with the lines
from another buffer use ":diffget" on the line below them.
*E787*
When the buffer that is about to be modified is read-only and the autocommand
that is triggered by |FileChangedRO| changes buffers the command will fail.
The autocommand must not change buffers.
The [bufspec] argument above can be a buffer number, a pattern for a buffer
name or a part of a buffer name. Examples:

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0c. Last change: 2005 Sep 11
*digraph.txt* For Vim version 7.0d. Last change: 2005 Sep 11
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0c. Last change: 2006 Mar 06
*editing.txt* For Vim version 7.0d. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -313,6 +313,8 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
in the 'path' is edited.
This command fails if Vim refuses to |abandon| the
current file.
If you want to edit the file in a new window use
|CTRL-W_CTRL-F|.
If you do want to edit a new file, use: >
:e <cfile>
< To make gf always work like that: >
@@ -422,14 +424,18 @@ name. Line breaks also separate names.
The [++opt] argument can be used to force the value of 'fileformat',
'fileencoding' or 'binary' to a value for one command, and to specify the
behavior for bad characters. The form is: >
++{optname}
Or: >
++{optname}={value}
Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin*
Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin* *++edit*
ff or fileformat overrides 'fileformat'
enc or encoding overrides 'fileencoding'
bin or binary sets 'binary'
nobin or nobinary resets 'binary'
bad specifies behavior for bad characters
edit for |:read| only: keep option values as if editing
a file
{value} cannot contain white space. It can be any valid value for these
options. Examples: >
@@ -897,6 +903,7 @@ used, for example, when the write fails and you want to try again later with
The [!] is needed to overwrite an existing file.
When 'filetype' is empty filetype detection is done
with the new name, before the file is written.
When the write was successful 'readonly' is reset.
{not in Vi}
*:up* *:update*

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0c. Last change: 2006 Mar 26
*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,8 +110,8 @@ around the arguments, to invoke the function it refers to. Example: >
:let Fn = function("MyFunc")
:echo Fn()
< *E704* *E705* *E707*
A Funcref variable must start with a capital, "s:", "w:" or "b:". You cannot
have both a Funcref variable and a function with the same name.
A Funcref variable must start with a capital, "s:", "w:", "t:" or "b:". You
cannot have both a Funcref variable and a function with the same name.
A special case is defining a function and directly assigning its Funcref to a
Dictionary entry. Example: >
@@ -504,7 +504,7 @@ the function was invoked from.
It is also possible to add a function without the "dict" attribute as a
Funcref to a Dictionary, but the "self" variable is not available then.
*numbered-function*
*numbered-function* *anonymous-function*
To avoid the extra name for the function it can be defined and directly
assigned to a Dictionary in this way: >
:let mydict = {'data': [0, 1, 2, 3]}
@@ -819,7 +819,7 @@ Number. Note that this doesn't recognize multi-byte encodings.
Index zero gives the first character. This is like it works in C. Careful:
text column numbers start with one! Example, to get the character under the
cursor: >
:let c = getline(line("."))[col(".") - 1]
:let c = getline(".")[col(".") - 1]
If the length of the String is less than the index, the result is an empty
String. A negative index always results in an empty string (reason: backwards
@@ -1030,6 +1030,7 @@ specified by what is prepended:
(nothing) In a function: local to a function; otherwise: global
|buffer-variable| b: Local to the current buffer.
|window-variable| w: Local to the current window.
|tabpage-variable| t: Local to the current tab page.
|global-variable| g: Global.
|local-variable| l: Local to a function.
|script-variable| s: Local to a |:source|'ed Vim script.
@@ -1063,6 +1064,11 @@ b:changedtick The total number of changes to the current buffer. It is
A variable name that is preceded with "w:" is local to the current window. It
is deleted when the window is closed.
*tabpage-variable* *t:var*
A variable name that is preceded with "t:" is local to the current tab page,
It is deleted when the tab page is closed. {not available when compiled
without the +windows feature}
*global-variable* *g:var*
Inside functions global variables are accessed with "g:". Omitting this will
access a variable local to a function. But "g:" can also be used in any other
@@ -1501,6 +1507,7 @@ append( {lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
argidx() Number current index in the argument list
argv( {nr}) String {nr} entry of the argument list
argv( ) List the argument list
browse( {save}, {title}, {initdir}, {default})
String put up a file requester
browsedir( {title}, {initdir}) String put up a directory requester
@@ -1542,29 +1549,33 @@ eval( {string}) any evaluate {string} into its value
eventhandler( ) Number TRUE if inside an event handler
executable( {expr}) Number 1 if executable {expr} exists
exists( {expr}) Number TRUE if {expr} exists
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
expand( {expr}) String expand special keywords in {expr}
filereadable( {file}) Number TRUE if {file} is a readable file
filewritable( {file}) Number TRUE if {file} is a writable file
filter( {expr}, {string}) List/Dict remove items from {expr} where
{string} is 0
finddir( {name}[, {path}[, {count}]])
String Find directory {name} in {path}
String find directory {name} in {path}
findfile( {name}[, {path}[, {count}]])
String Find file {name} in {path}
filewritable( {file}) Number TRUE if {file} is a writable file
String find file {name} in {path}
fnamemodify( {fname}, {mods}) String modify file name
foldclosed( {lnum}) Number first line of fold at {lnum} if closed
foldclosedend( {lnum}) Number last line of fold at {lnum} if closed
foldlevel( {lnum}) Number fold level at {lnum}
foldtext( ) String line displayed for closed fold
foldtextresult( {lnum}) String text for closed fold at {lnum}
foreground( ) Number bring the Vim window to the foreground
function( {name}) Funcref reference to function {name}
garbagecollect() none free memory, breaking cyclic references
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
getbufline( {expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
getbufvar( {expr}, {varname}) any variable {varname} in buffer {expr}
getchar( [expr]) Number get one character from the user
getcharmod( ) Number modifiers for the last typed character
getbufvar( {expr}, {varname}) variable {varname} in buffer {expr}
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
getcmdtype() String return the current command-line type
@@ -1583,7 +1594,7 @@ getreg( [{regname} [, 1]]) String contents of register
getregtype( [{regname}]) String type of register
getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
getwinvar( {nr}, {varname}) variable {varname} in window {nr}
getwinvar( {nr}, {varname}) any variable {varname} in window {nr}
glob( {expr}) String expand file wildcards in {expr}
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
has( {feature}) Number TRUE if feature {feature} supported
@@ -1604,6 +1615,7 @@ index( {list}, {expr} [, {start} [, {ic}]])
input( {prompt} [, {text} [, {completion}]])
String get input from the user
inputdialog( {p} [, {t} [, {c}]]) String like input() but in a GUI dialog
inputlist( {textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
inputsecret( {prompt} [, {text}]) String like input() but hiding the text
@@ -1627,6 +1639,7 @@ mapcheck( {name}[, {mode} [, {abbr}]])
String check for mappings matching {name}
match( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} matches in {expr}
matcharg( {nr}) List arguments of |:match|
matchend( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} ends in {expr}
matchlist( {expr}, {pat}[, {start}[, {count}]])
@@ -1640,6 +1653,7 @@ mkdir({name} [, {path} [, {prot}]])
mode() String current editing mode
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}) String single char with ASCII value {expr}
pathshorten( {expr}) String shorten directory names in a path
prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
printf( {fmt}, {expr1}...) String format text
pumvisible() Number whether popup menu is visible
@@ -1680,6 +1694,7 @@ setcmdpos( {pos}) Number set cursor position in command-line
setline( {lnum}, {line}) Number set line {lnum} to {line}
setloclist( {nr}, {list}[, {action}])
Number modify location list using {list}
setpos( {expr}, {list}) none set the {expr} position to {list}
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
@@ -1767,7 +1782,7 @@ argidx() The result is the current index in the argument list. 0 is
the first file. argc() - 1 is the last one. See |arglist|.
*argv()*
argv({nr}) The result is the {nr}th file in the argument list of the
argv([{nr}]) The result is the {nr}th file in the argument list of the
current window. See |arglist|. "argv(0)" is the first one.
Example: >
:let i = 0
@@ -1776,7 +1791,9 @@ argv({nr}) The result is the {nr}th file in the argument list of the
: exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
: let i = i + 1
:endwhile
<
< Without the {nr} argument a |List| with the whole |arglist| is
returned.
*browse()*
browse({save}, {title}, {initdir}, {default})
Put up a file requester. This only works when "has("browse")"
@@ -2249,6 +2266,9 @@ executable({expr}) *executable()*
extension.
On MS-DOS and MS-Windows it only checks if the file exists and
is not a directory, not if it's really executable.
On MS-Windows an executable in the same directory as Vim is
always found. Since this directory is added to $PATH it
should also work to execute it |win32-PATH|.
The result is a Number:
1 exists
0 does not exist
@@ -2716,11 +2736,11 @@ getfontname([{name}]) *getfontname()*
font name. If not then an empty string is returned.
Otherwise the actual font name is returned, or {name} if the
GUI does not support obtaining the real name.
Only works when the GUI is running, thus not you your vimrc or
Note that the GTK 2 GUI accepts any font name, thus checking
for a valid name does not work.
Only works when the GUI is running, thus not in your vimrc or
gvimrc file. Use the |GUIEnter| autocommand to use this
function just after the GUI has started.
Note that the GTK 2 GUI accepts any font name, thus checking
for a valid name does not work.
getfperm({fname}) *getfperm()*
The result is a String, which is the read, write, and execute
@@ -3134,9 +3154,9 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
NOTE: Command-line completion is not supported.
inputlist({textlist}) *inputlist()*
{textlist} must be a list of strings. This list is displayed,
one string per line. The user will be prompted to enter a
number, which is returned.
{textlist} must be a |List| of strings. This |List| is
displayed, one string per line. The user will be prompted to
enter a number, which is returned.
The user can also select an item by clicking on it with the
mouse. For the first string 0 is returned. When clicking
above the first item a negative number is returned. When
@@ -3193,7 +3213,7 @@ isdirectory({directory}) *isdirectory()*
exist, or isn't a directory, the result is FALSE. {directory}
is any expression, which is used as a String.
islocked({expr}) *islocked()*
islocked({expr}) *islocked()* *E786*
The result is a Number, which is non-zero when {expr} is the
name of a locked variable.
{expr} must be the name of a variable, |List| item or
@@ -3476,6 +3496,18 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
the pattern. 'smartcase' is NOT used. The matching is always
done like 'magic' is set and 'cpoptions' is empty.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
|:2match| or |:3match| command.
Return a |List| with two elements:
The name of the highlight group used
The pattern used.
When {nr} is not 1, 2 or 3 returns an empty |List|.
When there is no match item set returns ['', ''].
This is usef to save and restore a |:match|.
matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
Same as match(), but return the index of first character after
the match. Example: >
@@ -3595,6 +3627,15 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
call setpos('.', save_cursor)
< Also see |setpos()|.
pathshorten({expr}) *pathshorten()*
Shorten directory names in the path {expr} and return the
result. The tail, the file name, is kept as-is. The other
components in the path are reduced to single letters. Leading
'~' and '.' characters are kept. Example: >
:echo pathshorten('~/.vim/autoload/myfile.vim')
< ~/.v/a/myfile.vim ~
It doesn't matter if the path exists or not.
prevnonblank({lnum}) *prevnonblank()*
Return the line number of the first line at or above {lnum}
that is not blank. Example: >
@@ -4527,7 +4568,7 @@ strpart({src}, {start}[, {len}]) *strpart()*
strpart("abcdefg", 3) == "defg"
< Note: To get the first character, {start} must be 0. For
example, to get three bytes under and after the cursor: >
strpart(getline(line(".")), col(".") - 1, 3)
strpart(getline("."), col(".") - 1, 3)
<
strridx({haystack}, {needle} [, {start}]) *strridx()*
The result is a Number, which gives the byte index in
@@ -5033,7 +5074,6 @@ gui Compiled with GUI enabled.
gui_athena Compiled with Athena GUI.
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
gui_kde Compiled with KDE GUI |KVim|
gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.
@@ -5651,6 +5691,7 @@ This would call the function "my_func_whizz(parameter)".
g: global variables
b: local buffer variables
w: local window variables
t: local tab page variables
s: script-local variables
l: local function variables
v: Vim variables.
@@ -5708,8 +5749,8 @@ This would call the function "my_func_whizz(parameter)".
Note that when two variables refer to the same |List|
and you lock one of them, the |List| will also be
locked when used through the other variable. Example:
>
locked when used through the other variable.
Example: >
:let l = [0, 1, 2, 3]
:let cl = l
:lockvar l

View File

@@ -1,4 +1,4 @@
*farsi.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*farsi.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*filetype.txt* For Vim version 7.0d. Last change: 2006 Mar 24
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.0c. Last change: 2005 Sep 10
*fold.txt* For Vim version 7.0d. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -109,6 +109,7 @@ level of the previous line.
There must be no side effects from the expression. The text in the buffer,
cursor position, the search patterns, options etc. must not be changed.
You can change and restore them if you are careful.
If there is some error in the expression, or the resulting value isn't
recognized, there is no error message and the fold level will be zero.

View File

@@ -1,4 +1,4 @@
*getscript.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*getscript.txt* For Vim version 7.0d. Last change: 2006 Mar 24
Get the Latest VimScripts

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.0c. Last change: 2006 Mar 20
*gui.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,6 +36,10 @@ The X11 version of Vim can run both in GUI and in non-GUI mode. See
|gui-x11-start|.
*gui-init* *gvimrc* *.gvimrc* *_gvimrc*
The gvimrc file is where GUI-specific startup commands should be placed. It
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
environment variable has its name.
When the GUI starts up initializations are carried out, in this order:
- The 'term' option is set to "builgin_gui" and terminal options are reset to
their default value for the GUI |terminal-options|.
@@ -66,6 +70,8 @@ When the GUI starts up initializations are carried out, in this order:
- For Win32, when $HOME is not set, "$VIM\_gvimrc" is used.
- When a "_gvimrc" file is not found, ".gvimrc" is tried too. And vice
versa.
The name of the first file found is stored in $MYGVIMRC, unless it was
already set.
- If the 'exrc' option is set (which is NOT the default) the file ./.gvimrc
is sourced, if it exists and isn't the same file as the system or user
gvimrc file. If this file is not owned by you, some security restrictions

View File

@@ -1,4 +1,4 @@
*gui_w16.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*gui_w16.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*gui_w32.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 7.0c. Last change: 2005 Dec 06
*gui_x11.txt* For Vim version 7.0d. Last change: 2005 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*hangulin.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*hangulin.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
@@ -48,7 +48,7 @@ If both are set, VIM_KEYBOARD has higher priority.
Hangul Fonts
------------
You can set text font using $HOME/.Xdefaults or $HOME/.gvimrc.
You can set text font using $HOME/.Xdefaults or in your gvimrc file.
But to use Hangul, you should set 'guifontset' in your vimrc.
$HOME/.Xdefaults: >

View File

@@ -1,4 +1,4 @@
*hebrew.txt* For Vim version 7.0c. Last change: 2003 May 11
*hebrew.txt* For Vim version 7.0d. Last change: 2003 May 11
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*help.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM - main help file
k
@@ -85,7 +85,7 @@ Making Vim Run ~
|usr_90.txt| Installing Vim
REFERENCE MANUAL: These files explain every detail of Vim. *ref-toc*
REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc*
General subjects ~
|intro.txt| general introduction to Vim; notation used in help files
@@ -171,6 +171,7 @@ Versions ~
|version4.txt| Differences between Vim version 3.0 and 4.x
|version5.txt| Differences between Vim version 4.6 and 5.x
|version6.txt| Differences between Vim version 5.7 and 6.x
|version7.txt| Differences between Vim version 6.4 and 7.x
*sys-file-list*
Remarks about specific systems ~
|os_390.txt| OS/390 Unix

View File

@@ -1,4 +1,4 @@
*howto.txt* For Vim version 7.0c. Last change: 2001 Sep 03
*howto.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -75,7 +75,7 @@ How to ... *howdoi* *how-do-i* *howto* *how-to*
|auto-setting| set options automatically
|term-dependent-settings| set options depending on terminal name
|save-settings| save settings
|:quote| comment my exrc/vimrc/gvimrc files
|:quote| comment my .vim files
|'helpheight'| change the default help height
|'highlight'| set various highlighting modes
|'title'| set the window title

View File

@@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*if_cscop.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Andy Kahn

View File

@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0c. Last change: 2006 Mar 06
*if_mzsch.txt* For Vim version 7.0d. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sergey Khorev

View File

@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0c. Last change: 2006 Mar 06
*if_ole.txt* For Vim version 7.0d. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Paul Moore

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0c. Last change: 2006 Mar 06
*if_perl.txt* For Vim version 7.0d. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0c. Last change: 2006 Jan 20
*if_pyth.txt* For Vim version 7.0d. Last change: 2006 Jan 20
VIM REFERENCE MANUAL by Paul Moore

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0c. Last change: 2006 Mar 26
*if_ruby.txt* For Vim version 7.0d. Last change: 2006 Mar 26
VIM REFERENCE MANUAL by Shugo Maeda

View File

@@ -1,4 +1,4 @@
*if_sniff.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*if_sniff.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL

View File

@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0c. Last change: 2006 Mar 06
*if_tcl.txt* For Vim version 7.0d. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0c. Last change: 2005 Aug 30
*indent.txt* For Vim version 7.0d. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,7 +68,7 @@ as follows:
"e" if you type the second 'e' for an "else" at the start of a
line
Characters that can precede each key:
Characters that can precede each key: *i_CTRL-F*
! When a '!' precedes the key, Vim will not insert the key but will
instead reindent the current line. This allows you to define a
command key for reindenting the current line. CTRL-F is the default

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*index.txt* For Vim version 7.0d. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -549,6 +549,8 @@ tag command action in Normal mode ~
|CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag
under cursor
|CTRL-W_g}| CTRL-W g } do a |:ptjump| to the tag under the cursor
|CTRL-W_gf| CTRL-W g f edit file name under the cursor in a new
tab page
|CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
|CTRL-W_i| CTRL-W i split window and jump to declaration of
identifier under the cursor

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0c. Last change: 2006 Mar 21
*insert.txt* For Vim version 7.0d. Last change: 2006 Apr 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -304,9 +304,11 @@ insert mode:
*i_CTRL-X_CTRL-E*
CTRL-X CTRL-E scroll window one line up.
When doing completion look here: |complete_CTRL-E|
*i_CTRL-X_CTRL-Y*
CTRL-X CTRL-Y scroll window one line down.
When doing completion look here: |complete_CTRL-Y|
After CTRL-X is pressed, each CTRL-E (CTRL-Y) scrolls the window up (down) by
one line unless that would cause the cursor to move from its current position
@@ -590,6 +592,16 @@ and CTRL-P (previous).
Also see the 'infercase' option if you want to adjust the case of the match.
*complete_CTRL-E*
When completion is active you can use CTRL-E to stop it and go back to the
orignally typed text. The CTRL-E will not be inserted.
*complete_CTRL-Y*
When the popup menu is displayed you can use CTRL-Y to stop completion and
accept the currently selected entry. The CTRL-Y is not inserted. Typing a
space, Enter, or some other unprintable character will leave completion mode
and insert that typed character.
Note: The keys that are valid in CTRL-X mode are not mapped. This allows for
":map ^F ^X^F" to work (where ^F is CTRL-F and ^X is CTRL-X). The key that
ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped.
@@ -992,10 +1004,13 @@ List.
Each list item can either be a string or a Dictionary. When it is a string it
is used as the completion. When it is a Dictionary it can contain these
items:
word the completion, mandatory
abbr abbreviation of "word", to be used in the menu
menu extra text for the popup menu
info more information about the item
word the text that will be inserted, mandatory
abbr abbreviation of "word"; when not empty it is used in
the menu instead of "word"
menu extra text for the popup menu, displayed after "word"
or "abbr"
info more information about the item, can be displayed in a
preview window
kind single letter indicating the type of completion
icase when non-zero case is to be ignored; when omitted
the 'ignorecase' option is used
@@ -1090,18 +1105,22 @@ The menu is used when:
The 'pumheight' option can be used to set a maximum height. The default is to
use all space available.
There are two states:
1. A complete match has been inserted.
2. Only part of a match has been inserted.
There are three states:
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P.
2. A cursor key has been used to select another match. The match was not
inserted then, only the entry in the popup menu is highlighted.
3. Only part of a match has been inserted and characters were typed or the
backspace key was used. The list of matches was then adjusted for what is
in front of the cursor.
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.
in the third 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.
If you select another match, e.g., with CTRL-N or CTRL-P, you go 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
When you are back at the original text then you are in the third 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>
@@ -1111,8 +1130,11 @@ 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.
Any non-special character:
Stop completion without changing the match and insert the
typed character.
In the second state these keys have a special meaning:
In the second and third 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
@@ -1120,18 +1142,26 @@ CTRL-L Add one character from the current match, may reduce the
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.
In all three states these can be used:
CTRL-Y Yes: Accept the currently selected match and stop completion.
CTRL-E End completion, go back to what was typed.
<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.
space or <Tab> Stop completion without changing the match and insert the
typed character.
The behavior of the Enter key depends on the state you are in:
first state: Use the text as it is and insert a line break.
second state: Insert the currently selected match.
third state: Use the text as it is and insert a line break.
In other words: If you used the cursor keys to select another entry in the
list of matches then the Enter key inserts that match. If you typed something
else then Enter inserts a line break.
The colors of the menu can be changed with these highlight groups:
@@ -1201,11 +1231,11 @@ are included.
CSS *ft-css-omni*
Complete properties and their appropriate values according to CSS 2.1
specification.
specification.
HTML and XHTML *ft-html-omni*
*ft-xhtml-omni*
HTML *ft-html-omni*
XHTML *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
@@ -1226,12 +1256,12 @@ other versions of HTML. Features:
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
- this is time needed for loading of data file.
Note: Completion may fail in badly formatted documents. In such case try to
run |:make| command to detect formatting problems.
JAVASCRIPT *ft-javascript-omni*
JAVASCRIPT *ft-javascript-omni*
Completion of most elements of JavaScript language and DOM elements.
@@ -1247,7 +1277,7 @@ Complete:
Completion works in separate JavaScript files (&ft==javascript), inside of
<script> tag of (X)HTML and in values of event attributes (including scanning
of external files.
DOM compatibility
At the moment (beginning of 2006) there are two main browsers - MS Internet
@@ -1255,11 +1285,11 @@ Explorer and Mozilla Firefox. These two applications are covering over 90% of
market. Theoretically standards are created by W3C organisation
(http://www.w3c.org) but they are not always followed/implemented.
IE FF W3C Omni completion ~
+/- +/- + + ~
+ + - + ~
+ - - - ~
- + - - ~
IE FF W3C Omni completion ~
+/- +/- + + ~
+ + - + ~
+ - - - ~
- + - - ~
Regardless from state of implementation in browsers but if element is defined
in standards, completion plugin will place element in suggestion list. When
@@ -1267,7 +1297,7 @@ 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*
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
@@ -1278,6 +1308,14 @@ Script completes:
- after $ variables name
- if variable was declared as object add "->", if tags file is available show
name of class
- after "->" complete only function and variable names specific for given
class. To find class location and contents tags file is required. Because
PHP isn't strongly typed language user can use @var tag to declare class: >
/* @var $myVar myClass */
$myVar->
<
Still, to find myClass contents tags file is required.
- function names with additonal info:
- in case of built-in functions list of possible arguments and after | type
@@ -1304,15 +1342,15 @@ This uses the current syntax highlighting for completion. It can be used for
any filetype and provides a minimal language-sensitive completion.
To enable syntax code completion you can run: >
setlocal omnifunc=syntaxcomplete#Complete
setlocal omnifunc=syntaxcomplete#Complete
You can automate this by placing the following in your vimrc (after any
":filetype" command): >
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
endif
The above will set completion to this script only if a specific plugin does
@@ -1355,6 +1393,20 @@ You can create as many of these variables as you need, varying only the
filetype at the end of the variable name.
SQL *ft-sql-omni*
Completion for the SQL language includes statements, functions, keywords.
It will also dynamically complete tables, procedures, views and column lists
with data pulled directly from within a database. For detailed instructions
and a tutorial see |omni-sql-completion|.
The SQL completion plugin can be used in conjunction with other completion
plugins. For example, the PHP filetype has it's own completion plugin.
Since PHP is often used to generate dynamic website by accessing a database,
the SQL completion plugin can also be enabled. This allows you to complete
PHP code and SQL code at the same time.
XML *ft-xml-omni*
Vim 7 provides mechanism to context aware completion of XML files. It depends
@@ -1381,9 +1433,9 @@ which will not create conflicts in future. For example name xhtml10s.vim means
it is data file for XHTML 1.0 Strict.
File contains one variable with fixed name: g:xmldata_xhtml10s . It is
compound from two parts:
compound from two parts:
1. "g:xmldata_" general prefix
1. "g:xmldata_" general prefix
2. "xhtml10s" name of file and name of described XML dialect
Part two must be exactly the same as name of file.
@@ -1394,14 +1446,14 @@ 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":
\ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"],
\ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}],
\ "script":
\ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [],
\ "html":
\ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"],
\ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}],
\ "script":
\ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [],
\ "defer": ["BOOL"], "xml:space": ["preserve"]}],
\ "meta":
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
\ "meta":
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
\ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}]
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]},
\ "vimxmltaginfo": {
@@ -1613,11 +1665,15 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
10. Inserting a file *inserting-file*
*:r* *:re* *:read*
:r[ead] [name] Insert the file [name] (default: current file) below
:r[ead] [++opt] [name]
Insert the file [name] (default: current file) below
the cursor.
See |++opt| for the possible values of [++opt].
:{range}r[ead] [name] Insert the file [name] (default: current file) below
:{range}r[ead] [++opt] [name]
Insert the file [name] (default: current file) below
the specified line.
See |++opt| for the possible values of [++opt].
*:r!* *:read!*
:r[ead] !{cmd} Execute {cmd} and insert its standard output below
@@ -1642,6 +1698,14 @@ If a file name is given with ":r", it becomes the alternate file. This can be
used, for example, when you want to edit that file instead: ":e! #". This can
be switched off by removing the 'a' flag from the 'cpoptions' option.
Of the [++opt] arguments one is specifically for ":read", the ++edit argument.
This is useful when the ":read" command is actually used to read a file into
the buffer as if editing that file. Use this command in an empty buffer: >
:read ++edit filename
The effect is that the 'fileformat', 'fileencoding', 'bomb', etc. options are
set to what has been detected for "filename". Note that a single empty line
remains, you may want to delete it.
*file-read*
The 'fileformat' option sets the <EOL> style for a file:
'fileformat' characters name ~

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.0c. Last change: 2005 Sep 01
*intro.txt* For Vim version 7.0d. Last change: 2006 Apr 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -94,13 +94,15 @@ mention that.
There are several mailing lists for Vim:
<vim@vim.org>
For discussions about using existing versions of Vim: Useful mappings,
questions, answers, where to get a specific version, etc.
questions, answers, where to get a specific version, etc. There are
quite a few people watching this list and answering questions, also
for beginners. Don't hesitate to ask your question here.
<vim-dev@vim.org> *vim-dev* *vimdev*
For discussions about changing Vim: New features, porting, patches,
beta-test versions, etc.
<vim-announce@vim.org> *vim-announce*
Announcements about new versions of Vim; also for beta-test versions
and ports to different systems.
and ports to different systems. This is a read-only list.
<vim-multibyte@vim.org> *vim-multibyte*
For discussions about using and improving the multi-byte aspects of
Vim.

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0c. Last change: 2006 Mar 20
*map.txt* For Vim version 7.0d. Last change: 2006 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0c. Last change: 2006 Mar 05
*mbyte.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -985,7 +985,7 @@ Cursor color when IME or XIM is on *CursorIM*
This works in the same way when using XIM.
You can select cursor color when status is on by using highlight group
CursorIM. For example, add these lines to your _gvimrc: >
CursorIM. For example, add these lines to your |gvimrc|: >
if has('multi_byte_ime')
highlight Cursor guifg=NONE guibg=Green
@@ -1076,6 +1076,7 @@ also add this line: >
'' '
Since the mapping is defined with |:lnoremap| the resulting quote will not be
used for the start of another character.
The "accents" keymap uses this. *keymap-accents*
Although it's possible to have more than one character in the second column,
this is unusual. But you can use various ways to specify the character: >

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0c. Last change: 2006 Mar 01
*message.txt* For Vim version 7.0d. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*mlang.txt* For Vim version 7.0c. Last change: 2004 Feb 24
*mlang.txt* For Vim version 7.0d. Last change: 2004 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0c. Last change: 2006 Jan 02
*motion.txt* For Vim version 7.0d. Last change: 2006 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0c. Last change: 2006 Mar 09
*netbeans.txt* For Vim version 7.0d. Last change: 2006 Mar 09
VIM REFERENCE MANUAL by Gordon Prieur

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0c. Last change: 2006 Mar 26
*options.txt* For Vim version 7.0d. Last change: 2006 Apr 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -684,8 +684,7 @@ A jump table for the options with a short description can be found at |Q_op|.
or selected.
This option is provided for backward compatibility with the Vim
released with Sun ONE Studio 4 Enterprise Edition.
Note: When this option is on some plugins may not work. The directory
browser sets if off.
Note: When this option is on some plugins may not work.
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
@@ -1443,6 +1442,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
Number of screen lines to use for the command-line. Helps avoiding
|hit-enter| prompts.
The value of this option is stored with the tab page, so that each tab
page can have a different value.
*'cmdwinheight'* *'cwh'*
'cmdwinheight' 'cwh' number (default 7)
@@ -1488,8 +1489,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|fold-marker|.
*'compatible'* *'cp'* *'nocompatible'* *'nocp'*
'compatible' 'cp' boolean (default on, off when a .vimrc or .gvimrc file
is found)
'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc|
file is found)
global
{not in Vi}
This option has the effect of making Vim either more Vi-compatible, or
@@ -1504,10 +1505,10 @@ A jump table for the options with a short description can be found at |Q_op|.
options. This default was chosen for those people who want to use Vim
just like Vi, and don't even (want to) know about the 'compatible'
option.
When a ".vimrc" or ".gvimrc" file is found while Vim is starting up,
When a |vimrc| or |gvimrc| file is found while Vim is starting up,
this option is switched off, and all options that have not been
modified will be set to the Vim defaults. Effectively, this means
that when a ".vimrc" or ".gvimrc" file exists, Vim will use the Vim
that when a |vimrc| or |gvimrc| file exists, Vim will use the Vim
defaults, otherwise it will use the Vi defaults. (Note: This doesn't
happen for the system-wide vimrc or gvimrc file). Also see
|compatible-default| and |posix-compliance|.
@@ -2077,6 +2078,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Highlight the screen line of the cursor with CursorLine
|hl-CursorLine|. Useful to easily spot the cursor. Will make screen
redrawing slower.
When Visual mode is active the highlighting isn't used to make it
easier to see the selected text.
*'debug'*
@@ -2717,6 +2720,8 @@ A jump table for the options with a short description can be found at |Q_op|.
< This is similar to the default, except that these characters will also
be used when there is highlighting.
for "stl" and "stlnc" only single-byte values are supported.
The highlighting used for these items:
item highlight group ~
stl:c StatusLine |hl-StatusLine|
@@ -2892,6 +2897,7 @@ A jump table for the options with a short description can be found at |Q_op|.
quickfix ":cn", ":crew", ":make", etc.
search search for a pattern: "/", "n", "*", "gd", etc.
(not for a search pattern in a ":" command)
Also for |[s| and |]s|.
tag jumping to a tag: ":ta", CTRL-T, etc.
undo undo or redo: "u" and CTRL-R
When the command is part of a mapping this option is not used. Add
@@ -3330,7 +3336,7 @@ A jump table for the options with a short description can be found at |Q_op|.
can use "gvim -f" or ":gui -f" to start the GUI in the
foreground. |gui-fork|
Note: Set this option in the vimrc file. The forking may have
happened already when the gvimrc file is read.
happened already when the |gvimrc| file is read.
'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
corner of the window. It's black&white on non-GTK, because of
@@ -3339,7 +3345,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'm' Menu bar is present.
'M' The system menu "$VIMRUNTIME/menu.vim" is not sourced. Note
that this flag must be added in the .vimrc file, before
switching on syntax or filetype recognition (when the .gvimrc
switching on syntax or filetype recognition (when the |gvimrc|
file is sourced the system menu has already been loaded; the
":syntax on" and ":filetype on" commands load the menu too).
'g' Grey menu items: Make menu items that are not active grey. If
@@ -3372,7 +3378,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'p' Use Pointer callbacks for X11 GUI. This is required for some
window managers. If the cursor is not blinking or hollow at
the right moment, try adding this flag. This must be done
before starting the GUI. Set it in your gvimrc. Adding or
before starting the GUI. Set it in your |gvimrc|. Adding or
removing it after the GUI has started has no effect.
'F' Add a footer. Only for Motif. See |gui-footer|.
@@ -3467,7 +3473,7 @@ A jump table for the options with a short description can be found at |Q_op|.
"8:SpecialKey,@:NonText,d:Directory,
e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,
M:ModeMsg,n:LineNr,r:Question,
s:StatusLine,S:StatusLineNC,c:VertSplit
s:StatusLine,S:StatusLineNC,c:VertSplit,
t:Title,v:Visual,w:WarningMsg,W:WildMenu,
f:Folded,F:FoldColumn,A:DiffAdd,
C:DiffChange,D:DiffDelete,T:DiffText,
@@ -3558,7 +3564,7 @@ A jump table for the options with a short description can be found at |Q_op|.
highlight all of the matched text. However, this depends on where the
search starts. This will be the first line in the window or the first
line below a closed fold. A match in a previous line which is not
drawn may not continue in an newly drawn line.
drawn may not continue in a newly drawn line.
NOTE: This option is reset when 'compatible' is set.
*'history'* *'hi'*
@@ -4263,7 +4269,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The characters ':' and ',' should not be used. UTF-8 characters can
be used when 'encoding' is "utf-8", otherwise only printable
characters are allowed.
characters are allowed. All characters must be single width.
Examples: >
:set lcs=tab:>-,trail:-
@@ -5367,6 +5373,8 @@ A jump table for the options with a short description can be found at |Q_op|.
going back to the other window, it still uses the
same relative offset.
Also see |scroll-binding|.
When 'diff' mode is active there always is vertical scroll binding,
even when "ver" isn't there.
*'sections'* *'sect'*
'sections' 'sect' string (default "SHNHH HUnhsh")
@@ -5967,8 +5975,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|zg| and |zw| commands can be used to access each. This allows using
a personal word list file and a project word list file.
When a word is added while this option is empty Vim will set it for
you: Using the first "spell" directory in 'runtimepath' that is
writable and the first language name that appears in 'spelllang',
you: Using the first directory in 'runtimepath' that is writable. If
there is no "spell" directory yet it will be created. For the file
name the first language name that appears in 'spelllang' is used,
ignoring the region.
The resulting ".spl" file will be used for spell checking, it does not
have to appear in 'spelllang'.
@@ -6352,6 +6361,8 @@ A jump table for the options with a short description can be found at |Q_op|.
jumping to errors (":cc", ":cn", "cp", etc.). It is
also used in all buffer related split commands, for
example ":sbuffer", ":sbnext", or ":sbrewind".
usetab Like "useopen", but also consider windows in other tab
pages.
split If included, split the current window before loading
a buffer. Otherwise: do not split, use current window.
Supported in |quickfix| commands that display errors.
@@ -6515,8 +6526,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'tagrelative' 'tr' boolean (Vim default: on, Vi default: off)
global
{not in Vi}
If on and using a tag file in another directory, file names in that
tag file are relative to the directory where the tag file is.
If on and using a tags file in another directory, file names in that
tags file are relative to the directory where the tags file is.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.

View File

@@ -1,4 +1,4 @@
*os_390.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_390.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Ralf Schandl

View File

@@ -1,4 +1,4 @@
*os_amiga.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_amiga.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_beos.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_beos.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_dos.txt* For Vim version 7.0c. Last change: 2006 Feb 14
*os_dos.txt* For Vim version 7.0d. Last change: 2006 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -77,10 +77,11 @@ is especially useful when using a Unix-like 'shell'.
==============================================================================
3. Standard mappings *dos-standard-mappings*
CTRL-PageUp cursor to first screen line *<C-PageUp>*
CTRL-PageDown cursor to last screen line, last character *<C-PageDown>*
The mappings for CTRL-PageUp and CTRL-PageDown have been removed, they now
jump to the next or previous tab page |<C-PageUp>| |<C-PageDown>|
These mappings accomplish this:
If you want them to move to the first and last screen line you can use these
mappings:
key key code Normal/Visual mode Insert mode ~
CTRL-PageUp <M-N><M-C-D> H <C-O>H

View File

@@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 7.0c. Last change: 2006 Mar 26
*os_mac.txt* For Vim version 7.0d. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -86,6 +86,14 @@ A: Assuming that Vim.app is located in /Applications:
Or:
/Applications/Vim.app/Contents/MacOS/Vim -g {arguments}
Q: How can I set $PATH to something reasonable when I start Vim.app from the
GUI or with open?
A: The following trick works with most shells. Put it in your vimrc file.
This is included in the system vimrc file included with the binaries
distributed at macvim.org . >
let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
==============================================================================
4. Mac Lack *mac-lack*

View File

@@ -1,4 +1,4 @@
*os_mint.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_mint.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Jens M. Felderhoff

View File

@@ -1,4 +1,4 @@
*os_msdos.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_msdos.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_os2.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_os2.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Paul Slootman

View File

@@ -1,4 +1,4 @@
*os_qnx.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_qnx.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Julian Kinraid

View File

@@ -1,4 +1,4 @@
*os_risc.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_risc.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Thomas Leonard

View File

@@ -1,4 +1,4 @@
*os_unix.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_unix.txt* For Vim version 7.0d. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 7.0c. Last change: 2006 Mar 02
*os_vms.txt* For Vim version 7.0d. Last change: 2006 Mar 02
VIM REFERENCE MANUAL

View File

@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 7.0c. Last change: 2005 Mar 29
*os_win32.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by George Reilly
@@ -87,6 +87,12 @@ The only kind of terminal type that the Win32 version of Vim understands is
probably get very strange behavior from Vim. Therefore Vim does not obtain
the default value of 'term' from the environment variable "TERM".
$PATH *win32-PATH*
The directory of the Vim executable is appended to $PATH. This is mostly to
make "!xxd' work, as it is in the Tools menu. And it also means that when
executable() returns 1 the executable can actually be executed.
==============================================================================
3. Restore screen contents *win32-restore*

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0c. Last change: 2006 Mar 25
*pattern.txt* For Vim version 7.0d. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1220,6 +1220,9 @@ Finally, these constructs are unique to Perl:
'ignorecase' does not apply, use |/\c| in the pattern to
ignore case. Otherwise case is not ignored.
Also see |matcharg()|, it returns the highlight group and
pattern of a previous :match command.
Another example, which highlights all characters in virtual
column 72 and more: >
:highlight rightMargin term=bold ctermfg=blue guifg=blue
@@ -1235,10 +1238,10 @@ Finally, these constructs are unique to Perl:
Clear a previously defined match pattern.
:2mat[ch] {group} /{pattern}/
:2mat[ch] {group} /{pattern}/ *:2match*
:2mat[ch]
:2mat[ch] none
:3mat[ch] {group} /{pattern}/
:3mat[ch] {group} /{pattern}/ *:3match*
:3mat[ch]
:3mat[ch] none
Just like |:match| above, but set a separate match. Thus

View File

@@ -1,4 +1,4 @@
*pi_gzip.txt* For Vim version 7.0c. Last change: 2002 Oct 29
*pi_gzip.txt* For Vim version 7.0d. Last change: 2002 Oct 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.0c. Last change: Mar 22, 2006
*pi_netrw.txt* For Vim version 7.0d. Last change: Apr 06, 2006
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -1448,6 +1448,9 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
11. History *netrw-history* {{{1
v85: * bug fix -- missing an endif
* bug fix -- handles spaces in names and directories when using
ftp-based browsing
v83: * disabled stop-acd handling; the change in directory handling
may allow acd to be used again. Awaiting feedback.
* D was refusing to delete remote files/directories in wide

View File

@@ -1,4 +1,4 @@
*pi_paren.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*pi_paren.txt* For Vim version 7.0d. Last change: 2006 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,5 +38,13 @@ 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.
The search is limited to avoid a delay when moving the cursor. The limits
are:
- What is visible in the window.
- 100 lines above or below the cursor to avoid a long delay when there are
closed folds.
- 'synmaxcolumn' times 2 bytes before or after the cursor to avoid a delay
in a long line with syntax highlighting.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*pi_spec.txt* For Vim version 7.0c. Last change: 2005 Oct 03
*pi_spec.txt* For Vim version 7.0d. Last change: 2005 Oct 03
by Gustavo Niemeyer ~

View File

@@ -1,6 +1,8 @@
*tar.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*tar.txt* For Vim version 7.0d. Last change: 2006 Mar 24
Tar File Interface
+====================+
| Tar File Interface |
+====================+
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
@@ -12,7 +14,8 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright*
1. Contents *tar* *tar-contents*
1. Contents..................................................|tar-contents|
2. Usage.....................................................|tar-usage|
3. History...................................................|tar-history|
3. Options...................................................|tar-options|
4. History...................................................|tar-history|
==============================================================================
2. Usage *tar-usage* *tar-manual*
@@ -24,7 +27,25 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright*
tar archives via the plugin.
==============================================================================
3. History *tar-history*
3. Options *tar-options*
These options are variables that one may change, typically in one's
<.vimrc> file.
Default
Variable Value Explanation
*g:tar_browseoptions* "Ptf" used to get a list of contents
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_writeoptions* "uf" used to update/replace a file
==============================================================================
4. History *tar-history*
v7 Mar 22, 2006 * work on making tar plugin work across network
Mar 27, 2006 * g:tar_cmd now available for users to change the name
of the tar program to be used. By default, of course,
its "tar".
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

View File

@@ -1,18 +1,20 @@
*zip.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*zip.txt* For Vim version 7.0d. Last change: 2006 Apr 03
Zip File Interface
+====================+
| Zip File Interface |
+====================+
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
Permission is hereby granted to use and distribute this code,
with or without modifications, provided that this copyright
notice is copied with it. Like anything else that's free,
zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is*
and it comes with no warranty of any kind, either expressed or
implied. By using this plugin, you agree that in no event will
the copyright holder be liable for any damages resulting from
the use of this software.
Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr {{{1 *zip-copyright*
Permission is hereby granted to use and distribute this code,
with or without modifications, provided that this copyright
notice is copied with it. Like anything else that's free,
zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is*
and it comes with no warranty of any kind, either expressed or
implied. By using this plugin, you agree that in no event will
the copyright holder be liable for any damages resulting from
the use of this software.
==============================================================================
1. Contents *zip* *zip-contents*

View File

@@ -1,4 +1,4 @@
*print.txt* For Vim version 7.0c. Last change: 2005 Apr 01
*print.txt* For Vim version 7.0d. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0c. Last change: 2006 Mar 24
*quickfix.txt* For Vim version 7.0d. Last change: 2006 Mar 24
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0c. Last change: 2006 Mar 23
*quickref.txt* For Vim version 7.0d. Last change: 2006 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*quotes.txt* For Vim version 7.0c. Last change: 2005 Apr 04
*quotes.txt* For Vim version 7.0d. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*recover.txt* For Vim version 7.0c. Last change: 2005 Dec 12
*recover.txt* For Vim version 7.0d. Last change: 2005 Dec 12
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*remote.txt* For Vim version 7.0c. Last change: 2006 Mar 11
*remote.txt* For Vim version 7.0d. Last change: 2006 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar

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