mirror of
https://github.com/zoriya/vim.git
synced 2025-12-27 01:18:14 +00:00
Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ef15e30a0 | ||
|
|
afeb4fa8a7 | ||
|
|
b8a7b560b1 | ||
|
|
280f126ef0 | ||
|
|
17c7c01170 | ||
|
|
51156d5a87 | ||
|
|
6ab5b84db4 | ||
|
|
d12f5c17be | ||
|
|
28c258fd24 | ||
|
|
7df351eb8a | ||
|
|
09df3127f4 | ||
|
|
33aec765bd | ||
|
|
71fe80dddd | ||
|
|
66fa271a25 | ||
|
|
0ac9379acf | ||
|
|
c716c306e9 | ||
|
|
b1b715d1fb | ||
|
|
b71eaaeaa8 | ||
|
|
2d3f489e09 | ||
|
|
8ada17c4d9 | ||
|
|
05a7bb363b | ||
|
|
c32840f267 | ||
|
|
04dbce064e | ||
|
|
316059c019 | ||
|
|
ea8bd73212 | ||
|
|
a40ceaf88a | ||
|
|
4770d09abd | ||
|
|
1cbe5f739d | ||
|
|
c7486e034e | ||
|
|
86e01085a1 | ||
|
|
371baa928d | ||
|
|
ebefac63f3 | ||
|
|
cc984263d7 | ||
|
|
0ce33f34a4 | ||
|
|
8fa0445c4f | ||
|
|
5c2f050d91 | ||
|
|
f4cd3e8074 | ||
|
|
bb1004ee56 | ||
|
|
a9b1e74b5d | ||
|
|
195d6357b4 | ||
|
|
46b8015066 | ||
|
|
e3226be91a | ||
|
|
d35f9711d4 | ||
|
|
da1b1a7357 | ||
|
|
3b18181f28 | ||
|
|
acf534595b | ||
|
|
97d29a1ace | ||
|
|
146522e760 | ||
|
|
83c465c705 | ||
|
|
12033fb4bf | ||
|
|
bca84a12bd | ||
|
|
38f1825274 | ||
|
|
61da4986dd | ||
|
|
6496966ad1 | ||
|
|
b2c2efa53a | ||
|
|
c6d8db78b1 | ||
|
|
b0bf8580c3 | ||
|
|
900b4d77f0 | ||
|
|
2c7a29c7fd | ||
|
|
5b962cf71c | ||
|
|
63a121b750 | ||
|
|
b348038631 | ||
|
|
292ad19e92 | ||
|
|
cdbac1ee33 | ||
|
|
cc016f5410 | ||
|
|
e5180526fd | ||
|
|
24552beda0 | ||
|
|
43abc52195 | ||
|
|
ba930509b0 | ||
|
|
18f9a79673 | ||
|
|
77197e44d6 | ||
|
|
d5bc83f576 | ||
|
|
4e330bbf21 | ||
|
|
b815dac061 | ||
|
|
be79f90adc | ||
|
|
e64ac77a28 | ||
|
|
241a8aaa48 | ||
|
|
9372a11ca6 | ||
|
|
cef9dcc37e | ||
|
|
943d2b5b80 | ||
|
|
f4d1145328 | ||
|
|
c6039d8fcb |
30
Filelist
30
Filelist
@@ -2,7 +2,7 @@
|
||||
# Used by Makefile and upload.aap.
|
||||
|
||||
# source files for all source archives
|
||||
SRC_ALL1 = \
|
||||
SRC_ALL = \
|
||||
src/README.txt \
|
||||
src/arabic.c \
|
||||
src/arabic.h \
|
||||
@@ -72,13 +72,12 @@ SRC_ALL1 = \
|
||||
src/vim.h \
|
||||
src/window.c \
|
||||
src/xxd/xxd.c \
|
||||
|
||||
SRC_ALL2 = \
|
||||
src/main.aap \
|
||||
src/testdir/main.aap \
|
||||
src/testdir/*.in \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test49.vim \
|
||||
src/testdir/test60.vim \
|
||||
src/proto.h \
|
||||
src/proto/buffer.pro \
|
||||
src/proto/charset.pro \
|
||||
@@ -138,7 +137,6 @@ SRC_UNIX = \
|
||||
pixmaps/gen-inline-pixbufs.sh \
|
||||
pixmaps/stock_icons.h \
|
||||
src/INSTALL \
|
||||
src/INSTALLkde.txt \
|
||||
src/Makefile \
|
||||
src/auto/configure \
|
||||
src/config.aap.in \
|
||||
@@ -155,11 +153,6 @@ SRC_UNIX = \
|
||||
src/gui_gtk_f.c \
|
||||
src/gui_gtk_f.h \
|
||||
src/gui_gtk_x11.c \
|
||||
src/gui_kde.cc \
|
||||
src/gui_kde_wid.cc \
|
||||
src/gui_kde_wid.h \
|
||||
src/gui_kde_x11.cc \
|
||||
src/kvim_iface.h \
|
||||
src/gui_motif.c \
|
||||
src/gui_xmdlg.c \
|
||||
src/gui_xmebw.c \
|
||||
@@ -185,8 +178,6 @@ SRC_UNIX = \
|
||||
src/proto/gui_athena.pro \
|
||||
src/proto/gui_gtk.pro \
|
||||
src/proto/gui_gtk_x11.pro \
|
||||
src/proto/gui_kde.pro \
|
||||
src/proto/gui_kde_x11.pro \
|
||||
src/proto/gui_motif.pro \
|
||||
src/proto/gui_xmdlg.pro \
|
||||
src/proto/gui_x11.pro \
|
||||
@@ -219,6 +210,7 @@ SRC_DOS_UNIX = \
|
||||
src/if_perlsfio.c \
|
||||
src/if_python.c \
|
||||
src/if_ruby.c \
|
||||
src/if_sniff.h \
|
||||
src/if_tcl.c \
|
||||
src/proto/if_cscope.pro \
|
||||
src/proto/if_mzsch.pro \
|
||||
@@ -364,21 +356,14 @@ SRC_AMI = \
|
||||
# source files for the Mac (also in the extra archive)
|
||||
SRC_MAC = \
|
||||
src/INSTALLmac.txt \
|
||||
src/Make_mpw.mak \
|
||||
src/dehqx.py \
|
||||
src/gui_mac.c \
|
||||
src/gui_mac.icns \
|
||||
src/gui_mac.r \
|
||||
src/os_mac.build \
|
||||
src/os_mac.c \
|
||||
src/os_mac.h \
|
||||
src/os_mac.rsr.hqx \
|
||||
src/os_mac.sit.hqx \
|
||||
src/os_mac_conv.c \
|
||||
src/os_macosx.c \
|
||||
src/os_mac.pbproj/project.pbxproj \
|
||||
src/proto/gui_mac.pro \
|
||||
src/proto/os_mac.pro \
|
||||
src/proto/os_mac_conv.pro \
|
||||
|
||||
# source files for VMS (in the extra archive)
|
||||
@@ -429,7 +414,6 @@ SRC_EXTRA = \
|
||||
src/gui_riscos.c \
|
||||
src/gui_riscos.h \
|
||||
src/if_sniff.c \
|
||||
src/if_sniff.h \
|
||||
src/infplist.xml \
|
||||
src/link.390 \
|
||||
src/os_beos.c \
|
||||
@@ -461,6 +445,7 @@ RT_ALL = \
|
||||
runtime/gvimrc_example.vim \
|
||||
runtime/macros/README.txt \
|
||||
runtime/macros/dvorak \
|
||||
runtime/macros/editexisting.vim \
|
||||
runtime/macros/hanoi/click.me \
|
||||
runtime/macros/hanoi/hanoi.vim \
|
||||
runtime/macros/hanoi/poster \
|
||||
@@ -535,10 +520,6 @@ RT_UNIX = \
|
||||
runtime/KVim.desktop \
|
||||
runtime/hi16-action-make.png \
|
||||
runtime/hi22-action-make.png \
|
||||
runtime/kde-tips \
|
||||
runtime/kvim32x32.png \
|
||||
runtime/kvim48x48.png \
|
||||
runtime/kvim64x64.png \
|
||||
runtime/vim16x16.png \
|
||||
runtime/vim16x16.xpm \
|
||||
runtime/vim32x32.png \
|
||||
@@ -703,6 +684,9 @@ LANG_GEN_BIN = \
|
||||
runtime/spell/en.ascii.spl \
|
||||
runtime/spell/en.latin1.spl \
|
||||
runtime/spell/en.utf-8.spl \
|
||||
runtime/spell/en.ascii.sug \
|
||||
runtime/spell/en.latin1.sug \
|
||||
runtime/spell/en.utf-8.sug \
|
||||
|
||||
# all files for lang archive
|
||||
LANG_SRC = \
|
||||
|
||||
68
Makefile
68
Makefile
@@ -37,8 +37,6 @@ all install uninstall tools config configure proto depend lint tags types test t
|
||||
#
|
||||
# TARGET PRODUCES CONTAINS
|
||||
# unixall vim-#.#.tar.bz2 Runtime files and Sources for Unix
|
||||
# unixrt vim-#.#-rt[12].tar.gz Runtime files for Unix
|
||||
# unixsrc vim-#.#-src[12].tar.gz Sources for Unix
|
||||
#
|
||||
# extra vim-#.#-extra.tar.gz Extra source and runtime files
|
||||
# lang vim-#.#-lang.tar.gz multi-language files
|
||||
@@ -66,7 +64,7 @@ all install uninstall tools config configure proto depend lint tags types test t
|
||||
#
|
||||
# All output files are created in the "dist" directory. Existing files are
|
||||
# overwritten!
|
||||
# To do all this you need the unixrt, unixsrc, extra and lang archives, and
|
||||
# To do all this you need the unix, extra and lang archives, and
|
||||
# compiled binaries.
|
||||
# Before creating an archive first delete all backup files, *.orig, etc.
|
||||
|
||||
@@ -80,10 +78,11 @@ MINOR = 0aa
|
||||
#
|
||||
# - Update Vim version number. For a test version in: src/version.h, Contents,
|
||||
# MAJOR/MINOR above, VIMRTDIR and VERSION in src/Makefile, README*.txt,
|
||||
# runtime/doc/*.txt and nsis/gvim.nsi. For a minor/major version:
|
||||
# src/GvimExt/GvimExt.reg, src/vim16.def.
|
||||
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
|
||||
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
|
||||
# - Correct included_patches[] in src/version.c.
|
||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, Cscope and "huge" features.
|
||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge"
|
||||
# features. Exclude workshop and SNiFF.
|
||||
# - With these features: "make proto" (requires cproto and Motif installed;
|
||||
# ignore warnings for missing include files, fix problems for syntax errors).
|
||||
# - With these features: "make depend" (works best with gcc).
|
||||
@@ -125,7 +124,7 @@ MINOR = 0aa
|
||||
# "uninstald16.exe".
|
||||
# 32 bit DOS version:
|
||||
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
|
||||
# - "rm testdir/*.out", "make -f Make_djg.mak test" and check the output.
|
||||
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
|
||||
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
||||
# "uninstald32.exe".
|
||||
# Win32 console version:
|
||||
@@ -262,10 +261,8 @@ dist/$(COMMENT_FARSI): dist/comment
|
||||
dist/$(COMMENT_LANG): dist/comment
|
||||
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
|
||||
|
||||
unixrt: dist prepare
|
||||
-rm -f dist/$(VIMVER)-rt1.tar.gz
|
||||
-rm -f dist/$(VIMVER)-rt2.tar.gz
|
||||
# first runtime file
|
||||
unixall: dist prepare
|
||||
-rm -f dist/$(VIMVER).tar.bz2
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
mkdir dist/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
@@ -273,36 +270,10 @@ unixrt: dist prepare
|
||||
$(RT_ALL_BIN) \
|
||||
$(RT_UNIX) \
|
||||
$(RT_UNIX_DOS_BIN) \
|
||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||
cd dist && tar cf $(VIMVER)-rt1.tar $(VIMRTDIR)
|
||||
gzip -9 dist/$(VIMVER)-rt1.tar
|
||||
# second runtime file (script and language files)
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
mkdir dist/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
$(RT_SCRIPTS) \
|
||||
$(LANG_GEN) \
|
||||
$(LANG_GEN_BIN) \
|
||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||
cd dist && tar cf $(VIMVER)-rt2.tar $(VIMRTDIR)
|
||||
gzip -9 dist/$(VIMVER)-rt2.tar
|
||||
|
||||
unixsrc: dist prepare
|
||||
-rm -f dist/$(VIMVER)-src1.tar.gz
|
||||
-rm -f dist/$(VIMVER)-src2.tar.gz
|
||||
# first source file
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
mkdir dist/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
$(SRC_ALL1) \
|
||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||
cd dist && tar cf $(VIMVER)-src1.tar $(VIMRTDIR)
|
||||
gzip -9 dist/$(VIMVER)-src1.tar
|
||||
# second source file
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
mkdir dist/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
$(SRC_ALL2) \
|
||||
$(SRC_ALL) \
|
||||
$(SRC_UNIX) \
|
||||
$(SRC_DOS_UNIX) \
|
||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||
@@ -310,21 +281,6 @@ unixsrc: dist prepare
|
||||
cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
|
||||
# Create an empty config.h file, make dependencies require it
|
||||
touch dist/$(VIMRTDIR)/src/auto/config.h
|
||||
# Make sure configure is newer than config.mk to force it to be generated
|
||||
touch dist/$(VIMRTDIR)/src/configure
|
||||
cd dist && tar cf $(VIMVER)-src2.tar $(VIMRTDIR)
|
||||
gzip -9 dist/$(VIMVER)-src2.tar
|
||||
|
||||
unixall: dist unixsrc unixrt
|
||||
-rm -f dist/$(VIMVER).tar.bz2
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
mkdir dist/$(VIMRTDIR)
|
||||
cd dist && tar xfz $(VIMVER)-src1.tar.gz
|
||||
cd dist && tar xfz $(VIMVER)-src2.tar.gz
|
||||
cd dist && tar xfz $(VIMVER)-rt1.tar.gz
|
||||
cd dist && tar xfz $(VIMVER)-rt2.tar.gz
|
||||
# Create an empty config.h file, make dependencies require it
|
||||
touch dist/$(VIMRTDIR)/src/auto/config.h
|
||||
# Make sure configure is newer than config.mk to force it to be generated
|
||||
touch dist/$(VIMRTDIR)/src/configure
|
||||
cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
|
||||
@@ -405,8 +361,7 @@ amisrc: dist prepare
|
||||
mkdir dist/Vim/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
$(ROOT_AMI) \
|
||||
$(SRC_ALL1) \
|
||||
$(SRC_ALL2) \
|
||||
$(SRC_ALL) \
|
||||
$(SRC_AMI) \
|
||||
$(SRC_AMI_DOS) \
|
||||
| (cd dist/Vim/$(VIMRTDIR); tar xf -)
|
||||
@@ -593,8 +548,7 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
|
||||
mkdir dist/vim
|
||||
mkdir dist/vim/$(VIMRTDIR)
|
||||
tar cf - \
|
||||
$(SRC_ALL1) \
|
||||
$(SRC_ALL2) \
|
||||
$(SRC_ALL) \
|
||||
$(SRC_DOS) \
|
||||
$(SRC_AMI_DOS) \
|
||||
$(SRC_DOS_UNIX) \
|
||||
|
||||
@@ -5,28 +5,28 @@ See "README.txt" for general information about Vim.
|
||||
|
||||
|
||||
NOTE: You will need two archives:
|
||||
vim62rt.zip contains the runtime files (same as for the PC version)
|
||||
vim62os2.zip contains the OS/2 executables
|
||||
vim70rt.zip contains the runtime files (same as for the PC version)
|
||||
vim70os2.zip contains the OS/2 executables
|
||||
|
||||
1. Go to the directory where you want to put the Vim files. Examples:
|
||||
cd C:\
|
||||
cd D:\editors
|
||||
|
||||
2. Unpack the zip archives. This will create a new directory "vim/vim62",
|
||||
2. Unpack the zip archives. This will create a new directory "vim/vim70",
|
||||
in which all the distributed Vim files are placed. Since the directory
|
||||
name includes the version number, it is unlikely that you overwrite
|
||||
existing files.
|
||||
Examples:
|
||||
pkunzip -d vim62os2.zip
|
||||
unzip vim62os2.zip
|
||||
pkunzip -d vim70os2.zip
|
||||
unzip vim70os2.zip
|
||||
|
||||
After you unpacked the files, you can still move the whole directory tree
|
||||
to another location.
|
||||
|
||||
3. Add the directory where vim.exe is to your path. The simplest is to add a
|
||||
line to your autoexec.bat. Examples:
|
||||
set path=%path%;C:\vim\vim62
|
||||
set path=%path%;D:\editors\vim\vim62
|
||||
set path=%path%;C:\vim\vim70
|
||||
set path=%path%;D:\editors\vim\vim70
|
||||
|
||||
That's it!
|
||||
|
||||
@@ -41,10 +41,10 @@ Extra remarks:
|
||||
C:\vim\_viminfo Dynamic info for 'viminfo'.
|
||||
C:\vim\... Other files you made.
|
||||
Distributed files:
|
||||
C:\vim\vim62\vim.exe The Vim version 6.2 executable.
|
||||
C:\vim\vim62\doc\*.txt The version 6.2 documentation files.
|
||||
C:\vim\vim62\bugreport.vim A Vim version 6.2 script.
|
||||
C:\vim\vim62\... Other version 6.2 distributed files.
|
||||
C:\vim\vim70\vim.exe The Vim version 7.0 executable.
|
||||
C:\vim\vim70\doc\*.txt The version 7.0 documentation files.
|
||||
C:\vim\vim70\bugreport.vim A Vim version 7.0 script.
|
||||
C:\vim\vim70\... Other version 7.0 distributed files.
|
||||
In this case the $VIM environment variable would be set like this:
|
||||
set VIM=C:\vim
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Oct 06
|
||||
" Last Change: 2006 Jan 30
|
||||
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
@@ -55,7 +55,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
|
||||
" Only one part, no "." or "->": complete from tags file.
|
||||
" When local completion is wanted CTRL-N would have been used.
|
||||
return map(taglist('^' . base), 'v:val["name"]')
|
||||
return map(taglist('^' . base), 's:Tag2item(v:val)')
|
||||
endif
|
||||
|
||||
" Find the variable items[0].
|
||||
@@ -87,7 +87,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
if diclist[i]['kind'] == 'v'
|
||||
let line = diclist[i]['cmd']
|
||||
if line[0] == '/' && line[1] == '^'
|
||||
let col = match(line, items[0])
|
||||
let col = match(line, '\<' . items[0] . '\>')
|
||||
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:]))
|
||||
endif
|
||||
endif
|
||||
@@ -106,7 +106,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
" type, add a "." or "->".
|
||||
if len(res) == 1 && res[0]['match'] == items[-1] && len(s:SearchMembers(res, [''])) > 0
|
||||
" If there is a '*' before the name use "->".
|
||||
if match(res[0]['tagline'], '\*\s*' . res[0]['match']) > 0
|
||||
if match(res[0]['tagline'], '\*\s*' . res[0]['match'] . '\>') > 0
|
||||
let res[0]['match'] .= '->'
|
||||
else
|
||||
let res[0]['match'] .= '.'
|
||||
@@ -116,6 +116,25 @@ function! ccomplete#Complete(findstart, base)
|
||||
return map(res, 'v:val["match"]')
|
||||
endfunc
|
||||
|
||||
"
|
||||
" Turn the tag info "val" into an item for completion.
|
||||
" "val" is is an item in the list returned by taglist().
|
||||
function! s:Tag2item(val)
|
||||
if has_key(a:val, "kind") && a:val["kind"] == 'v'
|
||||
if len(s:SearchMembers([{'match': a:val["name"], 'dict': a:val}], [''])) > 0
|
||||
" If there is a '*' before the name use "->". This assumes the command
|
||||
" is a search pattern!
|
||||
if match(a:val['cmd'], '\*\s*' . a:val['name'] . '\>') > 0
|
||||
return a:val["name"] . '->'
|
||||
else
|
||||
return a:val["name"] . '.'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
return a:val["name"]
|
||||
endfunction
|
||||
|
||||
|
||||
" Find composing type in "lead" and match items[0] with it.
|
||||
" Repeat this recursively for items[1], if it's there.
|
||||
" Return the list of matches.
|
||||
@@ -236,18 +255,34 @@ endfunction
|
||||
function! s:SearchMembers(matches, items)
|
||||
let res = []
|
||||
for i in range(len(a:matches))
|
||||
let line = a:matches[i]['tagline']
|
||||
let e = matchend(line, '\ttypename:')
|
||||
if e > 0
|
||||
" Use typename field
|
||||
let name = matchstr(line, '[^\t]*', e)
|
||||
let typename = ''
|
||||
if has_key(a:matches[i], 'dict')
|
||||
"if a:matches[i].dict['name'] == "gui"
|
||||
"echomsg string(a:matches[i].dict)
|
||||
"endif
|
||||
if has_key(a:matches[i].dict, 'typename')
|
||||
let typename = a:matches[i].dict['typename']
|
||||
endif
|
||||
let line = "\t" . a:matches[i].dict['cmd']
|
||||
else
|
||||
let line = a:matches[i]['tagline']
|
||||
let e = matchend(line, '\ttypename:')
|
||||
if e > 0
|
||||
" Use typename field
|
||||
let typename = matchstr(line, '[^\t]*', e)
|
||||
endif
|
||||
endif
|
||||
if typename != ''
|
||||
call extend(res, s:StructMembers(name, a:items))
|
||||
else
|
||||
" Use the search command (the declaration itself).
|
||||
let s = match(line, '\t\zs/^')
|
||||
if s > 0
|
||||
let e = match(line, a:matches[i]['match'], s)
|
||||
let e = match(line, '\<' . a:matches[i]['match'] . '\>', s)
|
||||
if e > 0
|
||||
"if a:matches[i].dict['name'] == "gui"
|
||||
"echomsg strpart(line, s, e - s)
|
||||
"endif
|
||||
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
" Vim completion script
|
||||
" Language: XHTML 1.0 Strict
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2005 Now 20
|
||||
" Last Change: 2006 Jan 30
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let curline = line('.')
|
||||
let compl_begin = col('.') - 2
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
|
||||
let start -= 1
|
||||
@@ -20,8 +21,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
|
||||
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
|
||||
if stylestart != 0 && styleend != 0
|
||||
let curpos = line('.')
|
||||
if stylestart <= curpos && styleend >= curpos
|
||||
if stylestart <= curline && styleend >= curline
|
||||
let start = col('.') - 1
|
||||
let b:csscompl = 1
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||
@@ -29,9 +29,42 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
endwhile
|
||||
endif
|
||||
endif
|
||||
if !exists("b:csscompl")
|
||||
let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
|
||||
let scriptend = searchpair('<script\>', '', '<\/script\>', "nW")
|
||||
if scriptstart != 0 && scriptend != 0
|
||||
if scriptstart <= curline && scriptend >= curline
|
||||
let start = col('.') - 1
|
||||
let b:jscompl = 1
|
||||
let b:jsrange = [scriptstart, scriptend]
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||
let start -= 1
|
||||
endwhile
|
||||
endif
|
||||
endif
|
||||
if !exists("b:csscompl") && !exists("b:jscompl")
|
||||
let b:compl_context = getline('.')[0:(compl_begin)]
|
||||
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
|
||||
if b:compl_context !~ '<[^>]*$'
|
||||
" Look like we may have broken tag. Check previous lines. Up to
|
||||
" 10?
|
||||
let i = 1
|
||||
while 1
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$'
|
||||
" Normal tag line, no need for completion at all
|
||||
let b:compl_context = ''
|
||||
break
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
" Make sure we don't have counter
|
||||
unlet! i
|
||||
endif
|
||||
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
|
||||
else
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
endif
|
||||
@@ -42,12 +75,22 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let res2 = []
|
||||
" a:base is very short - we need context
|
||||
let context = b:compl_context
|
||||
unlet! b:compl_context
|
||||
" Check if we should do CSS completion inside of <style> tag
|
||||
if exists("b:csscompl")
|
||||
unlet! b:csscompl
|
||||
let context = b:compl_context
|
||||
return csscomplete#CompleteCSS(0, context)
|
||||
elseif exists("b:jscompl")
|
||||
unlet! b:jscompl
|
||||
let context = b:compl_context
|
||||
return javascriptcomplete#CompleteJS(0, context)
|
||||
else
|
||||
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
|
||||
return []
|
||||
endif
|
||||
let context = matchstr(b:compl_context, '.\zs.*')
|
||||
endif
|
||||
unlet! b:compl_context
|
||||
" Make entities completion
|
||||
if exists("b:entitiescompl")
|
||||
unlet! b:entitiescompl
|
||||
@@ -58,13 +101,25 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
|
||||
let entities = g:xmldata_xhtml10s['vimxmlentities']
|
||||
|
||||
for m in entities
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m.';')
|
||||
endif
|
||||
endfor
|
||||
if len(a:base) == 1
|
||||
for m in entities
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m.';')
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
else
|
||||
for m in entities
|
||||
if m =~? '^'.a:base
|
||||
call add(res, m.';')
|
||||
elseif m =~? a:base
|
||||
call add(res2, m.';')
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
endif
|
||||
|
||||
return res
|
||||
|
||||
endif
|
||||
if context =~ '>'
|
||||
@@ -72,6 +127,9 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
" should abandon action - with one exception: <style> span { bo
|
||||
if context =~ 'style[^>]\{-}>[^<]\{-}$'
|
||||
return csscomplete#CompleteCSS(0, context)
|
||||
elseif context =~ 'script[^>]\{-}>[^<]\{-}$'
|
||||
let b:jsrange = [line('.'), search('<\/script\>', 'nW')]
|
||||
return javascriptcomplete#CompleteJS(0, context)
|
||||
else
|
||||
return []
|
||||
endif
|
||||
@@ -456,6 +514,13 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
endif
|
||||
" Deal with tag completion.
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
if opentag == ''
|
||||
" Hack for sometimes failing GetLastOpenTag.
|
||||
" As far as I tested fail isn't GLOT fault but problem
|
||||
" of invalid document - not properly closed tags and other mish-mash.
|
||||
" If returns empty string assume <body>. Safe bet.
|
||||
let opentag = 'body'
|
||||
endif
|
||||
|
||||
if !exists("g:xmldata_xhtml10s")
|
||||
runtime! autoload/xml/xhtml10s.vim
|
||||
@@ -463,7 +528,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
|
||||
let tags = g:xmldata_xhtml10s[opentag][0]
|
||||
|
||||
for m in tags
|
||||
for m in sort(tags)
|
||||
if m =~ '^'.context
|
||||
call add(res, m)
|
||||
elseif m =~ context
|
||||
|
||||
495
runtime/autoload/javascriptcomplete.vim
Normal file
495
runtime/autoload/javascriptcomplete.vim
Normal file
@@ -0,0 +1,495 @@
|
||||
" Vim completion script
|
||||
" Language: Java Script
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Jan 30
|
||||
|
||||
function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let curline = line('.')
|
||||
let compl_begin = col('.') - 2
|
||||
" Bit risky but JS is rather limited language and local chars shouldn't
|
||||
" fint way into names
|
||||
while start >= 0 && line[start - 1] =~ '\w'
|
||||
let start -= 1
|
||||
endwhile
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
return start
|
||||
else
|
||||
" Initialize base return lists
|
||||
let res = []
|
||||
let res2 = []
|
||||
" a:base is very short - we need context
|
||||
let context = b:compl_context
|
||||
" Shortcontext is context without a:base, useful for checking if we are
|
||||
" looking for objects
|
||||
let shortcontext = substitute(context, a:base.'$', '', '')
|
||||
unlet! b:compl_context
|
||||
|
||||
if shortcontext =~ '\.$'
|
||||
" Complete methods and properties for objects
|
||||
" DOM separate
|
||||
let doms = ['style.']
|
||||
" Arrays
|
||||
let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype']
|
||||
let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift',
|
||||
\ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf',
|
||||
\ 'watch', 'unwatch']
|
||||
call map(arraymeth, 'v:val."("')
|
||||
let arrays = arrayprop + arraymeth
|
||||
|
||||
" Boolean - complete subset of array values
|
||||
" properties - constructor, prototype
|
||||
" methods - toSource, toString, valueOf
|
||||
|
||||
" Date
|
||||
" properties - constructor, prototype
|
||||
let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds',
|
||||
\ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset',
|
||||
\ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds',
|
||||
\ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
|
||||
\ 'getYear', 'parse', 'parse',
|
||||
\ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds',
|
||||
\ 'setMinutes', 'setMonth', 'setSeconds',
|
||||
\ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds',
|
||||
\ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime',
|
||||
\ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString',
|
||||
\ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch']
|
||||
call map(datemeth, 'v:val."("')
|
||||
let dates = datemeth
|
||||
|
||||
" Function
|
||||
let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length',
|
||||
\ 'arity', 'constructor', 'length', 'prototype']
|
||||
let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf']
|
||||
call map(funcmeth, 'v:val."("')
|
||||
let funcs = funcprop + funcmeth
|
||||
|
||||
" Math
|
||||
let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT']
|
||||
let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor',
|
||||
\ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan',
|
||||
\ 'watch', 'unwatch']
|
||||
call map(mathmeth, 'v:val."("')
|
||||
let maths = mathprop + mathmeth
|
||||
|
||||
" Number
|
||||
let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY',
|
||||
\ 'constructor', 'prototype']
|
||||
let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf',
|
||||
\ 'watch', 'unwatch']
|
||||
call map(numbmeth, 'v:val."("')
|
||||
let numbs = numbprop + numbmeth
|
||||
|
||||
" Object
|
||||
let objeprop = ['constructor', 'prototype']
|
||||
let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf']
|
||||
call map(objemeth, 'v:val."("')
|
||||
let objes = objeprop + objemeth
|
||||
|
||||
" RegExp
|
||||
let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
|
||||
let regemeth = ['exec', 'toSource', 'toString', 'test', 'watch', 'unwatch']
|
||||
call map(regemeth, 'v:val."("')
|
||||
let reges = regeprop + regemeth
|
||||
|
||||
" String
|
||||
let striprop = ['constructor', 'length', 'prototype']
|
||||
let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat',
|
||||
\ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics',
|
||||
\ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small',
|
||||
\ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase',
|
||||
\ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch']
|
||||
call map(strimeth, 'v:val."("')
|
||||
let stris = striprop + strimeth
|
||||
|
||||
" User created properties
|
||||
if exists("b:jsrange")
|
||||
let file = getline(b:jsrange[0],b:jsrange[1])
|
||||
unlet! b:jsrange
|
||||
else
|
||||
let file = getline(1, '$')
|
||||
endif
|
||||
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\w"')
|
||||
let juser_props1 = join(user_props1, ' ')
|
||||
let user_props1 = split(juser_props1, '\zethis\.')
|
||||
unlet! juser_props1
|
||||
call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\w\\+\\ze")')
|
||||
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\w"')
|
||||
call map(user_props2, 'matchstr(v:val, "\\.prototype\\.\\zs\\w\\+\\ze")')
|
||||
let user_props = user_props1 + user_props2
|
||||
|
||||
" HTML DOM properties
|
||||
" Anchors - anchor.
|
||||
let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML',
|
||||
\ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus']
|
||||
let anchmeth = ['blur', 'focus']
|
||||
call map(anchmeth, 'v:val."("')
|
||||
let anths = anchprop + anchmeth
|
||||
" Area - area.
|
||||
let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id',
|
||||
\ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target']
|
||||
let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver']
|
||||
call map(areameth, 'v:val."("')
|
||||
let areas = areaprop + areameth
|
||||
" Base - base.
|
||||
let baseprop = ['href', 'id', 'target']
|
||||
let bases = baseprop
|
||||
" Body - body.
|
||||
let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop',
|
||||
\ 'text', 'vLink']
|
||||
let bodys = bodyprop
|
||||
" Document - document.
|
||||
let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
|
||||
\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
|
||||
let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
|
||||
\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
|
||||
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
|
||||
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
|
||||
call map(documeth, 'v:val."("')
|
||||
let docus = docuprop + documeth
|
||||
" Form - form.
|
||||
let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length',
|
||||
\ 'method', 'name', 'tabIndex', 'target']
|
||||
let formmeth = ['reset', 'submit', 'onReset', 'onSubmit']
|
||||
call map(formmeth, 'v:val."("')
|
||||
let forms = formprop + formmeth
|
||||
" Frame - frame.
|
||||
let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth',
|
||||
\ 'name', 'noResize', 'scrolling', 'src']
|
||||
let frammeth = ['blur', 'focus']
|
||||
call map(frammeth, 'v:val."("')
|
||||
let frams = framprop + frammeth
|
||||
" Frameset - frameset.
|
||||
let fsetprop = ['cols', 'id', 'rows']
|
||||
let fsetmeth = ['blur', 'focus']
|
||||
call map(fsetmeth, 'v:val."("')
|
||||
let fsets = fsetprop + fsetmeth
|
||||
" History - history.
|
||||
let histprop = ['length']
|
||||
let histmeth = ['back', 'forward', 'go']
|
||||
call map(histmeth, 'v:val."("')
|
||||
let hists = histprop + histmeth
|
||||
" Iframe - iframe.
|
||||
let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth',
|
||||
\ 'name', 'scrolling', 'src', 'width']
|
||||
let ifras = ifraprop
|
||||
" Image - image.
|
||||
let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
|
||||
\ 'lowsrc', 'name', 'src', 'useMap', 'vspace', 'width']
|
||||
let imagmeth = ['onAbort', 'onError', 'onLoad']
|
||||
call map(imagmeth, 'v:val."("')
|
||||
let imags = histprop + imagmeth
|
||||
" Button - accessible only by other properties
|
||||
let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
|
||||
let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
|
||||
call map(buttmeth, 'v:val."("')
|
||||
let butts = buttprop + buttmeth
|
||||
" Checkbox - accessible only by other properties
|
||||
let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
|
||||
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
|
||||
let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
|
||||
call map(checmeth, 'v:val."("')
|
||||
let checs = checprop + checmeth
|
||||
" File upload - accessible only by other properties
|
||||
let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
|
||||
let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
|
||||
call map(filemeth, 'v:val."("')
|
||||
let files = fileprop + filemeth
|
||||
" Hidden - accessible only by other properties
|
||||
let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value']
|
||||
let hidds = hiddprop
|
||||
" Password - accessible only by other properties
|
||||
let passprop = ['accept', 'accessKey', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex',
|
||||
\ 'type', 'value']
|
||||
let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown',
|
||||
\ 'onKeyPress', 'onKeyUp']
|
||||
call map(passmeth, 'v:val."("')
|
||||
let passs = passprop + passmeth
|
||||
" Radio - accessible only by other properties
|
||||
let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
|
||||
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
|
||||
let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
|
||||
call map(radimeth, 'v:val."("')
|
||||
let radis = radiprop + radimeth
|
||||
" Reset - accessible only by other properties
|
||||
let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
|
||||
let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
|
||||
call map(resemeth, 'v:val."("')
|
||||
let reses = reseprop + resemeth
|
||||
" Submit - accessible only by other properties
|
||||
let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
|
||||
let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart']
|
||||
call map(submmeth, 'v:val."("')
|
||||
let subms = submprop + submmeth
|
||||
" Text - accessible only by other properties
|
||||
let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly',
|
||||
\ 'size', 'tabIndex', 'type', 'value']
|
||||
let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown',
|
||||
\ 'onKeyPress', 'onKeyUp', 'onSelect']
|
||||
call map(textmeth, 'v:val."("')
|
||||
let texts = textprop + textmeth
|
||||
" Link - link.
|
||||
let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media',
|
||||
\ 'rel', 'rev', 'target', 'type']
|
||||
let linkmeth = ['onLoad']
|
||||
call map(linkmeth, 'v:val."("')
|
||||
let links = linkprop + linkmeth
|
||||
" Location - location.
|
||||
let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol',
|
||||
\ 'search']
|
||||
let locameth = ['assign', 'reload', 'replace']
|
||||
call map(locameth, 'v:val."("')
|
||||
let locas = locaprop + locameth
|
||||
" Meta - meta.
|
||||
let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme']
|
||||
let metas = metaprop
|
||||
" Navigator - navigator.
|
||||
let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled',
|
||||
\ 'platform', 'userAgent']
|
||||
let navimeth = ['javaEnabled', 'taintEnabled']
|
||||
call map(navimeth, 'v:val."("')
|
||||
let navis = naviprop + navimeth
|
||||
" Object - object.
|
||||
let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data',
|
||||
\ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex',
|
||||
\ 'type', 'useMap', 'vspace', 'width']
|
||||
let objes = objeprop
|
||||
" Option - accessible only by other properties
|
||||
let optiprop = ['defaultSelected',
|
||||
\ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value']
|
||||
let optis = optiprop
|
||||
" Screen - screen.
|
||||
let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width']
|
||||
let scres = screprop
|
||||
" Select - accessible only by other properties
|
||||
let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name',
|
||||
\ 'selectedIndex', 'size', 'tabIndex', 'type', 'value']
|
||||
let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus']
|
||||
call map(selemeth, 'v:val."("')
|
||||
let seles = seleprop + selemeth
|
||||
" Style - style.
|
||||
let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
|
||||
\ 'backgroundPosition', 'backgroundRepeat',
|
||||
\ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop',
|
||||
\ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor',
|
||||
\ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle',
|
||||
\ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth',
|
||||
\ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom',
|
||||
\ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth',
|
||||
\ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom',
|
||||
\ 'paddingLeft', 'paddingRight', 'paddingTop',
|
||||
\ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content',
|
||||
\ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction',
|
||||
\ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight',
|
||||
\ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility',
|
||||
\ 'width',
|
||||
\ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType',
|
||||
\ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex',
|
||||
\ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside',
|
||||
\ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout',
|
||||
\ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
|
||||
\ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes',
|
||||
\ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition',
|
||||
\ 'unicodeBidi', 'whiteSpace', 'wordSpacing']
|
||||
let styls = stylprop
|
||||
" Table - table.
|
||||
let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding',
|
||||
\ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width']
|
||||
let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow',
|
||||
\ 'deleteTFoot', 'deleteTHead', 'insertRow']
|
||||
call map(tablmeth, 'v:val."("')
|
||||
let tabls = tablprop + tablmeth
|
||||
" Table data - TableData.
|
||||
let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff',
|
||||
\ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width']
|
||||
let tdats = tdatprop
|
||||
" Table row - TableRow.
|
||||
let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex',
|
||||
\ 'vAlign']
|
||||
let trowmeth = ['deleteCell', 'insertCell']
|
||||
call map(trowmeth, 'v:val."("')
|
||||
let trows = trowprop + trowmeth
|
||||
" Textarea - accessible only by other properties
|
||||
let tareprop = ['accessKey', 'cols', 'defaultValue',
|
||||
\ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
|
||||
\ 'tabIndex', 'type', 'value']
|
||||
let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus']
|
||||
call map(taremeth, 'v:val."("')
|
||||
let tares = tareprop + taremeth
|
||||
" Window - window.
|
||||
let windprop = ['frames', 'closed', 'defaultStatus', 'length', 'name', 'opener', 'parent',
|
||||
\ 'self', 'status', 'top']
|
||||
let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus',
|
||||
\ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval',
|
||||
\ 'setTimeout']
|
||||
call map(windmeth, 'v:val."("')
|
||||
let winds = windprop + windmeth
|
||||
" XMLHttpRequest - access by new xxx()
|
||||
let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
|
||||
\ 'status', 'statusText']
|
||||
let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open',
|
||||
\ 'send', 'setRequestHeader']
|
||||
call map(xmlhmeth, 'v:val."("')
|
||||
let xmlhs = xmlhprop + xmlhmeth
|
||||
|
||||
let object = matchstr(shortcontext, '\zs\w\+\ze\(\[.\{-}\]\)\?\.$')
|
||||
let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
|
||||
let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\w\+\ze')
|
||||
|
||||
if object_type == 'Date'
|
||||
let values = dates
|
||||
elseif object_type == 'Image'
|
||||
let values = imags
|
||||
elseif object_type == 'Array'
|
||||
let values = arrays
|
||||
elseif object_type == 'Boolean'
|
||||
" TODO: a bit more than real boolean
|
||||
let values = arrays
|
||||
elseif object_type == 'XMLHttpRequest'
|
||||
let values = xmlhs
|
||||
elseif object_type == 'String'
|
||||
let values = stris
|
||||
endif
|
||||
|
||||
if !exists('values')
|
||||
" List of properties
|
||||
if shortcontext =~ 'Math\.$'
|
||||
let values = maths
|
||||
elseif shortcontext =~ 'anchor\.$'
|
||||
let values = anths
|
||||
elseif shortcontext =~ 'area\.$'
|
||||
let values = areas
|
||||
elseif shortcontext =~ 'base\.$'
|
||||
let values = bases
|
||||
elseif shortcontext =~ 'body\.$'
|
||||
let values = bodys
|
||||
elseif shortcontext =~ 'document\.$'
|
||||
let values = docus
|
||||
elseif shortcontext =~ 'form\.$'
|
||||
let values = forms
|
||||
elseif shortcontext =~ 'frameset\.$'
|
||||
let values = fsets
|
||||
elseif shortcontext =~ 'history\.$'
|
||||
let values = hists
|
||||
elseif shortcontext =~ 'iframe\.$'
|
||||
let values = ifras
|
||||
elseif shortcontext =~ 'image\.$'
|
||||
let values = imags
|
||||
elseif shortcontext =~ 'link\.$'
|
||||
let values = links
|
||||
elseif shortcontext =~ 'location\.$'
|
||||
let values = locas
|
||||
elseif shortcontext =~ 'meta\.$'
|
||||
let values = metas
|
||||
elseif shortcontext =~ 'navigator\.$'
|
||||
let values = navis
|
||||
elseif shortcontext =~ 'object\.$'
|
||||
let values = objes
|
||||
elseif shortcontext =~ 'screen\.$'
|
||||
let values = scres
|
||||
elseif shortcontext =~ 'style\.$'
|
||||
let values = styls
|
||||
elseif shortcontext =~ 'table\.$'
|
||||
let values = tabls
|
||||
elseif shortcontext =~ 'TableData\.$'
|
||||
let values = tdats
|
||||
elseif shortcontext =~ 'TableRow\.$'
|
||||
let values = trows
|
||||
elseif shortcontext =~ 'window\.$'
|
||||
let values = winds
|
||||
else
|
||||
let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris
|
||||
let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists
|
||||
let values += ifras + imags + links + locas + metas + navis + objes + scres + styls
|
||||
let values += tabls + trows + winds
|
||||
endif
|
||||
endif
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.a:base
|
||||
call add(res, m)
|
||||
elseif m =~? a:base
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
unlet! values
|
||||
return res + res2
|
||||
|
||||
endif
|
||||
|
||||
if exists("b:jsrange")
|
||||
let file = getline(b:jsrange[0],b:jsrange[1])
|
||||
unlet! b:jsrange
|
||||
else
|
||||
let file = getline(1, '$')
|
||||
endif
|
||||
|
||||
" Get variables data.
|
||||
let variables = filter(copy(file), 'v:val =~ "var\\s"')
|
||||
call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")')
|
||||
call map(variables, 'substitute(v:val, ";\\|$", ",", "g")')
|
||||
let vars = []
|
||||
" This loop is necessary to get variable names from constructs like:
|
||||
" var var1, var2, var3 = "something";
|
||||
for i in range(len(variables))
|
||||
let comma_separated = split(variables[i], ',\s*')
|
||||
call map(comma_separated, 'matchstr(v:val, "\\w\\+")')
|
||||
let vars += comma_separated
|
||||
endfor
|
||||
|
||||
let variables = sort(vars)
|
||||
|
||||
" Add undeclared variables.
|
||||
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\w\\+\\s*="')
|
||||
call map(undeclared_variables, 'matchstr(v:val, "^\\s*\\zs\\w\\+\\ze")')
|
||||
|
||||
let variables += sort(undeclared_variables)
|
||||
|
||||
" Get functions
|
||||
let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
|
||||
let arguments = copy(functions)
|
||||
call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\w\\+")')
|
||||
call map(functions, 'v:val."("')
|
||||
|
||||
" Get functions arguments
|
||||
call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")')
|
||||
let jargs = join(arguments, ',')
|
||||
let jargs = substitute(jargs, '\s', '', 'g')
|
||||
let arguments = split(jargs, ',')
|
||||
|
||||
" Built-in functions
|
||||
let builtin = []
|
||||
|
||||
" Top-level HTML DOM objects
|
||||
let htmldom = ['document', 'anchor', 'area', 'base', 'body', 'document', 'event', 'form', 'frame', 'frameset', 'history', 'iframe', 'image', 'input', 'link', 'location', 'meta', 'navigator', 'object', 'option', 'screen', 'select', 'table', 'tableData', 'tableHeader', 'tableRow', 'textarea', 'window']
|
||||
call map(htmldom, 'v:val."."')
|
||||
|
||||
" Top-level properties
|
||||
let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
|
||||
\ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat',
|
||||
\ 'parseInt', 'String', 'undefined', 'escape', 'unescape']
|
||||
|
||||
" Keywords
|
||||
let keywords = ["Array", "Boolean", "Date", "Function", "Math", "Number", "Object", "RegExp", "String", "XMLHttpRequest", "ActiveXObject", "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double ", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in ", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super ", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"]
|
||||
|
||||
let values = variables + functions + htmldom + arguments + builtin + properties + keywords
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.a:base
|
||||
call add(res, m)
|
||||
elseif m =~? a:base
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
endfunction
|
||||
@@ -1,7 +1,7 @@
|
||||
" netrw.vim: Handles file transfer and remote directory listing across a network
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Nov 28, 2005
|
||||
" Version: 76
|
||||
" Date: Jan 30, 2006
|
||||
" Version: 78
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
@@ -23,7 +23,7 @@
|
||||
if &cp || exists("g:loaded_netrw")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrw = "v76"
|
||||
let g:loaded_netrw = "v78"
|
||||
if v:version < 700
|
||||
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
|
||||
finish
|
||||
@@ -32,8 +32,12 @@ let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
" call Decho("doing autoload/netrw.vim")
|
||||
|
||||
" ======================
|
||||
" Netrw Variables: {{{1
|
||||
" ======================
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Default values for netrw's global protocol variables {{{1
|
||||
" Default values for netrw's global protocol variables {{{2
|
||||
if !exists("g:netrw_dav_cmd")
|
||||
let g:netrw_dav_cmd = "cadaver"
|
||||
endif
|
||||
@@ -84,14 +88,17 @@ if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Default values for netrw's global variables {{{1
|
||||
" Default values - a-c ---------- {{{2
|
||||
" Default values for netrw's global variables {{{2
|
||||
" Default values - a-c ---------- {{{3
|
||||
if !exists("g:netrw_alto")
|
||||
let g:netrw_alto= 0
|
||||
endif
|
||||
if !exists("g:netrw_altv")
|
||||
let g:netrw_altv= 0
|
||||
endif
|
||||
if !exists("g:netrw_browse_split")
|
||||
let g:netrw_browse_split= 0
|
||||
endif
|
||||
if !exists("g:netrw_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell == "bash"
|
||||
@@ -103,7 +110,7 @@ if !exists("g:netrw_cygwin")
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
" Default values - d-f ---------- {{{2
|
||||
" Default values - d-f ---------- {{{3
|
||||
if !exists("g:NETRW_DIRHIST_CNT")
|
||||
let g:NETRW_DIRHIST_CNT= 0
|
||||
endif
|
||||
@@ -123,7 +130,7 @@ endif
|
||||
if !exists("g:netrw_ftpmode")
|
||||
let g:netrw_ftpmode= "binary"
|
||||
endif
|
||||
" Default values - h-lh ---------- {{{2
|
||||
" Default values - h-lh ---------- {{{3
|
||||
if !exists("g:netrw_hide")
|
||||
let g:netrw_hide= 1
|
||||
endif
|
||||
@@ -142,7 +149,7 @@ endif
|
||||
if !exists("g:netrw_list_hide")
|
||||
let g:netrw_list_hide= ""
|
||||
endif
|
||||
" Default values - lh-lz ---------- {{{2
|
||||
" Default values - lh-lz ---------- {{{3
|
||||
if !exists("g:netrw_local_mkdir")
|
||||
let g:netrw_local_mkdir= "mkdir"
|
||||
endif
|
||||
@@ -159,7 +166,7 @@ endif
|
||||
if g:netrw_longlist == 1
|
||||
let g:netrw_list_cmd= g:netrw_list_cmd." -l"
|
||||
endif
|
||||
" Default values - m-r ---------- {{{2
|
||||
" Default values - m-r ---------- {{{3
|
||||
if !exists("g:netrw_maxfilenamelen")
|
||||
let g:netrw_maxfilenamelen= 32
|
||||
endif
|
||||
@@ -178,7 +185,7 @@ endif
|
||||
if !exists("g:netrw_rmf_cmd")
|
||||
let g:netrw_rmf_cmd = g:netrw_ssh_cmd." HOSTNAME rm -f"
|
||||
endif
|
||||
" Default values - s ---------- {{{2
|
||||
" Default values - s ---------- {{{3
|
||||
if exists("g:netrw_silent") && g:netrw_silent != 0
|
||||
let g:netrw_silentxfer= "silent "
|
||||
else
|
||||
@@ -198,7 +205,7 @@ endif
|
||||
if !exists("g:netrw_ssh_browse_reject")
|
||||
let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
|
||||
endif
|
||||
" Default values - t-w ---------- {{{2
|
||||
" Default values - t-w ---------- {{{3
|
||||
if !exists("g:netrw_timefmt")
|
||||
let g:netrw_timefmt= "%c"
|
||||
endif
|
||||
@@ -209,7 +216,7 @@ if !exists("g:netrw_winsize")
|
||||
let g:netrw_winsize= ""
|
||||
endif
|
||||
" ---------------------------------------------------------------------
|
||||
" Default values for netrw's script variables: {{{1
|
||||
" Default values for netrw's script variables: {{{2
|
||||
if !exists("s:netrw_cd_escape")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
let s:netrw_cd_escape="#% "
|
||||
@@ -230,8 +237,12 @@ endif
|
||||
" files read by network transfer aren't appropriately highlighted.
|
||||
"let g:decho_bufenter = 1 "Decho
|
||||
|
||||
" ==============================
|
||||
" Netrw Utility Functions: {{{1
|
||||
" ==============================
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetSavePosn: saves position of cursor on screen {{{1
|
||||
" NetSavePosn: saves position of cursor on screen {{{2
|
||||
fun! netrw#NetSavePosn()
|
||||
" call Dfunc("NetSavePosn()")
|
||||
" Save current line and column
|
||||
@@ -248,7 +259,7 @@ fun! netrw#NetSavePosn()
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{1
|
||||
" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{2
|
||||
fun! netrw#NetRestorePosn()
|
||||
" call Dfunc("NetRestorePosn() winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline)
|
||||
let eikeep= &ei
|
||||
@@ -275,15 +286,19 @@ fun! netrw#NetRestorePosn()
|
||||
" call Dret("NetRestorePosn")
|
||||
endfun
|
||||
|
||||
" ===============================
|
||||
" Netrw Transfer Functions: {{{1
|
||||
" ===============================
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetRead: responsible for reading a file over the net {{{1
|
||||
" NetRead: responsible for reading a file over the net {{{2
|
||||
fun! netrw#NetRead(...)
|
||||
" call Dfunc("NetRead(a:1<".a:1.">)")
|
||||
|
||||
" save options
|
||||
call s:NetOptionSave()
|
||||
|
||||
" Special Exception: if a file is named "0r", then
|
||||
" Special Exception: if a file is named "0r", then {{{3
|
||||
" "0r" will be used to read the
|
||||
" following files instead of "r"
|
||||
if a:0 == 0
|
||||
@@ -297,7 +312,7 @@ fun! netrw#NetRead(...)
|
||||
let ichoice = 1
|
||||
endif
|
||||
|
||||
" get name of a temporary file and set up shell-quoting character
|
||||
" get name of a temporary file and set up shell-quoting character {{{3
|
||||
let tmpfile= tempname()
|
||||
let tmpfile= substitute(tmpfile,'\','/','ge')
|
||||
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
|
||||
@@ -377,7 +392,7 @@ fun! netrw#NetRead(...)
|
||||
let tmpfile = fnamemodify(tmpfile,':t')
|
||||
endif
|
||||
|
||||
" Determine method of read (ftp, rcp, etc)
|
||||
" Determine method of read (ftp, rcp, etc) {{{3
|
||||
call s:NetMethod(choice)
|
||||
|
||||
" Check if NetBrowse() should be handling this request
|
||||
@@ -389,21 +404,21 @@ fun! netrw#NetRead(...)
|
||||
endif
|
||||
|
||||
" use filename's suffix for the temporary file
|
||||
if b:netrw_fname =~ '\.[^./]\+'
|
||||
let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)','\1','e')
|
||||
if b:netrw_fname =~ '\.[^./]\+$'
|
||||
let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)$','\1','e')
|
||||
let tmpfile= substitute(tmpfile,"$",suffix,'e')
|
||||
" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix)")
|
||||
" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">")
|
||||
endif
|
||||
|
||||
" ============
|
||||
" Perform Read
|
||||
" ============
|
||||
" Perform Protocol-Based Read {{{3
|
||||
" ===========================
|
||||
if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
|
||||
echo "(netrw) Processing your read request..."
|
||||
endif
|
||||
|
||||
".........................................
|
||||
" rcp: NetRead Method #1
|
||||
" rcp: NetRead Method #1 {{{3
|
||||
if b:netrw_method == 1 " read with rcp
|
||||
" call Decho("read via rcp (method #1)")
|
||||
" ER: noting done with g:netrw_uid yet?
|
||||
@@ -430,7 +445,7 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" ftp + <.netrc>: NetRead Method #2
|
||||
" ftp + <.netrc>: NetRead Method #2 {{{3
|
||||
elseif b:netrw_method == 2 " read with ftp + <.netrc>
|
||||
" call Decho("read via ftp+.netrc (method #2)")
|
||||
let netrw_fname= b:netrw_fname
|
||||
@@ -460,7 +475,7 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" ftp + machine,id,passwd,filename: NetRead Method #3
|
||||
" ftp + machine,id,passwd,filename: NetRead Method #3 {{{3
|
||||
elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname
|
||||
" Construct execution string (four lines) which will be passed through filter
|
||||
" call Decho("read via ftp+mipf (method #3)")
|
||||
@@ -512,7 +527,7 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" scp: NetRead Method #4
|
||||
" scp: NetRead Method #4 {{{3
|
||||
elseif b:netrw_method == 4 " read with scp
|
||||
" call Decho("read via scp (method #4)")
|
||||
if exists("g:netrw_port") && g:netrw_port != ""
|
||||
@@ -522,17 +537,18 @@ fun! netrw#NetRead(...)
|
||||
endif
|
||||
if g:netrw_cygwin == 1
|
||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile)
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile
|
||||
else
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".tmpfile)
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".tmpfile
|
||||
endif
|
||||
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
elseif b:netrw_method == 5 " read with http (wget)
|
||||
" http: NetRead Method #5 (wget) {{{3
|
||||
elseif b:netrw_method == 5
|
||||
" call Decho("read via http (method #5)")
|
||||
if g:netrw_http_cmd == ""
|
||||
if !exists("g:netrw_quiet")
|
||||
@@ -564,8 +580,8 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" cadaver: NetRead Method #6
|
||||
elseif b:netrw_method == 6 " read with cadaver
|
||||
" cadaver: NetRead Method #6 {{{3
|
||||
elseif b:netrw_method == 6
|
||||
" call Decho("read via cadaver (method #6)")
|
||||
|
||||
" Construct execution string (four lines) which will be passed through filter
|
||||
@@ -596,8 +612,8 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" rsync: NetRead Method #7
|
||||
elseif b:netrw_method == 7 " read with rsync
|
||||
" rsync: NetRead Method #7 {{{3
|
||||
elseif b:netrw_method == 7
|
||||
" call Decho("read via rsync (method #7)")
|
||||
if g:netrw_cygwin == 1
|
||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||
@@ -611,9 +627,9 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" fetch: NetRead Method #8
|
||||
" fetch: NetRead Method #8 {{{3
|
||||
" fetch://[user@]host[:http]/path
|
||||
elseif b:netrw_method == 8 " read with fetch
|
||||
elseif b:netrw_method == 8
|
||||
if g:netrw_fetch_cmd == ""
|
||||
if !exists("g:netrw_quiet")
|
||||
echohl Error | echo "***netrw*** fetch command not available" | echohl None
|
||||
@@ -640,8 +656,8 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" sftp: NetRead Method #9
|
||||
elseif b:netrw_method == 9 " read with sftp
|
||||
" sftp: NetRead Method #9 {{{3
|
||||
elseif b:netrw_method == 9
|
||||
" call Decho("read via sftp (method #4)")
|
||||
if g:netrw_cygwin == 1
|
||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||
@@ -656,12 +672,13 @@ fun! netrw#NetRead(...)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
else " Complain
|
||||
" Complain {{{3
|
||||
else
|
||||
echo "***warning*** unable to comply with your request<" . choice . ">"
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" cleanup
|
||||
" cleanup {{{3
|
||||
" call Decho("cleanup")
|
||||
if exists("b:netrw_method")
|
||||
unlet b:netrw_method
|
||||
@@ -673,7 +690,7 @@ fun! netrw#NetRead(...)
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{1
|
||||
" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
|
||||
fun! s:NetGetFile(readcmd, tfile, method)
|
||||
" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
|
||||
|
||||
@@ -715,13 +732,14 @@ fun! s:NetGetFile(readcmd, tfile, method)
|
||||
elseif rfile =~ '\.tar$'
|
||||
call tar#Browse(tfile)
|
||||
else
|
||||
" call Decho("edit temporary file")
|
||||
e
|
||||
endif
|
||||
|
||||
" rename buffer back to remote filename
|
||||
keepalt exe "file ".rfile
|
||||
keepalt exe "file ".escape(rfile,' ')
|
||||
filetype detect
|
||||
" call Dredir("ls!","renamed buffer back to remote filename<".rfile.">")
|
||||
" call Dredir("ls!","renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">")
|
||||
let line1 = 1
|
||||
let line2 = line("$")
|
||||
|
||||
@@ -764,7 +782,7 @@ fun! s:NetGetFile(readcmd, tfile, method)
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetWrite: responsible for writing a file over the net {{{1
|
||||
" NetWrite: responsible for writing a file over the net {{{2
|
||||
fun! netrw#NetWrite(...) range
|
||||
" call Dfunc("NetWrite(a:0=".a:0.")")
|
||||
|
||||
@@ -772,7 +790,7 @@ fun! netrw#NetWrite(...) range
|
||||
let mod= 0
|
||||
call s:NetOptionSave()
|
||||
|
||||
" Get Temporary Filename
|
||||
" Get Temporary Filename {{{3
|
||||
let tmpfile= tempname()
|
||||
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
|
||||
echohl Error | echo "***netrw*** your ".substitute(tmpfile,'[^/]\+$','','e')." directory is missing!"
|
||||
@@ -800,6 +818,7 @@ fun! netrw#NetWrite(...) range
|
||||
|
||||
while ichoice <= a:0
|
||||
|
||||
" Process arguments: {{{3
|
||||
" attempt to repeat with previous host-file-etc
|
||||
if exists("b:netrw_lastfile") && a:0 == 0
|
||||
" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
|
||||
@@ -860,19 +879,19 @@ fun! netrw#NetWrite(...) range
|
||||
let tmpfile = fnamemodify(tmpfile,':t')
|
||||
endif
|
||||
|
||||
" Determine method of read (ftp, rcp, etc)
|
||||
" Determine method of read (ftp, rcp, etc) {{{3
|
||||
call s:NetMethod(choice)
|
||||
|
||||
" =============
|
||||
" Perform Write
|
||||
" =============
|
||||
" Perform Protocol-Based Write {{{3
|
||||
" ============================
|
||||
if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
|
||||
echo "(netrw) Processing your write request..."
|
||||
endif
|
||||
|
||||
".........................................
|
||||
" rcp: NetWrite Method #1
|
||||
if b:netrw_method == 1 " write with rcp
|
||||
" rcp: NetWrite Method #1 {{{3
|
||||
if b:netrw_method == 1
|
||||
" call Decho("write via rcp (method #1)")
|
||||
if s:netrw_has_nt_rcp == 1
|
||||
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
||||
@@ -892,8 +911,8 @@ fun! netrw#NetWrite(...) range
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" ftp + <.netrc>: NetWrite Method #2
|
||||
elseif b:netrw_method == 2 " write with ftp + <.netrc>
|
||||
" ftp + <.netrc>: NetWrite Method #2 {{{3
|
||||
elseif b:netrw_method == 2
|
||||
let netrw_fname = b:netrw_fname
|
||||
new
|
||||
setlocal ff=unix
|
||||
@@ -920,8 +939,8 @@ fun! netrw#NetWrite(...) range
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" ftp + machine, id, passwd, filename: NetWrite Method #3
|
||||
elseif b:netrw_method == 3 " write with ftp + machine, id, passwd, and fname
|
||||
" ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3
|
||||
elseif b:netrw_method == 3
|
||||
let netrw_fname= b:netrw_fname
|
||||
new
|
||||
setlocal ff=unix
|
||||
@@ -964,8 +983,8 @@ fun! netrw#NetWrite(...) range
|
||||
bd!
|
||||
|
||||
".........................................
|
||||
" scp: NetWrite Method #4
|
||||
elseif b:netrw_method == 4 " write with scp
|
||||
" scp: NetWrite Method #4 {{{3
|
||||
elseif b:netrw_method == 4
|
||||
if exists("g:netrw_port") && g:netrw_port != ""
|
||||
let useport= " -P ".g:netrw_port
|
||||
else
|
||||
@@ -973,16 +992,16 @@ fun! netrw#NetWrite(...) range
|
||||
endif
|
||||
if g:netrw_cygwin == 1
|
||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
|
||||
else
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
|
||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
|
||||
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
|
||||
endif
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" http: NetWrite Method #5
|
||||
" http: NetWrite Method #5 {{{3
|
||||
elseif b:netrw_method == 5
|
||||
if !exists("g:netrw_quiet")
|
||||
echohl Error | echo "***netrw*** currently <netrw.vim> does not support writing using http:" | echohl None
|
||||
@@ -990,8 +1009,8 @@ fun! netrw#NetWrite(...) range
|
||||
endif
|
||||
|
||||
".........................................
|
||||
" dav: NetWrite Method #6
|
||||
elseif b:netrw_method == 6 " write with cadaver
|
||||
" dav: NetWrite Method #6 (cadaver) {{{3
|
||||
elseif b:netrw_method == 6
|
||||
" call Decho("write via cadaver (method #6)")
|
||||
|
||||
" Construct execution string (four lines) which will be passed through filter
|
||||
@@ -1020,8 +1039,8 @@ fun! netrw#NetWrite(...) range
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" rsync: NetWrite Method #7
|
||||
elseif b:netrw_method == 7 " write with rsync
|
||||
" rsync: NetWrite Method #7 {{{3
|
||||
elseif b:netrw_method == 7
|
||||
if g:netrw_cygwin == 1
|
||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||
" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||
@@ -1033,8 +1052,8 @@ fun! netrw#NetWrite(...) range
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" scp: NetWrite Method #9
|
||||
elseif b:netrw_method == 9 " write with sftp
|
||||
" sftp: NetWrite Method #9 {{{3
|
||||
elseif b:netrw_method == 9
|
||||
let netrw_fname= b:netrw_fname
|
||||
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
||||
let uid_machine = g:netrw_uid .'@'. g:netrw_machine
|
||||
@@ -1051,12 +1070,13 @@ fun! netrw#NetWrite(...) range
|
||||
let b:netrw_lastfile= choice
|
||||
|
||||
".........................................
|
||||
else " Complain
|
||||
" Complain {{{3
|
||||
else
|
||||
echo "***warning*** unable to comply with your request<" . choice . ">"
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" cleanup
|
||||
" cleanup {{{3
|
||||
" call Decho("cleanup")
|
||||
let result=delete(tmpfile)
|
||||
call s:NetOptionRestore()
|
||||
@@ -1072,6 +1092,7 @@ endfun
|
||||
" Remote Directory Browsing Support: {{{1
|
||||
" ===========================================
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2
|
||||
" of the contents of a remote directory. It is assumed that the
|
||||
" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted
|
||||
@@ -1235,10 +1256,10 @@ fun! s:NetBrowse(dirname)
|
||||
" call Decho("exe file ".escape(bufname,s:netrw_cd_escape))
|
||||
exe 'file '.escape(bufname,s:netrw_cd_escape)
|
||||
" call Decho("renaming file to bufname<".bufname.">")
|
||||
setlocal bh=hide bt=nofile nobl nonu
|
||||
setlocal bh=hide bt=nofile nobl nonu noswf
|
||||
|
||||
" save current directory on directory history list
|
||||
call <SID>NetBookmarkDir(3,expand("%"))
|
||||
call s:NetBookmarkDir(3,expand("%"))
|
||||
|
||||
" set up buffer-local mappings
|
||||
" call Decho("set up buffer-local mappings")
|
||||
@@ -1256,6 +1277,7 @@ fun! s:NetBrowse(dirname)
|
||||
nnoremap <buffer> <silent> i :call <SID>NetLongList(0)<cr>
|
||||
nnoremap <buffer> <silent> o :call <SID>NetSplit(0)<cr>
|
||||
nnoremap <buffer> <silent> O :call <SID>NetObtain()<cr>
|
||||
nnoremap <buffer> <silent> P :call <SID>NetPrevWinOpen(0)<cr>
|
||||
nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,expand("%"))<cr>
|
||||
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
|
||||
@@ -1263,7 +1285,7 @@ fun! s:NetBrowse(dirname)
|
||||
nnoremap <buffer> <silent> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
|
||||
nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
|
||||
nnoremap <buffer> <silent> v :call <SID>NetSplit(1)<cr>
|
||||
nnoremap <buffer> <silent> x :call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
|
||||
nnoremap <buffer> <silent> x :call netrw#NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
|
||||
nnoremap <buffer> <silent> <2-leftmouse> :call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
|
||||
exe 'nnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
|
||||
@@ -1446,6 +1468,13 @@ fun! s:NetBrowseChgDir(dirname,newdir)
|
||||
if newdir !~ '[\/]$'
|
||||
" handling a file
|
||||
let dirname= dirname.newdir
|
||||
if g:netrw_browse_split == 1
|
||||
new
|
||||
wincmd _
|
||||
elseif g:netrw_browse_split == 2
|
||||
rightb vert new
|
||||
wincmd |
|
||||
endif
|
||||
" call Decho("handling a file: dirname<".dirname.">")
|
||||
|
||||
elseif newdir == './'
|
||||
@@ -1479,7 +1508,7 @@ fun! s:NetBrowseChgDir(dirname,newdir)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetGetWord: it gets the directory named under the cursor
|
||||
" NetGetWord: it gets the directory named under the cursor {{{2
|
||||
fun! s:NetGetWord()
|
||||
" call Dfunc("NetGetWord() line#".line("."))
|
||||
call s:UseBufWinVars()
|
||||
@@ -1651,7 +1680,7 @@ fun! s:NetBrowseRm(usrhost,path) range
|
||||
" refresh the directory
|
||||
let curline= line(".")-1
|
||||
" call Decho("refresh the directory")
|
||||
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
|
||||
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
|
||||
exe curline
|
||||
|
||||
" call Dret("NetBrowseRm")
|
||||
@@ -1692,7 +1721,7 @@ fun! s:NetBrowseRename(usrhost,path) range
|
||||
|
||||
" refresh the directory
|
||||
let curline= line(".")
|
||||
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
|
||||
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
|
||||
exe "keepjumps ".curline
|
||||
" call Dret("NetBrowseRename")
|
||||
endfun
|
||||
@@ -1721,29 +1750,29 @@ endfun
|
||||
" =2 : local and o
|
||||
" =3 : local and v
|
||||
fun! s:NetSplit(mode)
|
||||
" call Dfunc("NetSplit(mode=".a:mode.")")
|
||||
" call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
|
||||
|
||||
call s:SaveWinVars()
|
||||
if a:mode == 0
|
||||
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
|
||||
call s:CopyWinVars()
|
||||
exe "norm! 0"
|
||||
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
|
||||
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
|
||||
elseif a:mode ==1
|
||||
exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
|
||||
call s:CopyWinVars()
|
||||
exe "norm! 0"
|
||||
call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
|
||||
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
|
||||
elseif a:mode ==2
|
||||
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
|
||||
call s:CopyWinVars()
|
||||
exe "norm! 0"
|
||||
call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
|
||||
call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
|
||||
else
|
||||
exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
|
||||
call s:CopyWinVars()
|
||||
exe "norm! 0"
|
||||
call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
|
||||
call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
|
||||
endif
|
||||
|
||||
" call Dret("NetSplit")
|
||||
@@ -1752,8 +1781,8 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
" NetBrowseX: allows users to write custom functions to operate on {{{2
|
||||
" files given their extension. Passes 0=local, 1=remote
|
||||
fun! s:NetBrowseX(fname,remote)
|
||||
" call Dfunc("NetBrowseX(".a:fname." remote=".a:remote.")")
|
||||
fun! netrw#NetBrowseX(fname,remote)
|
||||
" call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")")
|
||||
|
||||
" set up the filename
|
||||
" (lower case the extension, make a local copy of a remote file)
|
||||
@@ -1764,6 +1793,23 @@ fun! s:NetBrowseX(fname,remote)
|
||||
let fname= escape(a:fname,"%#")
|
||||
" call Decho("fname<".fname."> after escape()")
|
||||
|
||||
" seems kde systems often have gnome-open due to dependencies, even though
|
||||
" gnome-open's subsidiary display tools are largely absent. Kde systems
|
||||
" usually have "kicker" running, though... (tnx Mikolaj Machowski)
|
||||
if !exists("s:haskicker")
|
||||
if has("unix")
|
||||
let v:shell_error=0
|
||||
silent! let s:haskicker= system('ps -e') =~ 'kicker'
|
||||
if v:shell_error
|
||||
let s:haskicker = 0
|
||||
let v:shell_error = 0
|
||||
endif
|
||||
else
|
||||
let s:haskicker= 0
|
||||
endif
|
||||
" call Decho("setting s:haskicker=".s:haskicker)
|
||||
endif
|
||||
|
||||
if a:remote == 1
|
||||
" create a local copy
|
||||
let fname= tempname().".".exten
|
||||
@@ -1777,24 +1823,37 @@ fun! s:NetBrowseX(fname,remote)
|
||||
|
||||
" set up redirection
|
||||
if &srr =~ "%s"
|
||||
let redir= substitute(&srr,"%s","/dev/null"."")
|
||||
let redir= substitute(&srr,"%s","/dev/null","")
|
||||
else
|
||||
let redir= &srr . "/dev/null"
|
||||
endif
|
||||
" call Decho("redir:".redir.":")
|
||||
|
||||
if exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer)
|
||||
if g:netrw_browsex_viewer == '-'
|
||||
call netrwFileHandlers#Init()
|
||||
if exten != "" && exists("*netrwFileHandlers#NFH_".exten)
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")')
|
||||
exe "let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")'
|
||||
endif
|
||||
else
|
||||
" call Decho("exe silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."' ".redir)
|
||||
exe "silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."'".redir
|
||||
let ret= v:shell_error
|
||||
endif
|
||||
|
||||
" execute the file handler
|
||||
if has("win32") || has("win64")
|
||||
elseif has("win32") || has("win64")
|
||||
" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"')
|
||||
exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"'
|
||||
let ret= v:shell_error
|
||||
|
||||
elseif has("unix") && executable("gnome-open")
|
||||
elseif has("unix") && executable("gnome-open") && !s:haskicker
|
||||
" call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
|
||||
exe "silent !gnome-open '".escape(fname,'%#')."'".redir
|
||||
let ret= v:shell_error
|
||||
|
||||
elseif has("unix") && executable("kfmclient")
|
||||
elseif has("unix") && executable("kfmclient") && s:haskicker
|
||||
" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
|
||||
exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
|
||||
let ret= v:shell_error
|
||||
@@ -1969,7 +2028,7 @@ fun! s:NetHideEdit(islocal)
|
||||
if a:islocal == 0
|
||||
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
|
||||
else
|
||||
silent call s:NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
|
||||
silent call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
|
||||
endif
|
||||
|
||||
" call Dret("NetHideEdit")
|
||||
@@ -1989,7 +2048,7 @@ fun! s:NetSortSequence(mode)
|
||||
if a:mode == 0
|
||||
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
|
||||
else
|
||||
silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
|
||||
silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
|
||||
endif
|
||||
|
||||
" call Dret("NetSortSequence")
|
||||
@@ -2025,9 +2084,9 @@ fun! s:NetLongList(mode)
|
||||
|
||||
" refresh the listing
|
||||
if a:mode == 0
|
||||
silent call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),"./"))
|
||||
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),"./"))
|
||||
else
|
||||
silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
|
||||
silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
|
||||
endif
|
||||
|
||||
" keep cursor on the filename
|
||||
@@ -2434,6 +2493,82 @@ fun! s:NetObtain()
|
||||
" call Dret("NetObtain")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetPrevWinOpen: opoen file/directory in previous window. {{{2
|
||||
" If there's only one window, then the window will first be split.
|
||||
fun! s:NetPrevWinOpen(islocal)
|
||||
" call Dfunc("NetPrevWinOpen(islocal=".a:islocal.")")
|
||||
|
||||
" get last window number and the word currently under the cursor
|
||||
let lastwinnr = winnr("$")
|
||||
let curword = s:NetGetWord()
|
||||
let curdir = b:netrw_curdir
|
||||
" call Decho("lastwinnr=".lastwinnr." curword<".curword.">")
|
||||
|
||||
let didsplit = 0
|
||||
if lastwinnr == 1
|
||||
" if only one window, open a new one first
|
||||
" call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")")
|
||||
exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
|
||||
let didsplit = 1
|
||||
|
||||
else
|
||||
wincmd p
|
||||
" if the previous window's buffer has been changed (is modified),
|
||||
" and it doesn't appear in any other extant window, then ask the
|
||||
" user if s/he wants to abandon modifications therein.
|
||||
let bnr = winbufnr(0)
|
||||
let bnrcnt = 0
|
||||
if &mod
|
||||
windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif
|
||||
" call Decho("bnr=".bnr." bnrcnt=".bnrcnt)
|
||||
if bnrcnt == 1
|
||||
let bufname= bufname(winbufnr(winnr()))
|
||||
let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel")
|
||||
|
||||
if choice == 1
|
||||
" Yes -- write file & then browse
|
||||
let v:errmsg= ""
|
||||
silent w
|
||||
if v:errmsg != ""
|
||||
echohl Error | echo "***netrw*** "unable to write <".bufname.">!" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
if didsplit
|
||||
q
|
||||
else
|
||||
wincmd p
|
||||
endif
|
||||
" call Dret("NetPrevWinOpen : unable to write <".bufname.">")
|
||||
return
|
||||
endif
|
||||
|
||||
elseif choice == 2
|
||||
" No -- don't worry about changed file, just browse anyway
|
||||
set nomod
|
||||
echohl WarningMsg | echo "***netrw*** ".bufname." changes abandoned" | echohl None
|
||||
|
||||
else
|
||||
" Cancel -- don't do this
|
||||
if didsplit
|
||||
q
|
||||
else
|
||||
wincmd p
|
||||
endif
|
||||
" call Dret("NetPrevWinOpen : cancelled")
|
||||
return
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:islocal
|
||||
call s:LocalBrowse(s:LocalBrowseChgDir(curdir,curword))
|
||||
else
|
||||
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),curword))
|
||||
endif
|
||||
" call Dret("NetPrevWinOpen")
|
||||
endfun
|
||||
|
||||
" ==========================================
|
||||
" Local Directory Browsing Support: {{{1
|
||||
" ==========================================
|
||||
@@ -2445,7 +2580,7 @@ fun! s:LocalBrowse(dirname)
|
||||
" the BufEnter event causes triggering when attempts to write to
|
||||
" the DBG buffer are made.
|
||||
if isdirectory(a:dirname)
|
||||
call netrw#DirBrowse(a:dirname)
|
||||
silent! call netrw#DirBrowse(a:dirname)
|
||||
endif
|
||||
" not a directory, ignore it
|
||||
endfun
|
||||
@@ -2462,6 +2597,7 @@ fun! netrw#DirBrowse(dirname)
|
||||
" call Dret("DirBrowse")
|
||||
return
|
||||
endif
|
||||
|
||||
call s:NetOptionSave()
|
||||
|
||||
if v:version < 603
|
||||
@@ -2550,10 +2686,13 @@ fun! netrw#DirBrowse(dirname)
|
||||
endif
|
||||
|
||||
" change the name of the buffer to reflect the b:netrw_curdir
|
||||
" Hmm. When another vim is open to the same directory, I get
|
||||
" a "Press ENTER" ... ok, setting "noswf" avoids it.
|
||||
" call Decho('exe silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape))
|
||||
exe 'silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape)
|
||||
|
||||
" make this buffer not-a-file, modifiable, not line-numbered, etc
|
||||
setlocal bh=hide bt=nofile nobl ma nonu
|
||||
setlocal bh=hide bt=nofile nobl ma nonu noswf
|
||||
keepalt silent! %d
|
||||
|
||||
" ---------------------------
|
||||
@@ -2563,7 +2702,7 @@ fun! netrw#DirBrowse(dirname)
|
||||
endif
|
||||
|
||||
" save current directory on directory history list
|
||||
call <SID>NetBookmarkDir(3,b:netrw_curdir)
|
||||
call s:NetBookmarkDir(3,b:netrw_curdir)
|
||||
|
||||
" set up all the maps
|
||||
" call Decho("Setting up local browser maps")
|
||||
@@ -2584,6 +2723,7 @@ fun! netrw#DirBrowse(dirname)
|
||||
nnoremap <buffer> <silent> o :call <SID>NetSplit(2)<cr>
|
||||
nnoremap <buffer> <silent> O :call <SID>LocalObtain()<cr>
|
||||
nnoremap <buffer> <silent> p :call <SID>LocalPreview(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),1))<cr>
|
||||
nnoremap <buffer> <silent> P :call <SID>NetPrevWinOpen(1)<cr>
|
||||
nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,b:netrw_curdir)<cr>
|
||||
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'),1)<cr>
|
||||
nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
|
||||
@@ -2591,7 +2731,7 @@ fun! netrw#DirBrowse(dirname)
|
||||
nnoremap <buffer> <silent> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
|
||||
nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
|
||||
nnoremap <buffer> <silent> v :call <SID>NetSplit(3)<cr>
|
||||
nnoremap <buffer> <silent> x :call <SID>NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
|
||||
nnoremap <buffer> <silent> x :call netrw#NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
|
||||
nnoremap <buffer> <silent> <2-leftmouse> :call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
|
||||
nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
|
||||
nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
|
||||
@@ -2784,7 +2924,7 @@ fun! s:LocalBrowseList()
|
||||
let ft = strpart("000000000000000000",1,18-strlen(t)).t
|
||||
" call Decho("exe keepjumps put ='".ft.'/'.filename."'")
|
||||
let ftpfile= ft.'/'.pfile
|
||||
keepjumps put=ftpfile
|
||||
keepjumps silent! put=ftpfile
|
||||
|
||||
elseif g:netrw_sort_by =~ "^s"
|
||||
" sort by size (handles file sizes up to 1 quintillion bytes, US)
|
||||
@@ -2793,12 +2933,12 @@ fun! s:LocalBrowseList()
|
||||
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
|
||||
" call Decho("exe keepjumps put ='".fsz.'/'.filename."'")
|
||||
let fszpfile= fsz.'/'.pfile
|
||||
keepjumps put =fszpfile
|
||||
keepjumps silent! put =fszpfile
|
||||
|
||||
else
|
||||
" sort by name
|
||||
" call Decho("exe keepjumps put ='".pfile."'")
|
||||
keepjumps put=pfile
|
||||
keepjumps silent! put=pfile
|
||||
endif
|
||||
endwhile
|
||||
|
||||
@@ -2833,6 +2973,13 @@ fun! s:LocalBrowseChgDir(dirname,newdir,...)
|
||||
if a:0 < 1
|
||||
" call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape.">")
|
||||
" call Decho("about to edit<".escape(dirname,s:netrw_cd_escape).">")
|
||||
if g:netrw_browse_split == 1
|
||||
new
|
||||
wincmd _
|
||||
elseif g:netrw_browse_split == 2
|
||||
rightb vert new
|
||||
wincmd |
|
||||
endif
|
||||
exe "e! ".escape(dirname,s:netrw_cd_escape)
|
||||
set ma nomod
|
||||
endif
|
||||
@@ -3063,7 +3210,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
|
||||
|
||||
" if dosplit or file has been modified
|
||||
if a:dosplit || &modified
|
||||
call <SID>SaveWinVars()
|
||||
call s:SaveWinVars()
|
||||
|
||||
if a:style == 0 " Explore, Sexplore
|
||||
exe g:netrw_winsize."wincmd s"
|
||||
@@ -3275,7 +3422,7 @@ fun! s:NetGetcwd(doesc)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetMethod: determine method of transfer {{{1
|
||||
" NetMethod: determine method of transfer {{{2
|
||||
" method == 1: rcp
|
||||
" 2: ftp + <.netrc>
|
||||
" 3: ftp + machine, id, password, and [path]filename
|
||||
@@ -3475,7 +3622,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetUserPass: set username and password for subsequent ftp transfer {{{1
|
||||
" NetUserPass: set username and password for subsequent ftp transfer {{{2
|
||||
" Usage: :call NetUserPass() -- will prompt for userid and password
|
||||
" :call NetUserPass("uid") -- will prompt for password
|
||||
" :call NetUserPass("uid","password") -- sets global userid and password
|
||||
@@ -3506,7 +3653,7 @@ fun! NetUserPass(...)
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetOptionSave: save options and set to "standard" form {{{1
|
||||
" NetOptionSave: save options and set to "standard" form {{{2
|
||||
fun! s:NetOptionSave()
|
||||
" call Dfunc("NetOptionSave()")
|
||||
if !exists("w:netoptionsave")
|
||||
@@ -3550,7 +3697,7 @@ fun! s:NetOptionSave()
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetOptionRestore: restore options {{{1
|
||||
" NetOptionRestore: restore options {{{2
|
||||
fun! s:NetOptionRestore()
|
||||
" call Dfunc("NetOptionRestore()")
|
||||
if !exists("w:netoptionsave")
|
||||
@@ -3591,7 +3738,7 @@ fun! s:NetOptionRestore()
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetReadFixup: this sort of function is typically written by the user {{{1
|
||||
" NetReadFixup: this sort of function is typically written by the user {{{2
|
||||
" to handle extra junk that their system's ftp dumps
|
||||
" into the transfer. This function is provided as an
|
||||
" example and as a fix for a Windows 95 problem: in my
|
||||
@@ -3609,7 +3756,7 @@ if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetSort: Piet Delport's BISort2() function, modified to take a range {{{1
|
||||
" NetSort: Piet Delport's BISort2() function, modified to take a range {{{2
|
||||
if v:version < 700
|
||||
fun! s:NetSort() range
|
||||
" " call Dfunc("NetSort()")
|
||||
@@ -3654,7 +3801,7 @@ if v:version < 700
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{1
|
||||
" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
|
||||
" What this function does is to compute a priority for the patterns
|
||||
" in the g:netrw_sort_sequence. It applies a substitute to any
|
||||
" "files" that satisfy each pattern, putting the priority / in
|
||||
@@ -3711,7 +3858,7 @@ fun! s:SetSort()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" SaveWinVars: (used by Explore()) {{{1
|
||||
" SaveWinVars: (used by Explore()) {{{2
|
||||
fun! s:SaveWinVars()
|
||||
" call Dfunc("SaveWinVars()")
|
||||
if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif
|
||||
@@ -3727,7 +3874,7 @@ fun! s:SaveWinVars()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" CopyWinVars: (used by Explore()) {{{1
|
||||
" CopyWinVars: (used by Explore()) {{{2
|
||||
fun! s:CopyWinVars()
|
||||
" call Dfunc("CopyWinVars()")
|
||||
if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif
|
||||
@@ -3743,7 +3890,7 @@ fun! s:CopyWinVars()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
|
||||
" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{2
|
||||
" To allow separate windows to have their own activities, such as
|
||||
" Explore **/pattern, several variables have been made window-oriented.
|
||||
" However, when the user splits a browser window (ex: ctrl-w s), these
|
||||
@@ -3765,7 +3912,7 @@ fun! s:SetBufWinVars()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{1
|
||||
" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{2
|
||||
" Matching function to BufferWinVars()
|
||||
fun! s:UseBufWinVars()
|
||||
" call Dfunc("UseBufWinVars()")
|
||||
@@ -3783,7 +3930,7 @@ fun! s:UseBufWinVars()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" RFC2396: converts %xx into characters
|
||||
" RFC2396: converts %xx into characters {{{2
|
||||
fun! netrw#RFC2396(fname)
|
||||
" call Dfunc("RFC2396(fname<".a:fname.">)")
|
||||
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
|
||||
@@ -3792,7 +3939,7 @@ fun! netrw#RFC2396(fname)
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" Settings Restoration: {{{1
|
||||
" Settings Restoration: {{{2
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Oct 12, 2005
|
||||
" Date: Jan 26, 2006
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 4
|
||||
" Version: 6a ASTRO-ONLY
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v4"
|
||||
let g:loaded_netrwSettings = "v6a"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwSettings: {{{1
|
||||
@@ -56,10 +56,10 @@ fun! netrwSettings#NetrwSettings()
|
||||
let g:netrw_ignorenetrc= 0
|
||||
endif
|
||||
|
||||
put ='+ ---------------------------------------------'
|
||||
put ='+ NetrwSettings: (by Charles E. Campbell, Jr.)'
|
||||
put ='+ --------------------------------------------'
|
||||
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
|
||||
put ='+ Press ? with cursor atop any line for help '
|
||||
put ='+ ---------------------------------------------'
|
||||
put ='+ --------------------------------------------'
|
||||
let s:netrw_settings_stop= line(".")
|
||||
|
||||
put =''
|
||||
@@ -89,6 +89,12 @@ fun! netrwSettings#NetrwSettings()
|
||||
put ='+ Netrw Browser Control'
|
||||
put = 'let g:netrw_alto = '.g:netrw_alto
|
||||
put = 'let g:netrw_altv = '.g:netrw_altv
|
||||
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
|
||||
if exists("g:netrw_browsex_viewer")
|
||||
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
|
||||
else
|
||||
put = 'let g:netrw_browsex_viewer = (not defined)'
|
||||
endif
|
||||
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
|
||||
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
||||
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
||||
|
||||
351
runtime/autoload/pycomplete.vim
Normal file
351
runtime/autoload/pycomplete.vim
Normal file
@@ -0,0 +1,351 @@
|
||||
"pycomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin
|
||||
" Version: 0.3
|
||||
" Last Updated: 23 January 2006
|
||||
"
|
||||
" v0.3 Changes:
|
||||
" added top level def parsing
|
||||
" for safety, call returns are not evaluated
|
||||
" handful of parsing changes
|
||||
" trailing ( and . characters
|
||||
" argument completion on open parens
|
||||
" stop parsing at current line - ++performance, local var resolution
|
||||
"
|
||||
" TODO
|
||||
" RExec subclass
|
||||
" Code cleanup + make class
|
||||
" use internal dict, not globals()
|
||||
|
||||
if !has('python')
|
||||
echo "Error: Required vim compiled with +python"
|
||||
finish
|
||||
endif
|
||||
|
||||
function! pycomplete#Complete(findstart, base)
|
||||
"findstart = 1 when we need to get the text length
|
||||
if a:findstart
|
||||
let line = getline('.')
|
||||
let idx = col('.')
|
||||
while idx > 0
|
||||
let idx -= 1
|
||||
let c = line[idx-1]
|
||||
if c =~ '\w'
|
||||
continue
|
||||
elseif ! c =~ '\.'
|
||||
idx = -1
|
||||
break
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return idx
|
||||
"findstart = 0 when we need to return the list of completions
|
||||
else
|
||||
execute "python get_completions('" . a:base . "')"
|
||||
return g:pycomplete_completions
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:DefPython()
|
||||
python << PYTHONEOF
|
||||
import vim, sys, types
|
||||
import __builtin__
|
||||
import tokenize, keyword, cStringIO
|
||||
|
||||
LOCALDEFS = \
|
||||
['LOCALDEFS', 'clean_up','eval_source_code', \
|
||||
'get_completions', '__builtin__', '__builtins__', \
|
||||
'dbg', '__name__', 'vim', 'sys', 'parse_to_end', \
|
||||
'parse_statement', 'tokenize', 'keyword', 'cStringIO', \
|
||||
'debug_level', 'safe_eval', '_ctor', 'get_arguments', \
|
||||
'strip_calls', 'types', 'parse_block']
|
||||
|
||||
def dbg(level,msg):
|
||||
debug_level = 1
|
||||
try:
|
||||
debug_level = vim.eval("g:pycomplete_debug_level")
|
||||
except:
|
||||
pass
|
||||
if level <= debug_level: print(msg)
|
||||
|
||||
def strip_calls(stmt):
|
||||
parsed=''
|
||||
level = 0
|
||||
for c in stmt:
|
||||
if c in ['[','(']:
|
||||
level += 1
|
||||
elif c in [')',']']:
|
||||
level -= 1
|
||||
elif level == 0:
|
||||
parsed += c
|
||||
##dbg(10,"stripped: %s" % parsed)
|
||||
return parsed
|
||||
|
||||
def get_completions(base):
|
||||
stmt = vim.eval('expand("<cWORD>")')
|
||||
#dbg(1,"statement: %s - %s" % (stmt, base))
|
||||
stmt = stmt+base
|
||||
eval_source_code()
|
||||
|
||||
try:
|
||||
ridx = stmt.rfind('.')
|
||||
if stmt[-1] == '(':
|
||||
match = ""
|
||||
stmt = strip_calls(stmt[:len(stmt)-1])
|
||||
all = get_arguments(eval(stmt))
|
||||
elif ridx == -1:
|
||||
match = stmt
|
||||
all = globals() + __builtin__.__dict__
|
||||
else:
|
||||
match = stmt[ridx+1:]
|
||||
stmt = strip_calls(stmt[:ridx])
|
||||
all = eval(stmt).__dict__
|
||||
|
||||
#dbg(15,"completions for: %s, match=%s" % (stmt,match))
|
||||
completions = []
|
||||
if type(all) == types.DictType:
|
||||
for m in all:
|
||||
if m.find('_') != 0 and m.find(match) == 0 and \
|
||||
m not in LOCALDEFS:
|
||||
#dbg(25,"matched... %s, %s" % (m, m.find(match)))
|
||||
typestr = str(all[m])
|
||||
if "function" in typestr: m += '('
|
||||
elif "method" in typestr: m += '('
|
||||
elif "module" in typestr: m += '.'
|
||||
elif "class" in typestr: m += '('
|
||||
completions.append(m)
|
||||
completions.sort()
|
||||
else:
|
||||
completions.append(all)
|
||||
#dbg(10,"all completions: %s" % completions)
|
||||
vim.command("let g:pycomplete_completions = %s" % completions)
|
||||
except:
|
||||
vim.command("let g:pycomplete_completions = []")
|
||||
#dbg(1,"exception: %s" % sys.exc_info()[1])
|
||||
clean_up()
|
||||
|
||||
def get_arguments(func_obj):
|
||||
def _ctor(obj):
|
||||
try:
|
||||
return class_ob.__init__.im_func
|
||||
except AttributeError:
|
||||
for base in class_ob.__bases__:
|
||||
rc = _find_constructor(base)
|
||||
if rc is not None: return rc
|
||||
return None
|
||||
|
||||
arg_offset = 1
|
||||
if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj)
|
||||
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
|
||||
else: arg_offset = 0
|
||||
|
||||
#dbg(20,"%s, offset=%s" % (str(func_obj), arg_offset))
|
||||
|
||||
arg_text = ''
|
||||
if type(func_obj) in [types.FunctionType, types.LambdaType]:
|
||||
try:
|
||||
cd = func_obj.func_code
|
||||
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||
defaults = func_obj.func_defaults or []
|
||||
defaults = list(map(lambda name: "=%s" % name, defaults))
|
||||
defaults = [""] * (len(real_args)-len(defaults)) + defaults
|
||||
items = map(lambda a,d: a+d, real_args, defaults)
|
||||
if func_obj.func_code.co_flags & 0x4:
|
||||
items.append("...")
|
||||
if func_obj.func_code.co_flags & 0x8:
|
||||
items.append("***")
|
||||
arg_text = ", ".join(items) + ')'
|
||||
|
||||
except:
|
||||
#dbg(1,"exception: %s" % sys.exc_info()[1])
|
||||
pass
|
||||
if len(arg_text) == 0:
|
||||
# The doc string sometimes contains the function signature
|
||||
# this works for alot of C modules that are part of the
|
||||
# standard library
|
||||
doc = getattr(func_obj, '__doc__', '')
|
||||
if doc:
|
||||
doc = doc.lstrip()
|
||||
pos = doc.find('\n')
|
||||
if pos > 0:
|
||||
sigline = doc[:pos]
|
||||
lidx = sigline.find('(')
|
||||
ridx = sigline.find(')')
|
||||
retidx = sigline.find('->')
|
||||
ret = sigline[retidx+2:].strip()
|
||||
if lidx > 0 and ridx > 0:
|
||||
arg_text = sigline[lidx+1:ridx] + ')'
|
||||
if len(ret) > 0: arg_text += ' #returns %s' % ret
|
||||
#dbg(15,"argument completion: %s" % arg_text)
|
||||
return arg_text
|
||||
|
||||
def parse_to_end(gen):
|
||||
stmt=''
|
||||
level = 0
|
||||
for type, str, begin, end, line in gen:
|
||||
if line == vim.eval('getline(\'.\')'): break
|
||||
elif str == '\\': continue
|
||||
elif str == ';':
|
||||
break
|
||||
elif type == tokenize.NEWLINE and level == 0:
|
||||
break
|
||||
elif str in ['[','(']:
|
||||
level += 1
|
||||
elif str in [')',']']:
|
||||
level -= 1
|
||||
elif level == 0:
|
||||
stmt += str
|
||||
#dbg(10,"current statement: %s" % stmt)
|
||||
return stmt
|
||||
|
||||
def parse_block(gen):
|
||||
lines = []
|
||||
level = 0
|
||||
for type, str, begin, end, line in gen:
|
||||
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
|
||||
elif type == tokenize.INDENT:
|
||||
level += 1
|
||||
elif type == tokenize.DEDENT:
|
||||
level -= 1
|
||||
if level == 0: break;
|
||||
else:
|
||||
stmt = parse_statement(gen,str)
|
||||
if len(stmt) > 0: lines.append(stmt)
|
||||
return lines
|
||||
|
||||
def parse_statement(gen,curstr=''):
|
||||
var = curstr
|
||||
type, str, begin, end, line = gen.next()
|
||||
if str == '=':
|
||||
type, str, begin, end, line = gen.next()
|
||||
if type == tokenize.NEWLINE:
|
||||
return ''
|
||||
elif type == tokenize.STRING or str == 'str':
|
||||
return '%s = str' % var
|
||||
elif str == '[' or str == 'list':
|
||||
return '%s= list' % var
|
||||
elif str == '{' or str == 'dict':
|
||||
return '%s = dict' % var
|
||||
elif type == tokenize.NUMBER:
|
||||
return '%s = 0' % var
|
||||
elif str == 'Set':
|
||||
return '%s = Set' % var
|
||||
elif str == 'open' or str == 'file':
|
||||
return '%s = file' % var
|
||||
else:
|
||||
inst = str + parse_to_end(gen)
|
||||
if len(inst) > 0:
|
||||
#dbg(5,"found [%s = %s]" % (var, inst))
|
||||
return '%s = %s' % (var, inst)
|
||||
return ''
|
||||
|
||||
def eval_source_code():
|
||||
LINE=vim.eval('getline(\'.\')')
|
||||
s = cStringIO.StringIO('\n'.join(vim.current.buffer[:]) + '\n')
|
||||
g = tokenize.generate_tokens(s.readline)
|
||||
|
||||
stmts = []
|
||||
lineNo = 0
|
||||
try:
|
||||
for type, str, begin, end, line in g:
|
||||
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
|
||||
elif begin[0] == lineNo: continue
|
||||
#junk
|
||||
elif type == tokenize.INDENT or \
|
||||
type == tokenize.DEDENT or \
|
||||
type == tokenize.ERRORTOKEN or \
|
||||
type == tokenize.ENDMARKER or \
|
||||
type == tokenize.NEWLINE or \
|
||||
type == tokenize.COMMENT:
|
||||
continue
|
||||
#import statement
|
||||
elif str == 'import':
|
||||
import_stmt=parse_to_end(g)
|
||||
if len(import_stmt) > 0:
|
||||
#dbg(5,"found [import %s]" % import_stmt)
|
||||
stmts.append("import %s" % import_stmt)
|
||||
#import from statement
|
||||
elif str == 'from':
|
||||
type, str, begin, end, line = g.next()
|
||||
mod = str
|
||||
|
||||
type, str, begin, end, line = g.next()
|
||||
if str != "import": break
|
||||
from_stmt=parse_to_end(g)
|
||||
if len(from_stmt) > 0:
|
||||
#dbg(5,"found [from %s import %s]" % (mod, from_stmt))
|
||||
stmts.append("from %s import %s" % (mod, from_stmt))
|
||||
#def statement
|
||||
elif str == 'def':
|
||||
funcstr = ''
|
||||
for type, str, begin, end, line in g:
|
||||
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
|
||||
elif str == ':':
|
||||
stmts += parse_block(g)
|
||||
break
|
||||
funcstr += str
|
||||
if len(funcstr) > 0:
|
||||
#dbg(5,"found [def %s]" % funcstr)
|
||||
stmts.append("def %s:\n pass" % funcstr)
|
||||
#class declaration
|
||||
elif str == 'class':
|
||||
type, str, begin, end, line = g.next()
|
||||
classname = str
|
||||
#dbg(5,"found [class %s]" % classname)
|
||||
|
||||
level = 0
|
||||
members = []
|
||||
for type, str, begin, end, line in g:
|
||||
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
|
||||
elif type == tokenize.INDENT:
|
||||
level += 1
|
||||
elif type == tokenize.DEDENT:
|
||||
level -= 1
|
||||
if level == 0: break;
|
||||
elif str == 'def':
|
||||
memberstr = ''
|
||||
for type, str, begin, end, line in g:
|
||||
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
|
||||
elif str == ':':
|
||||
stmts += parse_block(g)
|
||||
break
|
||||
memberstr += str
|
||||
#dbg(5," member [%s]" % memberstr)
|
||||
members.append(memberstr)
|
||||
classstr = 'class %s:' % classname
|
||||
for m in members:
|
||||
classstr += ("\n def %s:\n pass" % m)
|
||||
stmts.append("%s\n" % classstr)
|
||||
elif keyword.iskeyword(str) or str in globals():
|
||||
#dbg(5,"keyword = %s" % str)
|
||||
lineNo = begin[0]
|
||||
else:
|
||||
assign = parse_statement(g,str)
|
||||
if len(assign) > 0: stmts.append(assign)
|
||||
|
||||
for s in stmts:
|
||||
try:
|
||||
#dbg(15,"evaluating: %s\n" % s)
|
||||
exec(s) in globals()
|
||||
except:
|
||||
#dbg(1,"exception: %s" % sys.exc_info()[1])
|
||||
pass
|
||||
except:
|
||||
#dbg(1,"exception: %s" % sys.exc_info()[1])
|
||||
pass
|
||||
|
||||
def clean_up():
|
||||
for o in globals().keys():
|
||||
if o not in LOCALDEFS:
|
||||
try:
|
||||
exec('del %s' % o) in globals()
|
||||
except: pass
|
||||
|
||||
sys.path.extend(['.','..'])
|
||||
PYTHONEOF
|
||||
endfunction
|
||||
|
||||
let g:pycomplete_debug_level = 0
|
||||
call s:DefPython()
|
||||
" vim: set et ts=4:
|
||||
111
runtime/autoload/spellfile.vim
Normal file
111
runtime/autoload/spellfile.vim
Normal file
@@ -0,0 +1,111 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Feb 01
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
|
||||
endif
|
||||
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
|
||||
|
||||
" This function is used for the spellfile plugin.
|
||||
function! spellfile#LoadFile(lang)
|
||||
" If the netrw plugin isn't loaded we silently skip everything.
|
||||
if !exists(":Nread")
|
||||
if &verbose
|
||||
echomsg 'spellfile#LoadFile(): Nread command is not available.'
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
" If the URL changes we try all files again.
|
||||
if s:spellfile_URL != g:spellfile_URL
|
||||
let s:donedict = {}
|
||||
let s:spellfile_URL = g:spellfile_URL
|
||||
endif
|
||||
|
||||
" I will say this only once!
|
||||
if has_key(s:donedict, a:lang . &enc)
|
||||
if &verbose
|
||||
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
|
||||
endif
|
||||
return
|
||||
endif
|
||||
let s:donedict[a:lang . &enc] = 1
|
||||
|
||||
" Find spell directories we can write in.
|
||||
let dirlist = []
|
||||
let dirchoices = '&Cancel'
|
||||
for dir in split(globpath(&rtp, 'spell'), "\n")
|
||||
if filewritable(dir) == 2
|
||||
call add(dirlist, dir)
|
||||
let dirchoices .= "\n&" . len(dirlist)
|
||||
endif
|
||||
endfor
|
||||
if len(dirlist) == 0
|
||||
if &verbose
|
||||
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
|
||||
let msg .= "\nDo you want me to try downloading it?"
|
||||
if confirm(msg, "&Yes\n&No", 2) == 1
|
||||
let enc = &encoding
|
||||
if enc == 'iso-8859-15'
|
||||
let enc = 'latin1'
|
||||
endif
|
||||
let fname = a:lang . '.' . enc . '.spl'
|
||||
|
||||
" Split the window, read the file into a new buffer.
|
||||
new
|
||||
setlocal bin
|
||||
echo 'Downloading ' . fname . '...'
|
||||
exe 'Nread ' g:spellfile_URL . '/' . fname
|
||||
if getline(2) !~ 'VIMspell'
|
||||
" Didn't work, perhaps there is an ASCII one.
|
||||
g/^/d
|
||||
let fname = a:lang . '.ascii.spl'
|
||||
echo 'Could not find it, trying ' . fname . '...'
|
||||
exe 'Nread ' g:spellfile_URL . '/' . fname
|
||||
if getline(2) !~ 'VIMspell'
|
||||
echo 'Sorry, downloading failed'
|
||||
bwipe!
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
" Delete the empty first line and mark the file unmodified.
|
||||
1d
|
||||
set nomod
|
||||
|
||||
let msg = "In which directory do you want to write the file:"
|
||||
for i in range(len(dirlist))
|
||||
let msg .= "\n" . (i + 1) . '. ' . dirlist[i]
|
||||
endfor
|
||||
let dirchoice = confirm(msg, dirchoices) - 2
|
||||
if dirchoice >= 0
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
|
||||
" Also download the .sug file, if the user wants to.
|
||||
let msg = "Do you want me to try getting the .sug file?\n"
|
||||
let msg .= "This will improve making suggestions for spelling mistakes,\n"
|
||||
let msg .= "but it uses quite a bit of memory."
|
||||
if confirm(msg, "&No\n&Yes") == 2
|
||||
g/^/d
|
||||
let fname = substitute(fname, '\.spl$', '.sug', '')
|
||||
echo 'Downloading ' . fname . '...'
|
||||
exe 'Nread ' g:spellfile_URL . '/' . fname
|
||||
if getline(2) !~ 'VIMsug'
|
||||
echo 'Sorry, downloading failed'
|
||||
else
|
||||
1d
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
endif
|
||||
set nomod
|
||||
endif
|
||||
endif
|
||||
|
||||
bwipe
|
||||
endif
|
||||
endfunc
|
||||
179
runtime/autoload/syntaxcomplete.vim
Normal file
179
runtime/autoload/syntaxcomplete.vim
Normal file
@@ -0,0 +1,179 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 1.0
|
||||
" Last Change: Sun Jan 08 2006 10:17:51 PM
|
||||
|
||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||
if exists('&ofu')
|
||||
setlocal ofu=syntaxcomplete#Complete
|
||||
endif
|
||||
|
||||
if exists('g:loaded_syntax_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntax_completion = 1
|
||||
|
||||
" This script will build a completion list based on the syntax
|
||||
" elements defined by the files in $VIMRUNTIME/syntax.
|
||||
|
||||
let s:syn_remove_words = 'match,matchgroup=,contains,'.
|
||||
\ 'links to,start=,end=,nextgroup='
|
||||
|
||||
let s:cache_name = []
|
||||
let s:cache_list = []
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
if a:findstart
|
||||
" Locate the start of the item, including "."
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let lastword = -1
|
||||
while start > 0
|
||||
if line[start - 1] =~ '\w'
|
||||
let start -= 1
|
||||
elseif line[start - 1] =~ '\.'
|
||||
" The user must be specifying a column name
|
||||
if lastword == -1
|
||||
let lastword = start
|
||||
endif
|
||||
let start -= 1
|
||||
let b:sql_compl_type = 'column'
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Return the column of the last word, which is going to be changed.
|
||||
" Remember the text that comes before it in s:prepended.
|
||||
if lastword == -1
|
||||
let s:prepended = ''
|
||||
return start
|
||||
endif
|
||||
let s:prepended = strpart(line, start, lastword - start)
|
||||
return lastword
|
||||
endif
|
||||
|
||||
let base = s:prepended . a:base
|
||||
|
||||
let list_idx = index(s:cache_name, &filetype, 0, &ignorecase)
|
||||
if list_idx > -1
|
||||
let compl_list = s:cache_list[list_idx]
|
||||
else
|
||||
let compl_list = s:SyntaxList()
|
||||
let s:cache_name = add( s:cache_name, &filetype )
|
||||
let s:cache_list = add( s:cache_list, compl_list )
|
||||
endif
|
||||
|
||||
" Return list of matches.
|
||||
|
||||
if base =~ '\w'
|
||||
let compstr = join(compl_list, ' ')
|
||||
let compstr = substitute(compstr, '\<\%('.base.'\)\@!\w\+\s*', '', 'g')
|
||||
let compl_list = split(compstr, '\s\+')
|
||||
endif
|
||||
|
||||
return compl_list
|
||||
endfunc
|
||||
|
||||
function! s:SyntaxList()
|
||||
let saveL = @l
|
||||
|
||||
" Loop through all the syntax groupnames, and build a
|
||||
" syntax file which contains these names. This can
|
||||
" work generically for any filetype that does not already
|
||||
" have a plugin defined.
|
||||
" This ASSUMES the syntax groupname BEGINS with the name
|
||||
" of the filetype. From my casual viewing of the vim7\sytax
|
||||
" directory.
|
||||
redir @l
|
||||
silent! exec 'syntax list '
|
||||
redir END
|
||||
|
||||
let syntax_groups = @l
|
||||
let @l = saveL
|
||||
|
||||
if syntax_groups =~ 'E28'
|
||||
\ || syntax_groups =~ 'E411'
|
||||
\ || syntax_groups =~ 'E415'
|
||||
\ || syntax_groups =~ 'No sytax items'
|
||||
return -1
|
||||
endif
|
||||
|
||||
" Abort names - match, links to, matchgroup=, start=, contains=, contained,
|
||||
" cluster=, nextgroup=, end=
|
||||
let next_group_regex = '\n' .
|
||||
\ '\zs'.&filetype.'\w\+\ze'.
|
||||
\ '\s\+xxx\s\+'.
|
||||
\ '\<\('.
|
||||
\ substitute(s:syn_remove_words, ',', '\\|', 'g').
|
||||
\ '\)\@!'
|
||||
let syn_list = ''
|
||||
let index = 0
|
||||
let index = match(syntax_groups, next_group_regex, index)
|
||||
|
||||
|
||||
while index > 0
|
||||
let group_name = matchstr( syntax_groups, '\w\+', index )
|
||||
|
||||
let extra_syn_list = s:SyntaxGroupItems(group_name)
|
||||
|
||||
let syn_list = syn_list . extra_syn_list . "\n"
|
||||
|
||||
let index = index + strlen(group_name)
|
||||
let index = match(syntax_groups, next_group_regex, index)
|
||||
endwhile
|
||||
|
||||
return sort(split(syn_list))
|
||||
endfunction
|
||||
|
||||
function! s:SyntaxGroupItems( group_name )
|
||||
let saveL = @l
|
||||
|
||||
" Generate (based on the syntax highlight rules) a list of
|
||||
" the Statements, functions, keywords and so on available
|
||||
" If this needs updating, the syntax\sql.vim file should be
|
||||
" updated
|
||||
redir @l
|
||||
silent! exec 'syntax list ' . a:group_name
|
||||
redir END
|
||||
|
||||
if @l !~ 'E28'
|
||||
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
|
||||
let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
|
||||
|
||||
" We only want the words for the lines begining with
|
||||
" containedin, but there could be other items.
|
||||
|
||||
" Tried to remove all lines that do not begin with contained
|
||||
" but this does not work in all cases since you can have
|
||||
" contained nextgroup=...
|
||||
" So this will strip off the ending of lines with known
|
||||
" keywords.
|
||||
let syn_list = substitute( syn_list, '\<\('.
|
||||
\ substitute(
|
||||
\ escape( s:syn_remove_words, '\\/.*$^~[]')
|
||||
\ , ',', '\\|', 'g').
|
||||
\ '\).\{-}\%($\|'."\n".'\)'
|
||||
\ , "\n", 'g' )
|
||||
|
||||
" Now strip off the newline + blank space + contained
|
||||
let syn_list = substitute( syn_list, '\%(^\|\n\)\@<=\s*\<\('.
|
||||
\ 'contained\)'
|
||||
\ , "", 'g' )
|
||||
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
else
|
||||
let syn_list = ''
|
||||
endif
|
||||
|
||||
let @l = saveL
|
||||
|
||||
return syn_list
|
||||
endfunction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Nov 28, 2005
|
||||
" Version: 5
|
||||
" Date: Dec 24, 2005
|
||||
" Version: 7
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
@@ -24,7 +24,7 @@ set cpo&vim
|
||||
if exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v5"
|
||||
let g:loaded_tar= "v7"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Default Settings: {{{1
|
||||
@@ -93,7 +93,7 @@ fun! tar#Browse(tarfile)
|
||||
else
|
||||
exe "silent r! tar -".g:tar_browseoptions." '".a:tarfile."'"
|
||||
endif
|
||||
%g@/$@d
|
||||
silent %g@/$@d
|
||||
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
|
||||
@@ -146,7 +146,7 @@ fun! tar#Read(fname,mode)
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
|
||||
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
|
||||
elseif a:fname =~# '\.bz2$'
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'")
|
||||
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
|
||||
else
|
||||
@@ -242,16 +242,20 @@ fun! tar#Write(fname)
|
||||
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
endif
|
||||
call mkdir(dirpath,"p")
|
||||
endif
|
||||
if tarfile !~ '/'
|
||||
let tarfile= curdir.'/'.tarfile
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
|
||||
call mkdir(dirpath,"p")
|
||||
exe "w! ".fname
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: XHTML 1.0 Strict
|
||||
" Language: XML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2005 Nov 22
|
||||
" Last Change: 2006 Jan 24
|
||||
|
||||
" This function will create Dictionary with users namespace strings and values
|
||||
" canonical (system) names of data files. Names should be lowercase,
|
||||
@@ -54,6 +54,7 @@ endfunction
|
||||
function! xmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let curline = line('.')
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let compl_begin = col('.') - 2
|
||||
@@ -69,11 +70,32 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
endif
|
||||
|
||||
let b:compl_context = getline('.')[0:(compl_begin)]
|
||||
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
|
||||
if b:compl_context !~ '<[^>]*$'
|
||||
" Look like we may have broken tag. Check previous lines. Up to
|
||||
" 10?
|
||||
let i = 1
|
||||
while 1
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$'
|
||||
" Normal tag line, no need for completion at all
|
||||
let b:compl_context = ''
|
||||
break
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
" Make sure we don't have counter
|
||||
unlet! i
|
||||
endif
|
||||
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
|
||||
|
||||
" Make sure we will have only current namespace
|
||||
unlet! b:xml_namespace
|
||||
let b:xml_namespace = matchstr(b:compl_context, '^\k*\ze:')
|
||||
let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:')
|
||||
if b:xml_namespace == ''
|
||||
let b:xml_namespace = 'DEFAULT'
|
||||
endif
|
||||
@@ -89,7 +111,10 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let res = []
|
||||
let res2 = []
|
||||
" a:base is very short - we need context
|
||||
let context = b:compl_context
|
||||
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
|
||||
return []
|
||||
endif
|
||||
let context = matchstr(b:compl_context, '^<\zs.*')
|
||||
unlet! b:compl_context
|
||||
|
||||
" Make entities completion
|
||||
@@ -111,13 +136,24 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let values = intent + values
|
||||
endif
|
||||
|
||||
for m in values
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m.';')
|
||||
endif
|
||||
endfor
|
||||
if len(a:base) == 1
|
||||
for m in values
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m.';')
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
else
|
||||
for m in values
|
||||
if m =~? '^'.a:base
|
||||
call add(res, m.';')
|
||||
elseif m =~? a:base
|
||||
call add(res2, m.';')
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
return res + res2
|
||||
endif
|
||||
|
||||
endif
|
||||
if context =~ '>'
|
||||
@@ -265,6 +301,9 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
" Deal with tag completion.
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
let opentag = substitute(opentag, '^\k*:', '', '')
|
||||
if opentag == ''
|
||||
return []
|
||||
endif
|
||||
|
||||
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
|
||||
let context = substitute(context, '^\k*:', '', '')
|
||||
@@ -310,7 +349,7 @@ function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
|
||||
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
|
||||
endif
|
||||
else
|
||||
let tagpat='</\=\(\k\|[.-:]\)\+\|/>'
|
||||
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
|
||||
endif
|
||||
while (linenum>0)
|
||||
let line=getline(linenum)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Nov 28, 2005
|
||||
" Version: 5
|
||||
" Date: Dec 21, 2005
|
||||
" Version: 6
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
||||
@@ -22,7 +22,7 @@ if exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_zip= "v5"
|
||||
let g:loaded_zip= "v6"
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -198,16 +198,21 @@ fun! zip#Write(fname)
|
||||
|
||||
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
endif
|
||||
call mkdir(dirpath,"p")
|
||||
endif
|
||||
if zipfile !~ '/'
|
||||
let zipfile= curdir.'/'.zipfile
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
||||
|
||||
call mkdir(dirpath,"p")
|
||||
exe "w! ".fname
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
|
||||
endif
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ let current_compiler = "bdf"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal makeprg=bdftopcf\ $*
|
||||
CompilerSet makeprg=bdftopcf\ $*
|
||||
|
||||
setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
|
||||
CompilerSet errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
|
||||
\%-Z%p^,
|
||||
\%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt,
|
||||
\%-G%.%#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Miscrosoft Visual C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Jun 22
|
||||
" Last Change: 2005 Nov 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -9,5 +9,5 @@ endif
|
||||
let current_compiler = "msvc"
|
||||
|
||||
" The errorformat for MSVC is the default.
|
||||
setlocal errorformat&
|
||||
setlocal makeprg=nmake
|
||||
CompilerSet errorformat&
|
||||
CompilerSet makeprg=nmake
|
||||
|
||||
@@ -11,7 +11,7 @@ let current_compiler = "rst"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
CompilerSet errorformat=
|
||||
\%f:%l:\ (%tEBUG/0)\ %m,
|
||||
\%f:%l:\ (%tNFO/1)\ %m,
|
||||
\%f:%l:\ (%tARNING/2)\ %m,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Nov 21
|
||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -18,6 +18,7 @@ For a basic explanation, see section |40.3| in the user manual.
|
||||
8. Groups |autocmd-groups|
|
||||
9. Executing autocommands |autocmd-execute|
|
||||
10. Using autocommands |autocmd-use|
|
||||
11. Disabling autocommands |autocmd-disable|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
{only when the |+autocmd| feature has not been disabled at compile time}
|
||||
@@ -169,18 +170,196 @@ See |:verbose-cmd| for more information.
|
||||
==============================================================================
|
||||
5. Events *autocmd-events* *E215* *E216*
|
||||
|
||||
You can specify a comma-separated list of event names. No white space can be
|
||||
used in this list. The command applies to all the events in the list.
|
||||
|
||||
For READING FILES there are four kinds of events possible:
|
||||
BufNewFile starting to edit a non-existent file
|
||||
BufReadPre BufReadPost starting to edit an existing file
|
||||
FilterReadPre FilterReadPost read the temp file with filter output
|
||||
FileReadPre FileReadPost any other file read
|
||||
Vim uses only one of these four kinds when reading a file. The "Pre" and
|
||||
"Post" events are both triggered, before and after reading the file.
|
||||
|
||||
Note that the autocommands for the *ReadPre events and all the Filter events
|
||||
are not allowed to change the current buffer (you will get an error message if
|
||||
this happens). This is to prevent the file to be read into the wrong buffer.
|
||||
|
||||
Note that the 'modified' flag is reset AFTER executing the BufReadPost
|
||||
and BufNewFile autocommands. But when the 'modified' option was set by the
|
||||
autocommands, this doesn't happen.
|
||||
|
||||
You can use the 'eventignore' option to ignore a number of events or all
|
||||
events.
|
||||
*autocommand-events* *{event}*
|
||||
Vim recognizes the following events. Vim ignores the case of event names
|
||||
(e.g., you can use "BUFread" or "bufread" instead of "BufRead").
|
||||
|
||||
First an overview by function with a short explanation. Then the list
|
||||
alpabetically with full explanations |autocmd-events-abc|.
|
||||
|
||||
Name triggered by ~
|
||||
|
||||
Reading
|
||||
|BufNewFile| starting to edit a file that doesn't exist
|
||||
|BufReadPre| starting to edit a new buffer, before reading the file
|
||||
|BufRead| starting to edit a new buffer, after reading the file
|
||||
|BufReadPost| starting to edit a new buffer, after reading the file
|
||||
|BufReadCmd| before starting to edit a new buffer |Cmd-event|
|
||||
|
||||
|FileReadPre| before reading a file with a ":read" command
|
||||
|FileReadPost| after reading a file with a ":read" command
|
||||
|FileReadCmd| before reading a file with a ":read" comman |Cmd-event|
|
||||
|
||||
|FilterReadPre| before reading a file from a filter command
|
||||
|FilterReadPost| after reading a file from a filter command
|
||||
|
||||
|StdinReadPre| before reading from stdin into the buffer
|
||||
|StdinReadPost| After reading from the stdin into the buffer
|
||||
|
||||
Writing
|
||||
|BufWrite| starting to write the whole buffer to a file
|
||||
|BufWritePre| starting to write the whole buffer to a file
|
||||
|BufWritePost| after writing the whole buffer to a file
|
||||
|BufWriteCmd| before writing the whole buffer to a file |Cmd-event|
|
||||
|
||||
|FileWritePre| starting to write part of a buffer to a file
|
||||
|FileWritePost| after writing part of a buffer to a file
|
||||
|FileWriteCmd| before writing part of a buffer to a file |Cmd-event|
|
||||
|
||||
|FileAppendPre| starting to append to a file
|
||||
|FileAppendPost| after appending to a file
|
||||
|FileAppendCmd| before appending to a file |Cmd-event|
|
||||
|
||||
|FilterWritePre| starting to write a file for a filter command or diff
|
||||
|FilterWritePost| after writing a file for a filter command or diff
|
||||
|
||||
Buffers
|
||||
|BufAdd| just after adding a buffer to the buffer list
|
||||
|BufCreate| just after adding a buffer to the buffer list
|
||||
|BufDelete| before deleting a buffer from the buffer list
|
||||
|BufWipeout| before completely deleting a buffer
|
||||
|
||||
|BufFilePre| before changing the name of the current buffer
|
||||
|BufFilePost| after changing the name of the current buffer
|
||||
|
||||
|BufEnter| after entering a buffer
|
||||
|BufLeave| before leaving to another buffer
|
||||
|BufWinEnter| after a buffer is displayed in a window
|
||||
|BufWinLeave| before a buffer is removed from a window
|
||||
|
||||
|BufUnload| before unloading a buffer
|
||||
|BufHidden| just after a buffer has become hidden
|
||||
|BufNew| just after creating a new buffer
|
||||
|
||||
|SwapExists| detected an existing swap file
|
||||
|
||||
Options
|
||||
|FileType| when the 'filetype' option has been set
|
||||
|Syntax| when the 'syntax' option has been set
|
||||
|EncodingChanged| after the 'encoding' option has been changed
|
||||
|TermChanged| after the value of 'term' has changed
|
||||
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|TermResponse| after the termainal response to |t_RV| is received
|
||||
|
||||
|VimLeavePre| before exiting Vim, before writing the viminfo file
|
||||
|VimLeave| before exiting Vim, after writing the viminfo file
|
||||
|
||||
Various
|
||||
|FileChangedShell| Vim notices that a file changed since editing started
|
||||
|FileChangedRO| before making the first change to a read-only file
|
||||
|
||||
|FuncUndefined| a user function is used but it isn't defined
|
||||
|SpellFileMissing| a spell file is used but it can't be found
|
||||
|
||||
|FocusGained| Vim got input focus
|
||||
|FocusLost| Vim lost input focus
|
||||
|CursorHold| the user doesn't press a key for a while
|
||||
|
||||
|WinEnter| after entering another window
|
||||
|WinLeave| before leaving a window
|
||||
|CmdwinEnter| after entering the command-line window
|
||||
|CmdwinLeave| before leaving the command-line window
|
||||
|
||||
|InsertEnter| starting Insert mode
|
||||
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
||||
|InsertLeave| when leaving Insert mode
|
||||
|
||||
|ColorScheme| after loading a color scheme
|
||||
|
||||
|RemoteReply| a reply from a server Vim was received
|
||||
|
||||
|QuickFixCmdPre| before a quickfix command is run
|
||||
|QuickFixCmdPost| after a quickfix command is run
|
||||
|
||||
|SessionLoadPost| after loading a session file
|
||||
|
||||
|MenuPopup| just before showing the popup menu
|
||||
|
||||
|User| to be used in combination with ":doautocmd"
|
||||
|
||||
|
||||
The alphabetical list of autocommand events: *autocmd-events-abc*
|
||||
|
||||
*BufCreate* *BufAdd*
|
||||
BufAdd or BufCreate Just after creating a new buffer which is
|
||||
added to the buffer list, or adding a buffer
|
||||
to the buffer list.
|
||||
Also used just after a buffer in the buffer
|
||||
list has been renamed.
|
||||
The BufCreate event is for historic reasons.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being created "<afile>".
|
||||
*BufDelete*
|
||||
BufDelete Before deleting a buffer from the buffer list.
|
||||
The BufUnload may be called first (if the
|
||||
buffer was loaded).
|
||||
Also used just before a buffer in the buffer
|
||||
list is renamed.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
*BufEnter*
|
||||
BufEnter After entering a buffer. Useful for setting
|
||||
options for a file type. Also executed when
|
||||
starting to edit a buffer, after the
|
||||
BufReadPost autocommands.
|
||||
*BufFilePost*
|
||||
BufFilePost After changing the name of the current buffer
|
||||
with the ":file" or ":saveas" command.
|
||||
*BufFilePre*
|
||||
BufFilePre Before changing the name of the current buffer
|
||||
with the ":file" or ":saveas" command.
|
||||
*BufHidden*
|
||||
BufHidden Just after a buffer has become hidden. That
|
||||
is, when there are no longer windows that show
|
||||
the buffer, but the buffer is not unloaded or
|
||||
deleted. Not used for ":qa" or ":q" when
|
||||
exiting Vim.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufLeave*
|
||||
BufLeave Before leaving to another buffer. Also when
|
||||
leaving or closing the current window and the
|
||||
new current window is not for the same buffer.
|
||||
Not used for ":qa" or ":q" when exiting Vim.
|
||||
*BufNew*
|
||||
BufNew Just after creating a new buffer. Also used
|
||||
just after a buffer has been renamed. When
|
||||
the buffer is added to the buffer list BufAdd
|
||||
will be triggered too.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being created "<afile>".
|
||||
*BufNewFile*
|
||||
BufNewFile When starting to edit a file that doesn't
|
||||
exist. Can be used to read in a skeleton
|
||||
file.
|
||||
*BufReadPre* *E200* *E201*
|
||||
BufReadPre When starting to edit a new buffer, before
|
||||
reading the file into the buffer. Not used
|
||||
if the file doesn't exist.
|
||||
*BufRead* *BufReadPost*
|
||||
BufRead or BufReadPost When starting to edit a new buffer, after
|
||||
reading the file into the buffer, before
|
||||
@@ -193,60 +372,46 @@ BufRead or BufReadPost When starting to edit a new buffer, after
|
||||
*BufReadCmd*
|
||||
BufReadCmd Before starting to edit a new buffer. Should
|
||||
read the file into the buffer. |Cmd-event|
|
||||
*BufFilePre*
|
||||
BufFilePre Before changing the name of the current buffer
|
||||
with the ":file" or ":saveas" command.
|
||||
*BufFilePost*
|
||||
BufFilePost After changing the name of the current buffer
|
||||
with the ":file" or ":saveas" command.
|
||||
*FileReadPre*
|
||||
FileReadPre Before reading a file with a ":read" command.
|
||||
*FileReadPost*
|
||||
FileReadPost After reading a file with a ":read" command.
|
||||
Note that Vim sets the '[ and '] marks to the
|
||||
first and last line of the read. This can be
|
||||
used to operate on the lines just read.
|
||||
*FileReadCmd*
|
||||
FileReadCmd Before reading a file with a ":read" command.
|
||||
Should do the reading of the file. |Cmd-event|
|
||||
*FilterReadPre* *E135*
|
||||
FilterReadPre Before reading a file from a filter command.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer, not the name of the
|
||||
temporary file that is the output of the
|
||||
filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterReadPost*
|
||||
FilterReadPost After reading a file from a filter command.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer as with FilterReadPre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FileType*
|
||||
FileType When the 'filetype' option has been set.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'filetype'.
|
||||
See |filetypes|.
|
||||
*Syntax*
|
||||
Syntax When the 'syntax' option has been set.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'syntax'.
|
||||
See |:syn-on|.
|
||||
*StdinReadPre*
|
||||
StdinReadPre Before reading from stdin into the buffer.
|
||||
Only used when the "-" argument was used when
|
||||
Vim was started |--|.
|
||||
*StdinReadPost*
|
||||
StdinReadPost After reading from the stdin into the buffer,
|
||||
before executing the modelines. Only used
|
||||
when the "-" argument was used when Vim was
|
||||
started |--|.
|
||||
*BufReadPre* *E200* *E201*
|
||||
BufReadPre When starting to edit a new buffer, before
|
||||
reading the file into the buffer. Not used
|
||||
if the file doesn't exist.
|
||||
*BufUnload*
|
||||
BufUnload Before unloading a buffer. This is when the
|
||||
text in the buffer is going to be freed. This
|
||||
may be after a BufWritePost and before a
|
||||
BufDelete. Also used for all buffers that are
|
||||
loaded when Vim is going to exit.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufWinEnter*
|
||||
BufWinEnter After a buffer is displayed in a window. This
|
||||
can be when the buffer is loaded (after
|
||||
processing the modelines), when a hidden
|
||||
buffer is displayed in a window (and is no
|
||||
longer hidden) or a buffer already visible in
|
||||
a window is also displayed in another window.
|
||||
*BufWinLeave*
|
||||
BufWinLeave Before a buffer is removed from a window.
|
||||
Not when it's still visible in another window.
|
||||
Also triggered when exiting. It's triggered
|
||||
before BufUnload or BufHidden.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufWipeout*
|
||||
BufWipeout Before completely deleting a buffer. The
|
||||
BufUnload and BufDelete events may be called
|
||||
first (if the buffer was loaded and was in the
|
||||
buffer list). Also used just before a buffer
|
||||
is renamed (also when it's not in the buffer
|
||||
list).
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
*BufWrite* *BufWritePre*
|
||||
BufWrite or BufWritePre Before writing the whole buffer to a file.
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
(should undo the commands for BufWritePre).
|
||||
*BufWriteCmd*
|
||||
BufWriteCmd Before writing the whole buffer to a file.
|
||||
Should do the writing of the file and reset
|
||||
@@ -254,42 +419,70 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
'cpo' and writing to another file |cpo-+|.
|
||||
The buffer contents should not be changed.
|
||||
|Cmd-event|
|
||||
*FileWritePre*
|
||||
FileWritePre Before writing to a file, when not writing the
|
||||
whole buffer. Use the '[ and '] marks for the
|
||||
range of lines.
|
||||
*FileWritePost*
|
||||
FileWritePost After writing to a file, when not writing the
|
||||
whole buffer.
|
||||
*FileWriteCmd*
|
||||
FileWriteCmd Before writing to a file, when not writing the
|
||||
whole buffer. Should do the writing to the
|
||||
file. Should not change the buffer. Use the
|
||||
'[ and '] marks for the range of lines.
|
||||
|Cmd-event|
|
||||
*FileAppendPre*
|
||||
FileAppendPre Before appending to a file. Use the '[ and ']
|
||||
marks for the range of lines.
|
||||
*FileAppendPost*
|
||||
FileAppendPost After appending to a file.
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
(should undo the commands for BufWritePre).
|
||||
*CmdwinEnter*
|
||||
CmdwinEnter After entering the command-line window.
|
||||
Useful for setting options specifically for
|
||||
this special type of window. This is
|
||||
triggered _instead_ of BufEnter and WinEnter.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*CmdwinLeave*
|
||||
CmdwinLeave Before leaving the command-line window.
|
||||
Useful to clean up any global setting done
|
||||
with CmdwinEnter. This is triggered _instead_
|
||||
of BufLeave and WinLeave.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*ColorScheme*
|
||||
ColorScheme After loading a color scheme. |:colorscheme|
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not re-triggered
|
||||
until the user has pressed a key (i.e. doesn't
|
||||
fire every 'updatetime' ms if you leave Vim to
|
||||
make some coffee. :) See |CursorHold-example|
|
||||
for previewing tags.
|
||||
This event is only triggered in Normal mode.
|
||||
While recording the CursorHold event is not
|
||||
triggered. |q|
|
||||
Note: Interactive commands cannot be used for
|
||||
this event. There is no hit-enter prompt,
|
||||
the screen is updated directly (when needed).
|
||||
Note: In the future there will probably be
|
||||
another option to set the time.
|
||||
Hint: to force an update of the status lines
|
||||
use: >
|
||||
:let &ro = &ro
|
||||
< {only on Amiga, Unix, Win32, MSDOS and all GUI
|
||||
versions}
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
changed. Useful to set up fonts, for example.
|
||||
*FileAppendCmd*
|
||||
FileAppendCmd Before appending to a file. Should do the
|
||||
appending to the file. Use the '[ and ']
|
||||
marks for the range of lines.|Cmd-event|
|
||||
*FilterWritePre*
|
||||
FilterWritePre Before writing a file for a filter command or
|
||||
making a diff.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer, not the name of the
|
||||
temporary file that is the output of the
|
||||
filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePost*
|
||||
FilterWritePost After writing a file for a filter command or
|
||||
making a diff.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer as with FilterWritePre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FileAppendPost*
|
||||
FileAppendPost After appending to a file.
|
||||
*FileAppendPre*
|
||||
FileAppendPre Before appending to a file. Use the '[ and ']
|
||||
marks for the range of lines.
|
||||
*FileChangedRO*
|
||||
FileChangedRO Before making the first change to a read-only
|
||||
file. Can be used to check-out the file from
|
||||
a source control system. Not triggered when
|
||||
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.
|
||||
WARNING: If the autocommand moves the cursor
|
||||
the effect of the change is undefined.
|
||||
*FileChangedShell*
|
||||
FileChangedShell When Vim notices that the modification time of
|
||||
a file has changed since editing started.
|
||||
@@ -319,17 +512,64 @@ FileChangedShell When Vim notices that the modification time of
|
||||
commands for the FileChangedShell event no
|
||||
other FileChangedShell event will be
|
||||
triggered.
|
||||
*FileChangedRO*
|
||||
FileChangedRO Before making the first change to a read-only
|
||||
file. Can be used to check-out the file from
|
||||
a source control system. Not triggered when
|
||||
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.
|
||||
WARNING: If the autocommand moves the cursor
|
||||
the effect of the change is undefined.
|
||||
*FileEncoding*
|
||||
FileEncoding Obsolete. It still works and is equivalent
|
||||
to |EncodingChanged|.
|
||||
*FileReadCmd*
|
||||
FileReadCmd Before reading a file with a ":read" command.
|
||||
Should do the reading of the file. |Cmd-event|
|
||||
*FileReadPost*
|
||||
FileReadPost After reading a file with a ":read" command.
|
||||
Note that Vim sets the '[ and '] marks to the
|
||||
first and last line of the read. This can be
|
||||
used to operate on the lines just read.
|
||||
*FileReadPre*
|
||||
FileReadPre Before reading a file with a ":read" command.
|
||||
*FileType*
|
||||
FileType When the 'filetype' option has been set.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'filetype'.
|
||||
See |filetypes|.
|
||||
*FileWriteCmd*
|
||||
FileWriteCmd Before writing to a file, when not writing the
|
||||
whole buffer. Should do the writing to the
|
||||
file. Should not change the buffer. Use the
|
||||
'[ and '] marks for the range of lines.
|
||||
|Cmd-event|
|
||||
*FileWritePost*
|
||||
FileWritePost After writing to a file, when not writing the
|
||||
whole buffer.
|
||||
*FileWritePre*
|
||||
FileWritePre Before writing to a file, when not writing the
|
||||
whole buffer. Use the '[ and '] marks for the
|
||||
range of lines.
|
||||
*FilterReadPost*
|
||||
FilterReadPost After reading a file from a filter command.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer as with FilterReadPre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterReadPre* *E135*
|
||||
FilterReadPre Before reading a file from a filter command.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer, not the name of the
|
||||
temporary file that is the output of the
|
||||
filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePost*
|
||||
FilterWritePost After writing a file for a filter command or
|
||||
making a diff.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer as with FilterWritePre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePre*
|
||||
FilterWritePre Before writing a file for a filter command or
|
||||
making a diff.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer, not the name of the
|
||||
temporary file that is the output of the
|
||||
filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FocusGained*
|
||||
FocusGained When Vim got input focus. Only for the GUI
|
||||
version and a few console versions where this
|
||||
@@ -345,104 +585,141 @@ FuncUndefined When a user function is used but it isn't
|
||||
when it's used. Both <amatch> and <afile> are
|
||||
set to the name of the function.
|
||||
See |autoload-functions|.
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not re-triggered
|
||||
until the user has pressed a key (i.e. doesn't
|
||||
fire every 'updatetime' ms if you leave Vim to
|
||||
make some coffee. :) See |CursorHold-example|
|
||||
for previewing tags.
|
||||
This event is only triggered in Normal mode.
|
||||
Note: Interactive commands cannot be used for
|
||||
this event. There is no hit-enter prompt,
|
||||
the screen is updated directly (when needed).
|
||||
Note: In the future there will probably be
|
||||
another option to set the time.
|
||||
Hint: to force an update of the status lines
|
||||
use: >
|
||||
:let &ro = &ro
|
||||
< {only on Amiga, Unix, Win32, MSDOS and all GUI
|
||||
versions}
|
||||
*BufEnter*
|
||||
BufEnter After entering a buffer. Useful for setting
|
||||
options for a file type. Also executed when
|
||||
starting to edit a buffer, after the
|
||||
BufReadPost autocommands.
|
||||
*BufLeave*
|
||||
BufLeave Before leaving to another buffer. Also when
|
||||
leaving or closing the current window and the
|
||||
new current window is not for the same buffer.
|
||||
Not used for ":qa" or ":q" when exiting Vim.
|
||||
*BufWinEnter*
|
||||
BufWinEnter After a buffer is displayed in a window. This
|
||||
can be when the buffer is loaded (after
|
||||
processing the modelines), when a hidden
|
||||
buffer is displayed in a window (and is no
|
||||
longer hidden) or a buffer already visible in
|
||||
a window is also displayed in another window.
|
||||
*BufWinLeave*
|
||||
BufWinLeave Before a buffer is removed from a window.
|
||||
Not when it's still visible in another window.
|
||||
Also triggered when exiting. It's triggered
|
||||
before BufUnload or BufHidden.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufUnload*
|
||||
BufUnload Before unloading a buffer. This is when the
|
||||
text in the buffer is going to be freed. This
|
||||
may be after a BufWritePost and before a
|
||||
BufDelete. Also used for all buffers that are
|
||||
loaded when Vim is going to exit.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufHidden*
|
||||
BufHidden Just after a buffer has become hidden. That
|
||||
is, when there are no longer windows that show
|
||||
the buffer, but the buffer is not unloaded or
|
||||
deleted. Not used for ":qa" or ":q" when
|
||||
exiting Vim.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
*BufNew*
|
||||
BufNew Just after creating a new buffer. Also used
|
||||
just after a buffer has been renamed. When
|
||||
the buffer is added to the buffer list BufAdd
|
||||
will be triggered too.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being created "<afile>".
|
||||
*BufCreate* *BufAdd*
|
||||
BufAdd or BufCreate Just after creating a new buffer which is
|
||||
added to the buffer list, or adding a buffer
|
||||
to the buffer list.
|
||||
Also used just after a buffer in the buffer
|
||||
list has been renamed.
|
||||
The BufCreate event is for historic reasons.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being created "<afile>".
|
||||
*BufDelete*
|
||||
BufDelete Before deleting a buffer from the buffer list.
|
||||
The BufUnload may be called first (if the
|
||||
buffer was loaded).
|
||||
Also used just before a buffer in the buffer
|
||||
list is renamed.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
*BufWipeout*
|
||||
BufWipeout Before completely deleting a buffer. The
|
||||
BufUnload and BufDelete events may be called
|
||||
first (if the buffer was loaded and was in the
|
||||
buffer list). Also used just before a buffer
|
||||
is renamed (also when it's not in the buffer
|
||||
list).
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
*GUIEnter*
|
||||
GUIEnter After starting the GUI successfully, and after
|
||||
opening the window. It is triggered before
|
||||
VimEnter when using gvim. Can be used to
|
||||
position the window from a .gvimrc file: >
|
||||
:autocmd GUIEnter * winpos 100 50
|
||||
< *InsertChange*
|
||||
InsertChange When typing <Insert> while in Insert or
|
||||
Replace mode. The |v:insertmode| variable
|
||||
indicates the new mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertEnter*
|
||||
InsertEnter When starting Insert mode. Also for Replace
|
||||
mode and Virtual Replace mode. The
|
||||
|v:insertmode| variable indicates the mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertLeave*
|
||||
InsertLeave When leaving Insert mode. Also when using
|
||||
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
*MenuPopup*
|
||||
MenuPopup Just before showing the popup menu (under the
|
||||
right mouse button). Useful for adjusting the
|
||||
menu for what is under the cursor or mouse
|
||||
pointer.
|
||||
The pattern is matched against a single
|
||||
character representing the mode:
|
||||
n Normal
|
||||
v Visual
|
||||
o Operator-pending
|
||||
i Insert
|
||||
c Commmand line
|
||||
*QuickFixCmdPre*
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:grep|, |:grepadd|, |:vimgrep|,
|
||||
|:vimgrepadd|). The pattern is matched against
|
||||
the command being run. When |:grep| is used
|
||||
but 'grepprg' is set to "internal" it still
|
||||
matches "grep".
|
||||
This command cannot be used to set the
|
||||
'makeprg' and 'grepprg' variables.
|
||||
If this command causes an error, the quickfix
|
||||
command is not executed.
|
||||
*QuickFixCmdPost*
|
||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
command is run.
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
server was received |server2client()|.
|
||||
<amatch> is equal to the {serverid} from which
|
||||
the reply was sent, and <afile> is the actual
|
||||
reply string.
|
||||
Note that even if an autocommand is defined,
|
||||
the reply should be read with |remote_read()|
|
||||
to consume it.
|
||||
*SessionLoadPost*
|
||||
SessionLoadPost After loading the session file created using
|
||||
the |:mksession| command.
|
||||
*SpellFileMissing*
|
||||
SpellFileMissing When trying to load a spell checking file and
|
||||
it can't be found. <amatch> is the language,
|
||||
'encoding' also matters. See
|
||||
|spell-SpellFileMissing|.
|
||||
*StdinReadPost*
|
||||
StdinReadPost After reading from the stdin into the buffer,
|
||||
before executing the modelines. Only used
|
||||
when the "-" argument was used when Vim was
|
||||
started |--|.
|
||||
*StdinReadPre*
|
||||
StdinReadPre Before reading from stdin into the buffer.
|
||||
Only used when the "-" argument was used when
|
||||
Vim was started |--|.
|
||||
*SwapExists*
|
||||
SwapExists Detected an existing swap file when starting
|
||||
to edit a file. Only when it is possible to
|
||||
select a way to handle the situation, when Vim
|
||||
would ask the user what to do.
|
||||
The |v:swapname| variable holds the name of
|
||||
the swap file found, <afile> the file being
|
||||
edited. |v:swapcommand| may contain a command
|
||||
to be executed in the opened file.
|
||||
The commands should set the |v:swapchoice|
|
||||
variable to a string with one character to
|
||||
tell Vim what should be done next:
|
||||
'o' open read-only
|
||||
'e' edit the file anyway
|
||||
'r' recover
|
||||
'd' delete the swap file
|
||||
'q' quit, don't edit the file
|
||||
'a' abort, like hitting CTRL-C
|
||||
When set to an empty string the user will be
|
||||
asked, as if there was no SwapExists autocmd.
|
||||
Note: Do not try to change the buffer, the
|
||||
results are unpredictable.
|
||||
*Syntax*
|
||||
Syntax When the 'syntax' option has been set.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'syntax'.
|
||||
See |:syn-on|.
|
||||
*TermChanged*
|
||||
TermChanged After the value of 'term' has changed. Useful
|
||||
for re-loading the syntax file to update the
|
||||
colors, fonts and other terminal-dependent
|
||||
settings. Executed for all loaded buffers.
|
||||
*TermResponse*
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
can be used to do things depending on the
|
||||
terminal version.
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
":doautocmd".
|
||||
*UserGettingBored*
|
||||
UserGettingBored When the user hits CTRL-C. Just kidding! :-)
|
||||
*VimEnter*
|
||||
VimEnter After doing all the startup stuff, including
|
||||
loading .vimrc files, executing the "-c cmd"
|
||||
arguments, creating all windows and loading
|
||||
the buffers in them.
|
||||
*VimLeave*
|
||||
VimLeave Before exiting Vim, just after writing the
|
||||
.viminfo file. Executed only once, like
|
||||
VimLeavePre.
|
||||
To detect an abnormal exit use |v:dying|.
|
||||
*VimLeavePre*
|
||||
VimLeavePre Before exiting Vim, just before writing the
|
||||
.viminfo file. This is executed only once,
|
||||
if there is a match with the name of what
|
||||
happens to be the current buffer when exiting.
|
||||
Mostly useful with a "*" pattern. >
|
||||
:autocmd VimLeavePre * call CleanupStuff()
|
||||
< To detect an abnormal exit use |v:dying|.
|
||||
*WinEnter*
|
||||
WinEnter After entering another window. Not done for
|
||||
the first window, when Vim has just started.
|
||||
@@ -459,142 +736,6 @@ WinLeave Before leaving a window. If the window to be
|
||||
executes the BufLeave autocommands before the
|
||||
WinLeave autocommands (but not for ":new").
|
||||
Not used for ":qa" or ":q" when exiting Vim.
|
||||
*CmdwinEnter*
|
||||
CmdwinEnter After entering the command-line window.
|
||||
Useful for setting options specifically for
|
||||
this special type of window. This is
|
||||
triggered _instead_ of BufEnter and WinEnter.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*CmdwinLeave*
|
||||
CmdwinLeave Before leaving the command-line window.
|
||||
Useful to clean up any global setting done
|
||||
with CmdwinEnter. This is triggered _instead_
|
||||
of BufLeave and WinLeave.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*GUIEnter*
|
||||
GUIEnter After starting the GUI successfully, and after
|
||||
opening the window. It is triggered before
|
||||
VimEnter when using gvim. Can be used to
|
||||
position the window from a .gvimrc file: >
|
||||
:autocmd GUIEnter * winpos 100 50
|
||||
< *VimEnter*
|
||||
VimEnter After doing all the startup stuff, including
|
||||
loading .vimrc files, executing the "-c cmd"
|
||||
arguments, creating all windows and loading
|
||||
the buffers in them.
|
||||
*VimLeavePre*
|
||||
VimLeavePre Before exiting Vim, just before writing the
|
||||
.viminfo file. This is executed only once,
|
||||
if there is a match with the name of what
|
||||
happens to be the current buffer when exiting.
|
||||
Mostly useful with a "*" pattern. >
|
||||
:autocmd VimLeavePre * call CleanupStuff()
|
||||
< To detect an abnormal exit use |v:dying|.
|
||||
*VimLeave*
|
||||
VimLeave Before exiting Vim, just after writing the
|
||||
.viminfo file. Executed only once, like
|
||||
VimLeavePre.
|
||||
To detect an abnormal exit use |v:dying|.
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
changed. Useful to set up fonts, for example.
|
||||
*InsertEnter*
|
||||
InsertEnter When starting Insert mode. Also for Replace
|
||||
mode and Virtual Replace mode. The
|
||||
|v:insertmode| variable indicates the mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertChange*
|
||||
InsertChange When typing <Insert> while in Insert or
|
||||
Replace mode. The |v:insertmode| variable
|
||||
indicates the new mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertLeave*
|
||||
InsertLeave When leaving Insert mode. Also when using
|
||||
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
*FileEncoding*
|
||||
FileEncoding Obsolete. It still works and is equivalent
|
||||
to |EncodingChanged|.
|
||||
*ColorScheme*
|
||||
ColorScheme After loading a color scheme. |:colorscheme|
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
server was received |server2client()|.
|
||||
<amatch> is equal to the {serverid} from which
|
||||
the reply was sent, and <afile> is the actual
|
||||
reply string.
|
||||
Note that even if an autocommand is defined,
|
||||
the reply should be read with |remote_read()|
|
||||
to consume it.
|
||||
*TermChanged*
|
||||
TermChanged After the value of 'term' has changed. Useful
|
||||
for re-loading the syntax file to update the
|
||||
colors, fonts and other terminal-dependent
|
||||
settings. Executed for all loaded buffers.
|
||||
*TermResponse*
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
can be used to do things depending on the
|
||||
terminal version.
|
||||
QuickFixCmdPre *QuickFixCmdPre*
|
||||
Before a quickfix command is run (|:make|,
|
||||
|:grep|, |:grepadd|, |:vimgrep|,
|
||||
|:vimgrepadd|). The pattern is matched against
|
||||
the command being run. When |:grep| is used
|
||||
but 'grepprg' is set to "internal" it still
|
||||
matches "grep".
|
||||
This command cannot be used to set the
|
||||
'makeprg' and 'grepprg' variables.
|
||||
If this command causes an error, the quickfix
|
||||
command is not executed.
|
||||
QuickFixCmdPost *QuickFixCmdPost*
|
||||
like QuickFixCmdPre, but after a quickfix
|
||||
command is run.
|
||||
*MenuPopup*
|
||||
MenuPopup Just before showing the popup menu (under the
|
||||
right mouse button). Useful for adjusting the
|
||||
menu for what is under the cursor or mouse
|
||||
pointer.
|
||||
The pattern is matched against a single
|
||||
character representing the mode:
|
||||
n Normal
|
||||
v Visual
|
||||
o Operator-pending
|
||||
i Insert
|
||||
c Commmand line
|
||||
*UserGettingBored*
|
||||
UserGettingBored When the user hits CTRL-C. Just kidding! :-)
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
":doautocmd".
|
||||
|
||||
You can specify a comma-separated list of event names. No white space can be
|
||||
used in this list. The command applies to all the events in the list.
|
||||
|
||||
For READING FILES there are four kinds of events possible:
|
||||
BufNewFile starting to edit a non-existent file
|
||||
BufReadPre BufReadPost starting to edit an existing file
|
||||
FilterReadPre FilterReadPost read the temp file with filter output
|
||||
FileReadPre FileReadPost any other file read
|
||||
Vim uses only one of these four kinds when reading a file. The "Pre" and
|
||||
"Post" events are both triggered, before and after reading the file.
|
||||
|
||||
Note that the autocommands for the *ReadPre events and all the Filter events
|
||||
are not allowed to change the current buffer (you will get an error message if
|
||||
this happens). This is to prevent the file to be read into the wrong buffer.
|
||||
|
||||
Note that the 'modified' flag is reset AFTER executing the BufReadPost
|
||||
and BufNewFile autocommands. But when the 'modified' option was set by the
|
||||
autocommands, this doesn't happen.
|
||||
|
||||
You can use the 'eventignore' option to ignore a number of events or all
|
||||
events.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{pat}*
|
||||
@@ -922,10 +1063,8 @@ It's possible to use the ":au" command in an autocommand. This can be a
|
||||
self-modifying command! This can be useful for an autocommand that should
|
||||
execute only once.
|
||||
|
||||
There is currently no way to disable the autocommands. If you want to write a
|
||||
file without executing the autocommands for that type of file, write it under
|
||||
another name and rename it with a shell command. In some situations you can
|
||||
use the 'eventignore' option.
|
||||
If you want to skip autocommands for one command, use the |:noautocmd| command
|
||||
modifier or the 'eventignore' option.
|
||||
|
||||
Note: When reading a file (with ":read file" or with a filter command) and the
|
||||
last line in the file does not have an <EOL>, Vim remembers this. At the next
|
||||
@@ -1042,5 +1181,22 @@ The |v:cmdbang| variable is one when "!" was used, zero otherwise.
|
||||
|
||||
See the $VIMRUNTIME/plugin/netrw.vim for examples.
|
||||
|
||||
==============================================================================
|
||||
11. Disabling autocommands *autocmd-disable*
|
||||
|
||||
To disable autocommands for some time use the 'eventignore' option. Note that
|
||||
this may cause unexpected behavior, make sure you restore 'eventignore'
|
||||
afterwards, using a |:try| block with |:finally|.
|
||||
|
||||
*:noautocmd* *:noa*
|
||||
To disable autocommands for just one command use the ":noautocmd" command
|
||||
modifier. This will set 'eventignore' to "all" for the duration of the
|
||||
following command. Example: >
|
||||
|
||||
:noautocmd w fname.gz
|
||||
|
||||
This will write the file without triggering the autocommands defined by the
|
||||
gzip plugin.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -503,6 +503,8 @@ comment (starting with '"') after the ":!" command.
|
||||
temporary file and then reads the file into the
|
||||
buffer. Vim uses the 'shellredir' option to redirect
|
||||
the filter output to the temporary file.
|
||||
However, if the 'shelltemp' option is off then pipes
|
||||
are used when possible (on Unix).
|
||||
When the 'R' flag is included in 'cpoptions' marks in
|
||||
the filtered lines are deleted, unless the
|
||||
|:keepmarks| command is used. Example: >
|
||||
@@ -1087,7 +1089,8 @@ register. {not in Vi}
|
||||
7. Selection and drop registers "*, "+ and "~
|
||||
Use these register for storing and retrieving the selected text for the GUI.
|
||||
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
||||
working, the unnamed register is used instead. {not in Vi}
|
||||
working, the unnamed register is used instead. For Unix systems the clipboard
|
||||
is only available when the |+xterm_clipboard| feature is present. {not in Vi}
|
||||
|
||||
Note that there is only a distinction between "* and "+ for X11 systems. For
|
||||
an explanation of the difference, see |x11-selection|. Under MS-Windows, use
|
||||
@@ -1493,8 +1496,9 @@ Vim has a sorting function and a sorting command. The sorting function can be
|
||||
found here: |sort()|.
|
||||
|
||||
*:sor* *:sort*
|
||||
:[range]sor[t][!] [i] [u] [/{pattern}/]
|
||||
Sort lines in [range].
|
||||
:[range]sor[t][!] [i][u][n][x][o] [/{pattern}/]
|
||||
Sort lines in [range]. When no range is given all
|
||||
lines are sorted.
|
||||
|
||||
With [!] the order is reversed.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Nov 21
|
||||
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -153,7 +153,9 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
|
||||
*c_CTRL-R_=*
|
||||
'=' the expression register: you are prompted to
|
||||
enter an expression (see |expression|)
|
||||
(doesn't work at the expression prompt)
|
||||
(doesn't work at the expression prompt; some
|
||||
things such as changing the buffer or current
|
||||
window are not allowed to avoid side effects)
|
||||
See |registers| about registers. {not in Vi}
|
||||
Implementation detail: When using the |expression| register
|
||||
and invoking setcmdpos(), this sets the position before
|
||||
@@ -197,6 +199,8 @@ CTRL-\ e {expr} *c_CTRL-\_e*
|
||||
The cursor position is unchanged, except when the cursor was
|
||||
at the end of the line, then it stays at the end.
|
||||
|setcmdpos()| can be used to set the cursor position.
|
||||
The |sandbox| is used for evaluating the expression to avoid
|
||||
nasty side effects.
|
||||
Example: >
|
||||
:cmap <F7> <C-\>eAppendSome()<CR>
|
||||
:func AppendSome()
|
||||
@@ -692,6 +696,12 @@ output.
|
||||
==============================================================================
|
||||
6. Ex special characters *cmdline-special*
|
||||
|
||||
Note: These are special characters in the executed command line. If you want
|
||||
to insert special things while typing you can use the CTRL-R command. For
|
||||
example, "%" stands for the current file name, while CTRL-R % inserts the
|
||||
current file name right away. See |c_CTRL-R|.
|
||||
|
||||
|
||||
In Ex commands, at places where a file name can be used, the following
|
||||
characters have a special meaning. These can also be used in the expression
|
||||
function expand() |expand()|.
|
||||
@@ -736,7 +746,7 @@ Note: these are typed literally, they are not special keys!
|
||||
<amatch> when executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType and Syntax events).
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
<sfile> when executing a ":source" command, is replaced with the
|
||||
file name of the sourced file;
|
||||
when executing a function, is replaced with
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
|
||||
*debug.txt* For Vim version 7.0aa. Last change: 2005 Dec 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -7,6 +7,7 @@
|
||||
Debugging Vim *debug-vim*
|
||||
|
||||
This is for debugging Vim itself, when it doesn't work properly.
|
||||
For debugging Vim scripts, functions, etc. see |debug-scripts|
|
||||
|
||||
1. Location of a crash, using gcc and gdb |debug-gcc|
|
||||
2. Windows Bug Reporting |debug-win32|
|
||||
@@ -61,9 +62,9 @@ This includes the WinDbg debugger.
|
||||
If you have Visual Studio, use that instead of the VC Toolkit
|
||||
and WinDbg.
|
||||
|
||||
|
||||
(No idea what to do if your binary was built with the Borland or Cygwin
|
||||
compilers. Sorry.)
|
||||
For other compilers, you should always use the corresponding debugger: TD for
|
||||
a Vim executable compiled with the Borland compiler; gdb (see above
|
||||
|debug-gcc|) for the Cygwin and MinGW compilers.
|
||||
|
||||
=========================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
|
||||
*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -382,8 +382,8 @@ checking engine in Vim, for various reasons:
|
||||
them separately from Vim. That's mostly not impossible, but a drawback.
|
||||
- Performance: A few tests showed that it's possible to check spelling on the
|
||||
fly (while redrawing), just like syntax highlighting. But the mechanisms
|
||||
used by other code are much slower. Myspell uses a simplistic hashtable,
|
||||
for example.
|
||||
used by other code are much slower. Myspell uses a hashtable, for example.
|
||||
The affix compression that most spell checkers use makes it slower too.
|
||||
- For using an external program like aspell a communication mechanism would
|
||||
have to be setup. That's complicated to do in a portable way (Unix-only
|
||||
would be relatively simple, but that's not good enough). And performance
|
||||
@@ -399,14 +399,88 @@ checking engine in Vim, for various reasons:
|
||||
another program or library would be acceptable. But the word lists probably
|
||||
differ, the suggestions may be wrong words.
|
||||
|
||||
|
||||
Spelling suggestions *develop-spell-suggestions*
|
||||
|
||||
For making suggestions there are two basic mechanisms:
|
||||
1. Try changing the bad word a little bit and check for a match with a good
|
||||
word. Or go through the list of good words, change them a little bit and
|
||||
check for a match with the bad word. The changes are deleting a character,
|
||||
inserting a character, swapping two characters, etc.
|
||||
2. Perform soundfolding on both the bad word and the good words and then find
|
||||
matches, possibly with a few changes like with the first mechanism.
|
||||
|
||||
The first is good for finding typing mistakes. After experimenting with
|
||||
hashtables and looking at solutions from other spell checkers the conclusion
|
||||
was that a trie (a kind of tree structure) is ideal for this. Both for
|
||||
reducing memory use and being able to try sensible changes. For example, when
|
||||
inserting a character only characters that lead to good words need to be
|
||||
tried. Other mechanisms (with hashtables) need to try all possible letters at
|
||||
every position in the word. Also, a hashtable has the requirement that word
|
||||
boundaries are identified separately, while a trie does not require this.
|
||||
That makes the mechanism a lot simpler.
|
||||
|
||||
Soundfolding is useful when someone knows how the words sounds but doesn't
|
||||
know how it is spelled. For example, the word "dictionary" might be written
|
||||
as "daktonerie". The number of changes that the first method would need to
|
||||
try is very big, it's hard to find the good word that way. After soundfolding
|
||||
the words become "tktnr" and "tkxnry", these differ by only two letters.
|
||||
|
||||
To find words by their soundfolded equivalent (soundalike word) we need a list
|
||||
of all soundfolded words. A few experiments have been done to find out what
|
||||
the best method is. Alternatives:
|
||||
1. Do the sound folding on the fly when looking for suggestions. This means
|
||||
walking through the trie of good words, soundfolding each word and
|
||||
checking how different it is from the bad word. This is very efficient for
|
||||
memory use, but takes a long time. On a fast PC it takes a couple of
|
||||
seconds for English, which can be acceptable for interactive use. But for
|
||||
some languages it takes more than ten seconds (e.g., German, Catalan),
|
||||
which is unacceptable slow. For batch processing (automatic corrections)
|
||||
it's to slow for all languages.
|
||||
2. Use a trie for the soundfolded words, so that searching can be done just
|
||||
like how it works without soundfolding. This requires remembering a list
|
||||
of good words for each soundfolded word. This makes finding matches very
|
||||
fast but requires quite a lot of memory, in the order of 1 to 10 Mbyte.
|
||||
For some languages more than the original word list.
|
||||
3. Like the second alternative, but reduce the amount of memory by using affix
|
||||
compression and store only the soundfolded basic word. This is what Aspell
|
||||
does. Disadvantage is that affixes need to be stripped from the bad word
|
||||
before soundfolding it, which means that mistakes at the start and/or end
|
||||
of the word will cause the mechanism to fail. Also, this becomes slow when
|
||||
the bad word is quite different from the good word.
|
||||
|
||||
The choice made is to use the second mechanism and use a separate file. This
|
||||
way a user with sufficient memory can get very good suggestions while a user
|
||||
who is short of memory or just wants the spell checking and no suggestions
|
||||
doesn't use so much memory.
|
||||
|
||||
|
||||
Word frequency
|
||||
|
||||
For sorting suggestions it helps to know which words are common. In theory we
|
||||
could store a word frequency with the word in the dictionary. However, this
|
||||
requires storing a count per word. That degrades word tree compression a lot.
|
||||
And maintaining the word frequency for all languages will be a heavy task.
|
||||
Also, it would be nice to prefer words that are already in the text. This way
|
||||
the words that appear in the specific text are preferred for suggestions.
|
||||
|
||||
What has been implemented is to count words that have been seen during
|
||||
displaying. A hashtable is used to quickly find the word count. The count is
|
||||
initialized from words listed in COMMON items in the affix file, so that it
|
||||
also works when starting a new file.
|
||||
|
||||
This isn't ideal, because the longer Vim is running the higher the counts
|
||||
become. But in practice it is a noticable improvement over not using the word
|
||||
count.
|
||||
|
||||
==============================================================================
|
||||
4. Assumptions *design-assumptions*
|
||||
|
||||
Size of variables:
|
||||
char 8 bit signed
|
||||
char_u 8 bit unsigned
|
||||
int 16, 32 or 64 bit signed
|
||||
unsigned 16, 32 or 64 bit unsigned
|
||||
int 32 or 64 bit signed (16 might be possible with limited features)
|
||||
unsigned 32 or 64 bit unsigned (16 as with ints)
|
||||
long 32 or 64 bit signed, can hold a pointer
|
||||
|
||||
Note that some compilers cannot handle long lines or strings. The C89
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2005 Sep 21
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -345,8 +345,8 @@ get an error message. Possible causes:
|
||||
- The 'shell' and associated options are not set correctly. Try if filtering
|
||||
works with a command like ":!sort".
|
||||
- You are using 'diffexpr' and it doesn't work.
|
||||
If it's not clear what the problem is set the 'verbose' option to see more
|
||||
messages.
|
||||
If it's not clear what the problem is set the 'verbose' option to one or more
|
||||
to see more messages.
|
||||
|
||||
The self-installing Vim includes a diff program. If you don't have it you
|
||||
might want to download a diff.exe. For example from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
|
||||
*editing.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -155,11 +155,14 @@ Technical: On the Amiga you can use 30 characters for a file name. But on an
|
||||
When you started editing without giving a file name, "No File" is displayed in
|
||||
messages. If the ":write" command is used with a file name argument, the file
|
||||
name for the current file is set to that file name. This only happens when
|
||||
the 'F' flag is included in 'cpoptions' (by default it is included). This is
|
||||
useful when entering text in an empty buffer and then writing it to a file.
|
||||
If 'cpoptions' contains the 'f' flag (by default it is NOT included) the file
|
||||
name is set for the ":read file" command. This is useful when starting Vim
|
||||
without an argument and then doing ":read file" to start editing a file.
|
||||
the 'F' flag is included in 'cpoptions' (by default it is included) |cpo-F|.
|
||||
This is useful when entering text in an empty buffer and then writing it to a
|
||||
file. If 'cpoptions' contains the 'f' flag (by default it is NOT included)
|
||||
|cpo-f| the file name is set for the ":read file" command. This is useful
|
||||
when starting Vim without an argument and then doing ":read file" to start
|
||||
editing a file.
|
||||
When the file name was set and 'filetype' is empty the filetype detection
|
||||
autocommands will be triggered.
|
||||
*not-edited*
|
||||
Because the file name was set without really starting to edit that file, you
|
||||
are protected from overwriting that file. This is done by setting the
|
||||
@@ -398,8 +401,9 @@ The expression can contain just about anything, thus this can also be used to
|
||||
avoid the special meaning of '"', '|', '%' and '#'.
|
||||
|
||||
*++opt* *[++opt]*
|
||||
The [++opt] argument can be used to force the value of 'fileformat' or
|
||||
'fileencoding' to a value for one command. The form is: >
|
||||
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}={value}
|
||||
|
||||
Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin*
|
||||
@@ -407,6 +411,7 @@ Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin*
|
||||
enc or encoding overrides 'fileencoding'
|
||||
bin or binary sets 'binary'
|
||||
nobin or nobinary resets 'binary'
|
||||
bad specifies behavior for bad characters
|
||||
|
||||
{value} cannot contain white space. It can be any valid value for these
|
||||
options. Examples: >
|
||||
@@ -416,12 +421,24 @@ This edits the same file again with 'fileformat' set to "unix". >
|
||||
:w ++enc=latin1 newfile
|
||||
This writes the current buffer to "newfile" in latin1 format.
|
||||
|
||||
There may be several ++opt arguments, separated by white space. They must all
|
||||
appear before any |+cmd| argument.
|
||||
|
||||
*++bad*
|
||||
The argument of "++bad=" specifies what happens with characters that can't be
|
||||
converted and illegal bytes. It can be one of three things:
|
||||
++bad=X A single-byte character that replaces each bad character.
|
||||
++bad=keep Keep bad characters without conversion. Note that this may
|
||||
result in illegal bytes in your text!
|
||||
++bad=drop Remove the bad characters.
|
||||
|
||||
The default is like "++bad=?": Replace each bad character with a question
|
||||
mark.
|
||||
|
||||
Note that when reading, the 'fileformat' and 'fileencoding' options will be
|
||||
set to the used format. When writing this doesn't happen, thus a next write
|
||||
will use the old value of the option. Same for the 'binary' option.
|
||||
|
||||
There may be several ++opt arguments, separated by white space. They must all
|
||||
appear before any |+cmd| argument.
|
||||
|
||||
*+cmd* *[+cmd]*
|
||||
The [+cmd] argument can be used to position the cursor in the newly opened
|
||||
@@ -860,6 +877,8 @@ used, for example, when the write fails and you want to try again later with
|
||||
the filename of the current buffer to {file}. The
|
||||
previous name is used for the alternate file name.
|
||||
The [!] is needed to overwrite an existing file.
|
||||
When 'filetype' is empty filetype detection is done
|
||||
with the new name, before the file is written.
|
||||
{not in Vi}
|
||||
|
||||
*:up* *:update*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Nov 20
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,6 +28,7 @@ done, the features in this document are not available. See |+eval| and
|
||||
9. Examples |eval-examples|
|
||||
10. No +eval feature |no-eval-feature|
|
||||
11. The sandbox |eval-sandbox|
|
||||
12. Textlock |textlock|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
@@ -1272,12 +1273,13 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
|
||||
Vim behaves like it is empty, there is no warning message.
|
||||
|
||||
*v:fname_in* *fname_in-variable*
|
||||
v:fname_in The name of the input file. Only valid while evaluating:
|
||||
v:fname_in The name of the input file. Valid while evaluating:
|
||||
option used for ~
|
||||
'charconvert' file to be converted
|
||||
'diffexpr' original file
|
||||
'patchexpr' original file
|
||||
'printexpr' file to be printed
|
||||
And set to the swap file name for |SwapExists|.
|
||||
|
||||
*v:fname_out* *fname_out-variable*
|
||||
v:fname_out The name of the output file. Only valid while
|
||||
@@ -1400,6 +1402,29 @@ v:shell_error Result of the last shell command. When non-zero, the last
|
||||
*v:statusmsg* *statusmsg-variable*
|
||||
v:statusmsg Last given status message. It's allowed to set this variable.
|
||||
|
||||
*v:swapname* *swapname-variable*
|
||||
v:swapname Only valid when executing |SwapExists| autocommands: Name of
|
||||
the swap file found. Read-only.
|
||||
|
||||
*v:swapchoice* *swapchoice-variable*
|
||||
v:swapchoice |SwapExists| autocommands can set this to the selected choice
|
||||
for handling an existing swap file:
|
||||
'o' Open read-only
|
||||
'e' Edit anyway
|
||||
'r' Recover
|
||||
'd' Delete swapfile
|
||||
'q' Quit
|
||||
'a' Abort
|
||||
The value should be a single-character string. An empty value
|
||||
results in the user being asked, as would happen when there is
|
||||
no SwapExists autocommand. The default is empty.
|
||||
|
||||
*v:swapcommand* *swapcommand-variable*
|
||||
v:swapcommand Normal mode command to be executed after a file has been
|
||||
opened. Can be used for a |SwapExists| autocommand to have
|
||||
another Vim open the file and jump to the right place. For
|
||||
example, when jumping to a tag the value is ":tag tagname\r".
|
||||
|
||||
*v:termresponse* *termresponse-variable*
|
||||
v:termresponse The escape sequence returned by the terminal for the |t_RV|
|
||||
termcap entry. It is set when Vim receives an escape sequence
|
||||
@@ -1537,6 +1562,7 @@ getftime( {fname}) Number last modification time of file
|
||||
getftype( {fname}) String description of type of file {fname}
|
||||
getline( {lnum}) String line {lnum} of current buffer
|
||||
getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
|
||||
getloclist({nr}) List list of location list items
|
||||
getqflist() List list of quickfix items
|
||||
getreg( [{regname} [, 1]]) String contents of register
|
||||
getregtype( [{regname}]) String type of register
|
||||
@@ -1627,7 +1653,9 @@ serverlist() String get a list of available servers
|
||||
setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
|
||||
setcmdpos( {pos}) Number set cursor position in command-line
|
||||
setline( {lnum}, {line}) Number set line {lnum} to {line}
|
||||
setqflist( {list}[, {action}]) Number set list of quickfix items using {list}
|
||||
setloclist( {nr}, {list}[, {action}])
|
||||
Number modify location list using {list}
|
||||
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
|
||||
setreg( {n}, {v}[, {opt}]) Number set register to value and type
|
||||
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
|
||||
simplify( {filename}) String simplify filename as much as possible
|
||||
@@ -2176,6 +2204,14 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
|
||||
literally and compared to the
|
||||
autocommand patterns character by
|
||||
character)
|
||||
#group autocommand group exists
|
||||
#group#event autocommand defined for this group and
|
||||
event.
|
||||
#group#event#pattern
|
||||
autocommand defined for this group,
|
||||
event and pattern.
|
||||
##event autocommand for this event is
|
||||
supported.
|
||||
For checking for a supported feature use |has()|.
|
||||
|
||||
Examples: >
|
||||
@@ -2185,8 +2221,12 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
|
||||
exists("*s:MyFunc")
|
||||
exists("bufcount")
|
||||
exists(":Make")
|
||||
exists("#CursorHold");
|
||||
exists("#CursorHold")
|
||||
exists("#BufReadPre#*.gz")
|
||||
exists("#filetypeindent")
|
||||
exists("#filetypeindent#FileType")
|
||||
exists("#filetypeindent#FileType#*")
|
||||
exists("##ColorScheme")
|
||||
< There must be no space between the symbol (&/$/*/#) and the
|
||||
name.
|
||||
Note that the argument must be a string, not the name of the
|
||||
@@ -2331,9 +2371,11 @@ filter({expr}, {string}) *filter()*
|
||||
|
||||
The operation is done in-place. If you want a List or
|
||||
Dictionary to remain unmodified make a copy first: >
|
||||
:let l = filter(copy(mylist), '& =~ "KEEP"')
|
||||
:let l = filter(copy(mylist), 'v:val =~ "KEEP"')
|
||||
|
||||
< Returns {expr}, the List or Dictionary that was filtered.
|
||||
When an error is encountered while evaluating {string} no
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
finddir({name}[, {path}[, {count}]]) *finddir()*
|
||||
@@ -2656,6 +2698,12 @@ getline({lnum} [, {end}])
|
||||
:let end = search("^$") - 1
|
||||
:let lines = getline(start, end)
|
||||
|
||||
getloclist({nr}) *getloclist()*
|
||||
Returns a list with all the entries in the location list for
|
||||
window {nr}. When {nr} is zero the current window is used.
|
||||
For a location list window, the displayed location list is
|
||||
returned. For an invalid window number {nr}, an empty list is
|
||||
returned. Otherwise, same as getqflist().
|
||||
|
||||
getqflist() *getqflist()*
|
||||
Returns a list with all the current quickfix errors. Each
|
||||
@@ -3218,12 +3266,14 @@ map({expr}, {string}) *map()*
|
||||
:let tlist = map(copy(mylist), ' & . "\t"')
|
||||
|
||||
< Returns {expr}, the List or Dictionary that was filtered.
|
||||
When an error is encountered while evaluating {string} no
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
maparg({name}[, {mode}]) *maparg()*
|
||||
Return the rhs of mapping {name} in mode {mode}. When there
|
||||
is no mapping for {name}, an empty String is returned.
|
||||
These characters can be used for {mode}:
|
||||
{mode} can be one of these strings:
|
||||
"n" Normal
|
||||
"v" Visual
|
||||
"o" Operator-pending
|
||||
@@ -3231,12 +3281,16 @@ maparg({name}[, {mode}]) *maparg()*
|
||||
"c" Cmd-line
|
||||
"l" langmap |language-mapping|
|
||||
"" Normal, Visual and Operator-pending
|
||||
When {mode} is omitted, the modes from "" are used.
|
||||
When {mode} is omitted, the modes for "" are used.
|
||||
The {name} can have special key names, like in the ":map"
|
||||
command. The returned String has special characters
|
||||
translated like in the output of the ":map" command listing.
|
||||
The mappings local to the current buffer are checked first,
|
||||
then the global mappings.
|
||||
This function can be used to map a key even when it's already
|
||||
mapped, and have it do the original mapping too. Sketch: >
|
||||
exe 'nnoremap <Tab> ==' . maparg('<Tab>', 'n')
|
||||
|
||||
|
||||
mapcheck({name}[, {mode}]) *mapcheck()*
|
||||
Check if there is a mapping that matches with {name} in mode
|
||||
@@ -3624,6 +3678,8 @@ remote_foreground({server}) *remote_foreground()*
|
||||
< Except that on Win32 systems the client does the work, to work
|
||||
around the problem that the OS doesn't always allow the server
|
||||
to bring itself to the foreground.
|
||||
Note: This does not restore the window if it was minimized,
|
||||
like foreground() does.
|
||||
This function is not available in the |sandbox|.
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
@@ -3928,12 +3984,18 @@ setline({lnum}, {line}) *setline()*
|
||||
:endfor
|
||||
< Note: The '[ and '] marks are not set.
|
||||
|
||||
setloclist({nr}, {list} [, {action}]) *setloclist()*
|
||||
Create or replace or add to the location list for window {nr}.
|
||||
When {nr} is zero the current window is used. For a location
|
||||
list window, the displayed location list is modified. For an
|
||||
invalid window number {nr}, -1 is returned.
|
||||
Otherwise, same as setqflist().
|
||||
|
||||
setqflist({list} [, {action}]) *setqflist()*
|
||||
Creates a quickfix list using the items in {list}. Each item
|
||||
in {list} is a dictionary. Non-dictionary items in {list} are
|
||||
ignored. Each dictionary item can contain the following
|
||||
entries:
|
||||
Create or replace or add to the quickfix list using the items
|
||||
in {list}. Each item in {list} is a dictionary.
|
||||
Non-dictionary items in {list} are ignored. Each dictionary
|
||||
item can contain the following entries:
|
||||
|
||||
filename name of a file
|
||||
lnum line number in the file
|
||||
@@ -4194,7 +4256,7 @@ strlen({expr}) The result is a Number, which is the length of the String
|
||||
|
||||
strpart({src}, {start}[, {len}]) *strpart()*
|
||||
The result is a String, which is part of {src}, starting from
|
||||
byte {start}, with the length {len}.
|
||||
byte {start}, with the byte length {len}.
|
||||
When non-existing bytes are included, this doesn't result in
|
||||
an error, the bytes are simply omitted.
|
||||
If {len} is missing, the copy continues from {start} till the
|
||||
@@ -4343,6 +4405,10 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
|
||||
The resulting error code can be found in |v:shell_error|.
|
||||
This function will fail in |restricted-mode|.
|
||||
|
||||
Note that any wrong value in the options mentioned above may
|
||||
make the function fail. It has also been reported to fail
|
||||
when using a security agent application.
|
||||
Unlike ":!cmd" there is no automatic check for changed files.
|
||||
Use |:checktime| to force a check.
|
||||
|
||||
@@ -4351,16 +4417,16 @@ taglist({expr}) *taglist()*
|
||||
Returns a list of tags matching the regular expression {expr}.
|
||||
Each list item is a dictionary with at least the following
|
||||
entries:
|
||||
name name of the tag.
|
||||
filename name of the file where the tag is
|
||||
name Name of the tag.
|
||||
filename Name of the file where the tag is
|
||||
defined.
|
||||
cmd Ex command used to locate the tag in
|
||||
the file.
|
||||
kind type of the tag. The value for this
|
||||
kind Type of the tag. The value for this
|
||||
entry depends on the language specific
|
||||
kind values generated by the ctags
|
||||
tool.
|
||||
static a file specific tag. Refer to
|
||||
static A file specific tag. Refer to
|
||||
|static-tag| for more information.
|
||||
The "kind" entry is only available when using Exuberant ctags
|
||||
generated tags file. More entries may be present, depending
|
||||
@@ -4584,7 +4650,7 @@ all_builtin_terms Compiled with all builtin terminals enabled.
|
||||
amiga Amiga version of Vim.
|
||||
arabic Compiled with Arabic support |Arabic|.
|
||||
arp Compiled with ARP support (Amiga).
|
||||
autocmd Compiled with autocommands support.
|
||||
autocmd Compiled with autocommand support. |autocommand|
|
||||
balloon_eval Compiled with |balloon-eval| support.
|
||||
balloon_multiline GUI supports multiline balloons.
|
||||
beos BeOS version of Vim.
|
||||
@@ -6766,7 +6832,7 @@ The 'foldexpr', 'includeexpr', 'indentexpr', 'statusline' and 'foldtext'
|
||||
options are evaluated in a sandbox. This means that you are protected from
|
||||
these expressions having nasty side effects. This gives some safety for when
|
||||
these options are set from a modeline. It is also used when the command from
|
||||
a tags file is executed.
|
||||
a tags file is executed and for CTRL-R = in the command line.
|
||||
The sandbox is also used for the |:sandbox| command.
|
||||
|
||||
These items are not allowed in the sandbox:
|
||||
@@ -6776,6 +6842,7 @@ These items are not allowed in the sandbox:
|
||||
- executing a shell command
|
||||
- reading or writing a file
|
||||
- jumping to another buffer or editing a file
|
||||
- executing Python, Perl, etc. commands
|
||||
This is not guaranteed 100% secure, but it should block most attacks.
|
||||
|
||||
*:san* *:sandbox*
|
||||
@@ -6783,5 +6850,33 @@ This is not guaranteed 100% secure, but it should block most attacks.
|
||||
option that may have been set from a modeline, e.g.
|
||||
'foldexpr'.
|
||||
|
||||
*sandbox-option*
|
||||
A few options contain an expression. When this expression is evaluated it may
|
||||
have to be done in the sandbox to avoid trouble. But the sandbox is
|
||||
restrictive, thus this only happens when the option was set from an insecure
|
||||
location. Insecure in this context are:
|
||||
- sourcing a .vimrc or .exrc in the current directlry
|
||||
- while executing in the sandbox
|
||||
- value coming from a modeline
|
||||
|
||||
Note that when in the sandbox and saving an option value and restoring it, the
|
||||
option will still be marked as it was set in the sandbox.
|
||||
|
||||
==============================================================================
|
||||
12. Textlock *textlock*
|
||||
|
||||
In a few situations it is not allowed to change the text in the buffer, jump
|
||||
to another window and some other things that might confuse or break what Vim
|
||||
is currently doing. This mostly applies to things that happen when Vim is
|
||||
actually doing something else. For example, evaluating the 'balloonexpr' may
|
||||
happen any moment the mouse cursor is resting at some position.
|
||||
|
||||
This is not allowed when the textlock is active:
|
||||
- changing the buffer text
|
||||
- jumping to another buffer or window
|
||||
- editing another file
|
||||
- closing a window or quitting Vim
|
||||
- etc.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
|
||||
*gui_x11.txt* For Vim version 7.0aa. Last change: 2005 Dec 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -437,59 +437,9 @@ command line argument).
|
||||
==============================================================================
|
||||
7. KDE version *gui-kde* *kde* *KDE* *KVim*
|
||||
|
||||
NOTE: The KDE version is still under development. It is not recommended for
|
||||
daily work.
|
||||
|
||||
The KDE version of Vim works with KDE 2.x and KDE 3.x.
|
||||
KVim (name code for gui-kde) does not use traditional X settings for its
|
||||
configuration.
|
||||
Most important difference is the font handling, KVim uses QFont to display the
|
||||
text. To set your font use the following syntax :
|
||||
>
|
||||
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
|
||||
<
|
||||
the '10' value is the font size, other settings concerns more specific Qt
|
||||
options which you should not need to care with.
|
||||
The suggested way to choose your font is through the font selection dialog
|
||||
available with the command :
|
||||
:set guifont=*
|
||||
|
||||
Note: X Font names are not supported any more, so if you use GVim too, you'll
|
||||
have to set something like this in your ~/.gvimrc : >
|
||||
|
||||
if has("gui_kde")
|
||||
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
|
||||
else if has("gui_gtk")
|
||||
:set guifont=-misc-fixed-medium-r-normal-*-*-100-*-*-c-*-iso10646-1
|
||||
endif
|
||||
<
|
||||
*antialias*
|
||||
KVim uses antialias for its font, so that the text looks better, to disable
|
||||
this you have to refer to Qt's documentation (export QT_XFT=0 for QT 2.x).
|
||||
|
||||
KDE provides some other features, like being able to move the menubar and the
|
||||
toolbar wherever you want around the text area.
|
||||
|
||||
*kde-toolbar*
|
||||
KVim can be used with a KDE-look toolbar instead of Vim's default toolbar. To
|
||||
enable this feature you have to run the configure script with the
|
||||
--enable-kde-toolbar switch. It may be moved to a runtime option in the
|
||||
future.
|
||||
|
||||
*DCOP*
|
||||
Since Vim 6.0, the new ClientServer feature has been added, it works fine in
|
||||
KVim too. KVim also provides its own communication scheme based on DCOP. This
|
||||
is mainly used by the |vimpart| but can freely be used by other applications
|
||||
or manually through KDE's DCOP tools. The DCOP servername is synchronized with
|
||||
the X11 servername so that it's easier to identify the same KVim through the
|
||||
two communication systems.
|
||||
|
||||
*vimpart* *vim-kpart*
|
||||
KVim developers are also working on a component to allow embedding of Vim into
|
||||
KDE's applications. As of this writing, the component is working and can be
|
||||
used in different KDE applications. New KDE applications should support it
|
||||
soon. To get more information about this component, refer to
|
||||
http://freehackers.org/kvim or to the KDE project.
|
||||
There is no KDE version of Vim. There has been some work on a port using the
|
||||
Qt toolkit, but it never worked properly and it has been abandoned. Work
|
||||
continues on Yzis: www.yzis.org.
|
||||
|
||||
==============================================================================
|
||||
8. Compiling *gui-x11-compiling*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
|
||||
*help.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -17,13 +17,13 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
It is possible to further specify the context:
|
||||
*help-context*
|
||||
WHAT PREPEND EXAMPLE ~
|
||||
Normal mode commands (nothing) :help x
|
||||
Visual mode commands v_ :help v_u
|
||||
Insert mode commands i_ :help i_<Esc>
|
||||
Command-line commands : :help :quit
|
||||
Normal mode command (nothing) :help x
|
||||
Visual mode command v_ :help v_u
|
||||
Insert mode command i_ :help i_<Esc>
|
||||
Command-line command : :help :quit
|
||||
Command-line editing c_ :help c_<Del>
|
||||
Vim command arguments - :help -r
|
||||
Options ' :help 'textwidth'
|
||||
Vim command argument - :help -r
|
||||
Option ' :help 'textwidth'
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
|
||||
@@ -191,6 +191,13 @@ Standard plugins ~
|
||||
|pi_expl.txt| File explorer
|
||||
|
||||
LOCAL ADDITIONS: *local-additions*
|
||||
|cecutil.txt| DrChip's Utilities Jun 11, 2004
|
||||
|engspchk.txt| English Spelling Checker (v61) Mar 14, 2005
|
||||
|example.txt| Example for a locally added help file
|
||||
|matchit.txt| Extended "%" matching
|
||||
|test.txt| Testing the h<>lp c<>mm<6D>nd n<>w
|
||||
|typecorr.txt| Plugin for correcting typing mistakes
|
||||
|helpp.txt| Dummy line to avoid an error message
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*bars* Bars example
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2005 May 08
|
||||
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -10,6 +10,7 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme*
|
||||
2. Examples |mzscheme-examples|
|
||||
3. Threads |mzscheme-threads|
|
||||
4. The Vim access procedures |mzscheme-vim|
|
||||
5. Dynamic loading |mzscheme-dynamic|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
@@ -243,5 +244,23 @@ Windows *mzscheme-window*
|
||||
a pair (linenr . column).
|
||||
(set-cursor (line . col) [window]) Set cursor position.
|
||||
|
||||
==============================================================================
|
||||
5. Dynamic loading *mzscheme-dynamic*
|
||||
|
||||
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
|
||||
output then includes |+mzscheme/dyn|.
|
||||
|
||||
This means that Vim will search for the MzScheme DLL files only when needed.
|
||||
When you don't use the MzScheme interface you don't need them, thus you can
|
||||
use Vim without these DLL files.
|
||||
|
||||
To use the MzScheme interface the MzScheme DLLs must be in your search path.
|
||||
In a console window type "path" to see what directories are used.
|
||||
|
||||
The names of the DLLs must match the MzScheme version Vim was compiled with.
|
||||
For MzScheme version 209 they will be "libmzsch209_000.dll" and
|
||||
"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for
|
||||
"libmzsch\d\d\d_\d\d\d\.dll\c".
|
||||
|
||||
======================================================================
|
||||
vim:tw=78:ts=8:sts=4:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*if_pyth.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -131,14 +131,24 @@ vim.command(str) *python-command*
|
||||
|
||||
vim.eval(str) *python-eval*
|
||||
Evaluates the expression str using the vim internal expression
|
||||
evaluator (see |expression|). Returns the expression result as a
|
||||
string.
|
||||
evaluator (see |expression|). Returns the expression result as:
|
||||
- a string if the Vim expression evaluates to a string or number
|
||||
- a list if the Vim expression evaluates to a Vim list
|
||||
- a dictionary if the Vim expression evaluates to a Vim dictionary
|
||||
Dictionaries and lists are recursively expanded.
|
||||
Examples: >
|
||||
:py text_width = vim.eval("&tw")
|
||||
:py str = vim.eval("12+12") # NB result is a string! Use
|
||||
# string.atoi() to convert to
|
||||
# a number.
|
||||
|
||||
:py tagList = vim.eval('taglist("eval_expr")')
|
||||
< The latter will return a python list of python dicts, for instance:
|
||||
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
|
||||
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
|
||||
|
||||
|
||||
|
||||
Error object of the "vim" module
|
||||
|
||||
vim.error *python-error*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 Nov 27
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -343,9 +343,9 @@ tag char note action in Normal mode ~
|
||||
"yy"
|
||||
|ZZ| ZZ store current file if modified, and exit
|
||||
|ZQ| ZQ exit current file always
|
||||
|[| [{char} square bracket command (see below)
|
||||
|[| [{char} square bracket command (see |[| below)
|
||||
\ not used
|
||||
|]| ]{char} square bracket command (see below)
|
||||
|]| ]{char} square bracket command (see |]| below)
|
||||
|^| ^ 1 cursor to the first CHAR of the line
|
||||
|_| _ 1 cursor to the first CHAR N - 1 lines lower
|
||||
|`| `{a-zA-Z0-9} 1 cursor to the mark {a-zA-Z0-9}
|
||||
@@ -373,7 +373,7 @@ tag char note action in Normal mode ~
|
||||
|e| e 1 cursor forward to the end of word N
|
||||
|f| f{char} 1 cursor to Nth occurrence of {char} to the
|
||||
right
|
||||
|g| g{char} extended commands, see below
|
||||
|g| g{char} extended commands, see |g| below
|
||||
|h| h 1 cursor N chars to the left
|
||||
|i| i 2 insert text before the cursor N times
|
||||
|j| j 1 cursor N lines downward
|
||||
@@ -403,7 +403,7 @@ tag char note action in Normal mode ~
|
||||
cursor [into buffer x]
|
||||
|y| ["x]y{motion} yank Nmove text [into buffer x]
|
||||
|yy| ["x]yy yank N lines [into buffer x]
|
||||
|z| z{char} commands starting with 'z', see below
|
||||
|z| z{char} commands starting with 'z', see |z| below
|
||||
|{| { 1 cursor N paragraphs backward
|
||||
|bar| | 1 cursor to column N
|
||||
|}| } 1 cursor N paragraphs forward
|
||||
@@ -736,6 +736,7 @@ tag char note action in Normal mode ~
|
||||
|gu| gu{motion} 2 make Nmove text lowercase
|
||||
|gv| gv reselect the previous Visual area
|
||||
|gw| gw{motion} 2 format Nmove text and keep cursor
|
||||
|g@| g@{motion} call 'operatorfunc'
|
||||
|g~| g~{motion} 2 swap case for Nmove text
|
||||
|g<Down>| g<Down> 1 same as "gj"
|
||||
|g<End>| g<End> 1 same as "g$"
|
||||
@@ -759,18 +760,19 @@ tag char note action in Normal mode ~
|
||||
cursor on first non-blank
|
||||
|z.| z. redraw, cursor line to center of window,
|
||||
cursor on first non-blank
|
||||
|z=| z= give spelling suggestions
|
||||
|zA| zA open a closed fold or close an open fold
|
||||
recursively
|
||||
|zC| zC close folds recursively
|
||||
|zD| zD delete folds recursively
|
||||
|zE| zE eliminate all folds
|
||||
|zF| zF create a fold for N lines
|
||||
|zG| zG mark word as good word
|
||||
|zG| zG mark word as good spelled word
|
||||
|zM| zM set 'foldlevel' to zero
|
||||
|zN| zN set 'foldenable'
|
||||
|zO| zO open folds recursively
|
||||
|zR| zR set 'foldlevel' to the deepest fold
|
||||
|zW| zW mark word as wrong (bad) word
|
||||
|zW| zW mark word as wrong (bad) spelled word
|
||||
|zX| zX re-apply 'foldlevel'
|
||||
|z^| z^ cursor on line N (default line above
|
||||
window), otherwise like "z-"
|
||||
@@ -782,7 +784,7 @@ tag char note action in Normal mode ~
|
||||
position the cursor at the end (right side)
|
||||
of the screen
|
||||
|zf| zf{motion} create a fold for Nmove text
|
||||
|zg| zg mark word as good word
|
||||
|zg| zg mark word as good spelled word
|
||||
|zh| zh when 'wrap' off scroll screen N characters
|
||||
to the right
|
||||
|zi| zi toggle 'foldenable'
|
||||
@@ -799,7 +801,7 @@ tag char note action in Normal mode ~
|
||||
side) of the screen
|
||||
|zt| zt redraw, cursor line at top of window
|
||||
|zv| zv open enough folds to view the cursor line
|
||||
|zw| zw mark word as wrong (bad) word
|
||||
|zw| zw mark word as wrong (bad) spelled word
|
||||
|zx| zx re-apply 'foldlevel' and do "zv"
|
||||
|zz| zz redraw, cursor line at center of window
|
||||
|z<Left>| z<Left> same as "zh"
|
||||
@@ -1067,7 +1069,8 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:cNfile| :cNf[ile] go to last error in previous file
|
||||
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
|
||||
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
|
||||
|:caddfile| :cad[dfile] add error message to current quickfix list
|
||||
|:caddexpr| :cad[dexpr] add errors from expr
|
||||
|:caddfile| :caddf[ile] add error message to current quickfix list
|
||||
|:call| :cal[l] call a function
|
||||
|:catch| :cat[ch] part of a :try command
|
||||
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|
||||
@@ -1210,23 +1213,47 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:keepalt| :keepa[lt] following command keeps the alternate file
|
||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
||||
|:lNext| :lN[ext] go to previous entry in location list
|
||||
|:lNfile| :lNf[ile] go to last entry in previous file
|
||||
|:list| :l[ist] print lines
|
||||
|:laddexpr| :lad[dexpr] add locations from expr
|
||||
|:laddfile| :laddf[ile] add locations to current location list
|
||||
|:last| :la[st] go to the last file in the argument list
|
||||
|:language| :lan[guage] set the language (locale)
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
|:lcd| :lc[d] change directory locally
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
|:lclose| :lcl[ose] close location window
|
||||
|:left| :le[ft] left align lines
|
||||
|:leftabove| :lefta[bove] make split window appear left or above
|
||||
|:let| :let assign a value to a variable or option
|
||||
|:lexpr| :lex[pr] read locations from expr and jump to first
|
||||
|:lfile| :lf[ile] read file with locations and jump to first
|
||||
|:lfirst| :lfir[st] go to the specified location, default first one
|
||||
|:lgetfile| :lg[etfile] read file with locations
|
||||
|:ll| :ll go to specific location
|
||||
|:llast| :lla[st] go to the specified location, default last one
|
||||
|:llist| :lli[st] list all locations
|
||||
|:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode
|
||||
|:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode
|
||||
|:lnext| :lne[xt] go to next location
|
||||
|:lnewer| :lnew[er] go to newer location list
|
||||
|:lnfile| :lnf[ile] go to first location in next file
|
||||
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|
||||
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|
||||
|:loadview| :lo[adview] load view for current window from a file
|
||||
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
||||
|:lockvar| :lockv[ar] lock variables
|
||||
|:lolder| :lol[der] go to older location list
|
||||
|:lopen| :lope[n] open location window
|
||||
|:lprevious| :lp[revious] go to previous location
|
||||
|:lpfile| :lpf[ile] go to last location in previous file
|
||||
|:lrewind| :lr[ewind] go to the specified location, default first one
|
||||
|:ls| :ls list all buffers
|
||||
|:ltag| :lt[ag] jump to tag and add matching tags to the
|
||||
location list
|
||||
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|
||||
|:lwindow| :lw[indow] open or close location window
|
||||
|:move| :m[ove] move lines
|
||||
|:mark| :ma[rk] set a mark
|
||||
|:make| :mak[e] execute external command 'makeprg' and parse
|
||||
@@ -1254,6 +1281,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:nmenu| :nme[nu] add menu for Normal mode
|
||||
|:nnoremap| :nn[oremap] like ":noremap" but for Normal mode
|
||||
|:nnoremenu| :nnoreme[nu] like ":noremenu" but for Normal mode
|
||||
|:noautocmd| :noa[utocmd] following command don't trigger autocommands
|
||||
|:noremap| :no[remap] enter a mapping that will not be remapped
|
||||
|:nohlsearch| :noh[lsearch] suspend 'hlsearch' highlighting
|
||||
|:noreabbrev| :norea[bbrev] enter an abbreviation that will not be
|
||||
@@ -1351,7 +1379,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
buffer list
|
||||
|:scriptnames| :scrip[tnames] list names of all sourced Vim scripts
|
||||
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|
||||
|:scscope| :scs[cope] split window and execute cscope command
|
||||
|:scscope| :scs[cope] split window and execute cscope command
|
||||
|:set| :se[t] show or set options
|
||||
|:setfiletype| :setf[iletype] set 'filetype', unless it was set already
|
||||
|:setglobal| :setg[lobal] show global values of options
|
||||
@@ -1375,7 +1403,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:source| :so[urce] read Vim or Ex commands from a file
|
||||
|:spelldump| :spelld[ump] split window and fill with all correct words
|
||||
|:spellgood| :spe[llgood] add good word for spelling
|
||||
|:spellrepall| :spellr[epall] replace all bad words like last |z?|
|
||||
|:spellrepall| :spellr[epall] replace all bad words like last |z=|
|
||||
|:spellwrong| :spellw[rong] add spelling mistake
|
||||
|:split| :sp[lit] split current window
|
||||
|:sprevious| :spr[evious] split window and go to previous file in the
|
||||
@@ -1385,6 +1413,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:stop| :st[op] suspend the editor or escape to a shell
|
||||
|:stag| :sta[g] split window and jump to a tag
|
||||
|:startinsert| :star[tinsert] start Insert mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startreplace| :startr[eplace] start Replace mode
|
||||
|:stopinsert|| :stopi[nsert] stop Insert mode
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2005 Nov 22
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -354,7 +354,7 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
|
||||
<MouseUp> scroll three lines up *i_<MouseUp>*
|
||||
<S-MouseUp> scroll a full page up *i_<S-MouseUp>*
|
||||
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
|
||||
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
||||
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
||||
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
|
||||
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
|
||||
-----------------------------------------------------------------------
|
||||
@@ -871,8 +871,8 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
User defined completion *compl-function*
|
||||
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
'completefunc' option. See the 'completefunc' help for how the function
|
||||
is called and an example.
|
||||
'completefunc' option. See below for how the function is called and an
|
||||
example |complete-functions|.
|
||||
|
||||
*i_CTRL-X_CTRL-U*
|
||||
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
|
||||
@@ -890,7 +890,7 @@ Omni completion *compl-omni*
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
'omnifunc' option. This is to be used for filetype-specific completion.
|
||||
|
||||
See the 'completefunc' help for how the function is called and an example.
|
||||
See below for how the function is called and an example |complete-functions|.
|
||||
For remarks about specific filetypes see |compl-omni-filetypes|.
|
||||
|
||||
*i_CTRL-X_CTRL-O*
|
||||
@@ -952,8 +952,96 @@ CTRL-P Find previous match for words that start with the
|
||||
other contexts unless a double CTRL-X is used.
|
||||
|
||||
|
||||
INSERT COMPLETION POPUP MENU *ins-completion-menu*
|
||||
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
|
||||
|
||||
This applies to 'completefunc' and 'omnifunc'.
|
||||
|
||||
The function will be invoked with two arguments. First the function is called
|
||||
to find the start of the text to be completed. Secondly the function is
|
||||
called to actually find the matches.
|
||||
|
||||
On the first invocation the arguments are:
|
||||
a:findstart 1
|
||||
a:base empty
|
||||
|
||||
The function must return the column of where the completion starts. It must
|
||||
be a number between zero and the cursor column "col('.')". This involves
|
||||
looking at the characters just before the cursor and including those
|
||||
characters that could be part of the completed item. The text between this
|
||||
column and the cursor column will be replaced with the matches. Return -1 if
|
||||
no completion can be done.
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
a:base the text with which matches should match, what was
|
||||
located in the first call (can be empty)
|
||||
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List. When one of the items in the list cannot be used as a string (e.g., a
|
||||
Dictionary) then an error message is given and further items in the list are
|
||||
not used.
|
||||
|
||||
When searching for matches takes some time call |complete_add()| to add each
|
||||
match to the total list. These matches should then not appear in the returned
|
||||
list! Call |complete_check()| now and then to allow the user to press a key
|
||||
while still searching for matches. Stop searching when it returns non-zero.
|
||||
|
||||
The function may move the cursor, it is restored afterwards. This option
|
||||
cannot be set from a |modeline| or in the |sandbox|, for security reasons.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
let res = []
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
The same, but now pretending searching for matches is slow: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call complete_add(m)
|
||||
endif
|
||||
sleep 300m " simulate searching for next match
|
||||
if complete_check()
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
|
||||
INSERT COMPLETION POPUP MENU *ins-completion-menu*
|
||||
*popupmenu-completion*
|
||||
Vim can display the matches in a simplistic popup menu.
|
||||
|
||||
The menu is used when:
|
||||
@@ -963,8 +1051,10 @@ The menu is used when:
|
||||
|
||||
While the menu is displayed these keys have a special meaning:
|
||||
<CR> and <Enter>: Accept the currently selected match
|
||||
<Up>: Select the previous match, as if CTRL-P was used
|
||||
<Down>: Select the next match, as if CTRL-N was used
|
||||
<Up>: Select the previous match, as if CTRL-P was used
|
||||
<Down>: Select the next match, as if CTRL-N was used
|
||||
<PageUp>: Select a match several entries back
|
||||
<PageDown>: Select a match several entries further
|
||||
|
||||
The colors of the menu can be changed with these highlight groups:
|
||||
Pmenu normal item |hl-Pmenu|
|
||||
@@ -1008,14 +1098,14 @@ When the same structure name appears in multiple places all possible members
|
||||
are included.
|
||||
|
||||
|
||||
CSS *ft-css-omni*
|
||||
CSS *ft-css-omni*
|
||||
|
||||
Complete properties and their appropriate values according to CSS 2.1
|
||||
specification.
|
||||
|
||||
|
||||
(X)HTML *ft-html-omni*
|
||||
*ft-xhtml-omni*
|
||||
(X)HTML *ft-html-omni*
|
||||
*ft-xhtml-omni*
|
||||
|
||||
CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
|
||||
It is designed to support writing of XHTML 1.0 Strict files but will
|
||||
@@ -1038,11 +1128,66 @@ Note: When used first time completion menu will be shown with little delay
|
||||
- this is time needed for loading of data file.
|
||||
|
||||
|
||||
XML *ft-xml-omni*
|
||||
JAVASCRIPT *ft-javascript-omni*
|
||||
|
||||
Vim 7 provides mechanism to context aware completion of XML files. It depends
|
||||
on special |xml-data-file| and two commands: |:XMLns| and |:XMLent|. Features
|
||||
are:
|
||||
Completion of most elements of JavaScript language and HTML DOM.
|
||||
|
||||
Complete:
|
||||
|
||||
- variables
|
||||
- function name
|
||||
- function arguments
|
||||
- properties of variables trying to detect type of variable
|
||||
- complete HTML DOM objects and properties depending on context
|
||||
- keywords of language
|
||||
|
||||
Completion works in separate JavaScript files (&ft==javascript) and inside of
|
||||
<script> tag of (X)HTML. Note: scanning will be only in scope of current tag.
|
||||
At the moment separate files are not taken into account.
|
||||
|
||||
DOM compatibility
|
||||
|
||||
At the moment (beginning of 2006) there are two main browsers - MS Internet
|
||||
Explorer and Mozilla Firefox. These two applications are covering over 90% of
|
||||
market. Theoretically standards are created by W3C organisation
|
||||
(http://www.w3c.org) but they are not always followed/implemented.
|
||||
|
||||
IE FF W3C Omni completion ~
|
||||
+/- +/- + + ~
|
||||
+ + - + ~
|
||||
+ - - - ~
|
||||
- + - - ~
|
||||
|
||||
Regardless from state of implementation in browsers but if element is defined
|
||||
in standards, completion plugin will place element in suggestion list. When
|
||||
both major engines implemented element, even if this is not in standards it
|
||||
will be suggested. All other elements are not placed in suggestion list.
|
||||
|
||||
|
||||
SYNTAX *ft-syntax-omni*
|
||||
|
||||
This uses the current syntax highlighting for completion. It can be used for
|
||||
any filetype and provides a minimal language-sensitive completion.
|
||||
|
||||
To enable code completion do: >
|
||||
source $VIMRUNTIME/autoload/syntaxcomplete.vim
|
||||
|
||||
You can automate this by placing this in your vimrc (after any ":filetype"
|
||||
command): >
|
||||
autocmd Filetype *
|
||||
\ if exists('&ofu') && &ofu == "" |
|
||||
\ source $VIMRUNTIME/autoload/syntaxcomplete.vim |
|
||||
\ endif
|
||||
|
||||
The above will set completion to this script only if a proper one does not
|
||||
already exist for that filetype.
|
||||
|
||||
|
||||
XML *ft-xml-omni*
|
||||
|
||||
Vim 7 provides mechanism to context aware completion of XML files. It depends
|
||||
on special |xml-omni-datafile| and two commands: |:XMLns| and |:XMLent|.
|
||||
Features are:
|
||||
|
||||
- after "<" complete tag name depending on context (no div suggest
|
||||
inside of an a tag)
|
||||
@@ -1050,11 +1195,11 @@ are:
|
||||
a tag)
|
||||
- when attribute has limited number of possible values help to complete
|
||||
them
|
||||
- complete names of entities (defined in |xml-data-file| and in current file
|
||||
- complete names of entities (defined in |xml-omni-datafile| and in current file
|
||||
with "<!ENTITY" declarations
|
||||
- when used after "</" CTRL-X CTRL-O will close the last opened tag
|
||||
|
||||
Format of XML data file *xml-omni-datafile*
|
||||
Format of XML data file *xml-omni-datafile*
|
||||
|
||||
Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim)
|
||||
|
||||
@@ -1103,7 +1248,7 @@ xsl.vim for example.
|
||||
|
||||
Commands
|
||||
|
||||
:XMLns {name} [{namespace}] *:XMLns*
|
||||
:XMLns {name} [{namespace}] *:XMLns*
|
||||
|
||||
Vim has to know which data file should be used and with which namespace. For
|
||||
loading of data file and connecting data with prope namespace use |:XMLns|
|
||||
@@ -1116,24 +1261,24 @@ to use XML completion in .xsl files: >
|
||||
:XMLns xsl xsl
|
||||
|
||||
|
||||
:XMLent {name} *:XMLent*
|
||||
:XMLent {name} *:XMLent*
|
||||
|
||||
By default entities will be completed from data file of default
|
||||
namespace. XMLent command should be used in case when there is no
|
||||
default namespace: >
|
||||
|
||||
:XMLent xhtml10s
|
||||
:XMLent xhtml10s
|
||||
|
||||
Usage
|
||||
|
||||
While used in situation (after declarations from previous part, | is
|
||||
cursor position): >
|
||||
|
||||
<|
|
||||
<|
|
||||
|
||||
Will complete to appropriate XHTML tag, and in this situation: >
|
||||
|
||||
<xsl:|
|
||||
<xsl:|
|
||||
|
||||
Will complete to appropriate XSL tag.
|
||||
|
||||
@@ -1141,7 +1286,7 @@ File xmlcomplete.vim provides through |autoload| mechanism
|
||||
GetLastOpenTag function which can be used in XML files to get name of
|
||||
last open tag with (b:unaryTagsStack has to be defined): >
|
||||
|
||||
:echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
:echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
|
||||
|
||||
|
||||
@@ -1273,6 +1418,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
|
||||
the function or script is finished.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +ex_extra
|
||||
feature}
|
||||
|
||||
*:startgreplace*
|
||||
:startg[replace][!] Just like |:startreplace|, but use Virtual Replace
|
||||
mode, like with |gR|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +ex_extra
|
||||
feature}
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*map.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,6 +10,17 @@ This subject is introduced in sections |05.3|, |24.7| and |40.1| of the user
|
||||
manual.
|
||||
|
||||
1. Key mapping |key-mapping|
|
||||
1.1 MAP COMMANDS |:map-commands|
|
||||
1.2 Special arguments |:map-arguments|
|
||||
1.3 Mapping and modes |:map-modes|
|
||||
1.4 Listing mappings |map-listing|
|
||||
1.5 Mapping special keys |:map-special-keys|
|
||||
1.6 Special characters |:map-special-chars|
|
||||
1.7 What keys to map |map-which-keys|
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping an operator |:map-operator|
|
||||
2. Abbreviations |abbreviations|
|
||||
3. Local mappings and functions |script-local|
|
||||
4. User-defined commands |user-commands|
|
||||
@@ -24,6 +35,9 @@ is to define a sequence commands for a function key. Example: >
|
||||
|
||||
This appends the current date and time after the cursor (in <> notation |<>|).
|
||||
|
||||
|
||||
1.1 MAP COMMANDS *:map-commands*
|
||||
|
||||
There are commands to enter new mappings, remove mappings and list mappings.
|
||||
See |map-overview| for the various forms of "map" and their relationships with
|
||||
modes.
|
||||
@@ -116,6 +130,21 @@ characters. You can use this to put command sequences under function keys,
|
||||
translate one key into another, etc. See |:mkexrc| for how to save and
|
||||
restore the current mappings.
|
||||
|
||||
*map-ambiguous*
|
||||
When two mappings start with the same sequence of characters, they are
|
||||
ambiguous. Example: >
|
||||
:imap aa foo
|
||||
:imap aaa bar
|
||||
When Vim has read "aa", it will need to get another character to be able to
|
||||
decide if "aa" or "aaa" should be mapped. This means that after typing "aa"
|
||||
that mapping won't get expanded yet, Vim is waiting for another character.
|
||||
If you type a space, then "foo" will get inserted, plus the space. If you
|
||||
type "a", then "bar" will get inserted.
|
||||
{Vi does not allow ambiguous mappings}
|
||||
|
||||
|
||||
1.2 SPECIAL ARGUMENTS *:map-arguments*
|
||||
|
||||
*:map-local* *:map-<buffer>* *E224* *E225*
|
||||
If the first argument to one of these commands is "<buffer>" it will apply to
|
||||
mappings locally to the current buffer only. Example: >
|
||||
@@ -162,12 +191,14 @@ already exists which is equal.
|
||||
Example of what will fail: >
|
||||
:map ,w /[#&!]<CR>
|
||||
:map <buffer> <unique> ,w /[.,;]<CR>
|
||||
If you want to map a key and then have it do what it was originally mapped to,
|
||||
have a look at |maparg()|.
|
||||
|
||||
"<buffer>", "<silent>", "<script>" and "<unique>" can be used in any order.
|
||||
They must appear right after the command, before any other arguments.
|
||||
|
||||
|
||||
MAPPING AND MODES
|
||||
1.3 MAPPING AND MODES *:map-modes*
|
||||
|
||||
There are five sets of mappings
|
||||
- For Normal mode: When typing commands.
|
||||
@@ -236,19 +267,9 @@ character as an argument to command like "f" or "t".
|
||||
are only used for typed characters. This assumes that the language mapping
|
||||
was already done when typing the mapping.
|
||||
|
||||
*map-multibyte*
|
||||
It is possible to map multibyte characters, but only the whole character. You
|
||||
cannot map the first byte only. This was done to prevent problems in this
|
||||
scenario: >
|
||||
:set encoding=latin1
|
||||
:imap <M-C> foo
|
||||
:set encoding=utf-8
|
||||
The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3
|
||||
byte. If you type the character <20> (0xea <M-a>) in UTF-8 encoding this is the
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then,
|
||||
otherwise it would be impossible to type the <20> character.
|
||||
|
||||
*map-listing*
|
||||
1.4 LISTING MAPPINGS *map-listing*
|
||||
|
||||
When listing mappings the characters in the first two columns are:
|
||||
|
||||
CHAR MODE ~
|
||||
@@ -283,6 +304,48 @@ last defined. Example: >
|
||||
|
||||
See |:verbose-cmd| for more information.
|
||||
|
||||
|
||||
1.5 MAPPING SPECIAL KEYS *:map-special-keys*
|
||||
|
||||
There are three ways to map a special key:
|
||||
1. The Vi-compatible method: Map the key code. Often this is a sequence that
|
||||
starts with <Esc>. To enter a mapping like this you type ":map " and then
|
||||
you have to type CTRL-V before hitting the function key. Note that when
|
||||
the key code for the key is in the termcap (the t_ options), it will
|
||||
automatically be translated into the internal code and become the second
|
||||
way of mapping (unless the 'k' flag is included in 'cpoptions').
|
||||
2. The second method is to use the internal code for the function key. To
|
||||
enter such a mapping type CTRL-K and then hit the function key, or use
|
||||
the form "#1", "#2", .. "#9", "#0", "<Up>", "<S-Down>", "<S-F7>", etc.
|
||||
(see table of keys |key-notation|, all keys from <Up> can be used). The
|
||||
first ten function keys can be defined in two ways: Just the number, like
|
||||
"#2", and with "<F>", like "<F2>". Both stand for function key 2. "#0"
|
||||
refers to function key 10, defined with option 't_f10', which may be
|
||||
function key zero on some keyboards. The <> form cannot be used when
|
||||
'cpoptions' includes the '<' flag.
|
||||
3. Use the termcap entry, with the form <t_xx>, where "xx" is the name of the
|
||||
termcap entry. Any string entry can be used. For example: >
|
||||
:map <t_F3> G
|
||||
< Maps function key 13 to "G". This does not work if 'cpoptions' includes
|
||||
the '<' flag.
|
||||
|
||||
The advantage of the second and third method is that the mapping will work on
|
||||
different terminals without modification (the function key will be
|
||||
translated into the same internal code or the actual key code, no matter what
|
||||
terminal you are using. The termcap must be correct for this to work, and you
|
||||
must use the same mappings).
|
||||
|
||||
DETAIL: Vim first checks if a sequence from the keyboard is mapped. If it
|
||||
isn't the terminal key codes are tried (see |terminal-options|). If a
|
||||
terminal code is found it is replaced with the internal code. Then the check
|
||||
for a mapping is done again (so you can map an internal code to something
|
||||
else). What is written into the script file depends on what is recognized.
|
||||
If the terminal key code was recognized as a mapping the key code itself is
|
||||
written to the script file. If it was recognized as a terminal code the
|
||||
internal code is written to the script file.
|
||||
|
||||
|
||||
1.6 SPECIAL CHARACTERS *:map-special-chars*
|
||||
*map_backslash*
|
||||
Note that only CTRL-V is mentioned here as a special character for mappings
|
||||
and abbreviations. When 'cpoptions' does not contain 'B', a backslash can
|
||||
@@ -294,18 +357,6 @@ To map a backslash, or use a backslash literally in the {rhs}, the special
|
||||
sequence "<Bslash>" can be used. This avoids the need to double backslashes
|
||||
when using nested mappings.
|
||||
|
||||
*map-ambiguous*
|
||||
When two mappings start with the same sequence of characters, they are
|
||||
ambiguous. Example: >
|
||||
:imap aa foo
|
||||
:imap aaa bar
|
||||
When Vim has read "aa", it will need to get another character to be able to
|
||||
decide if "aa" or "aaa" should be mapped. This means that after typing "aa"
|
||||
that mapping won't get expanded yet, Vim is waiting for another character.
|
||||
If you type a space, then "foo" will get inserted, plus the space. If you
|
||||
type "a", then "bar" will get inserted.
|
||||
{Vi does not allow ambiguous mappings}
|
||||
|
||||
*map_CTRL-C*
|
||||
Using CTRL-C in the {lhs} is possible, but it will only work when Vim is
|
||||
waiting for a key, not when Vim is busy with something. When Vim is busy
|
||||
@@ -331,6 +382,18 @@ example, to make sure that function key 8 does nothing at all: >
|
||||
:map <F8> <Nop>
|
||||
:map! <F8> <Nop>
|
||||
<
|
||||
*map-multibyte*
|
||||
It is possible to map multibyte characters, but only the whole character. You
|
||||
cannot map the first byte only. This was done to prevent problems in this
|
||||
scenario: >
|
||||
:set encoding=latin1
|
||||
:imap <M-C> foo
|
||||
:set encoding=utf-8
|
||||
The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3
|
||||
byte. If you type the character <20> (0xea <M-a>) in UTF-8 encoding this is the
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then,
|
||||
otherwise it would be impossible to type the <20> character.
|
||||
|
||||
*<Leader>* *mapleader*
|
||||
To define a mapping which uses the "mapleader" variable, the special string
|
||||
"<Leader>" can be used. It is replaced with the string value of "mapleader".
|
||||
@@ -418,14 +481,16 @@ and CTRL-X is not mapped. This was done to be able to use all the named
|
||||
registers and marks, even when the command with the same name has been
|
||||
mapped.
|
||||
|
||||
*map-which-keys*
|
||||
|
||||
1.7 WHAT KEYS TO MAP *map-which-keys*
|
||||
|
||||
If you are going to map something, you will need to choose which key(s) to use
|
||||
for the {lhs}. You will have to avoid keys that are used for Vim commands,
|
||||
otherwise you would not be able to use those commands anymore. Here are a few
|
||||
suggestions:
|
||||
- Function keys <F2>, <F3>, etc.. Also the shifted function keys <S-F1>,
|
||||
<S-F2>, etc. Note that <F1> is already used for the help command.
|
||||
- Meta-keys (with the ALT key pressed).
|
||||
- Meta-keys (with the ALT key pressed). |:map-alt-keys|
|
||||
- Use the '_' or ',' character and then any other character. The "_" and ","
|
||||
commands do exist in Vim (see |_| and |,|), but you probably never use them.
|
||||
- Use a key that is a synonym for another command. For example: CTRL-P and
|
||||
@@ -436,7 +501,9 @@ losing any builtin function. You can also use ":help {key}^D" to find out if
|
||||
a key is used for some command. ({key} is the specific key you want to find
|
||||
out about, ^D is CTRL-D).
|
||||
|
||||
*map-examples*
|
||||
|
||||
1.8 EXAMPLES *map-examples*
|
||||
|
||||
A few examples (given as you type them, for "<CR>" you type four characters;
|
||||
the '<' flag must not be present in 'cpoptions' for this to work). >
|
||||
|
||||
@@ -445,7 +512,9 @@ the '<' flag must not be present in 'cpoptions' for this to work). >
|
||||
:map _x d/END/e<CR>
|
||||
:map! qq quadrillion questions
|
||||
<
|
||||
*map-typing*
|
||||
|
||||
1.9 USING MAPPINGS *map-typing*
|
||||
|
||||
Vim will compare what you type with the start of a mapped sequence. If there
|
||||
is an incomplete match, it will get more characters until there either is a
|
||||
complete match or until there is no match at all. Example: If you map! "qq",
|
||||
@@ -458,14 +527,15 @@ you type slowly, or your system is slow, reset the 'timeout' option. Then you
|
||||
might want to set the 'ttimeout' option.
|
||||
|
||||
*map-keys-fails*
|
||||
There is one situation where key codes might not be recognized:
|
||||
There are situations where key codes might not be recognized:
|
||||
- Vim can only read part of the key code. Mostly this is only the first
|
||||
character. This happens on some Unix versions in an xterm.
|
||||
- The key code is after character(s) that are mapped. E.g., "<F1><F1>" or
|
||||
"g<F1>".
|
||||
|
||||
The result is that the key code is not recognized in this situation, and the
|
||||
mapping fails.
|
||||
There are two actions needed to avoid this problem:
|
||||
mapping fails. There are two actions needed to avoid this problem:
|
||||
|
||||
- Remove the 'K' flag from 'cpoptions'. This will make Vim wait for the rest
|
||||
of the characters of the function key.
|
||||
- When using <F1> to <F4> the actual key code generated may correspond to
|
||||
@@ -481,6 +551,9 @@ special key: >
|
||||
Don't type a real <Esc>, Vim will recognize the key code and replace it with
|
||||
<F1> anyway.
|
||||
|
||||
Another problem may be that when keeping ALT or Meta pressed the terminal
|
||||
prepends ESC instead of setting the 8th bit. See |:map-alt-keys|.
|
||||
|
||||
*recursive_mapping*
|
||||
If you include the {lhs} in the {rhs} you have a recursive mapping. When
|
||||
{lhs} is typed, it will be replaced with {rhs}. When the {lhs} which is
|
||||
@@ -517,43 +590,104 @@ the original Vi, as long as there is only one undo command in the mapped
|
||||
sequence (having two undo commands in a mapped sequence did not make sense
|
||||
in the original Vi, you would get back the text before the first undo).
|
||||
|
||||
*:map-special-keys*
|
||||
There are three ways to map a special key:
|
||||
1. The Vi-compatible method: Map the key code. Often this is a sequence that
|
||||
starts with <Esc>. To enter a mapping like this you type ":map " and then
|
||||
you have to type CTRL-V before hitting the function key. Note that when
|
||||
the key code for the key is in the termcap (the t_ options), it will
|
||||
automatically be translated into the internal code and become the second
|
||||
way of mapping (unless the 'k' flag is included in 'cpoptions').
|
||||
2. The second method is to use the internal code for the function key. To
|
||||
enter such a mapping type CTRL-K and then hit the function key, or use
|
||||
the form "#1", "#2", .. "#9", "#0", "<Up>", "<S-Down>", "<S-F7>", etc.
|
||||
(see table of keys |key-notation|, all keys from <Up> can be used). The
|
||||
first ten function keys can be defined in two ways: Just the number, like
|
||||
"#2", and with "<F>", like "<F2>". Both stand for function key 2. "#0"
|
||||
refers to function key 10, defined with option 't_f10', which may be
|
||||
function key zero on some keyboards. The <> form cannot be used when
|
||||
'cpoptions' includes the '<' flag.
|
||||
3. Use the termcap entry, with the form <t_xx>, where "xx" is the name of the
|
||||
termcap entry. Any string entry can be used. For example: >
|
||||
:map <t_F3> G
|
||||
< Maps function key 13 to "G". This does not work if 'cpoptions' includes
|
||||
the '<' flag.
|
||||
|
||||
The advantage of the second and third method is that the mapping will work on
|
||||
different terminals without modification (the function key will be
|
||||
translated into the same internal code or the actual key code, no matter what
|
||||
terminal you are using. The termcap must be correct for this to work, and you
|
||||
must use the same mappings).
|
||||
1.10 MAPPING ALT-KEYS *:map-alt-keys*
|
||||
|
||||
DETAIL: Vim first checks if a sequence from the keyboard is mapped. If it
|
||||
isn't the terminal key codes are tried (see |terminal-options|). If a
|
||||
terminal code is found it is replaced with the internal code. Then the check
|
||||
for a mapping is done again (so you can map an internal code to something
|
||||
else). What is written into the script file depends on what is recognized.
|
||||
If the terminal key code was recognized as a mapping the key code itself is
|
||||
written to the script file. If it was recognized as a terminal code the
|
||||
internal code is written to the script file.
|
||||
In the GUI Vim handles the Alt key itself, thus mapping keys with ALT should
|
||||
always work. But in a terminal Vim gets a sequence of bytes and has to figure
|
||||
out whether ALT was pressed or not.
|
||||
|
||||
By default Vim assumes that pressing the ALT key sets the 8th bit of a typed
|
||||
character. Most decent terminals can work that way, such as xterm, aterm and
|
||||
rxvt. If your <A-k> mappings don't work it might be that the terminal is
|
||||
prefixing the character with an ESC character. But you can just as well type
|
||||
ESC before a character, thus Vim doesn't know what happened (except for
|
||||
checking the delay between characters, which is not reliable).
|
||||
|
||||
As of this writing, some mainstream terminals like gnome-terminal and konsole
|
||||
use the ESC prefix. There doesn't appear a way to have them use the 8th bit
|
||||
instead. Xterm should work well by default. Aterm and rxvt should work well
|
||||
when started with the "--meta8" argument. You can also tweak resources like
|
||||
"metaSendsEscape", "eightBitInput" and "eightBitOutput".
|
||||
|
||||
On the Linux console, this behavior can be toggled with the "setmetamode"
|
||||
command. Bear in mind that not using an ESC prefix could get you in trouble
|
||||
with other programs. You should make sure that bash has the "convert-meta"
|
||||
option set to "on" in order for your Meta keybindings to still work on it
|
||||
(it's the default readline behavior, unless changed by specific system
|
||||
configuration). For that, you can add the line: >
|
||||
|
||||
set convert-meta on
|
||||
|
||||
to your ~/.inputrc file. If you're creating the file, you might want to use: >
|
||||
|
||||
$include /etc/inputrc
|
||||
|
||||
as the first line, if that file exists on your system, to keep global options.
|
||||
This may cause a problem for entering special characters, such as the umlaut.
|
||||
Then you should use CTRL-V before that character.
|
||||
|
||||
Bear in mind that convert-meta has been reported to have troubles when used in
|
||||
UTF-8 locales. On terminals like xterm, the "metaSendsEscape" resource can be
|
||||
toggled on the fly through the "Main Options" menu, by pressing Ctrl-LeftClick
|
||||
on the terminal; that's a good last resource in case you want to send ESC when
|
||||
using other applications but not when inside VIM.
|
||||
|
||||
|
||||
1.11 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create mapping that first sets the 'operatorfunc' option and then
|
||||
invoke the |g@| operator. After the user types the {motion} command the
|
||||
specified function will be called.
|
||||
|
||||
*g@* *E774* *E775*
|
||||
g@{motion} Call the function set by the 'operatorfunc' option.
|
||||
The '[ mark is positioned at the start of the text
|
||||
moved over by {motion}, the '] mark on the last
|
||||
character of the text.
|
||||
The function is called with one String argument:
|
||||
"line" {motion} was |linewise|
|
||||
"char" {motion} was |characterwise|
|
||||
"block" {motion} was |blockwise-visual||
|
||||
Although "block" would rarely appear, since it can
|
||||
only result from Visual mode where "g@" is not useful.
|
||||
{not available when compiled without the +eval
|
||||
feature}
|
||||
|
||||
Here is an example that counts the number of spaces with <F4>: >
|
||||
|
||||
nmap <silent> <F4> :set opfunc=CountSpaces<CR>g@
|
||||
vmap <silent> <F4> :<C-U>call CountSpaces(visualmode(), 1)<CR>
|
||||
|
||||
function! CountSpaces(type, ...)
|
||||
let sel_save = &selection
|
||||
let &selection = "inclusive"
|
||||
let reg_save = @@
|
||||
|
||||
if a:0 " Invoked from Visual mode, use '< and '> marks.
|
||||
silent exe "normal! `<" . a:type . "`>y"
|
||||
elseif a:type == 'line'
|
||||
silent exe "normal! '[V']y"
|
||||
elseif a:type == 'block'
|
||||
silent exe "normal! `[\<C-V>`]y"
|
||||
else
|
||||
silent exe "normal! `[v`]y"
|
||||
endif
|
||||
|
||||
echomsg strlen(substitute(@@, '[^ ]', '', 'g'))
|
||||
|
||||
let &selection = sel_save
|
||||
let @@ = reg_save
|
||||
endfunction
|
||||
|
||||
Note that the 'selection' option is temporarily set to "inclusive" to be able
|
||||
to yank exactly the right text by using Visual mode from the '[ to the ']
|
||||
mark.
|
||||
|
||||
Also note that there is a separate mapping for Visual mode. It removes the
|
||||
"'<,'>" range that ":" inserts in Visual mode and invokes the function with
|
||||
visualmode() and an extra argument.
|
||||
|
||||
==============================================================================
|
||||
2. Abbreviations *abbreviations* *Abbreviations*
|
||||
@@ -814,11 +948,10 @@ local function or uses a local mapping.
|
||||
Otherwise, using "<SID>" outside of a script context is an error.
|
||||
|
||||
If you need to get the script number to use in a complicated script, you can
|
||||
use this trick: >
|
||||
:map <SID>xx <SID>xx
|
||||
:let s:sid = maparg("<SID>xx")
|
||||
:unmap <SID>xx
|
||||
And remove the trailing "xx".
|
||||
use this function: >
|
||||
function s:SID()
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
|
||||
endfun
|
||||
|
||||
The "<SNR>" will be shown when listing functions and mappings. This is useful
|
||||
to find out what they are defined to.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2005 Oct 10
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -19,7 +19,8 @@ The ":messages" command can be used to view previously given messages. This
|
||||
is especially useful when messages have been overwritten or truncated. This
|
||||
depends on the 'shortmess' option.
|
||||
|
||||
The number of remembered messages is fixed at 20.
|
||||
The number of remembered messages is fixed at 20 for the tiny version and 100
|
||||
for other versions.
|
||||
|
||||
*g<*
|
||||
The "g<" command can be used to see the last page of previous command output.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.0aa. Last change: 2005 Sep 14
|
||||
*motion.txt* For Vim version 7.0aa. Last change: 2006 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -57,6 +57,7 @@ or change text. The following operators are available:
|
||||
|>| > shift right
|
||||
|<| < shift left
|
||||
|zf| zf define a fold
|
||||
|g@| g@ call function set with the 'operatorfunc' option
|
||||
|
||||
If the motion includes a count and the operator also had a count before it,
|
||||
the two counts are multiplied. For example: "2d3w" deletes six words.
|
||||
@@ -385,10 +386,11 @@ These commands move over words or WORDS.
|
||||
*word*
|
||||
A word consists of a sequence of letters, digits and underscores, or a
|
||||
sequence of other non-blank characters, separated with white space (spaces,
|
||||
tabs, <EOL>). This can be changed with the 'iskeyword' option.
|
||||
tabs, <EOL>). This can be changed with the 'iskeyword' option. An empty line
|
||||
is also considered to be a word.
|
||||
*WORD*
|
||||
A WORD consists of a sequence of non-blank characters, separated with white
|
||||
space. An empty line is also considered to be a word and a WORD.
|
||||
space. An empty line is also considered to be a WORD.
|
||||
|
||||
A sequence of folded lines is counted for one word of a single character.
|
||||
"w" and "W", "e" and "E" move to the start/end of the first word or WORD after
|
||||
@@ -973,7 +975,7 @@ These commands are not marks themselves, but jump to a mark:
|
||||
position. E.g., when updating a "Last change"
|
||||
timestamp in the first line: >
|
||||
|
||||
:let lnum = getline(".")
|
||||
:let lnum = line(".")
|
||||
:keepjumps normal gg
|
||||
:call SetLastChange()
|
||||
:keepjumps exe "normal " . lnum . "G"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Nov 23
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -162,6 +162,11 @@ include the "|" in the option value, use "\|" instead. This example sets the
|
||||
This sets the 'titlestring' option to "hi" and 'iconstring' to "there": >
|
||||
:set titlestring=hi|set iconstring=there
|
||||
|
||||
Similarly, the double quote character starts a comment. To include the '"' in
|
||||
the option value, use '\"' instead. This example sets the 'titlestring'
|
||||
option to 'hi "there"': >
|
||||
:set titlestring=hi\ \"there\"
|
||||
|
||||
For MS-DOS and WIN32 backslashes in file names are mostly not removed. More
|
||||
precise: For options that expect a file name (those where environment
|
||||
variables are expanded) a backslash before a normal file name character is not
|
||||
@@ -1037,6 +1042,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Vim does not try to send a message to an external debugger (Netbeans
|
||||
or Sun Workshop).
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'balloonexpr' |textlock|.
|
||||
|
||||
To check whether line breaks in the balloon text work use this check: >
|
||||
if has("balloon_multiline")
|
||||
<
|
||||
@@ -1172,6 +1183,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
autocommands. {not available when compiled without the
|
||||
|+autocmd| feature}
|
||||
quickfix quickfix buffer, contains list of errors |:cwindow|
|
||||
or list of locations |:lwindow|
|
||||
help help buffer (you are not supposed to set this
|
||||
manually)
|
||||
|
||||
@@ -1180,8 +1192,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Be careful with changing this option, it can have many side effects!
|
||||
|
||||
A "quickfix" buffer is only used for the error list. This value is
|
||||
set by the |:cwindow| command and you are not supposed to change it.
|
||||
A "quickfix" buffer is only used for the error list and the location
|
||||
list. This value is set by the |:cwindow| and |:lwindow| commands and
|
||||
you are not supposed to change it.
|
||||
|
||||
"nofile" and "nowrite" buffers are similar:
|
||||
both: The buffer is not to be written to disk, ":w" doesn't
|
||||
@@ -1436,6 +1449,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
to use the size for the GUI, put the command in your |gvimrc| file.
|
||||
When you set this option and Vim is unable to change the physical
|
||||
number of columns of the display, the display may be messed up.
|
||||
Mimimum value is 12, maximum value is 10000.
|
||||
|
||||
*'comments'* *'com'* *E524* *E525*
|
||||
'comments' 'com' string (default
|
||||
@@ -1597,92 +1611,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +eval
|
||||
or +insert_expand feature}
|
||||
This option specifies a function to be used for CTRL-X CTRL-U
|
||||
completion. |i_CTRL-X_CTRL-U|
|
||||
This option specifies a function to be used for Insert mode completion
|
||||
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
The function will be invoked with two arguments. First the function
|
||||
is called to find the start of the text to be completed. Secondly the
|
||||
function is called to actually find the matches.
|
||||
|
||||
On the first invocation the arguments are:
|
||||
a:findstart 1
|
||||
a:base empty
|
||||
|
||||
The function must return the column of where the completion starts.
|
||||
It must be a number between zero and the cursor column "col('.')".
|
||||
This involves looking at the characters just before the cursor and
|
||||
including those characters that could be part of the completed item.
|
||||
The text between this column and the cursor column will be replaced
|
||||
with the matches. Return -1 if no completion can be done.
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
a:base the text with which matches should match, what was
|
||||
located in the first call (can be empty)
|
||||
|
||||
The function must return a List with the matching words. These
|
||||
matches usually include the "a:base" text. When there are no matches
|
||||
return an empty List.
|
||||
|
||||
When searching for matches takes some time call |complete_add()| to
|
||||
add each match to the total list. These matches should then not
|
||||
appear in the returned list! Call |complete_check()| now and then to
|
||||
allow the user to press a key while still searching for matches. Stop
|
||||
searching when it returns non-zero.
|
||||
|
||||
The function may move the cursor, it is restored afterwards.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
let res = []
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
The same, but now pretending searching for matches is slow: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call complete_add(m)
|
||||
endif
|
||||
sleep 300m " simulate searching for next match
|
||||
if complete_check()
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu")
|
||||
@@ -1818,7 +1751,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
F When included, a ":write" command with a file name
|
||||
argument will set the file name for the current
|
||||
buffer, if the current buffer doesn't have a file name
|
||||
yet.
|
||||
yet. Also see |cpo-P|.
|
||||
*cpo-g*
|
||||
g Goto line 1 when using ":edit" without argument.
|
||||
*cpo-H*
|
||||
@@ -1887,6 +1820,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*cpo-p*
|
||||
p Vi compatible Lisp indenting. When not present, a
|
||||
slightly better algorithm is used.
|
||||
*cpo-P*
|
||||
P When included, a ":write" command that appends to a
|
||||
file will set the file name for the current buffer, if
|
||||
the current buffer doesn't have a file name yet and
|
||||
the 'F' flag is also included |cpo-F|.
|
||||
*cpo-q*
|
||||
q When joining multiple lines leave the cursor at the
|
||||
position where it would be when joining two lines.
|
||||
@@ -1976,11 +1914,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
C-indenting.
|
||||
*cpo--*
|
||||
- When included, a vertical movement command fails when
|
||||
it would above the first line or below the last line.
|
||||
Without it the cursor moves to the first or last line,
|
||||
unless it already was in that line.
|
||||
it would go above the first line or below the last
|
||||
line. Without it the cursor moves to the first or
|
||||
last line, unless it already was in that line.
|
||||
Applies to the commands "-", "k", CTRL-P, "+", "j",
|
||||
CTRL-N and CTRL-J.
|
||||
CTRL-N, CTRL-J and ":1234".
|
||||
*cpo-+*
|
||||
+ When included, a ":write file" command will reset the
|
||||
'modified' flag of the buffer, even though the buffer
|
||||
@@ -2539,7 +2477,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'encoding' is "utf-8" (or one of the other Unicode variants)
|
||||
conversion is most likely done in a way that the reverse
|
||||
conversion results in the same text. When 'encoding' is not
|
||||
"utf-8" special characters may be lost!
|
||||
"utf-8" some non-ASCII characters may be lost! You can use
|
||||
the |++bad| argument to specify what is done with characters
|
||||
that can't be converted.
|
||||
For an empty file or a file with only ASCII characters most encodings
|
||||
will work and the first entry of 'fileencodings' will be used (except
|
||||
"ucs-bom", which requires the BOM to be present). If you prefer
|
||||
@@ -2549,7 +2489,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
\ set fenc=iso-2022-jp | endif
|
||||
< This sets 'fileencoding' to "iso-2022-jp" if the file does not contain
|
||||
non-blank characters.
|
||||
Note that 'fileencodings' is not used for an new file, 'fileencoding'
|
||||
When the |++enc| argument is used then the value of 'fileencodings' is
|
||||
not used.
|
||||
Note that 'fileencodings' is not used for a new file, 'fileencoding'
|
||||
is always empty then. This means that a non-existing file may get a
|
||||
different encoding than an empty file.
|
||||
The special value "ucs-bom" can be used to check for a Unicode BOM
|
||||
@@ -2761,8 +2703,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+folding|
|
||||
or |+eval| feature}
|
||||
The expression used for when 'foldmethod' is "expr". It is evaluated
|
||||
for each line to obtain its fold level. See |fold-expr|. Also see
|
||||
|eval-sandbox|.
|
||||
for each line to obtain its fold level. See |fold-expr|.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'foldexpr' |textlock|.
|
||||
|
||||
*'foldignore'* *'fdi'*
|
||||
'foldignore' 'fdi' string (default: "#")
|
||||
@@ -2894,6 +2841,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
An expression which is used to specify the text displayed for a closed
|
||||
fold. See |fold-foldtext|.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'foldtext' |textlock|.
|
||||
|
||||
*'formatoptions'* *'fo'*
|
||||
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
|
||||
local to buffer
|
||||
@@ -3686,11 +3639,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
option to a file name. Mostly useful to change "." to "/" for Java: >
|
||||
:set includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
< The "v:fname" variable will be set to the file name that was detected.
|
||||
Evaluated in the |sandbox|.
|
||||
|
||||
Also used for the |gf| command if an unmodified file name can't be
|
||||
found. Allows doing "gf" on the name after an 'include' statement.
|
||||
Also used for |<cfile>|.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'includeexpr' |textlock|.
|
||||
|
||||
*'incsearch'* *'is'* *'noincsearch'* *'nois'*
|
||||
'incsearch' 'is' boolean (default off)
|
||||
global
|
||||
@@ -3736,9 +3695,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set indentexpr=GetMyIndent()
|
||||
< Error messages will be suppressed, unless the 'debug' option contains
|
||||
"msg".
|
||||
See |indent-expression|. Also see |eval-sandbox|.
|
||||
See |indent-expression|.
|
||||
NOTE: This option is made empty when 'compatible' is set.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'indentexpr' |textlock|.
|
||||
|
||||
|
||||
*'indentkeys'* *'indk'*
|
||||
'indentkeys' 'indk' string (default "0{,0},:,0#,!^F,o,O,e")
|
||||
local to buffer
|
||||
@@ -4091,7 +4057,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Vim limits the number of lines to what fits on the screen. You can
|
||||
use this command to get the tallest window possible: >
|
||||
:set lines=999
|
||||
< If you get less lines than expected, check the 'guiheadroom' option.
|
||||
< Minimum value is 2, maximum value is 1000.
|
||||
If you get less lines than expected, check the 'guiheadroom' option.
|
||||
When you set this option and Vim is unable to change the physical
|
||||
number of lines of the display, the display may be messed up.
|
||||
|
||||
@@ -4586,12 +4553,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This defines what bases Vim will consider for numbers when using the
|
||||
CTRL-A and CTRL-X commands for adding to and subtracting from a number
|
||||
respectively; see |CTRL-A| for more info on these commands.
|
||||
alpha if included, single alphabetical characters will be
|
||||
alpha If included, single alphabetical characters will be
|
||||
incremented or decremented. This is useful for a list with a
|
||||
letter index a), b), etc.
|
||||
octal if included, numbers that start with a zero will be considered
|
||||
octal If included, numbers that start with a zero will be considered
|
||||
to be octal. Example: Using CTRL-A on "007" results in "010".
|
||||
hex if included, numbers starting with "0x" or "0X" will be
|
||||
hex If included, numbers starting with "0x" or "0X" will be
|
||||
considered to be hexadecimal. Example: Using CTRL-X on
|
||||
"0x100" results in "0x0ff".
|
||||
Numbers which simply begin with a digit in the range 1-9 are always
|
||||
@@ -4633,10 +4600,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +eval
|
||||
or +insert_expand feature}
|
||||
This option specifies a function to be used for CTRL-X CTRL-O
|
||||
completion. |i_CTRL-X_CTRL-O|
|
||||
This option specifies a function to be used for Insert mode omni
|
||||
completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
For the use of the function see 'completefunc'.
|
||||
|
||||
*'operatorfunc'* *'opfunc'*
|
||||
'operatorfunc' 'opfunc' string (default: empty)
|
||||
global
|
||||
{not in Vi}
|
||||
This option specifies a function to be called by the |g@| operator.
|
||||
See |:map-operator| for more info and an example.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
|
||||
*'osfiletype'* *'oft'* *E366*
|
||||
@@ -5114,6 +5092,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
menu.vim GUI menus |menu.vim|
|
||||
plugin/ plugin scripts |write-plugin|
|
||||
print/ files for printing |postscript-print-encoding|
|
||||
spell/ spell checking files |spell|
|
||||
syntax/ syntax files |mysyntaxfile|
|
||||
tutor/ files for vimtutor |tutor|
|
||||
|
||||
@@ -5746,11 +5725,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in Vi}
|
||||
When on, a <Tab> in front of a line inserts blanks according to
|
||||
'shiftwidth'. 'tabstop' is used in other places. A <BS> will delete
|
||||
a 'shiftwidth' worth of space at the start of the line.
|
||||
When off a <Tab> always inserts blanks according to 'tabstop'.
|
||||
'shiftwidth' is only used for shifting text left or right
|
||||
|shift-left-right|.
|
||||
'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
|
||||
<BS> will delete a 'shiftwidth' worth of space at the start of the
|
||||
line.
|
||||
When off, a <Tab> always inserts blanks according to 'tabstop' or
|
||||
'softtabstop'. 'shiftwidth' is only used for shifting text left or
|
||||
right |shift-left-right|.
|
||||
What gets inserted (a Tab or spaces) depends on the 'expandtab'
|
||||
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
|
||||
number of spaces is minimized by using <Tab>s.
|
||||
@@ -5857,7 +5837,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
After this option has been set successfully, Vim will source the files
|
||||
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
|
||||
up to the first comma, dot or underscore. See |set-spc-auto|.
|
||||
up to the first comma, dot or underscore.
|
||||
Also see |set-spc-auto|.
|
||||
|
||||
|
||||
*'spellsuggest'* *'sps'*
|
||||
@@ -5866,7 +5847,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Methods used for spelling suggestions. Both for the |z?| command and
|
||||
Methods used for spelling suggestions. Both for the |z=| command and
|
||||
the |spellsuggest()| function. This is a comma-separated list of
|
||||
items:
|
||||
|
||||
@@ -5885,7 +5866,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
character inserts/deletes/swaps. Works well for
|
||||
simple typing mistakes.
|
||||
|
||||
{number} The maximum number of suggestions listed for |z?|.
|
||||
{number} The maximum number of suggestions listed for |z=|.
|
||||
Not used for |spellsuggest()|. The number of
|
||||
suggestions is never more than the value of 'lines'
|
||||
minus two.
|
||||
@@ -5907,7 +5888,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Lists, each with a suggestion and a score.
|
||||
Example:
|
||||
[['the', 33], ['that', 44]]
|
||||
Set 'verbose' and use |z?| to see the scores that the
|
||||
Set 'verbose' and use |z=| to see the scores that the
|
||||
internal methods use. A lower score is better.
|
||||
This may invoke |spellsuggest()| if you temporarily
|
||||
set 'spellsuggest' to exclude the "expr:" part.
|
||||
@@ -6029,6 +6010,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a S Argument list status as in default title. ({current} of {max})
|
||||
Empty if the argument file count is zero or one.
|
||||
{ NF Evaluate expression between '{' and '}' and substitute result.
|
||||
Note that there is no '%' before the closing '}'.
|
||||
( - Start of item group. Can be used for setting the width and
|
||||
alignment of a section. Must be followed by %) somewhere.
|
||||
) - End of item group. No width fields allowed.
|
||||
@@ -6062,7 +6044,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
temporarily to that of the window (and buffer) whose statusline is
|
||||
currently being drawn. The expression will evaluate in this context.
|
||||
The variable "actual_curbuf" is set to the 'bufnr()' number of the
|
||||
real current buffer. The expression is evaluated in the |sandbox|.
|
||||
real current buffer.
|
||||
|
||||
The 'statusline' option may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'statusline' |textlock|.
|
||||
|
||||
If the statusline is not updated when you want it (e.g., after setting
|
||||
a variable that's used in an expression), you can force an update by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Sep 12
|
||||
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -256,9 +256,13 @@ switched off by setting the 's' flag in the 'shortmess' option. The highlight
|
||||
method 'w' is used for this message (default: standout).
|
||||
|
||||
*search-range*
|
||||
You cannot limit the search command "/" to a certain range of lines. A trick
|
||||
to do this anyway is to use the ":substitute" command with the 'c' flag.
|
||||
Example: >
|
||||
You can limit the search command "/" to a certain range of lines by including
|
||||
\%>l items. For example, to match the word "limit" below line 199 and above
|
||||
line 300: >
|
||||
/\%>199l\%<300llimit
|
||||
Also see |/\%>l|.
|
||||
|
||||
Another way is to use the ":substitute" command with the 'c' flag. Example: >
|
||||
:.,300s/Pattern//gc
|
||||
This command will search from the cursor position until line 300 for
|
||||
"Pattern". At the match, you will be asked to type a character. Type 'q' to
|
||||
@@ -390,7 +394,9 @@ More explanation and examples below, follow the links.
|
||||
|/\ze| \ze \ze anything, sets end of match
|
||||
|/\%^| \%^ \%^ beginning of file |/zero-width| *E71*
|
||||
|/\%$| \%$ \%$ end of file |/zero-width|
|
||||
|/\%V| \%V \%V inside Visual area |/zero-width|
|
||||
|/\%#| \%# \%# cursor position |/zero-width|
|
||||
|/\%'m| \%'m \%'m mark m position |/zero-width|
|
||||
|/\%l| \%23l \%23l in line 23 |/zero-width|
|
||||
|/\%c| \%23c \%23c in column 23 |/zero-width|
|
||||
|/\%v| \%23v \%23v in virtual column 23 |/zero-width|
|
||||
@@ -784,6 +790,11 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
|
||||
position after the first "VIM".
|
||||
Searching from the end of the file backwards is easier!
|
||||
|
||||
*/\%V*
|
||||
\%V Match inside the Visual area. When Visual mode has already been
|
||||
stopped match in the area that |gv| would reselect.
|
||||
Only works for the current buffer.
|
||||
|
||||
*/\%#* *cursor-position*
|
||||
\%# Matches with the cursor position. Only works when matching in a
|
||||
buffer displayed in a window. {not in Vi}
|
||||
@@ -798,10 +809,24 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
|
||||
*/\%'m* */\%<'m* */\%>'m*
|
||||
\%'m Matches with the position of mark m.
|
||||
\%<'m Matches before the position of mark m.
|
||||
\%>'m Matches after the position of mark m.
|
||||
Example, to highlight the text from mark 's to 'e: >
|
||||
/.\%>'s.*\%<'e..
|
||||
< Note that two dots are required to include mark 'e in the match. That
|
||||
is because "\%<'e" matches at the character before the 'e mark, and
|
||||
since it's a |/zero-width| match it doesn't include that character.
|
||||
{not in Vi}
|
||||
WARNING: When the mark is moved after the pattern was used, the result
|
||||
becomes invalid. Vim doesn't automatically update the matches.
|
||||
Similar to moving the cursor for "\%#" |/\%#|.
|
||||
|
||||
*/\%l* */\%>l* */\%<l*
|
||||
\%23l Matches in a specific line.
|
||||
\%<23l Matches above a specific line.
|
||||
\%>23l Matches below a specific line.
|
||||
\%<23l Matches above a specific line (lower line number).
|
||||
\%>23l Matches below a specific line (higher line number).
|
||||
These three can be used to match specific lines in a buffer. The "23"
|
||||
can be any line number. The first line is 1. {not in Vi}
|
||||
WARNING: When inserting or deleting lines Vim does not automatically
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt* For Vim version 7.0. Last change: Nov 28, 2005
|
||||
*pi_netrw.txt* For Vim version 7.0. Last change: Jan 27, 2006
|
||||
|
||||
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
==============================================================================
|
||||
0. Contents *netrw-contents*
|
||||
|
||||
1. Netrw Reference......................................|netrw-ref|
|
||||
1. Starting With Netrw.................................|netrw-start|
|
||||
2. Netrw Reference......................................|netrw-ref|
|
||||
CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
|
||||
READING............................................|netrw-read|
|
||||
WRITING............................................|netrw-write|
|
||||
@@ -18,14 +19,14 @@
|
||||
CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
|
||||
VARIABLES..........................................|netrw-variables|
|
||||
PATHS..............................................|netrw-path|
|
||||
2. Network-Oriented File Transfer.......................|netrw-xfer|
|
||||
3. Network-Oriented File Transfer.......................|netrw-xfer|
|
||||
NETRC..............................................|netrw-netrc|
|
||||
PASSWORD...........................................|netrw-passwd|
|
||||
3. Activation...........................................|netrw-activate|
|
||||
4. Transparent File Transfer............................|netrw-transparent|
|
||||
5. Ex Commands..........................................|netrw-ex|
|
||||
6. Variables and Options................................|netrw-var|
|
||||
7. Directory Browsing...................................|netrw-browse| {{{1
|
||||
4. Activation...........................................|netrw-activate|
|
||||
5. Transparent File Transfer............................|netrw-transparent|
|
||||
6. Ex Commands..........................................|netrw-ex|
|
||||
7. Variables and Options................................|netrw-var|
|
||||
8. Directory Browsing...................................|netrw-browse| {{{1
|
||||
Maps...............................................|netrw-maps|
|
||||
Exploring..........................................|netrw-explore-cmds|
|
||||
Quick Reference Commands Table.....................|netrw-browse-cmds|
|
||||
@@ -41,7 +42,7 @@
|
||||
Deleting Files Or Directories......................|netrw-delete|
|
||||
Renaming Files Or Directories......................|netrw-move|
|
||||
Hiding Files Or Directories........................|netrw-a|
|
||||
Edit File Or Directory Hiding List.................|netrw-h|
|
||||
Edit File Or Directory Hiding List.................|netrw-ctrl-h|
|
||||
Browsing With A Horizontally Split Window..........|netrw-o|
|
||||
Preview Window.....................................|netrw-p|
|
||||
Selecting Sorting Style............................|netrw-s|
|
||||
@@ -56,19 +57,19 @@
|
||||
Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB|
|
||||
Listing Bookmarks And History......................|netrw-q|
|
||||
Improving Directory Browsing.......................|netrw-listhack| }}}1
|
||||
8. Problems and Fixes...................................|netrw-problems|
|
||||
9. Debugging............................................|netrw-debug|
|
||||
10. History..............................................|netrw-history|
|
||||
11. Credits..............................................|netrw-credits|
|
||||
9. Problems and Fixes...................................|netrw-problems|
|
||||
10. Debugging............................................|netrw-debug|
|
||||
11. History..............................................|netrw-history|
|
||||
12. Credits..............................................|netrw-credits|
|
||||
|
||||
The Netrw plugin is generally sourced automatically as it is a
|
||||
|standard-plugin|. That said, to make use of netrw, one must
|
||||
have plugins available which can be done with the following
|
||||
two lines in your <.vimrc>:
|
||||
two lines in your <.vimrc>: >
|
||||
|
||||
set nocp " 'compatible' is not set
|
||||
filetype plugin on " plugins are enabled
|
||||
|
||||
<
|
||||
You can avoid loading this plugin by setting the "loaded_netrw" variable
|
||||
in your <.vimrc> file: >
|
||||
|
||||
@@ -77,14 +78,66 @@ in your <.vimrc> file: >
|
||||
{Vi does not have any of this}
|
||||
|
||||
==============================================================================
|
||||
1. Netrw Reference *netrw-ref*
|
||||
1. Starting With Netrw *netrw-start*
|
||||
|
||||
Netrw makes reading, writing, and browsing over a network connection easy!
|
||||
First, make sure that you have plugins enabled, so you'll need to have at
|
||||
least the following in your <.vimrc>: (or see |netrw-activate|) >
|
||||
|
||||
set nocp " 'compatible' is not set
|
||||
filetype plugin on " plugins are enabled
|
||||
<
|
||||
(see |'cp'| and |:filetype-plugin-on|)
|
||||
|
||||
Netrw supports "transparent" editing of files on other machines using urls
|
||||
(see |netrw-transparent|). As an example of this, let's assume you have an
|
||||
account on some other machine; try >
|
||||
|
||||
vim scp://hostname/path/to/file
|
||||
<
|
||||
if you have an ssh connection. Want to make ssh/scp easier to use? Check
|
||||
out |netrw-listhack|!
|
||||
|
||||
What if you have ftp, not ssh/scp? That's easy, too; try >
|
||||
|
||||
vim ftp://hostname/path/to/file
|
||||
<
|
||||
Want to make ftp simpler to use? See if your ftp supports a file called
|
||||
<.netrc> -- typically it goes in your home directory, has read/write
|
||||
permissions for only the user to read (ie. not group, world, other, etc),
|
||||
and has lines resembling >
|
||||
|
||||
machine HOSTNAME login USERID password "PASSWORD"
|
||||
machine HOSTNAME login USERID password "PASSWORD"
|
||||
...
|
||||
default login USERID password "PASSWORD"
|
||||
<
|
||||
How about browsing -- ie. you just want to look around before editing a
|
||||
file. For browsing on your current host, just "edit" a directory: >
|
||||
|
||||
vim .
|
||||
vim /home/userid/path
|
||||
<
|
||||
For browsing on a remote host, "edit" a directory (but make sure that
|
||||
the directory name is followed by a "/"): >
|
||||
|
||||
vim scp://hostname/
|
||||
vim ftp://hostname/path/to/dir/
|
||||
<
|
||||
See |netrw-browse| for more!
|
||||
|
||||
There's more protocols supported than scp and ftp, too: see the next
|
||||
section, |netrw-externapp|.
|
||||
|
||||
==============================================================================
|
||||
2. Netrw Reference *netrw-ref*
|
||||
|
||||
CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp*
|
||||
|
||||
Protocol Variable Default Value
|
||||
-------- ---------------- -------------
|
||||
dav: *g:netrw_dav_cmd* = "cadaver"
|
||||
fetch: *g:netrw_fetch_cmd* = "fetch -o"
|
||||
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
|
||||
ftp: *g:netrw_ftp_cmd* = "ftp"
|
||||
http: *g:netrw_http_cmd* = "fetch -o" if fetch is available
|
||||
http: g:netrw_http_cmd = "wget -q -O" If wget is available
|
||||
@@ -191,7 +244,7 @@ file using root-relative paths, use the full path:
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
2. Network-Oriented File Transfer *netrw-xfer*
|
||||
3. Network-Oriented File Transfer *netrw-xfer*
|
||||
|
||||
Network-oriented file transfer under Vim is implemented by a VimL-based script
|
||||
(<netrw.vim>) using plugin techniques. It currently supports both reading and
|
||||
@@ -337,7 +390,7 @@ However, |netrw-listhack| can help with this problem.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Activation *netrw-activate*
|
||||
4. Activation *netrw-activate*
|
||||
|
||||
Network-oriented file transfers are available by default whenever
|
||||
|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
|
||||
@@ -351,7 +404,7 @@ up vim. I suggest that, at a minimum, you have at least the following in your
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
4. Transparent File Transfer *netrw-transparent*
|
||||
5. Transparent File Transfer *netrw-transparent*
|
||||
|
||||
Transparent file transfers occur whenever a regular file read or write
|
||||
(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
|
||||
@@ -365,7 +418,7 @@ See |netrw-activate| for more on how to encourage your vim to use plugins
|
||||
such as netrw.
|
||||
|
||||
==============================================================================
|
||||
5. Ex Commands *netrw-ex*
|
||||
6. Ex Commands *netrw-ex*
|
||||
|
||||
The usual read/write commands are supported. There are also a couple of
|
||||
additional commands available.
|
||||
@@ -403,7 +456,7 @@ additional commands available.
|
||||
|
||||
|
||||
==============================================================================
|
||||
6. Variables and Options *netrw-options* *netrw-var*
|
||||
7. Variables and Options *netrw-options* *netrw-var*
|
||||
|
||||
The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
|
||||
behavior. These variables typically may be set in the user's <.vimrc> file:
|
||||
@@ -476,10 +529,10 @@ variables listed below, and may be modified by the user.
|
||||
transformed however they wish
|
||||
by NetReadFixup()
|
||||
g:netrw_dav_cmd variable ="cadaver"
|
||||
g:netrw_fetch_cmd variable ="fetch -o"
|
||||
g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
|
||||
g:netrw_ftp_cmd variable ="ftp"
|
||||
g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
|
||||
g:netrw_http_cmd variable ="wget -O" if wget is executable
|
||||
g:netrw_http_cmd variable ="fetch -o" if fetch is available
|
||||
g:netrw_http_cmd variable ="wget -O" else if wget is available
|
||||
g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
|
||||
g:netrw_rcp_cmd variable ="rcp"
|
||||
g:netrw_rsync_cmd variable ="rsync -a"
|
||||
@@ -488,9 +541,10 @@ variables listed below, and may be modified by the user.
|
||||
-------------------------------------------------------------------------
|
||||
<
|
||||
*netrw-ftp*
|
||||
The first two options both help with certain ftp's that give trouble
|
||||
otherwise. In order to best understand how to use these options if ftp is
|
||||
giving you troubles, a bit of discussion follows on how netrw does ftp reads.
|
||||
The first two options (netrw_ftp and NetReadFixup) both help with certain
|
||||
ftp's that give trouble otherwise. In order to best understand how to use
|
||||
these options if ftp is giving you troubles, a bit of discussion follows on
|
||||
how netrw does ftp reads.
|
||||
|
||||
The g:netrw_..._cmd variables specify the external program to use handle the
|
||||
associated protocol (rcp, ftp, etc), plus any options.
|
||||
@@ -572,7 +626,7 @@ itself:
|
||||
>
|
||||
|
||||
==============================================================================
|
||||
7. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
|
||||
8. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
|
||||
|
||||
MAPS *netrw-maps*
|
||||
?................Help.......................................|netrw-help|
|
||||
@@ -585,7 +639,7 @@ MAPS *netrw-maps*
|
||||
c................Make Browsing Directory The Current Dir....|netrw-c|
|
||||
d................Make A New Directory.......................|netrw-d|
|
||||
D................Deleting Files or Directories..............|netrw-D|
|
||||
<c-h>............Edit File/Directory Hiding List............|netrw-h|
|
||||
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
|
||||
i................Long Listing...............................|netrw-i|
|
||||
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
|
||||
o................Browsing with a Horizontal Split...........|netrw-o|
|
||||
@@ -615,27 +669,38 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
|
||||
Command Explanation
|
||||
------- -----------
|
||||
< ? Causes Netrw to issue help
|
||||
<cr> Netrw will enter the directory or read the file
|
||||
<del> Netrw will attempt to remove the file/directory
|
||||
d Make a directory
|
||||
D Netrw will attempt to remove the file(s)/directory(ies)
|
||||
R Netrw will attempt to rename the file(s)/directory(ies)
|
||||
- Makes Netrw go up one directory
|
||||
a Toggles between normal display,
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
showing (display only files which match g:netrw_list_hide)
|
||||
c Make current browsing directory the current directory
|
||||
<c-h> Edit file hiding list
|
||||
i Toggles between long and short listing
|
||||
<c-l> Causes Netrw to refresh the directory listing
|
||||
<cr> Netrw will enter the directory or read the file |netrw-cr|
|
||||
<del> Netrw will attempt to remove the file/directory |netrw-del|
|
||||
- Makes Netrw go up one directory |netrw--|
|
||||
a Toggles between normal display, |netrw-a|
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
showing (display only files which match g:netrw_list_hide)
|
||||
b bookmark current directory; use Nb if compact listing
|
||||
in use |netrw-b|
|
||||
B go to previous bookmarked directory; use Nb if compact
|
||||
listing is in use |netrw-B|
|
||||
c Make current browsing directory the current directory |netrw-c|
|
||||
d Make a directory |netrw-d|
|
||||
D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D|
|
||||
<c-h> Edit file hiding list |netrw-ctrl-h|
|
||||
i Toggles between long and short listing |netrw-i|
|
||||
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
|
||||
Nb Same as b, but always available |netrw-Nb|
|
||||
NB Same as B, but always available |netrw-NB|
|
||||
o Enter the file/directory under the cursor in a new browser
|
||||
window. A horizontal split is used.
|
||||
p Preview the file
|
||||
r Reverse sorting order
|
||||
s Select sorting style: by name, time, or file size
|
||||
window. A horizontal split is used. |netrw-o|
|
||||
O Obtain a file specified by cursor |netrw-O|
|
||||
p Preview the file |netrw-p|
|
||||
P Browse in the previously used window |netrw-P|
|
||||
r Reverse sorting order |netrw-r|
|
||||
R Rename the designed file(s)/directory(ies) |netrw-R|
|
||||
s Select sorting style: by name, time, or file size |netrw-s|
|
||||
S Specify suffix priority for name-sorting |netrw-S|
|
||||
u Change to recently-visited directory |netrw-u|
|
||||
U Change to subsequently-visited directory |netrw-U|
|
||||
v Enter the file/directory under the cursor in a new browser
|
||||
window. A vertical split is used.
|
||||
x Apply a function to a file.
|
||||
window. A vertical split is used. |netrw-v|
|
||||
x Apply a function to a file. (special browsers) |netrw-x|
|
||||
|
||||
NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
>
|
||||
@@ -650,6 +715,19 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
by setting this variable (see |netrw-v|)
|
||||
default: =0
|
||||
|
||||
*g:netrw_browse_split* when browsing, <cr> will open the file by:
|
||||
=0: re-using the same window
|
||||
=1: horizontally splitting the window first
|
||||
=2: vertically splitting the window first
|
||||
*g:netrw_browsex_viewer* specify user's preference for a viewer: >
|
||||
"kfmclient exec"
|
||||
"gnome-open"
|
||||
< If >
|
||||
"-"
|
||||
< is used, then netrwFileHandler() will look for
|
||||
a script/function to handle the given
|
||||
extension. (see |netrw_filehandler|).
|
||||
<
|
||||
*g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
|
||||
that can show up as "directories" and "files"
|
||||
in the listing. This pattern is used to
|
||||
@@ -866,6 +944,11 @@ protocol given in the original read request.
|
||||
or more spaces embedded in it, or any trailing spaces, then you'll need to
|
||||
use the "thin" format to select it.
|
||||
|
||||
The |g:netrw_browse_split| option, which is zero by default, may be used to
|
||||
cause the opening of files to be done in a new window. The splitting will
|
||||
be done horizontally if the option is one and vertically if the option is
|
||||
two.
|
||||
|
||||
|
||||
OBTAINING A FILE *netrw-O*
|
||||
|
||||
@@ -921,7 +1004,7 @@ directory. Attempts to make a local directory that already exists (as either
|
||||
a file or a directory) will be detected, reported on, and ignored.
|
||||
|
||||
|
||||
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
|
||||
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del*
|
||||
|
||||
Deleting/removing files and directories involves moving the cursor to the
|
||||
file/directory to be deleted and pressing "D". Directories must be empty
|
||||
@@ -971,7 +1054,7 @@ ways: ignore it, hide files which match, and show only those files which
|
||||
match. The "a" map allows the user to cycle about these three ways.
|
||||
|
||||
The g:netrw_list_hide variable holds a comma delimited list of patterns (ex.
|
||||
\.obj) which specify the hiding list. (also see |netrw-h|) To set the hiding
|
||||
\.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the hiding
|
||||
list, use the <c-h> map. As an example, to hide files which begin with a ".",
|
||||
one may use the <c-h> map to set the hiding list to '^\..*' (or one may put
|
||||
let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the "a"
|
||||
@@ -979,7 +1062,7 @@ key to show all files, hide matching files, or to show only the matching
|
||||
files.
|
||||
|
||||
|
||||
EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide*
|
||||
EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide*
|
||||
|
||||
The "<ctrl-h>" map brings up a requestor allowing the user to change the
|
||||
file/directory hiding list. The hiding list consists of one or more patterns
|
||||
@@ -1009,6 +1092,20 @@ One may use a preview window (currently only for local browsing) by using the
|
||||
"p" key when the cursor is atop the desired filename to be previewed.
|
||||
|
||||
|
||||
PREVIOUS WINDOW *netrw-P* *netrw-prvwin*
|
||||
|
||||
To edit a file or directory in the previously used window (see :he |CTRL-W_P|),
|
||||
press a "P". If there's only one window, then the one window will be
|
||||
horizontally split (above/below splitting is controlled by |g:netrw_alto|,
|
||||
and its initial size is controlled by |g:netrw_winsize|).
|
||||
|
||||
If there's more than one window, the previous window will be re-used on
|
||||
the selected file/directory. If the previous window's associated buffer
|
||||
has been modified, and there's only one window with that buffer, then
|
||||
the user will be asked if s/he wishes to save the buffer first (yes,
|
||||
no, or cancel).
|
||||
|
||||
|
||||
SELECTING SORTING STYLE *netrw-s* *netrw-sort*
|
||||
|
||||
One may select the sorting style by name, time, or (file) size. The "s" map
|
||||
@@ -1068,15 +1165,30 @@ window and cursor at the right, have
|
||||
in your <.vimrc>.
|
||||
|
||||
|
||||
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
|
||||
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* *gx*
|
||||
|
||||
One may "enter" a file with a special handler, thereby firing up a browser or
|
||||
other application, for example, on a file by hitting the "x" key. The special
|
||||
handler varies:
|
||||
Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
|
||||
best seen with a special handler (ie. a tool provided with your computer).
|
||||
Netrw allows one to invoke such special handlers by: >
|
||||
|
||||
* when Exploring, hit the "x" key
|
||||
* when editing, hit gx with the cursor atop the special filename
|
||||
<
|
||||
Netrw determines which special handler by the following method:
|
||||
|
||||
* if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
|
||||
view files. Examples of useful settings (place into your <.vimrc>): >
|
||||
|
||||
:let g:netrw_browsex_viewer= "kfmclient exec"
|
||||
< or >
|
||||
:let g:netrw_browsex_viewer= "gnome-open"
|
||||
<
|
||||
If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
|
||||
invoked first (see |netrw_filehandler|).
|
||||
|
||||
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
|
||||
* for KDE (with kfmclient): kfmclient is used.
|
||||
* for Gnome (with gnome-open): gnome-open is used.
|
||||
* for KDE (with kfmclient): kfmclient is used.
|
||||
* otherwise the netrwFileHandler plugin is used.
|
||||
|
||||
The file's suffix is used by these various approaches to determine an
|
||||
@@ -1084,6 +1196,7 @@ appropriate application to use to "handle" these files. Such things as
|
||||
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
|
||||
*.eps) can be handled.
|
||||
|
||||
*netrw_filehandler*
|
||||
The netrwFileHandler applies a user-defined function to a file, based on its
|
||||
extension. Of course, the handler function must exist for it to be called!
|
||||
>
|
||||
@@ -1093,10 +1206,12 @@ extension. Of course, the handler function must exist for it to be called!
|
||||
See the <plugin/netrwFileHandlers.vim> for an example of how to handle an html
|
||||
file with mozilla.
|
||||
|
||||
One may write custom netrwFileHandlers; please look at the
|
||||
plugin/netrwFileHandlers.vim script for examples. If its likely to be
|
||||
generally useful, please feel free to forward a copy to me for future
|
||||
inclusion in the distribution.
|
||||
One may write custom netrwFileHandlers; please look at the >
|
||||
|
||||
plugin/netrwFileHandlers.vim
|
||||
|
||||
script for examples. If its likely to be generally useful, please feel free
|
||||
to forward a copy to me for future inclusion in the distribution.
|
||||
|
||||
|
||||
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
|
||||
@@ -1168,7 +1283,7 @@ help on what each of the variables do.
|
||||
|
||||
|
||||
==============================================================================
|
||||
8. Problems and Fixes *netrw-problems*
|
||||
9. Problems and Fixes *netrw-problems*
|
||||
|
||||
(This section is likely to grow as I get feedback)
|
||||
(also see |netrw-debug|)
|
||||
@@ -1233,7 +1348,7 @@ help on what each of the variables do.
|
||||
|
||||
|
||||
==============================================================================
|
||||
9. Debugging *netrw-debug*
|
||||
10. Debugging *netrw-debug*
|
||||
|
||||
The <netrw.vim> script is typically available as:
|
||||
>
|
||||
@@ -1282,8 +1397,23 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
NdrOchip at ScampbellPfamily.AbizM - NOSPAM
|
||||
|
||||
==============================================================================
|
||||
10. History *netrw-history*
|
||||
11. History *netrw-history* {{{1
|
||||
|
||||
v78: * progress has been made on allowing spaces inside directory
|
||||
names for remote work (reading, writing, browsing). (scp)
|
||||
v77: * Mikolaj Machowski fixed a bug in a substitute command
|
||||
* g:netrw_browsex_viewer implemented
|
||||
* Mikolaj Machowski pointed out that gnome-open is often
|
||||
executable under KDE systems, although it is effectively
|
||||
not functional. NetBrowseX now looks for "kicker" as
|
||||
a running process to determine if KDE is actually the
|
||||
really running.
|
||||
* Explorer's O functionality was inadvertently left out.
|
||||
Netrw now does the same thing, but with the "P" key.
|
||||
* added g:netrw_browse_split option
|
||||
* fixed a bug where the directory contained a "." but
|
||||
the file didn't (was treating the dirname from "."
|
||||
onwards as a suffix)
|
||||
v76: * "directory is missing" error message now restores echo
|
||||
highlighting
|
||||
v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
|
||||
@@ -1475,7 +1605,7 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
|
||||
|
||||
==============================================================================
|
||||
11. Credits *netrw-credits*
|
||||
11. Credits *netrw-credits* {{{1
|
||||
|
||||
Vim editor by Bram Moolenaar (Thanks, Bram!)
|
||||
dav support by C Campbell
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
*tar.txt* Tar File Interface Nov 22, 2005
|
||||
*tar.txt* Tar File Interface Dec 21, 2005
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: The GPL (gnu public license) applies to *tar-copyright*
|
||||
tarPlugin.vim, and tar.txt.
|
||||
tarPlugin.vim, and pi_tar.txt.
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
==============================================================================
|
||||
@@ -23,6 +23,8 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright*
|
||||
|
||||
==============================================================================
|
||||
3. History *tar-history*
|
||||
v6 Dec 21, 2005 * writing to files not in directories caused problems -
|
||||
fixed (pointed out by Christian Robinson)
|
||||
v5 Nov 22, 2005 * report option workaround installed
|
||||
v3 Sep 16, 2005 * handles writing files in an archive back to the
|
||||
archive
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*zip.txt* Zip File Interface Nov 22, 2005
|
||||
*zip.txt* Zip File Interface Nov 28, 2005
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
@@ -6,10 +6,11 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
|
||||
Permission is hereby granted to use and distribute this code,
|
||||
with or without modifications, provided that this copyright
|
||||
notice is copied with it. Like anything else that's free,
|
||||
zip.vim and zipPlugin.vim are provided *as is* and comes with no
|
||||
warranty of any kind, either expressed or implied. By using this
|
||||
plugin, you agree that in no event will the copyright holder be
|
||||
liable for any damages resulting from the use of this software.
|
||||
zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is*
|
||||
and it comes with no warranty of any kind, either expressed or
|
||||
implied. By using this plugin, you agree that in no event will
|
||||
the copyright holder be liable for any damages resulting from
|
||||
the use of this software.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *zip* *zip-contents*
|
||||
@@ -28,6 +29,8 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
|
||||
|
||||
==============================================================================
|
||||
3. History *zip-history*
|
||||
v6 Dec 21, 2005 * writing to files not in directories caused problems -
|
||||
fixed (pointed out by Christian Robinson)
|
||||
v5 Nov 22, 2005 * report option workaround installed
|
||||
v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
|
||||
v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Sep 27
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -42,7 +42,19 @@ easy way to do this is with the |:make| command (see below). The
|
||||
'errorformat' option should be set to match the error messages from your
|
||||
compiler (see |errorformat| below).
|
||||
|
||||
The following quickfix commands can be used:
|
||||
*location-list* *E776*
|
||||
A location list is similar to a quickfix list and contains a list of positions
|
||||
in files. A location list is associated with a window and each window can
|
||||
have a separate location list. A location list can be associated with only
|
||||
one window. The location list is independent of the quickfix list.
|
||||
|
||||
When a window with a location list is split, the new window gets a copy of the
|
||||
location list. When there are no references to a location list, the location
|
||||
list is destroyed.
|
||||
|
||||
The following quickfix commands can be used. The location list commands are
|
||||
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
|
||||
command with 'l'.
|
||||
|
||||
*:cc*
|
||||
:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
|
||||
@@ -56,18 +68,32 @@ The following quickfix commands can be used:
|
||||
The 'switchbuf' settings are respected when jumping
|
||||
to a buffer.
|
||||
|
||||
*:ll*
|
||||
:ll[!] [nr] Same as ":cc", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cn* *:cnext* *E553*
|
||||
:[count]cn[ext][!] Display the [count] next error in the list that
|
||||
includes a file name. If there are no file names at
|
||||
all, go to the [count] next error. See |:cc| for
|
||||
[!] and 'switchbuf'.
|
||||
|
||||
*:lne* *:lnext*
|
||||
:[count]lne[xt][!] Same as ":cnext", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
|
||||
:[count]cp[revious][!] Display the [count] previous error in the list that
|
||||
includes a file name. If there are no file names at
|
||||
all, go to the [count] previous error. See |:cc| for
|
||||
[!] and 'switchbuf'.
|
||||
|
||||
|
||||
:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
|
||||
:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
|
||||
list for the current window is used instead of the
|
||||
quickfix list.
|
||||
|
||||
*:cnf* *:cnfile*
|
||||
:[count]cnf[ile][!] Display the first error in the [count] next file in
|
||||
the list that includes a file name. If there are no
|
||||
@@ -75,6 +101,10 @@ The following quickfix commands can be used:
|
||||
the [count] next error. See |:cc| for [!] and
|
||||
'switchbuf'.
|
||||
|
||||
*:lnf* *:lnfile*
|
||||
:[count]lnf[ile][!] Same as ":cnfile", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
:[count]cNf[ile][!] *:cpf* *:cpfile* *:cNf* *:cNfile*
|
||||
:[count]cpf[ile][!] Display the last error in the [count] previous file in
|
||||
the list that includes a file name. If there are no
|
||||
@@ -82,17 +112,34 @@ The following quickfix commands can be used:
|
||||
the [count] previous error. See |:cc| for [!] and
|
||||
'switchbuf'.
|
||||
|
||||
|
||||
:[count]lNf[ile][!] *:lpf* *:lpfile* *:lNf* *:lNfile*
|
||||
:[count]lpf[ile][!] Same as ":cNfile" and ":cpfile", except the location
|
||||
list for the current window is used instead of the
|
||||
quickfix list.
|
||||
|
||||
*:crewind* *:cr*
|
||||
:cr[ewind][!] [nr] Display error [nr]. If [nr] is omitted, the FIRST
|
||||
error is displayed. See |:cc|.
|
||||
|
||||
*:lrewind* *:lr*
|
||||
:lr[ewind][!] [nr] Same as ":crewind", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cfirst* *:cfir*
|
||||
:cfir[st][!] [nr] Same as ":crewind".
|
||||
|
||||
*:lfirst* *:lfir*
|
||||
:lfir[st][!] [nr] Same as ":lrewind".
|
||||
|
||||
*:clast* *:cla*
|
||||
:cla[st][!] [nr] Display error [nr]. If [nr] is omitted, the LAST
|
||||
error is displayed. See |:cc|.
|
||||
|
||||
*:llast* *:lla*
|
||||
:lla[st][!] [nr] Same as ":clast", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cq* *:cquit*
|
||||
:cq[uit] Quit Vim with an error code, so that the compiler
|
||||
will not compile the same file again.
|
||||
@@ -105,16 +152,31 @@ The following quickfix commands can be used:
|
||||
name of the errorfile, the 'errorfile' option will
|
||||
be set to [errorfile]. See |:cc| for [!].
|
||||
|
||||
*:cg* *:cgetfile*
|
||||
:cg[etfile][!] [errorfile]
|
||||
*:lf* *:lfile*
|
||||
:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
You can not use the -q command-line option to set
|
||||
the location list.
|
||||
|
||||
|
||||
:cg[etfile][!] [errorfile] *:cg* *:cgetfile*
|
||||
Read the error file. Just like ":cfile" but don't
|
||||
jump to the first error.
|
||||
|
||||
*:cad* *:caddfile*
|
||||
:cad[dfile] [errorfile] Read the error file and add the errors from the
|
||||
|
||||
:lg[etfile][!] [errorfile] *:lg* *:lgetfile*
|
||||
Same as ":cgetfile", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:caddf* *:caddfile*
|
||||
:caddf[ile] [errorfile] Read the error file and add the errors from the
|
||||
errorfile to the current quickfix list. If a quickfix
|
||||
list is not present, then a new list is created.
|
||||
|
||||
*:laddf* *:laddfile*
|
||||
:laddf[ile] [errorfile] Same as ":caddfile", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cb* *:cbuffer* *E681*
|
||||
:cb[uffer] [bufnr] Read the error list from the current buffer.
|
||||
When [bufnr] is given it must be the number of a
|
||||
@@ -123,19 +185,41 @@ The following quickfix commands can be used:
|
||||
A range can be specified for the lines to be used.
|
||||
Otherwise all lines in the buffer are used.
|
||||
|
||||
*:cex* *:cexpr*
|
||||
:cex[pr][!] {expr} Create a quickfix list using the result of {expr}.
|
||||
If {expr} is a String, then each new-line terminated
|
||||
line in the String is processed using 'errorformat'
|
||||
and the result is added to the quickfix list.
|
||||
If {expr} is a List, then each String item in the list
|
||||
is processed and added to the quickfix list.
|
||||
Non String items in the List are ignored. See |:cc|
|
||||
*:lb* *:lbuffer*
|
||||
:lb[uffer] [bufnr] Same as ":cbuffer", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cex* *:cexpr* *E777*
|
||||
:cex[pr][!] {expr} Create a quickfix list using the result of {expr} and
|
||||
jump to the first error. If {expr} is a String, then
|
||||
each new-line terminated line in the String is
|
||||
processed using 'errorformat' and the result is added
|
||||
to the quickfix list. If {expr} is a List, then each
|
||||
String item in the list is processed and added to the
|
||||
quickfix list. Non String items in the List are
|
||||
ignored. See |:cc|
|
||||
for [!].
|
||||
Examples: >
|
||||
:cexpr system('grep -n xyz *')
|
||||
:cexpr getline(1, '$')
|
||||
<
|
||||
*:lex* *:lexpr*
|
||||
:lex[pr][!] {expr} Same as ":cexpr", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cad* *:caddexpr*
|
||||
:cad[dexpr][!] {expr} Evaluate {expr} and add the resulting lines to the
|
||||
current quickfix list. If a quickfix list is not
|
||||
present, then a new list is created. The current
|
||||
cursor position will not be changed. See |:cexpr| for
|
||||
more information.
|
||||
Example: >
|
||||
:g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
|
||||
<
|
||||
*:lad* *:laddexpr*
|
||||
:lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cl* *:clist*
|
||||
:cl[ist] [from] [, [to]]
|
||||
List all errors that are valid |quickfix-valid|.
|
||||
@@ -148,6 +232,15 @@ The following quickfix commands can be used:
|
||||
:cl[ist]! [from] [, [to]]
|
||||
List all errors.
|
||||
|
||||
*:lli* *:llist*
|
||||
:lli[st] [from] [, [to]]
|
||||
Same as ":clist", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
:lli[st]! [from] [, [to]]
|
||||
List all the entries in the location list for the
|
||||
current window.
|
||||
|
||||
If you insert or delete lines, mostly the correct error location is still
|
||||
found because hidden marks are used. Sometimes, when the mark has been
|
||||
deleted for some reason, the message "line changed" is shown to warn you that
|
||||
@@ -172,14 +265,28 @@ on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
|
||||
the current window. It is not possible to open a
|
||||
second quickfix window.
|
||||
|
||||
*:lop* *:lopen*
|
||||
:lop[en] [height] Open a window to show the location list for the
|
||||
current window. Works only when the location list for
|
||||
the current window is present. You can have more than
|
||||
one location window opened at a time. Otherwise, it
|
||||
acts the same as ":copen".
|
||||
|
||||
*:ccl* *:cclose*
|
||||
:ccl[ose] Close the quickfix window.
|
||||
|
||||
*:lcl* *:lclose*
|
||||
:lcl[ose] Close the window showing the location list for the
|
||||
current window.
|
||||
|
||||
*:cw* *:cwindow*
|
||||
:cw[indow] [height] Open the quickfix window when there are recognized
|
||||
errors. If the window is already open and there are
|
||||
no recognized errors, close the window.
|
||||
|
||||
*:lw* *:lwindow*
|
||||
:lw[indow] [height] Same as ":cwindow", except use the window showing the
|
||||
location list for the current window.
|
||||
|
||||
Normally the quickfix window is at the bottom of the screen. If there are
|
||||
vertical splits, it's at the bottom of the rightmost column of windows. To
|
||||
@@ -204,14 +311,17 @@ You can use CTRL-W <Enter> to open a new window and jump to the error there.
|
||||
|
||||
When the quickfix window has been filled, two autocommand events are
|
||||
triggered. First the 'filetype' option is set to "qf", which triggers the
|
||||
FileType event. Then the BufReadPost event is triggered. This can be used to
|
||||
perform some action on the listed errors. Example: >
|
||||
au BufReadPost quickfix setlocal nomodifiable
|
||||
\ | silent g/^/s//\=line(".")." "/
|
||||
\ | setlocal modifiable
|
||||
FileType event. Then the BufReadPost event is triggered, using "quickfix" for
|
||||
the buffer name. This can be used to perform some action on the listed
|
||||
errors. Example: >
|
||||
au BufReadPost quickfix setlocal modifiable
|
||||
\ | silent exe 'g/^/s//\=line(".")." "/'
|
||||
\ | setlocal nomodifiable
|
||||
This prepends the line number to each line. Note the use of "\=" in the
|
||||
substitute string of the ":s" command, which is used to evaluate an
|
||||
expression.
|
||||
The BufWinEnter event is also triggered, again using "quickfix" for the buffer
|
||||
name.
|
||||
|
||||
Note: Making changes in the quickfix window has no effect on the list of
|
||||
errors. 'modifiable' is off to avoid making changes. If you delete or insert
|
||||
@@ -220,6 +330,29 @@ If you really want to do this, you could write the contents of the quickfix
|
||||
window to a file and use ":cfile" to have it parsed and used as the new error
|
||||
list.
|
||||
|
||||
*location-list-window*
|
||||
The location list window displays the entries in a location list. When you
|
||||
open a location list window, it is created below the current window and
|
||||
displays the location list for the current window. The location list window
|
||||
is similar to the quickfix window, except that you can have more than one
|
||||
location list window open at a time. When you use a location list command in
|
||||
this window, the displayed location list is used.
|
||||
|
||||
When you select a file from the location list window, the following steps are
|
||||
used to find a window to edit the file:
|
||||
|
||||
1. If a window with the location list displayed in the location list window is
|
||||
present, then the file is opened in that window.
|
||||
2. If the above step fails and if the file is already opened in another
|
||||
window, then that window is used.
|
||||
3. If the above step fails then an existing window showing a buffer with
|
||||
'buftype' not set is used.
|
||||
4. If the above step fails, then the file is edited in a new window.
|
||||
|
||||
In all of the above cases, if the location list for the selected window is not
|
||||
yet set, then it is set to the location list displayed in the location list
|
||||
window.
|
||||
|
||||
=============================================================================
|
||||
3. Using more than one list of errors *quickfix-error-lists*
|
||||
|
||||
@@ -233,11 +366,19 @@ lists. They set one of the existing error lists as the current one.
|
||||
this [count] times. When already at the oldest error
|
||||
list, an error message is given.
|
||||
|
||||
*:lolder* *:lol*
|
||||
:lol[der] [count] Same as ":colder", except use the location list for
|
||||
the current window instead of the quickfix list.
|
||||
|
||||
*:cnewer* *:cnew* *E381*
|
||||
:cnew[er] [count] Go to newer error list. When [count] is given, do
|
||||
this [count] times. When already at the newest error
|
||||
list, an error message is given.
|
||||
|
||||
*:lnewer* *:lnew*
|
||||
:lnew[er] [count] Same as ":cnewer", except use the location list for
|
||||
the current window instead of the quickfix list.
|
||||
|
||||
When adding a new error list, it becomes the current list.
|
||||
|
||||
When ":colder" has been used and ":make" or ":grep" is used to add a new error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Nov 25
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,6 +211,8 @@ N is used to indicate an optional count that can be given before the command.
|
||||
|:ts| :ts[elect][!] [tag] List matching tags and select one to jump to
|
||||
|:tjump| :tj[ump][!] [tag] Jump to tag [tag] or select from list when
|
||||
there are multiple matches
|
||||
|:ltag| :lt[ag][!] [tag] Jump to tag [tag] and add matching tags to the
|
||||
location list.
|
||||
|
||||
|:tags| :tags Print tag list
|
||||
|CTRL-T| N CTRL-T Jump back from Nth older tag in tag list
|
||||
@@ -774,6 +776,7 @@ Short explanation of each option: *option-list*
|
||||
|'number'| |'nu'| print the line number in front of each line
|
||||
|'numberwidth'| |'nuw'| number of columns used for the line number
|
||||
|'omnifunc'| |'ofu'| function for filetype-specific completion
|
||||
|'operatorfunc'| |'opfunc'| funtion to be called for |g@| operator
|
||||
|'osfiletype'| |'oft'| operating system-specific filetype information
|
||||
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|
||||
|'paste'| allow pasting text
|
||||
@@ -937,7 +940,9 @@ Short explanation of each option: *option-list*
|
||||
|:clist| :cl list all errors
|
||||
|:cfile| :cf read errors from the file 'errorfile'
|
||||
|:cgetfile| :cg like :cfile but don't jump to the first error
|
||||
|:caddfile| :cad add errors from the error file to the current
|
||||
|:caddfile| :caddf add errors from the error file to the current
|
||||
quickfix list
|
||||
|:caddexpr| :cad add errors from an expression to the current
|
||||
quickfix list
|
||||
|:cbuffer| :cb read errors from text in a buffer
|
||||
|:cexpr| :cex read errors from an expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*recover.txt* For Vim version 7.0aa. Last change: 2005 Feb 10
|
||||
*recover.txt* For Vim version 7.0aa. Last change: 2005 Dec 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -126,6 +126,28 @@ command:
|
||||
A Vim swap file can be recognized by the first six characters: "b0VIM ".
|
||||
After that comes the version number, e.g., "3.0".
|
||||
|
||||
|
||||
Links and symbolic links ~
|
||||
|
||||
On Unix it is possible to have two names for the same file. This can be done
|
||||
with hard links and with symbolic links (symlinks).
|
||||
|
||||
For hard links Vim does not know the other name of the file. Therefore, the
|
||||
name of the swapfile will be based on the name you used to edit the file.
|
||||
There is no check for editing the same file by the other name too, because Vim
|
||||
cannot find the other swapfile (except for searching all of your harddisk,
|
||||
which would be very slow).
|
||||
|
||||
For symbolic links Vim resolves the links to find the name of the actual file.
|
||||
The swap file name is based on that name. Thus it doesn't matter by what name
|
||||
you edit the file, the swap file name will normally be the same. However,
|
||||
there are exceptions:
|
||||
- When the directory of the actual file is not writable the swapfile is put
|
||||
elsewhere.
|
||||
- When the symbolic links somehow create a loop you get an *E773* error
|
||||
message and the unmodified file name will be used. You won't be able to
|
||||
save your file normally.
|
||||
|
||||
==============================================================================
|
||||
2. Recovery *recovery* *E308* *E311*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*scroll.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*scroll.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -153,31 +153,39 @@ to the closest character that is on the screen. The value of 'sidescroll' is
|
||||
not used.
|
||||
|
||||
z<Right> or *zl* *z<Right>*
|
||||
zl Scroll the screen [count] characters to the left.
|
||||
This only works when 'wrap' is off. {not in Vi}
|
||||
zl Move the view on the text [count] characters to the
|
||||
right, thus scroll the text [count] characters to the
|
||||
left. This only works when 'wrap' is off. {not in
|
||||
Vi}
|
||||
|
||||
z<Left> or *zh* *z<Left>*
|
||||
zh Scroll the screen [count] characters to the right.
|
||||
This only works when 'wrap' is off. {not in Vi}
|
||||
zh Move the view on the text [count] characters to the
|
||||
left, thus scroll the text [count] characters to the
|
||||
right. This only works when 'wrap' is off. {not in
|
||||
Vi}
|
||||
|
||||
*zL*
|
||||
zL Scroll the screen half a screenwidth to the left.
|
||||
This only works when 'wrap' is off. {not in Vi}
|
||||
zL Move the view on the text half a screenwidth to the
|
||||
right, thus scroll the text half a screenwidth to the
|
||||
left. This only works when 'wrap' is off. {not in
|
||||
Vi}
|
||||
|
||||
*zH*
|
||||
zH Scroll the screen half a screenwidth to the right.
|
||||
This only works when 'wrap' is off. {not in Vi}
|
||||
zH Move the view on the text half a screenwidth to the
|
||||
left, thus scroll the text half a screenwidth to the
|
||||
right. This only works when 'wrap' is off. {not in
|
||||
Vi}
|
||||
|
||||
For the following two commands the cursor is not moved in the text, only the
|
||||
text scrolls on the screen.
|
||||
|
||||
*zs*
|
||||
zs Scroll the screen horizontally to position the cursor
|
||||
zs Scroll the text horizontally to position the cursor
|
||||
at the start (left side) of the screen. This only
|
||||
works when 'wrap' is off. {not in Vi}
|
||||
|
||||
*ze*
|
||||
ze Scroll the screen horizontally to position the cursor
|
||||
ze Scroll the text horizontally to position the cursor
|
||||
at the end (right side) of the screen. This only
|
||||
works when 'wrap' is off. {not in Vi}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2005 Nov 26
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -124,13 +124,15 @@ is set.
|
||||
|
||||
|
||||
Finding suggestions for bad words:
|
||||
*z?*
|
||||
z? For the word under/after the cursor suggest correctly
|
||||
*z=*
|
||||
z= For the word under/after the cursor suggest correctly
|
||||
spelled words. This also works to find alternatives
|
||||
for a word that is not highlighted as a bad word,
|
||||
e.g., when the word after it is bad.
|
||||
The results are sorted on similarity to the word
|
||||
under/after the cursor.
|
||||
In Visual mode the highlighted text is taken as the
|
||||
word to be replaced.
|
||||
The results are sorted on similarity to the word being
|
||||
replaced.
|
||||
This may take a long time. Hit CTRL-C when you get
|
||||
bored.
|
||||
|
||||
@@ -143,7 +145,7 @@ z? For the word under/after the cursor suggest correctly
|
||||
first line (the header) to cancel.
|
||||
|
||||
If a count is used that suggestion is used, without
|
||||
prompting. For example, "1z?" always takes the first
|
||||
prompting. For example, "1z=" always takes the first
|
||||
suggestion.
|
||||
|
||||
If 'verbose' is non-zero a score will be displayed
|
||||
@@ -156,7 +158,7 @@ z? For the word under/after the cursor suggest correctly
|
||||
and other languages without spaces between words.
|
||||
|
||||
*:spellr* *:spellrepall* *E752* *E753*
|
||||
:spellr[epall] Repeat the replacement done by |z?| for all matches
|
||||
:spellr[epall] Repeat the replacement done by |z=| for all matches
|
||||
with the replaced word in the current window.
|
||||
|
||||
In Insert mode, when the cursor is after a badly spelled word, you can use
|
||||
@@ -172,6 +174,12 @@ When there is a line break right after a sentence the highlighting of the next
|
||||
line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for
|
||||
how it can be set automatically when 'spelllang' is set.
|
||||
|
||||
Vim counts the number of times a good word is encountered. This is used to
|
||||
sort the suggestions: words that have been seen before get a small bonus,
|
||||
words that have been seen often get a bigger bonus. The COMMON item in the
|
||||
affix file can be used to define common words, so that this mechanism also
|
||||
works in a new or short file |spell-COMMON|.
|
||||
|
||||
==============================================================================
|
||||
2. Remarks on spell checking *spell-remarks*
|
||||
|
||||
@@ -253,6 +261,10 @@ Only the first file is loaded, the one that is first in 'runtimepath'. If
|
||||
this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
|
||||
All the ones that are found are used.
|
||||
|
||||
If no spell file is found the |SpellFileMissing| autocommand event is
|
||||
triggered. This may trigger the |spellfile.vim| plugin to offer you
|
||||
downloading the spell file.
|
||||
|
||||
Additionally, the files related to the names in 'spellfile' are loaded. These
|
||||
are the files that |zg| and |zw| add good and wrong words to.
|
||||
|
||||
@@ -296,7 +308,12 @@ A spell file might not be available in the current 'encoding'. See
|
||||
|spell-mkspell| about how to create a spell file. Converting a spell file
|
||||
with "iconv" will NOT work!
|
||||
|
||||
*E758* *E759*
|
||||
*spell-sug-file* *E781*
|
||||
If there is a file with exactly the same name as the ".spl" file but ending in
|
||||
".sug", that file will be used for giving better suggestions. It isn't loaded
|
||||
before suggestions are made to reduce memory use.
|
||||
|
||||
*E758* *E759* *E778* *E779* *E780* *E782*
|
||||
When loading a spell file Vim checks that it is properly formatted. If you
|
||||
get an error the file may be truncated, modified or intended for another Vim
|
||||
version.
|
||||
@@ -531,6 +548,11 @@ used spelling files, use this command:
|
||||
Note: For some languages the result may be enormous,
|
||||
causing Vim to run out of memory.
|
||||
|
||||
:spelld[ump]! Like ":spelldump" and include the word count. This is
|
||||
the number of times the word was found while
|
||||
updating the screen. Words that are in COMMON items
|
||||
get a starting count of 10.
|
||||
|
||||
The format of the word list is used |spell-wordlist-format|. You should be
|
||||
able to read it with ":mkspell" to generate one .spl file that includes all
|
||||
the words.
|
||||
@@ -542,6 +564,48 @@ for the current region are included and no "/regions" line is generated.
|
||||
Comment lines with the name of the .spl file are used as a header above the
|
||||
words that were generated from that .spl file.
|
||||
|
||||
|
||||
SPELL FILE MISSING *spell-SpellFileMissing* *spellfile.vim*
|
||||
|
||||
If the spell file for the language you are using is not available, you will
|
||||
get an error message. But if the "spellfile.vim" plugin is active it will
|
||||
offer you to download the spell file. Just follow the instructions, it will
|
||||
ask you where to write the file.
|
||||
|
||||
The plugin has a default place where to look for spell files, on the Vim ftp
|
||||
server. If you want to use another location or another protocol, set the
|
||||
g:spellfile_URL variable to the directory that holds the spell files. The
|
||||
|netrw| plugin is used for getting the file, look there for the speficic
|
||||
syntax of the URL. Example: >
|
||||
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
||||
You may need to escape special characters.
|
||||
|
||||
The plugin will only ask about downloading a language once. If you want to
|
||||
try again anyway restart Vim, or set g:spellfile_URL to another value (e.g.,
|
||||
prepend a space).
|
||||
|
||||
To avoid using the "spellfile.vim" plugin do this in your vimrc file: >
|
||||
|
||||
let loaded_spellfile_plugin = 1
|
||||
|
||||
Instead of using the plugin you can define a |SpellFileMissing| autocommand to
|
||||
handle the missing file yourself. You can use it like this: >
|
||||
|
||||
:au SpellFileMissing * call Download_spell_file(expand('<amatch>'))
|
||||
|
||||
Thus the <amatch> item contains the name of the language. Another important
|
||||
value is 'encoding', since every encoding has its own spell file. With two
|
||||
exceptions:
|
||||
- For ISO-8859-15 (latin9) the name "latin1" is used (the encodings only
|
||||
differ in characters not used in dictionary words).
|
||||
- The name "ascii" may also be used for some languages where the words use
|
||||
only ASCII letters for most of the words.
|
||||
|
||||
The default "spellfile.vim" plugin uses this autocommand, if you define your
|
||||
autocommand afterwars you may want to use ":au! SpellFileMissing" to overrule
|
||||
it. If you define your autocommand before the plugin is loaded it will notice
|
||||
this and not do anything.
|
||||
|
||||
==============================================================================
|
||||
4. Spell file format *spell-file-format*
|
||||
|
||||
@@ -569,13 +633,16 @@ Additionally the following items are recognized:
|
||||
|
||||
- Empty and blank lines are ignored.
|
||||
|
||||
# comment ~
|
||||
- Lines starting with a # are ignored (comment lines).
|
||||
|
||||
/encoding=utf-8 ~
|
||||
- A line starting with "/encoding=", before any word, specifies the encoding
|
||||
of the file. After the second '=' comes an encoding name. This tells Vim
|
||||
to setup conversion from the specified encoding to 'encoding'. Thus you can
|
||||
use one word list for several target encodings.
|
||||
|
||||
/regions=usca ~
|
||||
- A line starting with "/regions=" specifies the region names that are
|
||||
supported. Each region name must be two ASCII letters. The first one is
|
||||
region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca".
|
||||
@@ -583,7 +650,8 @@ Additionally the following items are recognized:
|
||||
list!
|
||||
|
||||
- Other lines starting with '/' are reserved for future use. The ones that
|
||||
are not recognized are ignored (but you do get a warning message).
|
||||
are not recognized are ignored. You do get a warning message, so that you
|
||||
know something won't work.
|
||||
|
||||
- A "/" may follow the word with the following items:
|
||||
= Case must match exactly.
|
||||
@@ -608,17 +676,18 @@ accepted. This is different from a word with mixed case that is automatically
|
||||
marked as keep-case, those words may appear in all upper-case letters.
|
||||
|
||||
|
||||
FORMAT WITH AFFIX COMPRESSION
|
||||
FORMAT WITH .AFF and .DIC FILES
|
||||
|
||||
There are two files: the basic word list and an affix file. The affixes are
|
||||
There are two files: the basic word list and an affix file. The affix file
|
||||
specifies settings for the language and can contain affixes. The affixes are
|
||||
used to modify the basic words to get the full word list. This significantly
|
||||
reduces the number of words, especially for a language like Polish. This is
|
||||
called affix compression.
|
||||
|
||||
The basic word list and the affix file are combined and turned into a binary
|
||||
spell file. All the preprocessing has been done, thus this file loads fast.
|
||||
The binary spell file format is described in the source code (src/spell.c).
|
||||
But only developers need to know about it.
|
||||
The basic word list and the affix file are combined with the ":mkspell"
|
||||
command and results in a binary spell file. All the preprocessing has been
|
||||
done, thus this file loads fast. The binary spell file format is described in
|
||||
the source code (src/spell.c). But only developers need to know about it.
|
||||
|
||||
The preprocessing also allows us to take the Myspell language files and modify
|
||||
them before the Vim word list is made. The tools for this can be found in the
|
||||
@@ -630,39 +699,47 @@ here:
|
||||
http://lingucomponent.openoffice.org/affix.readme ~
|
||||
Note that affixes are case sensitive, this isn't obvious from the description.
|
||||
|
||||
Vim does not use the TRY item, it is ignored. For making suggestions the
|
||||
possible characters in the words are used.
|
||||
|
||||
Vim supports quite a few extras. They are described below |spell-affix-vim|.
|
||||
Attempts have been made to keep this compatible with other spell checkers, so
|
||||
that the same files can be used.
|
||||
that the same files can often be used. One other project that offers more
|
||||
than Myspell is Hunspell ( http://hunspell.sf.net ).
|
||||
|
||||
|
||||
WORD LIST FORMAT *spell-dic-format*
|
||||
|
||||
A very short example, with line numbers:
|
||||
A short example, with line numbers:
|
||||
|
||||
1 1234
|
||||
2 aan
|
||||
3 Als
|
||||
4 Etten-Leur
|
||||
5 et al.
|
||||
6 's-Gravenhage
|
||||
7 's-Gravenhaags
|
||||
8 bedel/P
|
||||
9 kado/1
|
||||
10 cadeau/2
|
||||
11 TCP,IP
|
||||
1 1234 ~
|
||||
2 aan ~
|
||||
3 Als ~
|
||||
4 Etten-Leur ~
|
||||
5 et al. ~
|
||||
6 's-Gravenhage ~
|
||||
7 's-Gravenhaags ~
|
||||
8 # word that differs between regions ~
|
||||
9 kado/1 ~
|
||||
10 cadeau/2 ~
|
||||
11 TCP,IP ~
|
||||
12 /the S affix may add a 's' ~
|
||||
13 bedel/S ~
|
||||
|
||||
The first line contains the number of words. Vim ignores it, but you do get
|
||||
an error message if it's not there. *E760*
|
||||
|
||||
What follows is one word per line. There should be no white space before or
|
||||
after the word. After the word there is an optional slash and flags. Most of
|
||||
these flags are letters that indicate the affixes that can be used with this
|
||||
word. These are specified with SFX and PFX lines in the .aff file. See the
|
||||
Myspell documentation. Vim allows using other flag types with the FLAG item
|
||||
in the affix file |spell-FLAG|.
|
||||
What follows is one word per line. White space at the end of the line is
|
||||
ignored, all other white space matters. The encoding is specified in the
|
||||
affix file |spell-SET|.
|
||||
|
||||
Comment lines start with '#' or '/'. See the example lines 8 and 12. Note
|
||||
that putting a comment after a word is NOT allowed:
|
||||
|
||||
someword # comment that causes an error! ~
|
||||
|
||||
After the word there is an optional slash and flags. Most of these flags are
|
||||
letters that indicate the affixes that can be used with this word. These are
|
||||
specified with SFX and PFX lines in the .aff file, see |spell-SFX| and
|
||||
|spell-PFX|. Vim allows using other flag types with the FLAG item in the
|
||||
affix file |spell-FLAG|.
|
||||
|
||||
When the word only has lower-case letters it will also match with the word
|
||||
starting with an upper-case letter.
|
||||
@@ -672,7 +749,7 @@ is required at this position. The same word with a lower-case letter at this
|
||||
position will not match. When some of the other letters are upper-case it will
|
||||
not match either.
|
||||
|
||||
The word with all upper-case characters will always be OK.
|
||||
The word with all upper-case characters will always be OK,
|
||||
|
||||
word list matches does not match ~
|
||||
als als Als ALS ALs AlS aLs aLS
|
||||
@@ -680,49 +757,60 @@ The word with all upper-case characters will always be OK.
|
||||
ALS ALS als Als ALs AlS aLs aLS
|
||||
AlS AlS ALS als Als ALs aLs aLS
|
||||
|
||||
The KEP affix ID can be used to specifically match a word with identical case
|
||||
only, see below |spell-KEP|.
|
||||
The KEEPCASE affix ID can be used to specifically match a word with identical
|
||||
case only, see below |spell-KEEPCASE|.
|
||||
|
||||
Note in line 5 to 7 that non-word characters are used. You can include
|
||||
any character in a word. When checking the text a word still only matches
|
||||
when it appears with a non-word character before and after it. For Myspell a
|
||||
word starting with a non-word character probably won't work.
|
||||
Note: in line 5 to 7 non-word characters are used. You can include any
|
||||
character in a word. When checking the text a word still only matches when it
|
||||
appears with a non-word character before and after it. For Myspell a word
|
||||
starting with a non-word character probably won't work.
|
||||
|
||||
In line 12 the word "TCP/IP" is defined. Since the slash has a special
|
||||
meaning the comma is used instead. This is defined with the SLASH item in the
|
||||
affix file, see |spell-SLASH|. Note that without this SLASH item the
|
||||
word will be "TCP,IP".
|
||||
affix file, see |spell-SLASH|. Note that without this SLASH item the word
|
||||
will be "TCP,IP".
|
||||
|
||||
*spell-affix-vim*
|
||||
A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
|
||||
affix file. This has the meaning that case matters. This can be used if the
|
||||
word does not have the first letter in upper case at the start of a sentence.
|
||||
Example (assuming that = was used for KEP):
|
||||
|
||||
word list matches does not match ~
|
||||
's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
|
||||
's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
|
||||
AFFIX FILE FORMAT *spell-aff-format* *spell-affix-vim*
|
||||
|
||||
The flag can also be used to avoid that the word matches when it is in all
|
||||
upper-case letters.
|
||||
*spell-affix-comment*
|
||||
Comment lines in the .aff file start with a '#':
|
||||
|
||||
# comment line ~
|
||||
|
||||
With some items it's also possible to put a comment after it, but this isn't
|
||||
supported in general.
|
||||
|
||||
|
||||
ENCODING *spell-SET*
|
||||
|
||||
The affix file can be in any encoding that is supported by "iconv". However,
|
||||
in some cases the current locale should also be set properly at the time
|
||||
|:mkspell| is invoked. Adding FOL/LOW/UPP lines removes this requirement
|
||||
|spell-FOL|.
|
||||
|
||||
The encoding should be specified before anything where the encoding matters.
|
||||
The encoding applies both to the affix file and the dictionary file. It is
|
||||
done with a SET line:
|
||||
|
||||
SET utf-8 ~
|
||||
|
||||
The encoding can be different from the value of the 'encoding' option at the
|
||||
time ":mkspell" is used. Vim will then convert everything to 'encoding' and
|
||||
generate a spell file for 'encoding'. If some of the used characters to not
|
||||
fit in 'encoding' you will get an error message.
|
||||
*spell-affix-mbyte*
|
||||
The basic word list is normally in an 8-bit encoding, which is mentioned in
|
||||
the affix file. The affix file must always be in the same encoding as the
|
||||
word list. This is compatible with Myspell. For Vim the encoding may also be
|
||||
something else, any encoding that "iconv" supports. The "SET" line must
|
||||
specify the name of the encoding. When using a multi-byte encoding it's
|
||||
possible to use more different affixes (but Myspell doesn't support that, thus
|
||||
you may not want to use it anyway).
|
||||
When using a multi-byte encoding it's possible to use more different affix
|
||||
flags. But Myspell doesn't support that, thus you may not want to use it
|
||||
anyway. For compatibility use an 8-bit encoding.
|
||||
|
||||
|
||||
CHARACTER TABLES
|
||||
*spell-affix-chars*
|
||||
When using an 8-bit encoding the affix file should define what characters are
|
||||
word characters (as specified with ENC). This is because the system where
|
||||
":mkspell" is used may not support a locale with this encoding and isalpha()
|
||||
won't work. For example when using "cp1250" on Unix.
|
||||
|
||||
word characters. This is because the system where ":mkspell" is used may not
|
||||
support a locale with this encoding and isalpha() won't work. For example
|
||||
when using "cp1250" on Unix.
|
||||
*E761* *E762* *spell-FOL*
|
||||
*spell-LOW* *spell-UPP*
|
||||
Three lines in the affix file are needed. Simplistic example:
|
||||
@@ -774,7 +862,7 @@ the word. This is needed to detect a spelling error such as they'are. That
|
||||
should be they're, but since "they" and "are" are words themselves that would
|
||||
go unnoticed.
|
||||
|
||||
These characters are defined with MIDWORD in the .aff file:
|
||||
These characters are defined with MIDWORD in the .aff file. Example:
|
||||
|
||||
MIDWORD '- ~
|
||||
|
||||
@@ -808,9 +896,58 @@ The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
||||
documentation or the Aspell manual:
|
||||
http://aspell.net/man-html/Affix-Compression.html).
|
||||
|
||||
Note that Myspell ignores any extra text after the relevant info. Vim
|
||||
requires this text to start with a "#" so that mistakes don't go unnoticed.
|
||||
Example:
|
||||
Summary:
|
||||
SFX L Y 2 ~
|
||||
SFX L 0 re [^x] ~
|
||||
SFX L 0 ro x ~
|
||||
|
||||
The first line is a header and has four fields:
|
||||
SFX {flag} {combine} {count}
|
||||
|
||||
{flag} The name used for the suffix. Mostly it's a single letter,
|
||||
but other characters can be used, see |spell-FLAG|.
|
||||
|
||||
{combine} Can be 'Y' or 'N'. When 'Y' then the word plus suffix can
|
||||
also have a prefix. When 'N' then a prefix is not allowed.
|
||||
|
||||
{count} The number of lines following. If this is wrong you will get
|
||||
an error message.
|
||||
|
||||
For PFX the fields are exactly the same.
|
||||
|
||||
The basic format for the following lines is:
|
||||
SFX {flag} {strip} {add} {condition}
|
||||
|
||||
{flag} Must be the same as the {flag} used in the first line.
|
||||
|
||||
{strip} Characters removed from the basic word. There is no check if
|
||||
the characters are actually there, only the length is used (in
|
||||
bytes). This better match the {condition}, otherwise strange
|
||||
things may happen. If the {strip} length is equal to or
|
||||
longer than the basic word the suffix won't be used.
|
||||
When {strip} is 0 (zero) then nothing is stripped.
|
||||
|
||||
{add} Characters added to the basic word, after removing {strip}.
|
||||
|
||||
{condition} A simplistic pattern. Only when this matches with a basic
|
||||
word will the suffix be used for that word. This is normally
|
||||
for using one suffix letter with different {add} and {strip}
|
||||
fields for words with different endings.
|
||||
When {condition} is a . (dot) there is no condition.
|
||||
The pattern may contain:
|
||||
- Literal characters.
|
||||
- A set of characters in []. [abc] matches a, b and c.
|
||||
A dash is allowed for a range [a-c], but this is
|
||||
Vim-specific.
|
||||
- A set of characters that starts with a ^, meaning the
|
||||
complement of the specified characters. [^abc] matches any
|
||||
character but a, b and c.
|
||||
|
||||
For PFX the fields are the same, but the {strip}, {add} and {condition} apply
|
||||
to the start of the word.
|
||||
|
||||
Note: Myspell ignores any extra text after the relevant info. Vim requires
|
||||
this text to start with a "#" so that mistakes don't go unnoticed. Example:
|
||||
|
||||
SFX F 0 in [^i]n # Spion > Spionin ~
|
||||
SFX F 0 nen in # Bauerin > Bauerinnen ~
|
||||
@@ -826,16 +963,49 @@ Myspell that use this feature apparently have this flag. Example:
|
||||
SFX a 0 en . ~
|
||||
SFX a 0 on . ~
|
||||
|
||||
|
||||
AFFIX FLAGS *spell-affix-flags*
|
||||
|
||||
This is a feature that comes from Hunspell: The affix may specify flags. This
|
||||
works similar to flags specified on a basic word. The flags apply to the
|
||||
basic word plus the affix. Example:
|
||||
|
||||
SFX S Y 1 ~
|
||||
SFX S 0 s . ~
|
||||
|
||||
SFX A Y 1 ~
|
||||
SFX A 0 able/S . ~
|
||||
|
||||
When the dictionary file contains "drink/AS" then these words are possible:
|
||||
|
||||
drink
|
||||
drinks uses S suffix
|
||||
drinkable uses A suffix
|
||||
drinkables uses A suffix and then S suffix
|
||||
|
||||
Generally the flags of the suffix are added to the flags of the basic word,
|
||||
both are used for the word plus suffix. But the flags of the basic word are
|
||||
only used once for affixes, except that both one prefix and one suffix can be
|
||||
used when both support combining.
|
||||
|
||||
Specifically, the affix flags can be used for:
|
||||
- Affixes on affixes, as in the example above.
|
||||
- Making the word with the affix rare, by using the |spell-RARE| flag.
|
||||
- Exclude the word with the affix from compounding, by using the
|
||||
|spell-COMPOUNDFORBIDFLAG| flag.
|
||||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
OLD STUFF
|
||||
*spell-affix-rare*
|
||||
An extra item for Vim is the "rare" flag. It must come after the other
|
||||
fields, before a comment. When used then all words that use the affix will be
|
||||
marked as rare words. Example:
|
||||
marked as rare words. Examples:
|
||||
|
||||
PFX F 0 nene . rare ~
|
||||
SFX F 0 oin n rare # hardly ever used ~
|
||||
|
||||
However, if the word also appears as a good word in another way it won't be
|
||||
marked as rare.
|
||||
However, if the word also appears as a good word in another way (e.g., in
|
||||
another region) it won't be marked as rare.
|
||||
|
||||
*spell-affix-nocomp*
|
||||
Another extra item for Vim is the "nocomp" flag. It must come after the other
|
||||
@@ -852,6 +1022,7 @@ Example:
|
||||
util/ac ~
|
||||
|
||||
This allows for "wordutil" and "wordutils" but not "wordutilize".
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
*spell-PFXPOSTPONE*
|
||||
When an affix file has very many prefixes that apply to many words it's not
|
||||
@@ -872,34 +1043,38 @@ word to start with an upper case letter.
|
||||
WORDS WITH A SLASH *spell-SLASH*
|
||||
|
||||
The slash is used in the .dic file to separate the basic word from the affix
|
||||
letters that can be used. Unfortunately, this means you cannot use a slash in
|
||||
a word. Thus "TCP/IP" cannot be a word. To work around that you can define a
|
||||
replacement character for the slash. Example:
|
||||
|
||||
SLASH , ~
|
||||
|
||||
Now you can use "TCP,IP" to add the word "TCP/IP".
|
||||
|
||||
Of course, the letter used should itself not appear in any word! The letter
|
||||
must be ASCII, thus a single byte.
|
||||
letters and other flags. Unfortunately, this means you cannot use a slash in
|
||||
a word. Thus "TCP/IP" is not a word but "TCP with the flags "IP". To include
|
||||
a slash in the word put a backslash before it: "TCP\/IP". In the rare case
|
||||
you want to use a backslash inside a word you need to use two backslashes.
|
||||
Any other use of the backslash is reserved for future expansion.
|
||||
|
||||
|
||||
KEEP-CASE WORDS *spell-KEP*
|
||||
KEEP-CASE WORDS *spell-KEEPCASE*
|
||||
|
||||
In the affix file a KEP line can be used to define the affix name used for
|
||||
keep-case words. Example:
|
||||
In the affix file a KEEPCASE line can be used to define the affix name used
|
||||
for keep-case words. Example:
|
||||
|
||||
KEP = ~
|
||||
KEEPCASE = ~
|
||||
|
||||
See above for an example |spell-affix-vim|.
|
||||
This flag is not supported by Myspell. It has the meaning that case matters.
|
||||
This can be used if the word does not have the first letter in upper case at
|
||||
the start of a sentence. Example:
|
||||
|
||||
word list matches does not match ~
|
||||
's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
|
||||
's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
|
||||
|
||||
The flag can also be used to avoid that the word matches when it is in all
|
||||
upper-case letters.
|
||||
|
||||
|
||||
RARE WORDS *spell-RAR*
|
||||
RARE WORDS *spell-RARE*
|
||||
|
||||
In the affix file a RAR line can be used to define the affix name used for
|
||||
In the affix file a RARE line can be used to define the affix name used for
|
||||
rare words. Example:
|
||||
|
||||
RAR ? ~
|
||||
RARE ? ~
|
||||
|
||||
Rare words are highlighted differently from bad words. This is to be used for
|
||||
words that are correct for the language, but are hardly ever used and could be
|
||||
@@ -922,18 +1097,15 @@ This can be used to exclude words that would otherwise be good. For example
|
||||
Once a word has been marked as bad it won't be undone by encountering the same
|
||||
word as good.
|
||||
|
||||
The flag also applies to the word with affixes, thus this can be used to mark
|
||||
a whole bunch of related words as bad.
|
||||
|
||||
*spell-NEEDAFFIX*
|
||||
The NEEDAFFIX flag is used to require that a word is used with an affix. The
|
||||
word itself is not a good word. Example:
|
||||
word itself is not a good word (unless there is an empty affix). Example:
|
||||
|
||||
NEEDAFFIX + ~
|
||||
|
||||
*spell-NEEDCOMPOUND*
|
||||
The NEEDCOMPOUND flag is used to require that a word is used as part of a
|
||||
compound word The word itself is not a good word. Example:
|
||||
|
||||
NEEDCOMPOUND & ~
|
||||
|
||||
|
||||
COMPOUND WORDS *spell-compound*
|
||||
|
||||
@@ -944,8 +1116,8 @@ call this character a flag here. Obviously these flags must be different from
|
||||
any affix IDs used.
|
||||
|
||||
*spell-COMPOUNDFLAG*
|
||||
The Myspell compatible method uses one flag, specified with COMPOUNDFLAG.
|
||||
All words with this flag combine in any order. This means there is no control
|
||||
The Myspell compatible method uses one flag, specified with COMPOUNDFLAG. All
|
||||
words with this flag combine in any order. This means there is no control
|
||||
over which word comes first. Example:
|
||||
COMPOUNDFLAG c ~
|
||||
|
||||
@@ -1006,6 +1178,12 @@ A specific example: Allow a compound to be made of two words and a dash:
|
||||
|
||||
This allows for the word "start-end", but not "startend".
|
||||
|
||||
*spell-NEEDCOMPOUND*
|
||||
The NEEDCOMPOUND flag is used to require that a word is used as part of a
|
||||
compound word. The word itself is not a good word. Example:
|
||||
|
||||
NEEDCOMPOUND & ~
|
||||
|
||||
*spell-COMPOUNDMIN*
|
||||
The minimal character length of a word used for compounding is specified with
|
||||
COMPOUNDMIN. Example:
|
||||
@@ -1037,6 +1215,17 @@ If both COMPOUNDMAX and COMPOUNDSYLMAX are defined, a compound word is
|
||||
accepted if it fits one of the criteria, thus is either made from up to
|
||||
COMPOUNDMAX words or contains up to COMPOUNDSYLMAX syllables.
|
||||
|
||||
*spell-COMPOUNDFORBIDFLAG*
|
||||
The COMPOUNDFORBIDFLAG specifies a flag that can be used on an affix. It
|
||||
means that the word plus affix cannot be used in a compound word.
|
||||
NOT IMPLEMENTED YET.
|
||||
|
||||
*spell-COMPOUNDPERMITFLAG*
|
||||
The COMPOUNDPERMITFLAG specifies a flag that can be used on an affix. It
|
||||
means that the word plus affix can also be used in a compound word in a way
|
||||
where the affix ends up halfway the word.
|
||||
NOT IMPLEMENTED YET.
|
||||
|
||||
*spell-SYLLABLE*
|
||||
The SYLLABLE item defines characters or character sequences that are used to
|
||||
count the number of syllables in a word. Example:
|
||||
@@ -1105,6 +1294,30 @@ lists that support this.
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
*spell-COMMON*
|
||||
Common words can be specified with the COMMON item. This will give better
|
||||
suggestions when editing a short file. Example:
|
||||
|
||||
COMMON the of to and a in is it you that he was for on are ~
|
||||
|
||||
The words must be separated by white space, up to 25 per line.
|
||||
When multiple regions are specified in a ":mkspell" command the common words
|
||||
for all regions are combined and used for all regions.
|
||||
|
||||
*spell-NOSPLITSUGS*
|
||||
This item indicates that suggestions for splitting a word will not appear:
|
||||
|
||||
NOSPLITSUGS ~
|
||||
|
||||
*spell-NOSUGGEST*
|
||||
The flag specified with NOSUGGEST can be used for words that will not be
|
||||
suggested. Can be used for obscene words.
|
||||
|
||||
NOSUGGEST % ~
|
||||
|
||||
NOT IMPLEMENTED YET.
|
||||
|
||||
|
||||
REPLACEMENTS *spell-REP*
|
||||
|
||||
In the affix file REP items can be used to define common mistakes. This is
|
||||
@@ -1118,7 +1331,7 @@ used to make spelling suggestions. The items define the "from" text and the
|
||||
REP ch k ~
|
||||
|
||||
The first line specifies the number of REP lines following. Vim ignores the
|
||||
number, but it must be there.
|
||||
number, but it must be there (for compatibility with Myspell).
|
||||
|
||||
Don't include simple one-character replacements or swaps. Vim will try these
|
||||
anyway. You can include whole words if you want to, but you might want to use
|
||||
@@ -1129,7 +1342,7 @@ You can include a space by using an underscore:
|
||||
REP the_the the ~
|
||||
|
||||
|
||||
SIMILAR CHARACTERS *spell-MAP*
|
||||
SIMILAR CHARACTERS *spell-MAP* *E783*
|
||||
|
||||
In the affix file MAP items can be used to define letters that are very much
|
||||
alike. This is mostly used for a letter with different accents. This is used
|
||||
@@ -1146,6 +1359,21 @@ Each letter must appear in only one of the MAP items. It's a bit more
|
||||
efficient if the first letter is ASCII or at least one without accents.
|
||||
|
||||
|
||||
.SUG FILE *spell-NOSUGFILE*
|
||||
|
||||
When soundfolding is specified in the affix file then ":mkspell" will normally
|
||||
produce a .sug file next to the .spl file. This file is used to find
|
||||
suggestions by their sound-a-like form quickly. At the cost of a lot of
|
||||
memory (the amount depends on the number of words, |:mkspell| will display an
|
||||
estimate when it's done).
|
||||
|
||||
To avoid producing a .sug file use this item in the affix file:
|
||||
|
||||
NOSUGFILE ~
|
||||
|
||||
Users can simply omit the .sug file if they don't want to use it.
|
||||
|
||||
|
||||
SOUND-A-LIKE *spell-SAL*
|
||||
|
||||
In the affix file SAL items can be used to define the sounds-a-like mechanism
|
||||
@@ -1194,7 +1422,108 @@ white space is replaced by one space. Sequences of the same character in
|
||||
SOFOFROM are replaced by one.
|
||||
|
||||
You can use the |soundfold()| function to try out the results. Or set the
|
||||
'verbose' option to see the score in the output of the |z?| command.
|
||||
'verbose' option to see the score in the output of the |z=| command.
|
||||
|
||||
|
||||
UNSUPPORTED ITEMS *spell-affix-not-supported*
|
||||
|
||||
These items appear in the affix file of other spell checkers. In Vim they are
|
||||
ignored, not supported or defined in another way.
|
||||
|
||||
ACCENT (Hunspell) *spell-ACCENT*
|
||||
Use MAP instead. |spell-MAP|
|
||||
|
||||
CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE*
|
||||
Disallow uppercase letters at compound word boundaries.
|
||||
Not supported.
|
||||
|
||||
CHECKCOMPOUNDDUP (Hunspell) *spell-CHECKCOMPOUNDDUP*
|
||||
Disallow using the same word twice in a compound. Not
|
||||
supported.
|
||||
|
||||
CHECKCOMPOUNDREP (Hunspell) *spell-CHECKCOMPOUNDREP*
|
||||
Something about using REP items and compound words. Not
|
||||
supported.
|
||||
|
||||
CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
|
||||
Forbid three identical characters when compounding. Not
|
||||
supported.
|
||||
|
||||
CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN*
|
||||
Forbid compounding when patterns match. Not supported.
|
||||
|
||||
CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
|
||||
This means a prefix and suffix must be added at the same time.
|
||||
Instead only specify the suffix, and give the that suffix two
|
||||
flags: The required prefix and the NEEDAFFIX flag.
|
||||
|spell-NEEDAFFIX|
|
||||
|
||||
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
|
||||
Enables using two prefixes. Not supported.
|
||||
|
||||
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
|
||||
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
|
||||
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
|
||||
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
|
||||
|
||||
COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT*
|
||||
Flag for words in the dictionary that are already a compound.
|
||||
Vim doesn't use it.
|
||||
|
||||
COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE*
|
||||
Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE|
|
||||
|spell-COMPOUNDSYLMAX|
|
||||
|
||||
COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX*
|
||||
Use COMPOUNDMAX instead. |spell-COMPOUNDMAX|
|
||||
|
||||
FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
|
||||
Use BAD instead. |spell-BAD|
|
||||
|
||||
HOME (Hunspell) *spell-HOME*
|
||||
Specifies the website for the language. Not supported.
|
||||
|
||||
LANG (Hunspell) *spell-LANG*
|
||||
This specifies language-specific behavior. This actually
|
||||
moves part of the language knowledge into the program,
|
||||
therefore Vim does not support it. Each language property
|
||||
must be specified separately.
|
||||
|
||||
LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
|
||||
Only needed for mprphological analysis.
|
||||
|
||||
MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
|
||||
Not supported.
|
||||
|
||||
NAME (Hunspell) *spell-NAME*
|
||||
Specifies the name of the language. Not supported.
|
||||
|
||||
ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
|
||||
Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
|
||||
|
||||
PSEUDOROOT (Hunspell) *spell-PSEUDOROOT*
|
||||
Use NEEDAFFIX instead. |spell-NEEDAFFIX|
|
||||
|
||||
SUGSWITHDOTS (Hunspell) *spell-SUGSWITHDOTS*
|
||||
Adds dots to suggestions. Vim doesn't need this.
|
||||
|
||||
SYLLABLENUM (Hunspell) *spell-SYLLABLENUM*
|
||||
Not supported.
|
||||
|
||||
TRY (Myspell, Hunspell, others) *spell-TRY*
|
||||
Vim does not use the TRY item, it is ignored. For making
|
||||
suggestions the actual characters in the words are used.
|
||||
|
||||
VERSION (Hunspell) *spell-VERSION*
|
||||
Specifies the version for the language. Not supported.
|
||||
|
||||
WORDCHARS (Hunspell) *spell-WORDCHARS*
|
||||
Used to recognize words. Vim doesn't need it, because there
|
||||
is no need to separate words before checking them (using a
|
||||
trie instead of a hashtable).
|
||||
|
||||
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.0aa. Last change: 2005 Oct 02
|
||||
*starting.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -799,8 +799,9 @@ accordingly. Vim proceeds in this order:
|
||||
- The |--noplugin| command line argument is used.
|
||||
- The "-u NONE" command line argument is used |-u|.
|
||||
- When Vim was compiled without the |+eval| feature.
|
||||
Note that using "-c set noloadplugins" doesn't work, because the
|
||||
commands from the command line have not been executed yet.
|
||||
Note that using "-c 'set noloadplugins'" doesn't work, because the
|
||||
commands from the command line have not been executed yet. You can
|
||||
use "--cmd 'set noloadplugins'" |--cmd|.
|
||||
|
||||
5. Set 'shellpipe' and 'shellredir'
|
||||
The 'shellpipe' and 'shellredir' options are set according to the
|
||||
@@ -1201,6 +1202,13 @@ An example mapping: >
|
||||
:nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>:so ~/sessions/
|
||||
This saves the current Session, and starts off the command to load another.
|
||||
|
||||
The |SessionLoadPost| autocmd event is triggered after a session file is
|
||||
loaded/sourced.
|
||||
*SessionLoad-variable*
|
||||
While the session file is loading the SessionLoad global variable is set to 1.
|
||||
Plugins can use this to postpone some work until the SessionLoadPost event is
|
||||
triggered.
|
||||
|
||||
*:mkvie* *:mkview*
|
||||
:mkvie[w][!] [file] Write a Vim script that restores the contents of the
|
||||
current window.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Oct 12
|
||||
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1884,6 +1884,13 @@ If you want to fold blocks in if statements, etc. as well set the following: >
|
||||
|
||||
:let perl_fold_blocks = 1
|
||||
|
||||
To avoid folding packages or subs when perl_fold is let, let the appropriate
|
||||
variable(s): >
|
||||
|
||||
:unlet perl_nofold_packages
|
||||
:unlet perl_nofold_subs
|
||||
|
||||
|
||||
|
||||
PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*
|
||||
|
||||
@@ -2135,29 +2142,58 @@ number is that redrawing can become slow.
|
||||
|
||||
RUBY *ruby.vim* *ft-ruby-syntax*
|
||||
|
||||
There are a few options to the Ruby syntax highlighting.
|
||||
There are a number of options to the Ruby syntax highlighting.
|
||||
|
||||
By default, the "end" keyword is colorized according to the opening statement
|
||||
of the block it closes. While useful, this feature can be expensive: if you
|
||||
of the block it closes. While useful, this feature can be expensive; if you
|
||||
experience slow redrawing (or you are on a terminal with poor color support)
|
||||
you may want to turn it off by defining the "ruby_no_expensive" variable: >
|
||||
|
||||
:let ruby_no_expensive = 1
|
||||
|
||||
In this case the same color will be used for all control keywords.
|
||||
|
||||
If you do want this feature enabled, but notice highlighting errors while
|
||||
scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
|
||||
the "ruby_minlines" variable to a value larger than 50: >
|
||||
|
||||
:let ruby_minlines = 100
|
||||
|
||||
Ideally, this value should be a number of lines large enough to embrace your
|
||||
largest class or module.
|
||||
|
||||
Finally, if you do not like to see too many color items around, you can define
|
||||
Highlighting of special identifiers can be disabled by defining
|
||||
"ruby_no_identifiers": >
|
||||
|
||||
:let ruby_no_identifiers = 1
|
||||
|
||||
This will prevent highlighting of special identifiers like "ConstantName",
|
||||
"$global_var", "@instance_var", "| iterator |", and ":symbol".
|
||||
"$global_var", "@@class_var", "@instance_var", "| block_param |", and
|
||||
":symbol".
|
||||
|
||||
Significant methods of Kernel, Module and Object are highlighted by default.
|
||||
This can be disabled by defining "ruby_no_special_methods": >
|
||||
|
||||
:let ruby_no_special_methods = 1
|
||||
|
||||
This will prevent highlighting of important methods such as "require", "attr",
|
||||
"private", "raise" and "proc".
|
||||
|
||||
Whitespace errors can be highlighted by defining "ruby_space_errors": >
|
||||
|
||||
:let ruby_space_errors = 1
|
||||
|
||||
This will highlight trailing whitespace and tabs preceded by a space character
|
||||
as errors. This can be refined by defining "ruby_no_trail_space_error" and
|
||||
"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after
|
||||
spaces respectively.
|
||||
|
||||
Folding can be enabled by defining "ruby_fold": >
|
||||
|
||||
:let ruby_fold = 1
|
||||
|
||||
This will set the 'foldmethod' option to "syntax" and allow folding of
|
||||
classes, modules, methods, code blocks, heredocs and comments.
|
||||
SCHEME *scheme.vim* *ft-scheme-syntax*
|
||||
|
||||
By default only R5RS keywords are highlighted and properly indented.
|
||||
@@ -3216,7 +3252,7 @@ A more complicated Example: >
|
||||
<
|
||||
abcfoostringbarabc
|
||||
mmmmmmmmmmm match
|
||||
ssrrrreee highlight start/region/end ("Foo", "Exa" and "Bar")
|
||||
sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar")
|
||||
|
||||
Leading context *:syn-lc* *:syn-leading* *:syn-context*
|
||||
|
||||
@@ -3864,8 +3900,8 @@ guifg={color-name} *highlight-guifg*
|
||||
guibg={color-name} *highlight-guibg*
|
||||
guisp={color-name} *highlight-guisp*
|
||||
These give the foreground (guifg), background (guibg) and special
|
||||
(guisp) color to use in the GUI. "guisp" is used for underline and
|
||||
undercurl. There are a few special names:
|
||||
(guisp) color to use in the GUI. "guisp" is used for undercurl.
|
||||
There are a few special names:
|
||||
NONE no color (transparent)
|
||||
bg use normal background color
|
||||
background use normal background color
|
||||
|
||||
186
runtime/doc/tags
186
runtime/doc/tags
@@ -614,6 +614,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'omnifunc' options.txt /*'omnifunc'*
|
||||
'op' vi_diff.txt /*'op'*
|
||||
'open' vi_diff.txt /*'open'*
|
||||
'operatorfunc' options.txt /*'operatorfunc'*
|
||||
'opfunc' options.txt /*'opfunc'*
|
||||
'optimize' vi_diff.txt /*'optimize'*
|
||||
'option' intro.txt /*'option'*
|
||||
'osfiletype' options.txt /*'osfiletype'*
|
||||
@@ -1011,6 +1013,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
( motion.txt /*(*
|
||||
) motion.txt /*)*
|
||||
+ motion.txt /*+*
|
||||
++bad editing.txt /*++bad*
|
||||
++bin editing.txt /*++bin*
|
||||
++builtin_terms various.txt /*++builtin_terms*
|
||||
++enc editing.txt /*++enc*
|
||||
@@ -1086,6 +1089,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
+multi_byte_ime various.txt /*+multi_byte_ime*
|
||||
+multi_lang various.txt /*+multi_lang*
|
||||
+mzscheme various.txt /*+mzscheme*
|
||||
+mzscheme/dyn various.txt /*+mzscheme\/dyn*
|
||||
+netbeans_intg various.txt /*+netbeans_intg*
|
||||
+ole various.txt /*+ole*
|
||||
+osfiletype various.txt /*+osfiletype*
|
||||
@@ -1260,15 +1264,19 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
/\$ pattern.txt /*\/\\$*
|
||||
/\%# pattern.txt /*\/\\%#*
|
||||
/\%$ pattern.txt /*\/\\%$*
|
||||
/\%'m pattern.txt /*\/\\%'m*
|
||||
/\%( pattern.txt /*\/\\%(*
|
||||
/\%(\) pattern.txt /*\/\\%(\\)*
|
||||
/\%<'m pattern.txt /*\/\\%<'m*
|
||||
/\%<c pattern.txt /*\/\\%<c*
|
||||
/\%<l pattern.txt /*\/\\%<l*
|
||||
/\%<v pattern.txt /*\/\\%<v*
|
||||
/\%>'m pattern.txt /*\/\\%>'m*
|
||||
/\%>c pattern.txt /*\/\\%>c*
|
||||
/\%>l pattern.txt /*\/\\%>l*
|
||||
/\%>v pattern.txt /*\/\\%>v*
|
||||
/\%U pattern.txt /*\/\\%U*
|
||||
/\%V pattern.txt /*\/\\%V*
|
||||
/\%[] pattern.txt /*\/\\%[]*
|
||||
/\%^ pattern.txt /*\/\\%^*
|
||||
/\%c pattern.txt /*\/\\%c*
|
||||
@@ -1655,6 +1663,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:@ repeat.txt /*:@*
|
||||
:@: repeat.txt /*:@:*
|
||||
:@@ repeat.txt /*:@@*
|
||||
:CompilerSet usr_41.txt /*:CompilerSet*
|
||||
:Explore pi_netrw.txt /*:Explore*
|
||||
:Hexplore pi_netrw.txt /*:Hexplore*
|
||||
:Man filetype.txt /*:Man*
|
||||
@@ -1779,6 +1788,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:cabc map.txt /*:cabc*
|
||||
:cabclear map.txt /*:cabclear*
|
||||
:cad quickfix.txt /*:cad*
|
||||
:caddexpr quickfix.txt /*:caddexpr*
|
||||
:caddf quickfix.txt /*:caddf*
|
||||
:caddfile quickfix.txt /*:caddfile*
|
||||
:cal eval.txt /*:cal*
|
||||
:call eval.txt /*:call*
|
||||
@@ -2088,15 +2099,27 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:keepjumps motion.txt /*:keepjumps*
|
||||
:keepmarks motion.txt /*:keepmarks*
|
||||
:l various.txt /*:l*
|
||||
:lN quickfix.txt /*:lN*
|
||||
:lNext quickfix.txt /*:lNext*
|
||||
:lNf quickfix.txt /*:lNf*
|
||||
:lNfile quickfix.txt /*:lNfile*
|
||||
:la editing.txt /*:la*
|
||||
:lad quickfix.txt /*:lad*
|
||||
:laddexpr quickfix.txt /*:laddexpr*
|
||||
:laddf quickfix.txt /*:laddf*
|
||||
:laddfile quickfix.txt /*:laddfile*
|
||||
:lan mlang.txt /*:lan*
|
||||
:lang mlang.txt /*:lang*
|
||||
:language mlang.txt /*:language*
|
||||
:last editing.txt /*:last*
|
||||
:lb quickfix.txt /*:lb*
|
||||
:lbuffer quickfix.txt /*:lbuffer*
|
||||
:lc editing.txt /*:lc*
|
||||
:lcd editing.txt /*:lcd*
|
||||
:lch editing.txt /*:lch*
|
||||
:lchdir editing.txt /*:lchdir*
|
||||
:lcl quickfix.txt /*:lcl*
|
||||
:lclose quickfix.txt /*:lclose*
|
||||
:le change.txt /*:le*
|
||||
:left change.txt /*:left*
|
||||
:lefta windows.txt /*:lefta*
|
||||
@@ -2112,13 +2135,32 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:let-star eval.txt /*:let-star*
|
||||
:let-unpack eval.txt /*:let-unpack*
|
||||
:let.= eval.txt /*:let.=*
|
||||
:lex quickfix.txt /*:lex*
|
||||
:lexpr quickfix.txt /*:lexpr*
|
||||
:lf quickfix.txt /*:lf*
|
||||
:lfile quickfix.txt /*:lfile*
|
||||
:lfir quickfix.txt /*:lfir*
|
||||
:lfirst quickfix.txt /*:lfirst*
|
||||
:lg quickfix.txt /*:lg*
|
||||
:lgetfile quickfix.txt /*:lgetfile*
|
||||
:list various.txt /*:list*
|
||||
:ll quickfix.txt /*:ll*
|
||||
:lla quickfix.txt /*:lla*
|
||||
:llast quickfix.txt /*:llast*
|
||||
:lli quickfix.txt /*:lli*
|
||||
:llist quickfix.txt /*:llist*
|
||||
:lm map.txt /*:lm*
|
||||
:lmap map.txt /*:lmap*
|
||||
:lmap_l map.txt /*:lmap_l*
|
||||
:lmapc map.txt /*:lmapc*
|
||||
:lmapclear map.txt /*:lmapclear*
|
||||
:ln map.txt /*:ln*
|
||||
:lne quickfix.txt /*:lne*
|
||||
:lnew quickfix.txt /*:lnew*
|
||||
:lnewer quickfix.txt /*:lnewer*
|
||||
:lnext quickfix.txt /*:lnext*
|
||||
:lnf quickfix.txt /*:lnf*
|
||||
:lnfile quickfix.txt /*:lnfile*
|
||||
:lnoremap map.txt /*:lnoremap*
|
||||
:lo starting.txt /*:lo*
|
||||
:loadk mbyte.txt /*:loadk*
|
||||
@@ -2128,9 +2170,23 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:lockmarks motion.txt /*:lockmarks*
|
||||
:lockv eval.txt /*:lockv*
|
||||
:lockvar eval.txt /*:lockvar*
|
||||
:lol quickfix.txt /*:lol*
|
||||
:lolder quickfix.txt /*:lolder*
|
||||
:lop quickfix.txt /*:lop*
|
||||
:lopen quickfix.txt /*:lopen*
|
||||
:lp quickfix.txt /*:lp*
|
||||
:lpf quickfix.txt /*:lpf*
|
||||
:lpfile quickfix.txt /*:lpfile*
|
||||
:lprevious quickfix.txt /*:lprevious*
|
||||
:lr quickfix.txt /*:lr*
|
||||
:lrewind quickfix.txt /*:lrewind*
|
||||
:ls windows.txt /*:ls*
|
||||
:lt tagsrch.txt /*:lt*
|
||||
:ltag tagsrch.txt /*:ltag*
|
||||
:lu map.txt /*:lu*
|
||||
:lunmap map.txt /*:lunmap*
|
||||
:lw quickfix.txt /*:lw*
|
||||
:lwindow quickfix.txt /*:lwindow*
|
||||
:m change.txt /*:m*
|
||||
:ma motion.txt /*:ma*
|
||||
:mak quickfix.txt /*:mak*
|
||||
@@ -2142,9 +2198,15 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:map-<script> map.txt /*:map-<script>*
|
||||
:map-<silent> map.txt /*:map-<silent>*
|
||||
:map-<unique> map.txt /*:map-<unique>*
|
||||
:map-alt-keys map.txt /*:map-alt-keys*
|
||||
:map-arguments map.txt /*:map-arguments*
|
||||
:map-commands map.txt /*:map-commands*
|
||||
:map-local map.txt /*:map-local*
|
||||
:map-modes map.txt /*:map-modes*
|
||||
:map-operator map.txt /*:map-operator*
|
||||
:map-script map.txt /*:map-script*
|
||||
:map-silent map.txt /*:map-silent*
|
||||
:map-special-chars map.txt /*:map-special-chars*
|
||||
:map-special-keys map.txt /*:map-special-keys*
|
||||
:map-undo map.txt /*:map-undo*
|
||||
:map-verbose map.txt /*:map-verbose*
|
||||
@@ -2208,6 +2270,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:nnoremenu gui.txt /*:nnoremenu*
|
||||
:no map.txt /*:no*
|
||||
:no! map.txt /*:no!*
|
||||
:noa autocmd.txt /*:noa*
|
||||
:noautocmd autocmd.txt /*:noautocmd*
|
||||
:noh pattern.txt /*:noh*
|
||||
:nohlsearch pattern.txt /*:nohlsearch*
|
||||
:norea map.txt /*:norea*
|
||||
@@ -2468,6 +2532,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:stag windows.txt /*:stag*
|
||||
:star repeat.txt /*:star*
|
||||
:start insert.txt /*:start*
|
||||
:startgreplace insert.txt /*:startgreplace*
|
||||
:startinsert insert.txt /*:startinsert*
|
||||
:startreplace insert.txt /*:startreplace*
|
||||
:stj tagsrch.txt /*:stj*
|
||||
@@ -2695,6 +2760,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
<< change.txt /*<<*
|
||||
<> intro.txt /*<>*
|
||||
<A- intro.txt /*<A-*
|
||||
<A-LeftMouse> term.txt /*<A-LeftMouse>*
|
||||
<A-RightMouse> term.txt /*<A-RightMouse>*
|
||||
<BS> motion.txt /*<BS>*
|
||||
<Bar> intro.txt /*<Bar>*
|
||||
<Bslash> intro.txt /*<Bslash>*
|
||||
@@ -3033,7 +3100,6 @@ CursorHold autocmd.txt /*CursorHold*
|
||||
CursorHold-example windows.txt /*CursorHold-example*
|
||||
CursorIM mbyte.txt /*CursorIM*
|
||||
D change.txt /*D*
|
||||
DCOP gui_x11.txt /*DCOP*
|
||||
DOS os_dos.txt /*DOS*
|
||||
DOS-format editing.txt /*DOS-format*
|
||||
DOS-format-write editing.txt /*DOS-format-write*
|
||||
@@ -3774,7 +3840,18 @@ E77 message.txt /*E77*
|
||||
E770 spell.txt /*E770*
|
||||
E771 spell.txt /*E771*
|
||||
E772 spell.txt /*E772*
|
||||
E773 recover.txt /*E773*
|
||||
E774 map.txt /*E774*
|
||||
E775 map.txt /*E775*
|
||||
E776 quickfix.txt /*E776*
|
||||
E777 quickfix.txt /*E777*
|
||||
E778 spell.txt /*E778*
|
||||
E779 spell.txt /*E779*
|
||||
E78 motion.txt /*E78*
|
||||
E780 spell.txt /*E780*
|
||||
E781 spell.txt /*E781*
|
||||
E782 spell.txt /*E782*
|
||||
E783 spell.txt /*E783*
|
||||
E79 message.txt /*E79*
|
||||
E80 message.txt /*E80*
|
||||
E800 arabic.txt /*E800*
|
||||
@@ -3974,8 +4051,12 @@ Select visual.txt /*Select*
|
||||
Select-mode visual.txt /*Select-mode*
|
||||
Select-mode-mapping visual.txt /*Select-mode-mapping*
|
||||
Session starting.txt /*Session*
|
||||
SessionLoad-variable starting.txt /*SessionLoad-variable*
|
||||
SessionLoadPost autocmd.txt /*SessionLoadPost*
|
||||
SpellFileMissing autocmd.txt /*SpellFileMissing*
|
||||
StdinReadPost autocmd.txt /*StdinReadPost*
|
||||
StdinReadPre autocmd.txt /*StdinReadPre*
|
||||
SwapExists autocmd.txt /*SwapExists*
|
||||
Syntax autocmd.txt /*Syntax*
|
||||
T motion.txt /*T*
|
||||
TCL if_tcl.txt /*TCL*
|
||||
@@ -4194,7 +4275,6 @@ alt-input debugger.txt /*alt-input*
|
||||
alternate-file editing.txt /*alternate-file*
|
||||
amiga-window starting.txt /*amiga-window*
|
||||
ant.vim syntax.txt /*ant.vim*
|
||||
antialias gui_x11.txt /*antialias*
|
||||
ap motion.txt /*ap*
|
||||
apache.vim syntax.txt /*apache.vim*
|
||||
append() eval.txt /*append()*
|
||||
@@ -4225,7 +4305,9 @@ autocmd-buffer-local autocmd.txt /*autocmd-buffer-local*
|
||||
autocmd-buflocal autocmd.txt /*autocmd-buflocal*
|
||||
autocmd-changes autocmd.txt /*autocmd-changes*
|
||||
autocmd-define autocmd.txt /*autocmd-define*
|
||||
autocmd-disable autocmd.txt /*autocmd-disable*
|
||||
autocmd-events autocmd.txt /*autocmd-events*
|
||||
autocmd-events-abc autocmd.txt /*autocmd-events-abc*
|
||||
autocmd-execute autocmd.txt /*autocmd-execute*
|
||||
autocmd-groups autocmd.txt /*autocmd-groups*
|
||||
autocmd-intro autocmd.txt /*autocmd-intro*
|
||||
@@ -4480,6 +4562,7 @@ compl-spelling insert.txt /*compl-spelling*
|
||||
compl-tag insert.txt /*compl-tag*
|
||||
compl-vim insert.txt /*compl-vim*
|
||||
compl-whole-line insert.txt /*compl-whole-line*
|
||||
complete-functions insert.txt /*complete-functions*
|
||||
complete_add() eval.txt /*complete_add()*
|
||||
complete_check() eval.txt /*complete_check()*
|
||||
complex-change change.txt /*complex-change*
|
||||
@@ -4529,6 +4612,7 @@ cpo-K options.txt /*cpo-K*
|
||||
cpo-L options.txt /*cpo-L*
|
||||
cpo-M options.txt /*cpo-M*
|
||||
cpo-O options.txt /*cpo-O*
|
||||
cpo-P options.txt /*cpo-P*
|
||||
cpo-R options.txt /*cpo-R*
|
||||
cpo-S options.txt /*cpo-S*
|
||||
cpo-W options.txt /*cpo-W*
|
||||
@@ -4661,6 +4745,7 @@ design-not develop.txt /*design-not*
|
||||
design-speed-size develop.txt /*design-speed-size*
|
||||
desktop.vim syntax.txt /*desktop.vim*
|
||||
develop-spell develop.txt /*develop-spell*
|
||||
develop-spell-suggestions develop.txt /*develop-spell-suggestions*
|
||||
develop.txt develop.txt /*develop.txt*
|
||||
development develop.txt /*development*
|
||||
dh change.txt /*dh*
|
||||
@@ -5012,6 +5097,7 @@ ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
|
||||
ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
|
||||
ft-inform-syntax syntax.txt /*ft-inform-syntax*
|
||||
ft-java-syntax syntax.txt /*ft-java-syntax*
|
||||
ft-javascript-omni insert.txt /*ft-javascript-omni*
|
||||
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
|
||||
ft-lace-syntax syntax.txt /*ft-lace-syntax*
|
||||
ft-lex-syntax syntax.txt /*ft-lex-syntax*
|
||||
@@ -5059,6 +5145,7 @@ ft-spec-plugin filetype.txt /*ft-spec-plugin*
|
||||
ft-spup-syntax syntax.txt /*ft-spup-syntax*
|
||||
ft-sql-syntax syntax.txt /*ft-sql-syntax*
|
||||
ft-sqlinformix-syntax syntax.txt /*ft-sqlinformix-syntax*
|
||||
ft-syntax-omni insert.txt /*ft-syntax-omni*
|
||||
ft-tcsh-syntax syntax.txt /*ft-tcsh-syntax*
|
||||
ft-termcap-syntax syntax.txt /*ft-termcap-syntax*
|
||||
ft-tex-syntax syntax.txt /*ft-tex-syntax*
|
||||
@@ -5101,6 +5188,8 @@ g0 motion.txt /*g0*
|
||||
g8 various.txt /*g8*
|
||||
g:netrw_alto pi_netrw.txt /*g:netrw_alto*
|
||||
g:netrw_altv pi_netrw.txt /*g:netrw_altv*
|
||||
g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split*
|
||||
g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer*
|
||||
g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
|
||||
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
|
||||
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
|
||||
@@ -5132,6 +5221,7 @@ g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by*
|
||||
g:netrw_sort_direction pi_netrw.txt /*g:netrw_sort_direction*
|
||||
g:netrw_sort_sequence pi_netrw.txt /*g:netrw_sort_sequence*
|
||||
g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject*
|
||||
g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd*
|
||||
g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt*
|
||||
g:netrw_uid pi_netrw.txt /*g:netrw_uid*
|
||||
g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
|
||||
@@ -5149,6 +5239,7 @@ g<Up> motion.txt /*g<Up>*
|
||||
g? change.txt /*g?*
|
||||
g?? change.txt /*g??*
|
||||
g?g? change.txt /*g?g?*
|
||||
g@ map.txt /*g@*
|
||||
gD pattern.txt /*gD*
|
||||
gE motion.txt /*gE*
|
||||
gH visual.txt /*gH*
|
||||
@@ -5189,6 +5280,7 @@ getfsize() eval.txt /*getfsize()*
|
||||
getftime() eval.txt /*getftime()*
|
||||
getftype() eval.txt /*getftype()*
|
||||
getline() eval.txt /*getline()*
|
||||
getloclist() eval.txt /*getloclist()*
|
||||
getqflist() eval.txt /*getqflist()*
|
||||
getreg() eval.txt /*getreg()*
|
||||
getregtype() eval.txt /*getregtype()*
|
||||
@@ -5294,6 +5386,7 @@ gvimrc gui.txt /*gvimrc*
|
||||
gw change.txt /*gw*
|
||||
gwgw change.txt /*gwgw*
|
||||
gww change.txt /*gww*
|
||||
gx pi_netrw.txt /*gx*
|
||||
gzip pi_gzip.txt /*gzip*
|
||||
gzip-autocmd pi_gzip.txt /*gzip-autocmd*
|
||||
gzip-example autocmd.txt /*gzip-example*
|
||||
@@ -5313,7 +5406,6 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help various.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-tags tags 1
|
||||
help-translated various.txt /*help-translated*
|
||||
help-xterm-window various.txt /*help-xterm-window*
|
||||
help.txt help.txt /*help.txt*
|
||||
@@ -5620,7 +5712,6 @@ jumpto-diffs diff.txt /*jumpto-diffs*
|
||||
k motion.txt /*k*
|
||||
kcc uganda.txt /*kcc*
|
||||
kde gui_x11.txt /*kde*
|
||||
kde-toolbar gui_x11.txt /*kde-toolbar*
|
||||
key-codes intro.txt /*key-codes*
|
||||
key-codes-changed version4.txt /*key-codes-changed*
|
||||
key-mapping map.txt /*key-mapping*
|
||||
@@ -5690,6 +5781,8 @@ local-variables eval.txt /*local-variables*
|
||||
locale mbyte.txt /*locale*
|
||||
locale-name mbyte.txt /*locale-name*
|
||||
localtime() eval.txt /*localtime()*
|
||||
location-list quickfix.txt /*location-list*
|
||||
location-list-window quickfix.txt /*location-list-window*
|
||||
long-lines version5.txt /*long-lines*
|
||||
lowercase change.txt /*lowercase*
|
||||
lpc.vim syntax.txt /*lpc.vim*
|
||||
@@ -5837,6 +5930,7 @@ mysyntaxfile-replace syntax.txt /*mysyntaxfile-replace*
|
||||
mzscheme if_mzsch.txt /*mzscheme*
|
||||
mzscheme-buffer if_mzsch.txt /*mzscheme-buffer*
|
||||
mzscheme-commands if_mzsch.txt /*mzscheme-commands*
|
||||
mzscheme-dynamic if_mzsch.txt /*mzscheme-dynamic*
|
||||
mzscheme-examples if_mzsch.txt /*mzscheme-examples*
|
||||
mzscheme-sandbox if_mzsch.txt /*mzscheme-sandbox*
|
||||
mzscheme-threads if_mzsch.txt /*mzscheme-threads*
|
||||
@@ -5875,6 +5969,7 @@ netrw-D pi_netrw.txt /*netrw-D*
|
||||
netrw-NB pi_netrw.txt /*netrw-NB*
|
||||
netrw-Nb pi_netrw.txt /*netrw-Nb*
|
||||
netrw-O pi_netrw.txt /*netrw-O*
|
||||
netrw-P pi_netrw.txt /*netrw-P*
|
||||
netrw-R pi_netrw.txt /*netrw-R*
|
||||
netrw-S pi_netrw.txt /*netrw-S*
|
||||
netrw-U pi_netrw.txt /*netrw-U*
|
||||
@@ -5893,10 +5988,12 @@ netrw-chgup pi_netrw.txt /*netrw-chgup*
|
||||
netrw-contents pi_netrw.txt /*netrw-contents*
|
||||
netrw-cr pi_netrw.txt /*netrw-cr*
|
||||
netrw-credits pi_netrw.txt /*netrw-credits*
|
||||
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
|
||||
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
|
||||
netrw-curdir pi_netrw.txt /*netrw-curdir*
|
||||
netrw-d pi_netrw.txt /*netrw-d*
|
||||
netrw-debug pi_netrw.txt /*netrw-debug*
|
||||
netrw-del pi_netrw.txt /*netrw-del*
|
||||
netrw-delete pi_netrw.txt /*netrw-delete*
|
||||
netrw-dir pi_netrw.txt /*netrw-dir*
|
||||
netrw-dirlist pi_netrw.txt /*netrw-dirlist*
|
||||
@@ -5909,7 +6006,6 @@ netrw-externapp pi_netrw.txt /*netrw-externapp*
|
||||
netrw-file pi_netrw.txt /*netrw-file*
|
||||
netrw-fixup pi_netrw.txt /*netrw-fixup*
|
||||
netrw-ftp pi_netrw.txt /*netrw-ftp*
|
||||
netrw-h pi_netrw.txt /*netrw-h*
|
||||
netrw-handler pi_netrw.txt /*netrw-handler*
|
||||
netrw-help pi_netrw.txt /*netrw-help*
|
||||
netrw-hexplore pi_netrw.txt /*netrw-hexplore*
|
||||
@@ -5940,6 +6036,7 @@ netrw-pexplore pi_netrw.txt /*netrw-pexplore*
|
||||
netrw-preview pi_netrw.txt /*netrw-preview*
|
||||
netrw-problems pi_netrw.txt /*netrw-problems*
|
||||
netrw-protocol pi_netrw.txt /*netrw-protocol*
|
||||
netrw-prvwin pi_netrw.txt /*netrw-prvwin*
|
||||
netrw-q pi_netrw.txt /*netrw-q*
|
||||
netrw-r pi_netrw.txt /*netrw-r*
|
||||
netrw-read pi_netrw.txt /*netrw-read*
|
||||
@@ -5952,6 +6049,7 @@ netrw-sexplore pi_netrw.txt /*netrw-sexplore*
|
||||
netrw-sort pi_netrw.txt /*netrw-sort*
|
||||
netrw-sortsequence pi_netrw.txt /*netrw-sortsequence*
|
||||
netrw-starstar pi_netrw.txt /*netrw-starstar*
|
||||
netrw-start pi_netrw.txt /*netrw-start*
|
||||
netrw-transparent pi_netrw.txt /*netrw-transparent*
|
||||
netrw-u pi_netrw.txt /*netrw-u*
|
||||
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
|
||||
@@ -5965,13 +6063,13 @@ netrw-write pi_netrw.txt /*netrw-write*
|
||||
netrw-x pi_netrw.txt /*netrw-x*
|
||||
netrw-xfer pi_netrw.txt /*netrw-xfer*
|
||||
netrw.vim pi_netrw.txt /*netrw.vim*
|
||||
netrw_filehandler pi_netrw.txt /*netrw_filehandler*
|
||||
netterm-mouse options.txt /*netterm-mouse*
|
||||
network pi_netrw.txt /*network*
|
||||
new-5 version5.txt /*new-5*
|
||||
new-6 version6.txt /*new-6*
|
||||
new-7 version7.txt /*new-7*
|
||||
new-GTK-GUI version5.txt /*new-GTK-GUI*
|
||||
new-KDE version7.txt /*new-KDE*
|
||||
new-MzScheme version7.txt /*new-MzScheme*
|
||||
new-Select-mode version5.txt /*new-Select-mode*
|
||||
new-View version6.txt /*new-View*
|
||||
@@ -5984,6 +6082,7 @@ new-commands-5.4 version5.txt /*new-commands-5.4*
|
||||
new-debug-itf version6.txt /*new-debug-itf*
|
||||
new-debug-mode version6.txt /*new-debug-mode*
|
||||
new-debug-support version7.txt /*new-debug-support*
|
||||
new-define-operator version7.txt /*new-define-operator*
|
||||
new-diff-mode version6.txt /*new-diff-mode*
|
||||
new-encryption version5.txt /*new-encryption*
|
||||
new-evim version6.txt /*new-evim*
|
||||
@@ -6002,6 +6101,7 @@ new-indent-flex version6.txt /*new-indent-flex*
|
||||
new-items-6 version6.txt /*new-items-6*
|
||||
new-items-7 version7.txt /*new-items-7*
|
||||
new-line-continuation version5.txt /*new-line-continuation*
|
||||
new-location-list version7.txt /*new-location-list*
|
||||
new-manpage-trans version7.txt /*new-manpage-trans*
|
||||
new-multi-byte version5.txt /*new-multi-byte*
|
||||
new-multi-lang version6.txt /*new-multi-lang*
|
||||
@@ -6151,6 +6251,7 @@ pmbfn-option print.txt /*pmbfn-option*
|
||||
popt-option print.txt /*popt-option*
|
||||
popup-menu gui.txt /*popup-menu*
|
||||
popup-menu-added version5.txt /*popup-menu-added*
|
||||
popupmenu-completion insert.txt /*popupmenu-completion*
|
||||
ports-5.2 version5.txt /*ports-5.2*
|
||||
ports-6 version6.txt /*ports-6*
|
||||
posix vi_diff.txt /*posix*
|
||||
@@ -6368,6 +6469,7 @@ s:netrw_line pi_netrw.txt /*s:netrw_line*
|
||||
s:var eval.txt /*s:var*
|
||||
s<CR> change.txt /*s<CR>*
|
||||
sandbox eval.txt /*sandbox*
|
||||
sandbox-option eval.txt /*sandbox-option*
|
||||
save-file editing.txt /*save-file*
|
||||
save-settings starting.txt /*save-settings*
|
||||
scheme.vim syntax.txt /*scheme.vim*
|
||||
@@ -6416,6 +6518,7 @@ set-spc-auto spell.txt /*set-spc-auto*
|
||||
setbufvar() eval.txt /*setbufvar()*
|
||||
setcmdpos() eval.txt /*setcmdpos()*
|
||||
setline() eval.txt /*setline()*
|
||||
setloclist() eval.txt /*setloclist()*
|
||||
setqflist() eval.txt /*setqflist()*
|
||||
setreg() eval.txt /*setreg()*
|
||||
setting-guifont gui.txt /*setting-guifont*
|
||||
@@ -6459,35 +6562,74 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
|
||||
special-buffers windows.txt /*special-buffers*
|
||||
speed-up tips.txt /*speed-up*
|
||||
spell spell.txt /*spell*
|
||||
spell-ACCENT spell.txt /*spell-ACCENT*
|
||||
spell-BAD spell.txt /*spell-BAD*
|
||||
spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE*
|
||||
spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
|
||||
spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
|
||||
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
|
||||
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
|
||||
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
|
||||
spell-CMP spell.txt /*spell-CMP*
|
||||
spell-COMMON spell.txt /*spell-COMMON*
|
||||
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
|
||||
spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN*
|
||||
spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND*
|
||||
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
|
||||
spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
|
||||
spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
|
||||
spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX*
|
||||
spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
|
||||
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
|
||||
spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
|
||||
spell-COMPOUNDROOT spell.txt /*spell-COMPOUNDROOT*
|
||||
spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE*
|
||||
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
|
||||
spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX*
|
||||
spell-FLAG spell.txt /*spell-FLAG*
|
||||
spell-FOL spell.txt /*spell-FOL*
|
||||
spell-KEP spell.txt /*spell-KEP*
|
||||
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
|
||||
spell-HOME spell.txt /*spell-HOME*
|
||||
spell-KEEPCASE spell.txt /*spell-KEEPCASE*
|
||||
spell-LANG spell.txt /*spell-LANG*
|
||||
spell-LEMMA_PRESENT spell.txt /*spell-LEMMA_PRESENT*
|
||||
spell-LOW spell.txt /*spell-LOW*
|
||||
spell-MAP spell.txt /*spell-MAP*
|
||||
spell-MAXNGRAMSUGS spell.txt /*spell-MAXNGRAMSUGS*
|
||||
spell-NAME spell.txt /*spell-NAME*
|
||||
spell-NEEDAFFIX spell.txt /*spell-NEEDAFFIX*
|
||||
spell-NEEDCOMPOUND spell.txt /*spell-NEEDCOMPOUND*
|
||||
spell-NOBREAK spell.txt /*spell-NOBREAK*
|
||||
spell-NOSPLITSUGS spell.txt /*spell-NOSPLITSUGS*
|
||||
spell-NOSUGFILE spell.txt /*spell-NOSUGFILE*
|
||||
spell-NOSUGGEST spell.txt /*spell-NOSUGGEST*
|
||||
spell-ONLYINCOMPOUND spell.txt /*spell-ONLYINCOMPOUND*
|
||||
spell-PFX spell.txt /*spell-PFX*
|
||||
spell-PFXPOSTPONE spell.txt /*spell-PFXPOSTPONE*
|
||||
spell-RAR spell.txt /*spell-RAR*
|
||||
spell-PSEUDOROOT spell.txt /*spell-PSEUDOROOT*
|
||||
spell-RARE spell.txt /*spell-RARE*
|
||||
spell-REP spell.txt /*spell-REP*
|
||||
spell-SAL spell.txt /*spell-SAL*
|
||||
spell-SET spell.txt /*spell-SET*
|
||||
spell-SFX spell.txt /*spell-SFX*
|
||||
spell-SLASH spell.txt /*spell-SLASH*
|
||||
spell-SOFOFROM spell.txt /*spell-SOFOFROM*
|
||||
spell-SOFOTO spell.txt /*spell-SOFOTO*
|
||||
spell-SUGSWITHDOTS spell.txt /*spell-SUGSWITHDOTS*
|
||||
spell-SYLLABLE spell.txt /*spell-SYLLABLE*
|
||||
spell-SYLLABLENUM spell.txt /*spell-SYLLABLENUM*
|
||||
spell-SpellFileMissing spell.txt /*spell-SpellFileMissing*
|
||||
spell-TRY spell.txt /*spell-TRY*
|
||||
spell-UPP spell.txt /*spell-UPP*
|
||||
spell-VERSION spell.txt /*spell-VERSION*
|
||||
spell-WORDCHARS spell.txt /*spell-WORDCHARS*
|
||||
spell-aff-format spell.txt /*spell-aff-format*
|
||||
spell-affix-chars spell.txt /*spell-affix-chars*
|
||||
spell-affix-comment spell.txt /*spell-affix-comment*
|
||||
spell-affix-flags spell.txt /*spell-affix-flags*
|
||||
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
|
||||
spell-affix-nocomp spell.txt /*spell-affix-nocomp*
|
||||
spell-affix-not-supported spell.txt /*spell-affix-not-supported*
|
||||
spell-affix-rare spell.txt /*spell-affix-rare*
|
||||
spell-affix-vim spell.txt /*spell-affix-vim*
|
||||
spell-compound spell.txt /*spell-compound*
|
||||
@@ -6501,11 +6643,13 @@ spell-mkspell spell.txt /*spell-mkspell*
|
||||
spell-quickstart spell.txt /*spell-quickstart*
|
||||
spell-remarks spell.txt /*spell-remarks*
|
||||
spell-russian spell.txt /*spell-russian*
|
||||
spell-sug-file spell.txt /*spell-sug-file*
|
||||
spell-syntax spell.txt /*spell-syntax*
|
||||
spell-wordlist-format spell.txt /*spell-wordlist-format*
|
||||
spell-yiddish spell.txt /*spell-yiddish*
|
||||
spell.txt spell.txt /*spell.txt*
|
||||
spellbadword() eval.txt /*spellbadword()*
|
||||
spellfile.vim spell.txt /*spellfile.vim*
|
||||
spellsuggest() eval.txt /*spellsuggest()*
|
||||
split() eval.txt /*split()*
|
||||
splitfind windows.txt /*splitfind*
|
||||
@@ -6566,7 +6710,10 @@ substitute-CR version6.txt /*substitute-CR*
|
||||
suffixes cmdline.txt /*suffixes*
|
||||
suspend starting.txt /*suspend*
|
||||
swap-file recover.txt /*swap-file*
|
||||
swapchoice-variable eval.txt /*swapchoice-variable*
|
||||
swapcommand-variable eval.txt /*swapcommand-variable*
|
||||
swapfile-changed version4.txt /*swapfile-changed*
|
||||
swapname-variable eval.txt /*swapname-variable*
|
||||
syn-sync-grouphere syntax.txt /*syn-sync-grouphere*
|
||||
syn-sync-groupthere syntax.txt /*syn-sync-groupthere*
|
||||
syn-sync-linecont syntax.txt /*syn-sync-linecont*
|
||||
@@ -6756,6 +6903,7 @@ tag-highlight syntax.txt /*tag-highlight*
|
||||
tag-matchlist tagsrch.txt /*tag-matchlist*
|
||||
tag-old-static tagsrch.txt /*tag-old-static*
|
||||
tag-overloaded version5.txt /*tag-overloaded*
|
||||
tag-preview tagsrch.txt /*tag-preview*
|
||||
tag-priority tagsrch.txt /*tag-priority*
|
||||
tag-regexp tagsrch.txt /*tag-regexp*
|
||||
tag-search tagsrch.txt /*tag-search*
|
||||
@@ -6771,6 +6919,13 @@ tags-file-format tagsrch.txt /*tags-file-format*
|
||||
tags-option tagsrch.txt /*tags-option*
|
||||
tagsrch.txt tagsrch.txt /*tagsrch.txt*
|
||||
tagstack tagsrch.txt /*tagstack*
|
||||
tar pi_tar.txt /*tar*
|
||||
tar-contents pi_tar.txt /*tar-contents*
|
||||
tar-copyright pi_tar.txt /*tar-copyright*
|
||||
tar-history pi_tar.txt /*tar-history*
|
||||
tar-manual pi_tar.txt /*tar-manual*
|
||||
tar-usage pi_tar.txt /*tar-usage*
|
||||
tar.txt pi_tar.txt /*tar.txt*
|
||||
tcl if_tcl.txt /*tcl*
|
||||
tcl-beep if_tcl.txt /*tcl-beep*
|
||||
tcl-buffer if_tcl.txt /*tcl-buffer*
|
||||
@@ -6844,6 +6999,7 @@ tex-style syntax.txt /*tex-style*
|
||||
tex.vim syntax.txt /*tex.vim*
|
||||
text-objects motion.txt /*text-objects*
|
||||
text-objects-changed version5.txt /*text-objects-changed*
|
||||
textlock eval.txt /*textlock*
|
||||
tf.vim syntax.txt /*tf.vim*
|
||||
this_session-variable eval.txt /*this_session-variable*
|
||||
throw-catch eval.txt /*throw-catch*
|
||||
@@ -6981,6 +7137,9 @@ v:scrollstart eval.txt /*v:scrollstart*
|
||||
v:servername eval.txt /*v:servername*
|
||||
v:shell_error eval.txt /*v:shell_error*
|
||||
v:statusmsg eval.txt /*v:statusmsg*
|
||||
v:swapchoice eval.txt /*v:swapchoice*
|
||||
v:swapcommand eval.txt /*v:swapcommand*
|
||||
v:swapname eval.txt /*v:swapname*
|
||||
v:termresponse eval.txt /*v:termresponse*
|
||||
v:this_session eval.txt /*v:this_session*
|
||||
v:throwpoint eval.txt /*v:throwpoint*
|
||||
@@ -7129,7 +7288,6 @@ vim-announce intro.txt /*vim-announce*
|
||||
vim-arguments starting.txt /*vim-arguments*
|
||||
vim-default-editor gui_w32.txt /*vim-default-editor*
|
||||
vim-dev intro.txt /*vim-dev*
|
||||
vim-kpart gui_x11.txt /*vim-kpart*
|
||||
vim-mac intro.txt /*vim-mac*
|
||||
vim-modes intro.txt /*vim-modes*
|
||||
vim-modes-intro intro.txt /*vim-modes-intro*
|
||||
@@ -7149,7 +7307,6 @@ viminfo-file-marks starting.txt /*viminfo-file-marks*
|
||||
viminfo-file-name starting.txt /*viminfo-file-name*
|
||||
viminfo-read starting.txt /*viminfo-read*
|
||||
viminfo-write starting.txt /*viminfo-write*
|
||||
vimpart gui_x11.txt /*vimpart*
|
||||
vimrc starting.txt /*vimrc*
|
||||
vimrc-filetype usr_05.txt /*vimrc-filetype*
|
||||
vimrc-intro usr_05.txt /*vimrc-intro*
|
||||
@@ -7320,7 +7477,7 @@ z/OS os_390.txt /*z\/OS*
|
||||
z<CR> scroll.txt /*z<CR>*
|
||||
z<Left> scroll.txt /*z<Left>*
|
||||
z<Right> scroll.txt /*z<Right>*
|
||||
z? spell.txt /*z?*
|
||||
z= spell.txt /*z=*
|
||||
zA fold.txt /*zA*
|
||||
zC fold.txt /*zC*
|
||||
zD fold.txt /*zD*
|
||||
@@ -7356,6 +7513,13 @@ zf fold.txt /*zf*
|
||||
zg spell.txt /*zg*
|
||||
zh scroll.txt /*zh*
|
||||
zi fold.txt /*zi*
|
||||
zip pi_zip.txt /*zip*
|
||||
zip-contents pi_zip.txt /*zip-contents*
|
||||
zip-copyright pi_zip.txt /*zip-copyright*
|
||||
zip-history pi_zip.txt /*zip-history*
|
||||
zip-manual pi_zip.txt /*zip-manual*
|
||||
zip-usage pi_zip.txt /*zip-usage*
|
||||
zip.txt pi_zip.txt /*zip.txt*
|
||||
zj fold.txt /*zj*
|
||||
zk fold.txt /*zk*
|
||||
zl scroll.txt /*zl*
|
||||
|
||||
@@ -257,6 +257,17 @@ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag".
|
||||
:tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. {not
|
||||
in Vi}
|
||||
|
||||
*:lt* *:ltag*
|
||||
:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new
|
||||
location list for the current window. [ident] can be
|
||||
a regexp pattern, see |tag-regexp|. When [ident] is
|
||||
not given, the last tag name from the tag stack is
|
||||
used. The search pattern to locate the tag line is
|
||||
prefixed with "\V" to escape all the special
|
||||
characters (very nomagic). The location list showing
|
||||
the matching tags is independent of the tag stack.
|
||||
See |tag-!| for [!].
|
||||
{not in Vi}
|
||||
|
||||
When there is no other message, Vim shows which matching tag has been jumped
|
||||
to, and the number of matching tags: >
|
||||
@@ -275,6 +286,7 @@ skipped and the next matching tag is used. Vim reports this, to notify you of
|
||||
missing files. When the end of the list of matches has been reached, an error
|
||||
message is given.
|
||||
|
||||
*tag-preview*
|
||||
The tag match list can also be used in the preview window. The commands are
|
||||
the same as above, with a "p" prepended.
|
||||
{not available when compiled without the |+quickfix| feature}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
|
||||
*term.txt* For Vim version 7.0aa. Last change: 2005 Dec 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -684,6 +684,7 @@ event position selection change action ~
|
||||
<MiddleMouse> yes if not active no put
|
||||
<MiddleMouse> yes if active no yank and put
|
||||
<RightMouse> yes start or extend yes
|
||||
<A-RightMouse> yes start or extend blockw. yes *<A-RightMouse>*
|
||||
<S-RightMouse> yes no change yes "#" (2) *<S-RightMouse>*
|
||||
<C-RightMouse> no no change no "CTRL-T"
|
||||
<RightDrag> yes extend no *<RightDrag>*
|
||||
@@ -699,6 +700,7 @@ event position selection change action ~
|
||||
<LeftRelease> yes start or extend (1) no like CTRL-O (1)
|
||||
<MiddleMouse> no (cannot be active) no put register
|
||||
<RightMouse> yes start or extend yes like CTRL-O
|
||||
<A-RightMouse> yes start or extend blockw. yes
|
||||
<S-RightMouse> yes (cannot be active) yes "CTRL-O#" (2)
|
||||
<C-RightMouse> no (cannot be active) no "CTRL-O CTRL-T"
|
||||
|
||||
@@ -713,12 +715,14 @@ Normal Mode:
|
||||
event position selection change action ~
|
||||
cursor window ~
|
||||
<S-LeftMouse> yes start or extend (1) no
|
||||
<A-LeftMouse> yes start or extend blockw. no *<A-LeftMouse>*
|
||||
<RightMouse> no popup menu no
|
||||
|
||||
Insert or Replace Mode:
|
||||
event position selection change action ~
|
||||
cursor window ~
|
||||
<S-LeftMouse> yes start or extend (1) no like CTRL-O (1)
|
||||
<A-LeftMouse> yes start or extend blockw. no
|
||||
<RightMouse> no popup menu no
|
||||
|
||||
(1) only if mouse pointer moved since press
|
||||
@@ -744,6 +748,12 @@ Visual area to be extended. When 'mousemodel' is "popup", the left button has
|
||||
to be used while keeping the shift key pressed. When clicking in a window
|
||||
which is editing another buffer, the Visual or Select mode is stopped.
|
||||
|
||||
In Normal, Visual and Select mode clicking the right mouse button with the alt
|
||||
key pressed causes the Visual area to become blockwise. When 'mousemodel is
|
||||
"popup" the left button has to be used with the alt key. Note that this won't
|
||||
work on systems where the window manager uses the mouse when the alt key is
|
||||
pressed (it may move the window).
|
||||
|
||||
*double-click*
|
||||
Double, triple and quadruple clicks are supported when the GUI is active,
|
||||
for MS-DOS and Win32, and for an xterm (if the gettimeofday() function is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Nov 28
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,79 +30,81 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Using chown() is unsafe. (Jinpeng Wei)
|
||||
ex_cmds.c: viminfo tempfile: use mch_open(O_EXCL) and fdopen()
|
||||
fileio.c: use fchown() instead of chown()
|
||||
vim.h: define O_NOFOLLOW if needed. Not in Vim 6.4?
|
||||
Variant of ":helpgrep" that uses a location list? How about:
|
||||
:lhelpgrep (use local list in help window, not current window)
|
||||
:lgrep
|
||||
:lvimgrep
|
||||
:lmake
|
||||
|
||||
Go over all changes between 6.3 and 6.4 and make sure they are included in 7.
|
||||
|
||||
Using ":read" in an empty buffer in Ex mode, then undo leaves a line behind.
|
||||
(Servatius Brandt).
|
||||
|
||||
'statusline' is drawn over the Omni menu.
|
||||
|
||||
Cygwin and Mac OS/X may preserve case for file names but ignore case
|
||||
differences. Use Amiga code?
|
||||
|
||||
"make unixall": remove split in floppy-size archives.
|
||||
|
||||
Using pipes for filter commands: provide some way to type a password, keep
|
||||
stderr in/out open for this?
|
||||
|
||||
To support mapping <F4> to be used as <F4>{motion}: Add operator that
|
||||
executes a user defined function. '[ and '] marks are at start and end of
|
||||
text. ":map <F4> :set opfunc=MyOp<CR>gy".
|
||||
|
||||
Patch from Yasuhiro Matsumoto: ":e ++enc=xxx" keeps encoding for conversion
|
||||
errors and illegal bytes. Make default to replace bad bytes/characters with
|
||||
'?' and allow for two alternatives:
|
||||
:e ++enc=xxx ++bad=keep foo.txt
|
||||
:e ++enc=xxx ++bad=drop foo.txt
|
||||
:e ++enc=xxx ++bad=? foo.txt
|
||||
|
||||
Win32: preserve the hidden attribute of the viminfo file.
|
||||
|
||||
Add ":startgreplace" to do "gR", like ":startreplace" does "R".
|
||||
|
||||
When 'delcombine' is set in Select mode before a character with a combining
|
||||
char the combinging char is deleted when it shouldn't. (Tony Mechelynck, Nov
|
||||
27)
|
||||
|
||||
ccomplete:
|
||||
ccomplete / omnicomplete:
|
||||
- Also add . or -> when completing struct members. use s:Tag2item()
|
||||
- When an option is set: In completion mode and the user types (identifier)
|
||||
characters, advance to the first match instead of removing the popup menu.
|
||||
If there is no match remove the selection. (Yegappan Lakshmanan)
|
||||
Keep the current list of all matches. Use the text typed (or completed) so
|
||||
far to make a second list with only matching entries.
|
||||
- Complete the longest common match instead of the first match?
|
||||
- !_TAG_FILE_FORMAT and it's ilk are listed in the global completions
|
||||
- When completing something that is a structure, add the "." or "->".
|
||||
Do this when "longest" is in 'completeopt'.
|
||||
Pressing CTRL-N or CTRL-P will get the whole match, as before.
|
||||
Need to postpone inserting anything until all matches have been found.
|
||||
Then add a completion item with the longest common string (after what was
|
||||
typed), if there is one.
|
||||
- When completing something that is a structure, add the "." or "->" right
|
||||
away. How to figure out if it's a pointer or not?
|
||||
- When a typedef or struct is local to a file only use it in that file?
|
||||
- Window resize when poup is displayed
|
||||
- page-up / page-down
|
||||
- Extra info for each entry to show in a tooltip kind of thing.
|
||||
Should use a dictionary for each entry. Fields could be:
|
||||
word the completed word
|
||||
menu menu text (use word when missing)
|
||||
info extra info, to be displayed in balloon (e.g., function args)
|
||||
kind single letter indicating the type of word:
|
||||
v = variable, f = function/method, c = composite (object,
|
||||
struct pointer).
|
||||
- Special mappings for when the popup menu is visible? Would allow for making
|
||||
a specific selection (e.g, methods vs variables).
|
||||
|
||||
spelling:
|
||||
- "z?" was to be used for searching in folded text. Use something else for
|
||||
suggestions. "zu"?
|
||||
- When a recognized word ends in a . don't have 'spellcapcheck" match it.
|
||||
- Use KEEPCASE instead of "KEP". It applies to the word including affixes
|
||||
Hunspell also uses it.
|
||||
- Hunspell has NOSUGGEST flag (use for obscene words?)
|
||||
- Check out Hunspell 1.1.2.
|
||||
- Also use the spelling dictionary for dictionary completion.
|
||||
When 'dictionary' is empty and/or when "kspell" is in 'complete'.
|
||||
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
|
||||
After deleting a word with "zw" and some timestamp difference perhaps?
|
||||
Store it as spell/cleanadd.vim.
|
||||
- suggestion for "KG" to "kg" when it's keepcase.
|
||||
- Using KEEPCASE flag still allows all-upper word, docs say it doesn't.
|
||||
Don't allow it, because there is no other way to do this.
|
||||
- Implement NOSUGGEST flag (used for obscene words).
|
||||
- Implement NOSPLITSUGS.
|
||||
- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE?
|
||||
Hunspell now uses COMPOUND with a count.
|
||||
- Check out Hunspell 1.1.3.
|
||||
what does MAXNGRAMSUGS do?
|
||||
See announcement (Nemeth, 5 jan)
|
||||
is COMPLEXPREFIXES necessary now that we have flags for affixes?
|
||||
- Look into hungarian dictionary:
|
||||
http://magyarispell.sourceforge.net/rc3-beta2.zip
|
||||
- Support breakpoint character <20> 0xb7 and ignore it?
|
||||
- Dutch word list should be available here: http://www.woordenlijst.org/
|
||||
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
|
||||
- Support flags on a suffix. Used for second level affixes, rare and
|
||||
nocomp. The flags may also be used for compounding. Default is an OR
|
||||
mechanism with the flags of the word. Adding "compset" on the affixes
|
||||
means the compound flags of the word are not used.
|
||||
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
|
||||
support both).
|
||||
- When compounding Hunspell doesn't allow affixes inside the compound word,
|
||||
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
|
||||
Check Myspell and Aspell if they also work this way.
|
||||
Thus a word + suffix needs a flag that it can't be used with a following
|
||||
compound, and word + prefix can't be after another word in a compound.
|
||||
- Implement COMPOUNDFORBIDFLAG.
|
||||
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to use
|
||||
same wordlist for hyphenation.
|
||||
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
|
||||
obtain). But new Myspell wordlist will come (Hagen)
|
||||
- Finding suggestions with sound folding is slow. Somehow store the
|
||||
sound-folded words and link to the words it comes from?
|
||||
|
||||
When editing a file "a" that is a symbolic link to "b", while another Vim is
|
||||
editing "b", there is no warning. Follow symlink to make swap file name?
|
||||
Patch from Stefano Zacchiroli.
|
||||
|
||||
In diff mode deleting lines is very slow. E.g., when diffing two .po files
|
||||
and then sourcing po/cleaup.vim.
|
||||
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
|
||||
- Add a command like "zg" that selects one of the files 'spellfile'.
|
||||
- Add a "zug" command that undoes "zg"? Deletes the good word instead of
|
||||
adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio
|
||||
Colombo)
|
||||
|
||||
7 Add plugins for formatting. Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
@@ -120,18 +122,22 @@ Mac unicode patch (Da Woon Jung):
|
||||
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
|
||||
(Alan Schmitt)
|
||||
|
||||
Mac: drop support for OS 9. Most people are now using OS/X and Vim 6.4 can be
|
||||
used for others. Will make maintaining the code simpler.
|
||||
Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1)
|
||||
Also add search???() function that returns list with lnum and col.
|
||||
|
||||
Patch to add a few flags to search(). (Benji Fisher, Nov 22)
|
||||
|
||||
Win32: Use the free downloadable compiler 7.1. Figure out how to do debugging
|
||||
(with Agide?) and describe it. (George Reilly)
|
||||
Win32: Use the free downloadable compiler 7.1 (2003). Figure out how to do
|
||||
debugging (with Agide?) and describe it. (George Reilly)
|
||||
Try out using the free MS compiler and debugger, using Make_mvc.mak.
|
||||
Try using Visual C++ Express 2005. (Ilya Bobir Dec 20)
|
||||
Disadvantage: Annoying warning messages, requires ..._NO_DEPRECATE, this
|
||||
is not a standard compiler.
|
||||
|
||||
Win32: Check that installer puts menu items in "all users" dir when possible,
|
||||
not administrator dir.
|
||||
|
||||
CTRL-X CTRL-L only completes from loaded buffers. Make it work for unloaded
|
||||
buffers too?
|
||||
|
||||
Autoload:
|
||||
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
|
||||
script names and a help file and produces a script that can be sourced to
|
||||
@@ -146,6 +152,14 @@ Autoload:
|
||||
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
|
||||
mappings for normal keys can be removed from Select mode.
|
||||
|
||||
When expanding on the command line, recognize shell commands, such as ":!cmd".
|
||||
Complete command names by searching in $PATH. When completing file names
|
||||
escape special characters ";&<>(){}". (Adri Verhoef)
|
||||
|
||||
Are there more commands where v:swapcommand can be set to something useful?
|
||||
|
||||
Put autocommand event names in a hashtable for faster lookup?
|
||||
|
||||
Awaiting response:
|
||||
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
||||
the screen.
|
||||
@@ -232,6 +246,8 @@ PLANNED FOR VERSION 7.0:
|
||||
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
|
||||
- Pre-expand abbreviations, show which abbrevs would match?
|
||||
- Provide a function to popup the menu, so that an insert mode mapping can
|
||||
start it (with a specific selection).
|
||||
|
||||
- UNDO TREE: keep all states of the text, don't delete undo info.
|
||||
When making a change, instead of clearing any future undo (thus redo)
|
||||
@@ -246,6 +262,8 @@ PLANNED FOR VERSION 7.0:
|
||||
Only difficult thing: When going back in time, how to find the previous
|
||||
text state in the tree?
|
||||
Show the list of changes in a window to be able to select a version?
|
||||
Also: See ":e" as a change operation, find the changes and add them to the
|
||||
undo info. Needed for when an external tool changes the file.
|
||||
- PERSISTENT UNDO: store undo in a file.
|
||||
Use timestamps, so that a version a certain time ago can be found and info
|
||||
before some time/date can be flushed. 'undopersist' gives maximum time to
|
||||
@@ -289,7 +307,7 @@ PLANNED FOR VERSION 7.0:
|
||||
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
|
||||
198 standard http://www.jcp.org/en/jsr/detail?id=198.
|
||||
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
|
||||
Plugin that uses a terminal emulator: http://ls10-www.cs.uni-dortmund.de/~menge/private/vimplugin.html
|
||||
Plugin that uses a terminal emulator: http://vimplugin.sf.net
|
||||
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
|
||||
Especially when using the scrollbar. Typing a cursor-movement command
|
||||
scrolls back to where the cursor is.
|
||||
@@ -299,6 +317,7 @@ PLANNED FOR VERSION 7.0:
|
||||
8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
|
||||
Add the 'maxcombining' option to set the nr. of composing characters.
|
||||
At the same time support more colors (use two bytes when necessary).
|
||||
8 "ga" should show all composing characters, also if there are more than 2.
|
||||
8 Searching for a composing character by itself should work. Perhaps "."
|
||||
with a composing char should work too.
|
||||
- Add a few more things to 'diffopt': "horizontal", "vertical",
|
||||
@@ -313,7 +332,7 @@ PLANNED FOR VERSION 7.0:
|
||||
- Running a shell command from the GUI still has limitations. Look into how
|
||||
the Vim shell project can help: http://vimshell.wana.at
|
||||
- Displaying size of Visual area: use 24-33 column display.
|
||||
When selecting multiple lines, up to about a screenfull, also count the
|
||||
When selecting multiple lines, up to about a screenful, also count the
|
||||
characters.
|
||||
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
|
||||
Other patch from Da Woon Jung, 2005 Jan 16.
|
||||
@@ -384,26 +403,7 @@ Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by
|
||||
Mathias Michaelis (2004 Sep 6)
|
||||
Also place vimtutor.bat in %windir%?
|
||||
|
||||
Add gui_mch_browsedir() for Motif, KDE and Mac OS/X.
|
||||
|
||||
Add extra list of file locations. A bit like the quickfix list, but there is
|
||||
one per window. Can be used with:
|
||||
:ltag list of matching tags, like :tselect
|
||||
Commands to use the location list:
|
||||
:lnext next location
|
||||
:lprevious :lNext previous location
|
||||
:lnfile location in next file
|
||||
:lNfile :lpfile location in previous file
|
||||
:lrewind :lfirst first location
|
||||
:llast last location
|
||||
:ll [N] go to location N (current one if N omitted)
|
||||
:lwindow open window with locations (separate from quickfix window)
|
||||
:lopen open window with locations
|
||||
:lclose close window with locations
|
||||
:llist list locations
|
||||
:lfile read locations from file using 'errorformat'
|
||||
:lgetfile idem, don't jump to first one
|
||||
:lbuffer idem, from current buffer.
|
||||
Add gui_mch_browsedir() for Motif, Mac OS/X.
|
||||
|
||||
HTML indenting can be slow, find out why. Any way to do some kind of
|
||||
profiling for Vim script? At least add a function to get the current time in
|
||||
@@ -425,6 +425,11 @@ Add more tests for all new functionality in Vim 7. Especially new functions.
|
||||
|
||||
Updated Ruby interface. (Ryan Paul)
|
||||
|
||||
'errorformat' docs are a bit unclear. Suggestions by Charles Campbell (2006
|
||||
Jan 6)
|
||||
Add a flag to check for a match with the next item first? Helps for
|
||||
continuation lines that may contain just about anything.
|
||||
|
||||
Awaiting updated patches:
|
||||
--- awaiting updated patch ---
|
||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||
@@ -599,14 +604,6 @@ GTK+ GUI known bugs:
|
||||
when it is longer than 4000 characters. Works OK from gvim to gvim and
|
||||
vim to vim. Pasting through xterm (using the shift key) also works.
|
||||
It starts working after GTK gvim loses the selection and gains it again.
|
||||
7 DND doesn't work with KDE (also with GTK 1).
|
||||
|
||||
KDE GUI known bugs:
|
||||
- There is no active maintenance and "yzis" is supposed to replace it.
|
||||
- With the default 'guifont' value bold text differs in size from normal
|
||||
text, causing the display to be messed up.
|
||||
- Error messages when starting up. The "tip of the day" box is empty.
|
||||
- Encoding of menu items needs to be converted. (Yasuhiro Matsumoto)
|
||||
|
||||
Win32 GUI known bugs:
|
||||
8 On Windows 98 the unicows library is needed to support functions with UCS2
|
||||
@@ -897,8 +894,6 @@ MSDOS, OS/2 and Win32:
|
||||
8 When editing a file on a Samba server, case might matter. ":e file"
|
||||
followed by ":e FILE" will edit "file" again, even though "FILE" might be
|
||||
another one. Set last used name in buflist_new()? Fix do_ecmd(), etc.
|
||||
8 ":mksession" generates a "cd" command where "aa\#bb" means directory "#bb"
|
||||
in "aa", but it's used as "aa#bb". (Ronald Hoellwarth)
|
||||
8 When a buffer is editing a file like "ftp://mach/file", which is not going
|
||||
to be used like a normal file name, don't change the slashes to
|
||||
backslashes. (Ronald Hoellwarth)
|
||||
@@ -1089,8 +1084,6 @@ Macintosh:
|
||||
one.
|
||||
7 When 'showbreak' is set, the amount of space a Tab occupies changes.
|
||||
Should work like 'showbreak' is inserted without changing the Tabs.
|
||||
7 When there is a "help.txt" window in a session file, restoring that
|
||||
session will not get the "LOCAL ADDITIONS" back.
|
||||
7 When 'mousefocus' is set and switching to another window with a typed
|
||||
command, the mouse pointer may be moved to a part of the window that's
|
||||
covered by another window and we lose focus. Only move in the y
|
||||
@@ -1420,6 +1413,10 @@ User Friendlier:
|
||||
7 When Vim detects a file is being edited elsewhere and it's a gvim session
|
||||
of the same user it should offer a "Raise" button, so that the other gvim
|
||||
window can be displayed. (Eduard)
|
||||
8 Support saving and restoring session for X windows? It should work to do
|
||||
":mksession" and use "-S fname" for the restart command. The
|
||||
gui_x11_wm_protocol_handler() already takes care of the rest.
|
||||
global_event_filter() for GTK.
|
||||
|
||||
|
||||
Spell checking:
|
||||
@@ -1428,12 +1425,8 @@ Spell checking:
|
||||
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
|
||||
syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file?
|
||||
- COMPOUNDMAX -> COMPOUNDWORDMAX?
|
||||
- Support flags on a suffix. Used for second level affixes. The flags may
|
||||
also be used for compounding. Default is an OR mechanism with the flags
|
||||
of the word. Adding "compset" on the affixes means the compound flags of
|
||||
the word are not used. Instead of "SFX a 0 add/FLAGS ." we could use "SFX
|
||||
a 0 add . /FLAGS" (or support both).
|
||||
- NEEDCOMPOUND also used for affix? Or use "needcomp" after affix?
|
||||
- NEEDCOMPOUND also used for affix? Or is this called ONLYINCOMPOUND now?
|
||||
Or is ONLYINCOMPOUND only for inside a compound, not at start or end?
|
||||
- Do we need a flag for the rule that when compounding is done the following
|
||||
word doesn't have a capital after a word character, even for Onecap words?
|
||||
- New hunspell home page: http://hunspell.sourceforge.net/
|
||||
@@ -1458,8 +1451,8 @@ Spell checking:
|
||||
- Add flags to count extra syllables in a word. SYLLABLEADD1 SYLLABLEADD2,
|
||||
etc.? Or make it possible to specify the syllable count of a word
|
||||
directly, e.g., after another slash: /abc/3
|
||||
- MORPHO item in affix file: ignore morphological fields after word and
|
||||
affix.
|
||||
- MORPHO item in affix file: ignore TAB and morphological field after
|
||||
word/flags and affix.
|
||||
- Implement multiple flags for compound words and CMP item?
|
||||
Await comments from other spell checking authors.
|
||||
- Also see tklspell: http://tkltrans.sourceforge.net/
|
||||
@@ -1520,8 +1513,8 @@ Folding:
|
||||
- 'foldmethod' "textobject": fold on sections and paragraph text objects.
|
||||
- Add 'hidecomment' option: don't display comments in /* */ and after //.
|
||||
Or is the conceal patch from Vince Negri a more generic solution?
|
||||
- "zu": undo change in manual fold. "zU" redo change in manual fold. How to
|
||||
implement this?
|
||||
- "zuf": undo change in manual fold. "zUf" redo change in manual fold. How
|
||||
to implement this?
|
||||
- "zJ" command: add the line or fold below the fold in the fold under the
|
||||
cursor.
|
||||
- 'foldmethod' "syntax": "fold=3": set fold level for a region.
|
||||
@@ -1558,7 +1551,6 @@ Multi-byte characters:
|
||||
8 Should add test for using various commands with multi-byte characters.
|
||||
8 'infercase' doesn't work with multi-byte characters.
|
||||
8 toupper() function doesn't handle byte count changes.
|
||||
8 "ga" should show all composing characters, also if there are more than 2.
|
||||
7 When searching, should order of composing characters be ignored?
|
||||
8 Should implement 'delcombine' for command line editing.
|
||||
8 Detect overlong UTF-8 sequences and handle them like illegal bytes.
|
||||
@@ -1876,7 +1868,6 @@ Built-in script language:
|
||||
7 Add function to generate unique number (date in milliseconds).
|
||||
7 Automatically load a function from a file when it is called. Need an
|
||||
option for the search path. (Sekera)
|
||||
7 Persistent variables: "p:var"; stored in viminfo file and sessions files.
|
||||
|
||||
|
||||
Robustness:
|
||||
@@ -1892,8 +1883,6 @@ Robustness:
|
||||
Performance:
|
||||
7 For strings up to 3 bytes don't allocate memory, use v_list itself as a
|
||||
character array. Use VAR_SSTRING (short string).
|
||||
8 Loading plugins takes startup time. Only load the part that is used to
|
||||
trigger the rest, and load the rest when it's needed?
|
||||
8 Turn b_syn_ic and b_syn_containedin into b_syn_flags.
|
||||
9 Loading menu.vim still takes quite a bit of time. How to make it faster?
|
||||
8 in_id_list() takes much time for syntax highlighting. Cache the result?
|
||||
@@ -1962,7 +1951,7 @@ Performance:
|
||||
- highlighting "~/vim/test/longline.tex", "~/vim/test/scwoop.tcl" and
|
||||
"~/vim/test/lockup.pl".
|
||||
- loading a syntax file to highlight all words not from a dictionary.
|
||||
- editing a vim script with syntax highlighting on (loading vim.vim).
|
||||
- editing a Vim script with syntax highlighting on (loading vim.vim).
|
||||
7 Screen updating can be further improved by only redrawing lines that were
|
||||
changed (and lines after them, when syntax highlighting was used, and it
|
||||
changed).
|
||||
@@ -2023,7 +2012,7 @@ Messages:
|
||||
typing, error messages must be switched back on.
|
||||
Also a flag to ignore error messages for shell commands (for mappings).
|
||||
- Option to set time for emsg() sleep. Interrupt sleep when key is typed?
|
||||
sleep before second message?
|
||||
Sleep before second message?
|
||||
8 In Ex silent mode or when reading commands from a file, what exactly is
|
||||
not printed and what is? Check ":print", ":set all", ":args", ":vers",
|
||||
etc. At least there should be no prompt. (Smulders) And don't clear the
|
||||
@@ -2104,14 +2093,10 @@ Shared libraries:
|
||||
|
||||
|
||||
Tags:
|
||||
8 Add a function that returns the line in the tags file for a matching tag.
|
||||
Can be used to extract more info (class name, inheritance, etc.) (Rico
|
||||
Hendriks)
|
||||
7 Count before CTRL-]: jump to N'th match
|
||||
8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.
|
||||
8 When output of ":tselect" is long, getting the more-prompt, should be able
|
||||
to type the tag number directly.
|
||||
7 Add a tag-select window. Works like ":cwindow". (Michal Malecki)
|
||||
7 Add the possibility to use the "-t {tag}" argument multiple times. Open a
|
||||
window for each tag.
|
||||
7 Make output of ":tselect" a bit nicer. Use highlighting?
|
||||
@@ -2275,6 +2260,7 @@ Autocommands:
|
||||
8 Use another option than 'updatetime' for the CursorHold event. The two
|
||||
things are unrelated for the user (but the implementation is more
|
||||
difficult).
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once.
|
||||
8 Also trigger CursorHold in Insert mode?
|
||||
7 Add autocommand event for when a buffer cannot be abandoned. So that user
|
||||
can define the action taking (autowrite, dialog, fail) based on the kind
|
||||
@@ -2344,8 +2330,7 @@ Autocommands:
|
||||
that marks can be updated. HierAssist has patch to add
|
||||
BufChangePre, BufChangePost and RevertBuf. (Shah)
|
||||
WinResized - When a window has been resized
|
||||
- Add autocommand to be executed every so many seconds? For writing the
|
||||
file now and then ('autosave').
|
||||
- Write the file now and then ('autosave'):
|
||||
*'autosave'* *'as'* *'noautosave'* *'noas'*
|
||||
'autosave' 'aw' number (default 0)
|
||||
Automatically write the current buffer to file N seconds after the
|
||||
@@ -2617,7 +2602,7 @@ Insert mode:
|
||||
continuation lines. Allows changing 'tabstop' without messing up the
|
||||
indents.
|
||||
And/or: Add option to copy indent as-is, without changing spaces to tabs.
|
||||
also for 'autoindent'. 'keeptabs': when set don't change the tabs and
|
||||
Also for 'autoindent'. 'keeptabs': when set don't change the tabs and
|
||||
spaces used for indent, when the indent remains the same or increases.
|
||||
|
||||
|
||||
@@ -2700,7 +2685,7 @@ Visual mode:
|
||||
behave like 'scrolloff' is one, so that the text scrolls when the pointer
|
||||
is in the top line.
|
||||
8 When using "I" or "A" in Visual block mode, short lines do not get the new
|
||||
text. make it possible to add the text to short lines too, with padding
|
||||
text. Make it possible to add the text to short lines too, with padding
|
||||
where needed.
|
||||
7 With a Visual block selected, "2x" deletes a block of double the width,
|
||||
"3y" yanks a block of triple width, etc.
|
||||
@@ -2850,8 +2835,9 @@ Incsearch:
|
||||
|
||||
|
||||
Searching:
|
||||
7 Add "g/" and "gb" to search for a pattern in the Visually selected text?
|
||||
8 Add "g/" and "gb" to search for a pattern in the Visually selected text?
|
||||
"g?" is already used for rot13.
|
||||
Can use "g/" in Normal mode, uses the '< to '> area.
|
||||
8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands
|
||||
for "go recursive here" and \@( \) marks the recursive part.
|
||||
Perl does it this way:
|
||||
@@ -3092,20 +3078,27 @@ Modelines:
|
||||
or not. Same for .exrc in local dir.
|
||||
|
||||
|
||||
Options:
|
||||
8 Make ":mksession" store buffer-specific options for the specific buffer.
|
||||
Sessions:
|
||||
8 DOS/Windows: ":mksession" generates a "cd" command where "aa\#bb" means
|
||||
directory "#bb" in "aa", but it's used as "aa#bb". (Ronald Hoellwarth)
|
||||
7 When there is a "help.txt" window in a session file, restoring that
|
||||
session will not get the "LOCAL ADDITIONS" back.
|
||||
8 With ":mksession" always store the 'sessionoptions' option, even when
|
||||
"options" isn't in it. (St-Amant)
|
||||
7 ":with option=value | command": temporarily set an option value and
|
||||
restore it after the command has executed.
|
||||
7 Setting an option always sets "w_set_curswant", while this is only
|
||||
required for a few options. Only do it for those options to avoid the
|
||||
side effect.
|
||||
8 When using ":mksession", also store a command to reset all options to
|
||||
their default value, before setting the options that are not at their
|
||||
default value.
|
||||
7 With ":mksession" also store the tag stack and jump history. (Michal
|
||||
Malecki)
|
||||
7 Persistent variables: "p:var"; stored in viminfo file and sessions files.
|
||||
|
||||
|
||||
Options:
|
||||
7 ":with option=value | command": temporarily set an option value and
|
||||
restore it after the command has executed.
|
||||
7 Setting an option always sets "w_set_curswant", while this is only
|
||||
required for a few options. Only do it for those options to avoid the
|
||||
side effect.
|
||||
8 Make "old" number options that really give a number of effects into string
|
||||
options that are a comma separated list. The old number values should
|
||||
also be supported.
|
||||
@@ -3316,8 +3309,7 @@ Various improvements:
|
||||
next <li>, ]< to next </li>, [< to previous </li>.
|
||||
8 Add ":rename" command: rename the file of the current buffer and rename
|
||||
the buffer. Buffer may be modified.
|
||||
- Perhaps ":cexpr" could read errors from a list?
|
||||
Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
|
||||
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
|
||||
Govindachar)
|
||||
6 In the quickfix window statusline add the command used to get the list of
|
||||
errors, e.g. ":make foo", ":grep something *.c".
|
||||
@@ -3381,6 +3373,7 @@ Various improvements:
|
||||
8 Add "g^E" and "g^Y", to scroll a screen-full line up and down.
|
||||
6 Add ":timer" command, to set a command to be executed at a certain
|
||||
interval, or once after some time has elapsed. (Aaron)
|
||||
Perhaps an autocommand event like CursorHold is better?
|
||||
8 Add ":confirm" handling in open_exfile(), for when file already exists.
|
||||
8 When quitting with changed files, make the dialog list the changed file
|
||||
and allow "write all", "discard all", "write some". The last one would
|
||||
@@ -3788,6 +3781,8 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
When using "do" or ":diffget" in a buffer with changes in every line an extra
|
||||
empty line would appear.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Jun 09
|
||||
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -747,6 +747,7 @@ Various:
|
||||
exists() check if a variable, function, etc. exists
|
||||
has() check if a feature is supported in Vim
|
||||
getqflist() list of quickfix errors
|
||||
getloclist() list of location list items
|
||||
cscope_connection() check if a cscope connection exists
|
||||
did_filetype() check if a FileType autocommand was used
|
||||
eventhandler() check if invoked by an event handler
|
||||
@@ -758,7 +759,8 @@ Various:
|
||||
libcallnr() idem, returning a number
|
||||
getreg() get contents of a register
|
||||
getregtype() get type of a register
|
||||
setqflist() create a quickfix list
|
||||
setqflist() modify a quickfix list
|
||||
setloclist() modify a location list
|
||||
setreg() set contents and type of a register
|
||||
taglist() get list of matching tags
|
||||
|
||||
@@ -2114,7 +2116,7 @@ a user to overrule or add to the default file. The default files start with: >
|
||||
When you write a compiler file and put it in your personal runtime directory
|
||||
(e.g., ~/.vim/compiler for Unix), you set the "current_compiler" variable to
|
||||
make the default file skip the settings.
|
||||
|
||||
*:CompilerSet*
|
||||
The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for
|
||||
":compiler". Vim defines the ":CompilerSet" user command for this. However,
|
||||
older Vim versions don't, thus your plugin should define it then. This is an
|
||||
@@ -2139,7 +2141,7 @@ that could be ~/.vim/after/compiler.
|
||||
*41.14* Writing a plugin that loads quickly *write-plugin-quickload*
|
||||
|
||||
A plugin may grow and become quite long. The startup delay may become
|
||||
noticable, while you hardly every use the plugin. Then it's time for a
|
||||
noticeable, while you hardly every use the plugin. Then it's time for a
|
||||
quickload plugin.
|
||||
|
||||
The basic idea is that the plugin is loaded twice. The first time user
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -321,6 +321,7 @@ B *+multi_byte* Korean and other languages |multibyte|
|
||||
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
|
||||
N *+multi_lang* non-English language support |multi-lang|
|
||||
m *+mzscheme* Mzscheme interface |mzscheme|
|
||||
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
|
||||
m *+netbeans_intg* |netbeans|
|
||||
m *+ole* Win32 GUI only: |ole-interface|
|
||||
*+osfiletype* Support for the 'osfiletype' option and filetype
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Nov 23
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -21,7 +21,6 @@ NEW FEATURES |new-7|
|
||||
Vim script enhancements |new-vim-script|
|
||||
Spell checking |new-spell|
|
||||
Omni completion |new-omni-completion|
|
||||
KDE support |new-KDE|
|
||||
MzScheme interface |new-MzScheme|
|
||||
Printing multi-byte text |new-print-multi-byte|
|
||||
Translated manual pages |new-manpage-trans|
|
||||
@@ -30,6 +29,8 @@ Scroll back in messages |new-scroll-back|
|
||||
POSIX compatibility |new-posix|
|
||||
Debugger support |new-debug-support|
|
||||
Remote file explorer |new-netrw-explore|
|
||||
Define an operator |new-define-operator|
|
||||
Location list |new-location-list|
|
||||
Various new items |new-items-7|
|
||||
|
||||
IMPROVEMENTS |improvements-7|
|
||||
@@ -67,6 +68,8 @@ results in "a'b".
|
||||
When overwriting a file with ":w! fname" there was no warning for when "fname"
|
||||
was being edited by another Vim. Vim now gives an error message |E768|.
|
||||
|
||||
The support for Mac OS 9 has been removed.
|
||||
|
||||
|
||||
Minor incompatibilities:
|
||||
|
||||
@@ -152,6 +155,9 @@ expr". "-=" and ".=" works in a similar way.
|
||||
With the |:profile| command you can find out where your function or script
|
||||
wastes its time.
|
||||
|
||||
In the Python interface vim.eval() also handles Dictionaries and Lists.
|
||||
|python-eval| (G. Sumner Hayes)
|
||||
|
||||
|
||||
Spell checking *new-spell*
|
||||
--------------
|
||||
@@ -166,7 +172,7 @@ The 'spellsuggest' option specifies the methods used for making suggestions
|
||||
|
||||
The |[s| and |]s| commands can be used to move to the next or previous error.
|
||||
The |zg| and |zw| commands can be used to add good and wrong words.
|
||||
The |z?| command can be used to correct the word.
|
||||
The |z=| command can be used to correct the word.
|
||||
The |:mkspell| command is used to generate a Vim spell file from word lists.
|
||||
|
||||
The "undercurl" highlighting attribute was added to nicely point out spelling
|
||||
@@ -202,13 +208,6 @@ When the 'completeopt' option contains "menu" then matches for Insert mode
|
||||
completion are displayed in a popup menu.
|
||||
|
||||
|
||||
KDE support *new-KDE*
|
||||
-----------
|
||||
|
||||
Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
|
||||
(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
|
||||
|
||||
|
||||
MzScheme interface *new-MzScheme*
|
||||
------------------
|
||||
|
||||
@@ -347,6 +346,25 @@ and a GUI dialog is not possible.
|
||||
The netrw plugin is maintained by Charles Campbell.
|
||||
|
||||
|
||||
Define an operator *new-define-operator*
|
||||
------------------
|
||||
|
||||
Previously it was not possible to define your own operator; a command that is
|
||||
followed by a {motion}. Vim 7 introduces the 'operatorfunc' option and the
|
||||
|g@| operator. This makes it possible to define a mapping that works like an
|
||||
operator. The actual work is then done by a function, which is invoked
|
||||
through the |g@| operator.
|
||||
|
||||
See |:map-operator| for the explanation and an example.
|
||||
|
||||
Location list *new-location-list*
|
||||
-------------
|
||||
|
||||
The support for a per-window quickfix list (location list) is added. The
|
||||
location list can be displayed in a location window (similar to the quickfix
|
||||
window). You can open more than one location list window. A set of commands
|
||||
similar to the quickfix commands are added to browse the location list.
|
||||
|
||||
Various new items *new-items-7*
|
||||
-----------------
|
||||
|
||||
@@ -360,6 +378,9 @@ CTRL-W <Enter> In the quickfix window: opens a new window to show the
|
||||
|
||||
|at| and |it| text objects select a block of text between HTML or XML tags.
|
||||
|
||||
<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos")
|
||||
<A-RightMouse> ('mousemodel' "extend")
|
||||
Make a blockwise selection. |<A-LeftMouse>|
|
||||
|
||||
Insert mode commands: ~
|
||||
|
||||
@@ -400,18 +421,15 @@ Ex commands: ~
|
||||
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|
||||
|
||||
|:startreplace| Start Replace mode. (Charles Campbell)
|
||||
|:startgreplace| Start Virtual Replace mode.
|
||||
|
||||
|:0file| Removes the name of the buffer. (Charles Campbell)
|
||||
|
||||
|:diffoff| Switch off diff mode in the current window or in all
|
||||
windows.
|
||||
|
||||
|:keepalt| Do not change the alternate file.
|
||||
|
||||
|:delmarks| Delete marks.
|
||||
|
||||
|:sandbox| Command modifier: execute the argument in the sandbox.
|
||||
|
||||
|:exusage| Help for Ex commands (Nvi command).
|
||||
|
||||
|:viusage| Help for Vi commands (Nvi command).
|
||||
@@ -428,6 +446,30 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|
||||
|:cexpr| Read error messages from a Vim expression (Yegappan
|
||||
Lakshmanan).
|
||||
|
||||
|:caddexpr| Add error messages from a Vim expression to an
|
||||
existing quickfix list. (Yegappan Lakshmanan).
|
||||
|
||||
|:ltag| Jump to a tag and add matching tags to a location list.
|
||||
|
||||
|
||||
Ex command modifiers: ~
|
||||
|
||||
|:keepalt| Do not change the alternate file.
|
||||
|
||||
|:noautocmd| Do not trigger autocommand events.
|
||||
|
||||
|:sandbox| Execute a command in the sandbox.
|
||||
|
||||
|
||||
Ex command arguments: ~
|
||||
|
||||
|++bad| Specify what happens with characters that can't be
|
||||
converted and illegal bytes. (code example by Yasuhiro
|
||||
Matsumoto)
|
||||
Also, when a conversion error occurs or illegal bytes
|
||||
are found include the line number in the error
|
||||
message.
|
||||
|
||||
|
||||
New and extended functions: ~
|
||||
|
||||
@@ -442,6 +484,7 @@ New and extended functions: ~
|
||||
|count()| count nr of times a value is in a List or Dictionary
|
||||
|deepcopy()| make a full copy of a List or Dictionary
|
||||
|empty()| check if List or Dictionary is empty
|
||||
|getloclist()| list of location list items (Yegappan Lakshmanan)
|
||||
|getqflist()| list of quickfix errors (Yegappan Lakshmanan)
|
||||
|extend()| append one List to another or add items from one
|
||||
Dictionary to another
|
||||
@@ -477,7 +520,8 @@ New and extended functions: ~
|
||||
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|
||||
|reverse()| reverse the order of a List
|
||||
|searchdecl()| search for declaration of variable
|
||||
|setqflist()| create a quickfix list (Yegappan Lakshmanan)
|
||||
|setloclist()| modify a location list (Yegappan Lakshmanan)
|
||||
|setqflist()| modify a quickfix list (Yegappan Lakshmanan)
|
||||
|sort()| sort a List
|
||||
|soundfold()| get the sound-a-like equivalent of a word
|
||||
|split()| split a String into a List
|
||||
@@ -503,6 +547,9 @@ New autocommand events: ~
|
||||
|ColorScheme| after loading a color scheme
|
||||
|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
|
||||
|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
|
||||
|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
|
||||
|
||||
|SpellFileMissing| when a spell file can't be found
|
||||
|
||||
|
||||
New items in search patterns: ~
|
||||
@@ -517,9 +564,15 @@ New items in search patterns: ~
|
||||
|/\%U| \%U1234abcd search for character with 8 pos. hex number
|
||||
|/\]| [\U1234abcd] idem, in a colletion
|
||||
(The above partly by Ciaran McCreesh)
|
||||
|
||||
|/[[=| [[=a=]] an equivalence class (only for latin1 characters)
|
||||
|/[[.| [[.a.]] a collation element (only works with single char)
|
||||
|
||||
|/\%'m| \%'m match at mark m
|
||||
|/\%<'m| \%<'m match before mark m
|
||||
|/\%>'m| \%>'m match after mark m
|
||||
|/\%V| \%V match in Visual area
|
||||
|
||||
Nesting |/multi| items no longer is an error when an empty match is possible.
|
||||
|
||||
It is now possible to use \{0}, it matches the preceding atom zero times. Not
|
||||
@@ -548,6 +601,8 @@ Moved all the indent settings from the filetype plugin to the indent file.
|
||||
Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
|
||||
different value.
|
||||
|
||||
VHDL indent file (Gerald Lai)
|
||||
|
||||
|
||||
New Keymaps: ~
|
||||
|
||||
@@ -574,17 +629,19 @@ Mac: GUI font selector. (Peter Cucka)
|
||||
|
||||
Mac: support for multi-byte characters. (Da Woon Jung)
|
||||
|
||||
GUI font selector for Motif. (Marcin Dalecki)
|
||||
|
||||
Nicer toolbar buttons for Motif. (Marcin Dalecki)
|
||||
|
||||
Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
|
||||
Mac: Support the xterm mouse in the non-GUI version.
|
||||
|
||||
Mac: better integration with Xcode. Post a fake mouse-up event after the odoc
|
||||
event and the drag receive handler to work around a stall after Vim loads a
|
||||
file. Fixed an off-by-one line number error. (Da Woon Jung)
|
||||
|
||||
Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
|
||||
GUI font selector for Motif. (Marcin Dalecki)
|
||||
|
||||
Nicer toolbar buttons for Motif. (Marcin Dalecki)
|
||||
|
||||
Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
|
||||
|
||||
To be used to set the cursor shape to a bar or a block. No default values,
|
||||
they are not supported by termcap/terminfo.
|
||||
|
||||
@@ -612,6 +669,14 @@ window height.
|
||||
The |v:scrollstart| variable has been added to help finding the location in
|
||||
your script that causes the hit-enter prompt.
|
||||
|
||||
To make it possible to handle the situation that a file is being edited that
|
||||
is already being edited by another Vim instance, the |SwapExists| event has
|
||||
been added. The |v:swapname|, |v:swapchoice| and |v:swapcommand| variables
|
||||
can be used, for example to use the |client-server| functionality to bring the
|
||||
other Vim to the foreground.
|
||||
When starting Vim with a "-t tag" argument, there is an existing swapfile and
|
||||
the user selects "quit" or "abort" then exit Vim.
|
||||
|
||||
==============================================================================
|
||||
IMPROVEMENTS *improvements-7*
|
||||
|
||||
@@ -627,6 +692,15 @@ iterative mechanism. This avoids out-of-stack errors. State is stored in
|
||||
allocated memory, running out of memory can always be detected. Allows
|
||||
matching more complex things, but Vim may seem to hang while doing that.
|
||||
|
||||
Previously some options were always evaluated in the |sandbox|. Now that only
|
||||
happens when the option was set from a modeline or in secure mode. Applies to
|
||||
'balloonexpr', 'foldexpr', 'foldtext' and 'includeexpr'. (Sumner Hayes)
|
||||
|
||||
Some commands and expressions could have nasty side effects, such as using
|
||||
CTRL-R = while editing a search pattern and the expression invokes a function
|
||||
that jumps to another window. The |textlock| has been added to prevent this
|
||||
from happening.
|
||||
|
||||
":breakadd here" and ":breakdel here" can be used to set or delete a
|
||||
breakpoint at the cursor.
|
||||
|
||||
@@ -636,6 +710,10 @@ few more important commands. Used ideas from Gabriel Zachmann.
|
||||
Unix: When libcall() fails obtain an error message with dlerror() and display
|
||||
it. (Johannes Zellner)
|
||||
|
||||
Mac and Cygwin: When editing an existing file make the file name the same case
|
||||
of the edited file. Thus when typing ":e os_UNIX.c" the file name becomes
|
||||
"os_unix.c".
|
||||
|
||||
Added "nbsp" in 'listchars'. (David Blanchet)
|
||||
|
||||
Added the "acwrite" value for the 'buftype' option. This is for a buffer that
|
||||
@@ -698,6 +776,10 @@ the swap file to indicate it is in the same directory as the edited file. The
|
||||
used path then doesn't matter and the check for editing the same file is much
|
||||
more reliable.
|
||||
|
||||
Unix: When editing a file through a symlink the swap file would use the name
|
||||
of the symlink. Now use the name of the actual file, so that editing the same
|
||||
file twice is detected. (suggestions by Stefano Zacchiroli and James Vega)
|
||||
|
||||
Client-server communication now supports 'encoding'. When setting 'encoding'
|
||||
in a Vim server to "utf-8", and using "vim --remote fname" in a console,
|
||||
"fname" is converted from the console encoding to utf-8. Also allows Vims
|
||||
@@ -849,6 +931,38 @@ in the FileChangedRO autocommand when checking out the file fails.
|
||||
|
||||
Unix: When open() returns EFBIG give an appropriate message.
|
||||
|
||||
":mksession" sets the SessionLoad variable to notify plugins. A modeline is
|
||||
added to the session file to set 'filetype' to "vim".
|
||||
|
||||
In the ATTENTION prompt put the "Delete it" choice before "Quit" to make it
|
||||
more logical. (Robert Webb)
|
||||
|
||||
When appending to a file while the buffer has no name the name of the appended
|
||||
file would be used for the current buffer. But the buffer contents is
|
||||
actually different from the file content. Don't set the file name, unless the
|
||||
'P' flag is present in 'cpoptions'.
|
||||
|
||||
When starting to edit a new file and the directory for the file doesn't exist
|
||||
then Vim will report "[New DIRECTORY]" instead of "[New File] to give the user
|
||||
a hint that something might be wrong.
|
||||
|
||||
Win32: Preserve the hidden attribute of the viminfo file.
|
||||
|
||||
In Insert mode CTRL-A didn't keep the last inserted text when using CTRL-O and
|
||||
then a cursor key. Now keep the previously inserted text if nothing is
|
||||
inserted after the CTRL-O. Allows using CTRL-O commands to move the cursor
|
||||
without losing the last inserted text.
|
||||
|
||||
The exists() function now supports checking for autocmd group definition
|
||||
and for supported autocommand events. (Yegappan Lakshmanan)
|
||||
|
||||
Allow using ":global" in the sandbox, it doesn't do anything harmful by
|
||||
itself.
|
||||
|
||||
":saveas asdf.c" will set 'filetype' to c when it's empty. Also for ":w
|
||||
asdf.c" when it sets the filename for the buffer.
|
||||
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
|
||||
@@ -1345,7 +1459,7 @@ When reporting a conversion error the line number of the last error could be
|
||||
given. Now report the first encountered error.
|
||||
|
||||
When using ":e ++enc=name file" and iconv() was used for conversion an error
|
||||
caused a fallback to no conversion. Now replace a character with '?' and
|
||||
caused a fall-back to no conversion. Now replace a character with '?' and
|
||||
continue.
|
||||
|
||||
When opening a new buffer the local value of 'bomb' was not initialized from
|
||||
@@ -1407,4 +1521,119 @@ available.
|
||||
In an empty line "ix<CTRL-O>0" moved the cursor to after the line instead of
|
||||
sticking to the first column.
|
||||
|
||||
When using ":wq" and a BufWriteCmd autocmd uses inputsecret() the text was
|
||||
echoed anyway. Set terminal to raw mode in getcmdline().
|
||||
|
||||
Unix: ":w a;b~c" caused an error in expanding wildcards.
|
||||
|
||||
When appending to a file with ":w >>fname" in a buffer without a name, causing
|
||||
the buffer to use "fname", the modified flag was reset.
|
||||
|
||||
When appending to to current file the "not edited" flag would be reset.
|
||||
":w" would overwrite the file accidentally.
|
||||
|
||||
Unix: When filtering text with an external command Vim would still read input,
|
||||
causing text typed for the command (e.g., a password) to be eaten and echoed.
|
||||
Don't read input when the terminal is in cooked mode.
|
||||
|
||||
The Cygwin version of xxd used CR/LF line separators. (Corinna Vinschen)
|
||||
|
||||
Unix: When filtering text through a shell command some resulting text may be
|
||||
dropped. Now after detecting that the child has exited try reading some more
|
||||
of its output.
|
||||
|
||||
When inside input(), using "CTRL-R =" and the expression throws an exception
|
||||
the command line was not abandoned but it wasn't used either. Now abandon
|
||||
typing the command line.
|
||||
|
||||
'delcombine' was also used in Visual and Select mode and for commands like
|
||||
"cl". That was illogical and has been disabled.
|
||||
|
||||
When recording while a CursorHold autocommand was defined special keys would
|
||||
appear in the register. Now the CursorHold event is not triggered while
|
||||
recording.
|
||||
|
||||
Unix: the src/configure script used ${srcdir-.}, not all shells understand
|
||||
that. Use ${srcdir:-.} instead.
|
||||
|
||||
When editing file "a" which is a symlink to file "b" that doesn't exist,
|
||||
writing file "a" to create "b" and then ":split b" resulted in two buffers on
|
||||
the same file with two different swapfile names. Now set the inode in the
|
||||
buffer when creating a new file.
|
||||
|
||||
When 'esckeys' is not set don't send the xterm code to request the version
|
||||
string, because it may cause trouble in Insert mode.
|
||||
|
||||
When evaluating an expression for CTRL-R = on the command line it was possible
|
||||
to call a function that opens a new window, resulting in errors for
|
||||
incremental search, and many other nasty things were possible. Now use the
|
||||
|textlock| to disallow changing the buffer or jumping to another window
|
||||
to protect from unexpected behavior. Same for CTRL-\ e.
|
||||
|
||||
"d(" deleted the character under the cursor, while the documentation specified
|
||||
an exclusive motion. Vi also doesn't delete the character under the cursor.
|
||||
|
||||
Shift-Insert in Insert mode could put the cursor before the last character
|
||||
when it just fits in the window. In coladvance() don't stop at the window
|
||||
edge when filling with spaces and when in Insert mode. In mswin.vim avoid
|
||||
getting a beep from the "l" command.
|
||||
|
||||
Win32 GUI: When Alt-F4 is used to close the window and Cancel is selected in
|
||||
the dialog then Vim would insert <M-F4> in the text. Now it's ignored.
|
||||
|
||||
When ":silent! {cmd}" caused the swap file dialog, which isn't displayed,
|
||||
there would still be a hit-enter prompt.
|
||||
|
||||
Requesting the termresponse (|t_RV|) early may cause problems with "-c"
|
||||
arguments that invoke an external command or even "-c quit". Postpone it
|
||||
until after executing "-c" arguments.
|
||||
|
||||
When typing in Insert mode so that a new line is started, using CTRL-G u to
|
||||
break undo and start a new change, then joining the lines with <BS> caused
|
||||
undo info to be missing. Now reset the insertion start point.
|
||||
|
||||
Syntax HL: When a region start match has a matchgroup and an offset that
|
||||
happens to be after the end of the line then it continued in the next line and
|
||||
stopped at the region end match, making the region continue after that.
|
||||
Now check for the column being past the end of the line in syn_add_end_off().
|
||||
|
||||
When changing a file, setting 'swapfile' off and then on again, making another
|
||||
change and killing Vim, then some blocks may be missing from the swapfile.
|
||||
When 'swapfile' is switched back on mark all blocks in the swapfile as dirty.
|
||||
Added mf_set_dirty().
|
||||
|
||||
Expanding wildcards in a command like ":e aap;<>!" didn't work. Put
|
||||
backslashes before characters that are special to the shell. (Adri Verhoef)
|
||||
|
||||
A CursorHold autocommand would cause a message to be cleared. Don't show the
|
||||
special key for the event for 'showcmd'.
|
||||
|
||||
When expanding a file name for a shell command, as in "!cmd foo<Tab>" or ":r
|
||||
!cmd foo<Tab>" also escape characters that are special for the shell:
|
||||
"!;&()<>".
|
||||
|
||||
When the name of the buffer was set by a ":r fname" command |cpo-f| no
|
||||
autocommands were triggered to notify about the change in the buffer list.
|
||||
|
||||
In the quickfix buffer 'bufhidden' was set to "delete", which caused closing
|
||||
the quickfix window to leave an unlisted "No Name" buffer behind every time.
|
||||
|
||||
Win32: when using two screens of different size, setting 'lines' to a large
|
||||
value didn't fill the whole screen. (SungHyun Nam)
|
||||
|
||||
Win32 installer: The generated _vimrc contained an absolute path to diff.exe.
|
||||
After upgrading it becomes invalid. Now use $VIMRUNTIME instead.
|
||||
|
||||
The command line was cleared to often when 'showmode' was set and ":silent
|
||||
normal vy" was used. Don't clear the command line unless the mode was
|
||||
actually displayed. Added the "mode_displayed" variable.
|
||||
|
||||
The "load session" toolbar item could not handle a space or other special
|
||||
characters in v:this_session.
|
||||
|
||||
":set sta ts=8 sw=4 sts=2" deleted 4 spaces halfway a line instead of 2.
|
||||
|
||||
In a multi-byte file the foldmarker could be recognized in the trail byte.
|
||||
(Taro Muraoka)
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*vi_diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -87,7 +87,9 @@ Length of an expanded string option
|
||||
Maximum display width Unix and Win32: 1024 characters, otherwise 255
|
||||
characters
|
||||
Maximum lhs of a mapping 50 characters.
|
||||
Number of highlighting different types: 223
|
||||
Number of different highlighting types: over 30000
|
||||
Range of a Number variable: -2147483648 to 2147483647 (more on 64 bit
|
||||
systems)
|
||||
|
||||
Information for undo and text in registers is kept in memory, thus when making
|
||||
(big) changes the amount of (virtual) memory available limits the number of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 7.0aa. Last change: 2005 Oct 09
|
||||
*visual.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -258,6 +258,11 @@ operator character: "v{move-around}3>" (move lines 3 indents to the right).
|
||||
The {move-around} is any sequence of movement commands. Note the difference
|
||||
with {motion}, which is only ONE movement command.
|
||||
|
||||
Another way to operate on the Visual area is using the |/\%V| item in a
|
||||
pattern. For example, to replace all '(' in the Visual area with '#': >
|
||||
|
||||
:%s/\%V(/X/g
|
||||
|
||||
==============================================================================
|
||||
5. Blockwise operators *blockwise-operators*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -992,9 +992,11 @@ list of buffers. |unlisted-buffer|
|
||||
Split window and edit buffer for {filename} from the buffer
|
||||
list. This will also edit a buffer that is not in the buffer
|
||||
list, without setting the 'buflisted' flag.
|
||||
Note: If what you want to do is split the buffer, make a copy
|
||||
under another name, you can do it this way: >
|
||||
:w foobar | sp #
|
||||
|
||||
*:bn* *:bnext* *E87*
|
||||
:[N]bn[ext][!] [N]
|
||||
:[N]bn[ext][!] [N] *:bn* *:bnext* *E87*
|
||||
Go to [N]th next buffer in buffer list. [N] defaults to one.
|
||||
Wraps around the end of the buffer list.
|
||||
See |:buffer-!| for [!].
|
||||
@@ -1089,9 +1091,10 @@ purposes. A few options can be set to change the behavior of a buffer:
|
||||
|
||||
A few useful kinds of a buffer:
|
||||
|
||||
quickfix Used to contain the error list. See |:cwindow|. This command
|
||||
sets the 'buftype' option to "quickfix". You are not supposed
|
||||
to change this! 'swapfile' is off.
|
||||
quickfix Used to contain the error list or the location list. See
|
||||
|:cwindow| and |:lwindow|. This command sets the 'buftype'
|
||||
option to "quickfix". You are not supposed to change this!
|
||||
'swapfile' is off.
|
||||
|
||||
help Contains a help file. Will only be created with the |:help|
|
||||
command. The flag that indicates a help buffer is internal
|
||||
@@ -1100,18 +1103,18 @@ help Contains a help file. Will only be created with the |:help|
|
||||
|
||||
directory Displays directory contents. Can be used by a file explorer
|
||||
plugin. The buffer is created with these settings: >
|
||||
:set buftype=nowrite
|
||||
:set bufhidden=delete
|
||||
:set noswapfile
|
||||
:setlocal buftype=nowrite
|
||||
:setlocal bufhidden=delete
|
||||
:setlocal noswapfile
|
||||
< The buffer name is the name of the directory and is adjusted
|
||||
when using the |:cd| command.
|
||||
|
||||
scratch Contains text that can be discarded at any time. It is kept
|
||||
when closing the window, it must be deleted explicitly.
|
||||
Settings: >
|
||||
:set buftype=nofile
|
||||
:set bufhidden=hide
|
||||
:set noswapfile
|
||||
:setlocal buftype=nofile
|
||||
:setlocal bufhidden=hide
|
||||
:setlocal noswapfile
|
||||
< The buffer name can be used to identify the buffer.
|
||||
|
||||
*unlisted-buffer*
|
||||
@@ -1119,7 +1122,7 @@ unlisted The buffer is not in the buffer list. It is not used for
|
||||
normal editing, but to show a help file, remember a file name
|
||||
or marks. The ":bdelete" command will also set this option,
|
||||
thus it doesn't completely delete the buffer. Settings: >
|
||||
:set nobuflisted
|
||||
:setlocal nobuflisted
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Nov 23
|
||||
" Last Change: 2006 Jan 12
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -399,7 +399,7 @@ fun! s:FTent()
|
||||
setf dtd
|
||||
endfun
|
||||
|
||||
" Clipper (or FoxPro)
|
||||
" Clipper (or FoxPro; could also be eviews)
|
||||
au BufNewFile,BufRead *.prg
|
||||
\ if exists("g:filetype_prg") |
|
||||
\ exe "setf " . g:filetype_prg |
|
||||
@@ -606,6 +606,9 @@ au BufNewFile,BufRead *.gpi setf gnuplot
|
||||
" GrADS scripts
|
||||
au BufNewFile,BufRead *.gs setf grads
|
||||
|
||||
" Gretl
|
||||
au BufNewFile,BufRead *.gretl setf gretl
|
||||
|
||||
" Groovy
|
||||
au BufNewFile,BufRead *.groovy setf groovy
|
||||
|
||||
|
||||
13
runtime/ftplugin/javascript.vim
Normal file
13
runtime/ftplugin/javascript.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Javascript
|
||||
" Maintainer: Bram Moolenaar (for now)
|
||||
" Last Change: 2006 Jan 30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if exists('&ofu')
|
||||
setlocal ofu=javascriptcomplete#CompleteJS
|
||||
endif
|
||||
30
runtime/ftplugin/matlab.vim
Normal file
30
runtime/ftplugin/matlab.vim
Normal file
@@ -0,0 +1,30 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: matlab
|
||||
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
|
||||
" Last Changed: 2006 Jan 12
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let s:conditionalEnd = '\(([^()]*\)\@!\<end\>\([^()]*)\)\@!'
|
||||
let b:match_words = '\<if\>\|\<while\>\|\<for\>\|\<switch\>:' .
|
||||
\ s:conditionalEnd . ',\<if\>:\<elseif\>:\<else\>:' .
|
||||
\ s:conditionalEnd
|
||||
endif
|
||||
|
||||
setlocal suffixesadd=.m
|
||||
setlocal suffixes+=.asv
|
||||
|
||||
let b:undo_ftplugin = "setlocal suffixesadd< suffixes< "
|
||||
\ . "| unlet! b:match_words"
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Perl
|
||||
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
||||
" Last Change: 2004 Dec 06
|
||||
" Last Change: 2005 Dec 16
|
||||
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@@ -27,7 +27,7 @@ endif
|
||||
|
||||
" Provided by Ned Konz <ned at bike-nomad dot com>
|
||||
"---------------------------------------------
|
||||
setlocal include=\\<\\(use\\|require\\)\\>
|
||||
setlocal include=\\<\\(use\\\|require\\)\\>
|
||||
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
|
||||
setlocal define=[^A-Za-z_]
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ setlocal suffixesadd=.py
|
||||
setlocal comments-=:%
|
||||
setlocal commentstring=#%s
|
||||
|
||||
setlocal omnifunc=pycomplete#Complete
|
||||
|
||||
set wildignore+=*.pyc
|
||||
|
||||
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
" Language: PHP
|
||||
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
|
||||
" URL: http://www.2072productions.com/vim/indent/php.vim
|
||||
" Last Change: 2005 Nobember 21st
|
||||
" Version: 1.20
|
||||
" Last Change: 2006 January 15th
|
||||
" Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php
|
||||
" Version: 1.23
|
||||
"
|
||||
" The change log and all the comments have been removed from this file.
|
||||
"
|
||||
@@ -11,14 +12,14 @@
|
||||
" 2072productions.com at the URI provided above.
|
||||
"
|
||||
" If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr
|
||||
" with an example of code that break the algorithm.
|
||||
" with an example of code that breaks the algorithm.
|
||||
"
|
||||
"
|
||||
" Thanks a lot for using this script.
|
||||
"
|
||||
"
|
||||
" NOTE: This script must be used with PHP syntax ON and with the php syntax
|
||||
" script by Lutz Eymers (http://www.isp.de/data/php.vim ) that's the script bundled with Gvim.
|
||||
" script by Lutz Eymers ( http://www.isp.de/data/php.vim ) that's the script bundled with Vim.
|
||||
"
|
||||
"
|
||||
" In the case you have syntax errors in your script such as end of HereDoc
|
||||
@@ -69,6 +70,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
@@ -127,7 +132,7 @@ if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUn
|
||||
endif
|
||||
|
||||
if exists("*GetPhpIndent")
|
||||
finish " XXX
|
||||
finish " XXX
|
||||
endif
|
||||
|
||||
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
|
||||
@@ -136,7 +141,13 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
|
||||
|
||||
|
||||
function! GetLastRealCodeLNum(startline) " {{{
|
||||
|
||||
let lnum = a:startline
|
||||
|
||||
if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1
|
||||
let lnum = b:GetLastRealCodeLNum_ADD
|
||||
endif
|
||||
|
||||
let old_lnum = lnum
|
||||
|
||||
while lnum > 1
|
||||
@@ -288,7 +299,7 @@ function! IslinePHP (lnum, tofind) " {{{
|
||||
endfunction " }}}
|
||||
|
||||
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\);'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|[|&]\)'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\|[|&]\)'
|
||||
|
||||
let s:autorestoptions = 0
|
||||
if ! s:autorestoptions
|
||||
@@ -316,6 +327,8 @@ endfunc
|
||||
|
||||
function! GetPhpIndent()
|
||||
|
||||
let b:GetLastRealCodeLNum_ADD = 0
|
||||
|
||||
let UserIsEditing=0
|
||||
if b:PHP_oldchangetick != b:changedtick
|
||||
let b:PHP_oldchangetick = b:changedtick
|
||||
@@ -361,7 +374,10 @@ function! GetPhpIndent()
|
||||
if !b:InPHPcode_checked " {{{ One time check
|
||||
let b:InPHPcode_checked = 1
|
||||
|
||||
let synname = IslinePHP (prevnonblank(v:lnum), "")
|
||||
let synname = ""
|
||||
if cline !~ '<?.*?>'
|
||||
let synname = IslinePHP (prevnonblank(v:lnum), "")
|
||||
endif
|
||||
|
||||
if synname!=""
|
||||
if synname != "phpHereDoc"
|
||||
@@ -425,6 +441,7 @@ function! GetPhpIndent()
|
||||
|
||||
elseif cline =~? '<script\>'
|
||||
let b:InPHPcode_and_script = 1
|
||||
let b:GetLastRealCodeLNum_ADD = v:lnum
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -453,11 +470,11 @@ function! GetPhpIndent()
|
||||
endif
|
||||
endif " }}}
|
||||
|
||||
|
||||
if !b:InPHPcode && !b:InPHPcode_and_script
|
||||
return -1
|
||||
endif
|
||||
|
||||
|
||||
" Indent successive // or # comment the same way the first is {{{
|
||||
if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
|
||||
if b:PHP_LastIndentedWasComment == 1
|
||||
@@ -482,9 +499,11 @@ function! GetPhpIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*'
|
||||
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
|
||||
if getline(v:lnum + 1) !~ '^\s*\*'
|
||||
return -1
|
||||
endif
|
||||
let b:PHP_InsideMultilineComment = 1
|
||||
return -1
|
||||
endif " }}}
|
||||
|
||||
|
||||
@@ -504,6 +523,7 @@ function! GetPhpIndent()
|
||||
let s:level = 0
|
||||
|
||||
let lnum = GetLastRealCodeLNum(v:lnum - 1)
|
||||
|
||||
let last_line = getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
let endline= s:endline
|
||||
|
||||
442
runtime/indent/vhdl.vim
Normal file
442
runtime/indent/vhdl.vim
Normal file
@@ -0,0 +1,442 @@
|
||||
" VHDL indent ('93 syntax)
|
||||
" Language: VHDL
|
||||
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
|
||||
" Version: 1.3
|
||||
" Last Change: 2006 Jan 31
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=1450
|
||||
|
||||
" only load this indent file when no other was loaded
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" setup indent options for local VHDL buffer
|
||||
setlocal indentexpr=GetVHDLindent()
|
||||
setlocal indentkeys=!^F,o,O,e,0(,0)
|
||||
setlocal indentkeys+==~if,=~then,=~elsif,=~else
|
||||
setlocal indentkeys+==~begin,=~is,=~select,=~--
|
||||
|
||||
" move around
|
||||
" keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units"
|
||||
let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)'
|
||||
nnoremap <silent><buffer>[[ :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','bW')<CR>
|
||||
nnoremap <silent><buffer>]] :cal search('\%(\<end\s\+\)\@<!\<'.b:vhdl_explore.'\>\c','W')<CR>
|
||||
nnoremap <silent><buffer>[] :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','bW')<CR>
|
||||
nnoremap <silent><buffer>][ :cal search('\<end\s\+'.b:vhdl_explore.'\>\c','W')<CR>
|
||||
|
||||
" constants
|
||||
" not a comment
|
||||
let s:NC = '\%(--.*\)\@<!'
|
||||
" end of string
|
||||
let s:ES = '\s*\%(--.*\)\=$'
|
||||
" no "end" keyword in front
|
||||
let s:NE = '\%(\<end\s\+\)\@<!'
|
||||
|
||||
" for matchit plugin
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1
|
||||
let b:match_words =
|
||||
\ s:NE.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'.
|
||||
\ s:NE.'\<case\>:\<when\>:\<end\s\+case\>,'.
|
||||
\ s:NE.'\<loop\>:\<end\s\+loop\>,'.
|
||||
\ s:NE.'\<for\>:\<end\s\+for\>,'.
|
||||
\ s:NE.'\<generate\>:\<end\s\+generate\>,'.
|
||||
\ s:NE.'\<record\>:\<end\s\+record\>,'.
|
||||
\ s:NE.'\<units\>:\<end\s\+units\>,'.
|
||||
\ s:NE.'\<process\>:\<end\s\+process\>,'.
|
||||
\ s:NE.'\<block\>:\<end\s\+block\>,'.
|
||||
\ s:NE.'\<function\>:\<end\s\+function\>,'.
|
||||
\ s:NE.'\<entity\>:\<end\s\+entity\>,'.
|
||||
\ s:NE.'\<component\>:\<end\s\+component\>,'.
|
||||
\ s:NE.'\<architecture\>:\<end\s\+architecture\>,'.
|
||||
\ s:NE.'\<package\>:\<end\s\+package\>,'.
|
||||
\ s:NE.'\<procedure\>:\<end\s\+procedure\>,'.
|
||||
\ s:NE.'\<configuration\>:\<end\s\+configuration\>'
|
||||
endif
|
||||
|
||||
" only define indent function once
|
||||
if exists("*GetVHDLindent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetVHDLindent()
|
||||
" store current line & string
|
||||
let curn = v:lnum
|
||||
let curs = getline(curn)
|
||||
|
||||
" find previous line that is not a comment
|
||||
let prevn = prevnonblank(curn - 1)
|
||||
let prevs = getline(prevn)
|
||||
while prevn > 0 && prevs =~ '^\s*--'
|
||||
let prevn = prevnonblank(prevn - 1)
|
||||
let prevs = getline(prevn)
|
||||
endwhile
|
||||
|
||||
" default indent starts as previous non-comment line's indent
|
||||
let ind = prevn > 0 ? indent(prevn) : 0
|
||||
" backup default
|
||||
let ind2 = ind
|
||||
|
||||
" indent: special; kill string so it would not affect other filters
|
||||
" keywords: "report" + string
|
||||
" where: anywhere in current or previous line
|
||||
let s0 = s:NC.'\<report\>\s*".*"'
|
||||
if curs =~? s0
|
||||
let curs = ""
|
||||
endif
|
||||
if prevs =~? s0
|
||||
let prevs = ""
|
||||
endif
|
||||
|
||||
" indent: previous line's comment position, otherwise follow next non-comment line if possible
|
||||
" keyword: "--"
|
||||
" where: start of current line
|
||||
if curs =~ '^\s*--'
|
||||
let pn = curn - 1
|
||||
let ps = getline(pn)
|
||||
if ps =~ '--'
|
||||
return stridx(ps, '--')
|
||||
else
|
||||
" find nextnonblank line that is not a comment
|
||||
let nn = nextnonblank(curn + 1)
|
||||
let ns = getline(nn)
|
||||
while nn > 0 && ns =~ '^\s*--'
|
||||
let nn = nextnonblank(nn + 1)
|
||||
let ns = getline(nn)
|
||||
endwhile
|
||||
let n = indent(nn)
|
||||
return n != -1 ? n : ind
|
||||
endif
|
||||
endif
|
||||
|
||||
" ****************************************************************************************
|
||||
" indent: align generic variables & port names
|
||||
" keywords: "generic", "map", "port" + "(", provided current line is part of mapping
|
||||
" where: anywhere in previous 2 lines
|
||||
" find following previous non-comment line
|
||||
let pn = prevnonblank(prevn - 1)
|
||||
let ps = getline(pn)
|
||||
while pn > 0 && ps =~ '^\s*--'
|
||||
let pn = prevnonblank(pn - 1)
|
||||
let ps = getline(pn)
|
||||
endwhile
|
||||
if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(generic\|map\|port\)\>.*\)\@<!\S\+\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(generic\|map\|port\)'.s:ES && prevs =~ '^\s*('))
|
||||
" align closing ")" with opening "("
|
||||
if curs =~ '^\s*)'
|
||||
return stridx(prevs, '(')
|
||||
endif
|
||||
let m = matchend(prevs, '(\s*\ze\w')
|
||||
if m != -1
|
||||
return m
|
||||
else
|
||||
return stridx(prevs, '(') + &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
" indent: align conditional/select statement
|
||||
" keywords: variable + "<=" without ";" ending
|
||||
" where: start of previous line
|
||||
if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES
|
||||
return matchend(prevs, '<=\s*\ze.')
|
||||
endif
|
||||
|
||||
" indent: backtrace previous non-comment lines for next smaller or equal size indent
|
||||
" keywords: "end" + "record", "units"
|
||||
" where: start of previous line
|
||||
" keyword: ")"
|
||||
" where: start of previous line
|
||||
" keyword: without "<=" + ";" ending
|
||||
" where: anywhere in previous line
|
||||
" keyword: "=>" + ")" ending, provided current line does not begin with ")"
|
||||
" where: anywhere in previous line
|
||||
" _note_: indent allowed to leave this filter
|
||||
let m = 0
|
||||
if prevs =~? '^\s*end\s\+\%(record\|units\)\>'
|
||||
let m = 3
|
||||
elseif prevs =~ '^\s*)'
|
||||
let m = 1
|
||||
elseif prevs =~ s:NC.'\%(<=.*\)\@<!;'.s:ES || (curs !~ '^\s*)' && prevs =~ s:NC.'=>.*'.s:NC.')'.s:ES)
|
||||
let m = 2
|
||||
endif
|
||||
|
||||
if m > 0
|
||||
let pn = prevnonblank(prevn - 1)
|
||||
let ps = getline(pn)
|
||||
while pn > 0
|
||||
let t = indent(pn)
|
||||
if ps !~ '^\s*--' && t < ind
|
||||
" make sure one of these is true
|
||||
" keywords: variable + "<=" without ";" ending
|
||||
" where: start of previous non-comment line
|
||||
" keywords: "generic", "map", "port"
|
||||
" where: anywhere in previous non-comment line
|
||||
" keyword: "("
|
||||
" where: start of previous non-comment line
|
||||
if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES
|
||||
if ps =~? s:NC.'\<\%(generic\|map\|port\)\>' || ps =~ '^\s*('
|
||||
let ind = t
|
||||
endif
|
||||
break
|
||||
endif
|
||||
let ind = t
|
||||
if m > 1
|
||||
" find following previous non-comment line
|
||||
let ppn = prevnonblank(pn - 1)
|
||||
let pps = getline(ppn)
|
||||
while ppn > 0 && pps =~ '^\s*--'
|
||||
let ppn = prevnonblank(ppn - 1)
|
||||
let pps = getline(ppn)
|
||||
endwhile
|
||||
" indent: follow
|
||||
" keyword: "select"
|
||||
" where: end of following previous non-comment line
|
||||
" keyword: "type"
|
||||
" where: start of following previous non-comment line
|
||||
if m == 2
|
||||
let s1 = s:NC.'\<select'.s:ES
|
||||
if ps !~? s1 && pps =~? s1
|
||||
let ind = indent(ppn)
|
||||
endif
|
||||
elseif m == 3
|
||||
let s1 = '^\s*type\>'
|
||||
if ps !~? s1 && pps =~? s1
|
||||
let ind = indent(ppn)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
break
|
||||
endif
|
||||
let pn = prevnonblank(pn - 1)
|
||||
let ps = getline(pn)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" indent: follow indent of previous opening statement, otherwise -sw
|
||||
" keyword: "begin"
|
||||
" where: anywhere in current line
|
||||
if curs =~? s:NC.'\<begin\>'
|
||||
let ind = ind - &sw
|
||||
" find previous opening statement of
|
||||
" keywords: "architecture", "block", "entity", "function", "generate", "procedure", "process"
|
||||
let s2 = s:NC.s:NE.'\<\%(architecture\|block\|entity\|function\|generate\|procedure\|process\)\>'
|
||||
if curs !~? s2.'.*'.s:NC.'\<begin\>.*'.s:ES && prevs =~? s2
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
" indent: +sw if previous line is previous opening statement
|
||||
" keywords: "record", "units"
|
||||
" where: anywhere in current line
|
||||
if curs =~? s:NC.s:NE.'\<\%(record\|units\)\>'
|
||||
" find previous opening statement of
|
||||
" keyword: "type"
|
||||
let s3 = s:NC.s:NE.'\<type\>'
|
||||
if curs !~? s3.'.*'.s:NC.'\<\%(record\|units\)\>.*'.s:ES && prevs =~? s3
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
" ****************************************************************************************
|
||||
" indent: 0
|
||||
" keywords: "architecture", "configuration", "entity", "library", "package"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*\%(architecture\|configuration\|entity\|library\|package\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "is"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type"
|
||||
if curs =~? '^\s*\<is\>' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>'
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "then"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "elsif", "if"
|
||||
if curs =~? '^\s*\<then\>' && prevs =~? s:NC.'\%(\<elsif\>\|'.s:NE.'\<if\>\)'
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "generate"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "for", "if"
|
||||
if curs =~? '^\s*\<generate\>' && prevs =~? s:NC.s:NE.'\%(\%(\<wait\s\+\)\@<!\<for\>\|\<if\>\)'
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keywords: "begin", "block", "loop", "process", "record", "units"
|
||||
" removed: "case", "elsif", "if", "while"
|
||||
" where: anywhere in previous line
|
||||
if prevs =~? s:NC.'\%(\<begin\>\|'.s:NE.'\<\%(block\|loop\|process\|record\|units\)\>\)'
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keywords: "architecture", "component", "configuration", "entity", "for", "package"
|
||||
" removed: "when", "with"
|
||||
" where: start of previous line
|
||||
if prevs =~? '^\s*\%(architecture\|component\|configuration\|entity\|for\|package\)\>'
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keyword: "generate", "is", "select", "=>"
|
||||
" where: end of previous line
|
||||
if prevs =~? s:NC.'\%(\%('.s:NE.'\<generate\|\<is\|\<select\)\|=>\)'.s:ES
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keyword: "else"
|
||||
" where: start of previous line
|
||||
" keyword: "then"
|
||||
" where: end of previous line
|
||||
" _note_: indent allowed to leave this filter
|
||||
if prevs =~? '^\s*else\>' || prevs =~? s:NC.'\<then'.s:ES
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
" ****************************************************************************************
|
||||
" indent: -sw
|
||||
" keywords: "when", provided previous line does not begin with "when"
|
||||
" where: start of current line
|
||||
let s4 = '^\s*when\>'
|
||||
if curs =~? s4
|
||||
if prevs !~? s4
|
||||
return ind - &sw
|
||||
else
|
||||
return ind2
|
||||
endif
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "else", "elsif", provided previous line does not contain "then"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*\%(else\|elsif\)\>'
|
||||
if prevs !~? s:NC.'\<then\>'
|
||||
return ind - &sw
|
||||
else
|
||||
return ind2
|
||||
endif
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "end" + "if", provided previous line does not begin with "else", not contain "then"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+if\>'
|
||||
if prevs !~? '^\s*else\>' && prevs !~? s:NC.'\<then\>'
|
||||
return ind - &sw
|
||||
else
|
||||
return ind2
|
||||
endif
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "end" + "function", "procedure", provided previous line does not contain "begin"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+\%(function\|procedure\)\>'
|
||||
if prevs !~? s:NC.'\<begin\>'
|
||||
return ind - &sw
|
||||
else
|
||||
return ind2
|
||||
endif
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "end" + "block", "for", "generate", "loop", "process", "record", "units"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+\%(block\|for\|generate\|loop\|process\|record\|units\)\>'
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" indent: backtrace previous non-comment lines
|
||||
" keyword: "end" + "case", "component"
|
||||
" where: start of current line
|
||||
let m = 0
|
||||
if curs =~? '^\s*end\s\+case\>'
|
||||
let m = 1
|
||||
elseif curs =~? '^\s*end\s\+component\>'
|
||||
let m = 2
|
||||
endif
|
||||
|
||||
if m > 0
|
||||
" find following previous non-comment line
|
||||
let pn = prevn
|
||||
let ps = getline(pn)
|
||||
while pn > 0
|
||||
if ps !~ '^\s*--'
|
||||
"indent: -2sw
|
||||
"keywords: "end" + "case"
|
||||
"where: start of previous non-comment line
|
||||
"indent: -sw
|
||||
"keywords: "when"
|
||||
"where: start of previous non-comment line
|
||||
"indent: follow
|
||||
"keywords: "case"
|
||||
"where: start of previous non-comment line
|
||||
if m == 1
|
||||
if ps =~? '^\s*end\s\+case\>'
|
||||
return indent(pn) - 2 * &sw
|
||||
elseif ps =~? '^\s*when\>'
|
||||
return indent(pn) - &sw
|
||||
elseif ps =~? '^\s*case\>'
|
||||
return indent(pn)
|
||||
endif
|
||||
"indent: follow
|
||||
"keyword: "component"
|
||||
"where: anywhere in previous non-comment line
|
||||
elseif m == 2
|
||||
if ps =~? s:NC.s:NE.'\<component\>'
|
||||
return indent(pn)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let pn = prevnonblank(pn - 1)
|
||||
let ps = getline(pn)
|
||||
endwhile
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keyword: ")"
|
||||
" where: start of current line
|
||||
if curs =~ '^\s*)'
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" indent: 0
|
||||
" keywords: "end" + "architecture", "configuration", "entity", "package"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+\%(architecture\|configuration\|entity\|package\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "end" + identifier
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+\w\+\>'
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" ****************************************************************************************
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keywords: without "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":="
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*\%(\<\%(generic\|map\|port\)\>.*\)\@<!\S\+\s*:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)'
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" return leftover filtered indent
|
||||
return ind
|
||||
endfunction
|
||||
9314
runtime/kde-tips
9314
runtime/kde-tips
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,8 @@
|
||||
" Vim Keymap file for Persian Standard Keyboard Layout
|
||||
" Maintainers: Behnam Esfahbod <behnam@bamdad.org>,
|
||||
" Amir Hedayaty <amir@bamdad.org>
|
||||
" Last Change: 2004 May 16
|
||||
" Maintainers: Behnam 'ZWNJ' Esfahbod <behnam@zwnj.org>,
|
||||
" Amir Hedayaty <hedayaty@gmail.com>
|
||||
" Last Change: 2005 Nov 30
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
scriptencoding utf-8
|
||||
|
||||
" Use this short name in the status line.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.9 KiB |
@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Sko
|
||||
menutrans Jump\ &back<Tab>^T Sko<EFBFBD>it\ &zp<EFBFBD>t<Tab>^T
|
||||
menutrans Build\ &Tags\ File &Vytvo<EFBFBD>it\ soubor\ tag<EFBFBD>
|
||||
|
||||
menutrans &Spelling &Kontrola\ pravopisu
|
||||
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
|
||||
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
|
||||
menutrans To\ Next\ error<Tab>]s &Dal<EFBFBD><EFBFBD>\ chyba<Tab>]s
|
||||
menutrans To\ Previous\ error<Tab>[s &P<EFBFBD>edchoz<EFBFBD>\ chyba<Tab>[s
|
||||
menutrans Suggest\ Corrections<Tab>z? &N<EFBFBD>vrh\ oprav<Tab>z?
|
||||
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
|
||||
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
|
||||
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
|
||||
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
|
||||
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
|
||||
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
|
||||
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
|
||||
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
|
||||
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
|
||||
menutrans &Find\ More\ Languages Nal<EFBFBD>zt\ dal<EFBFBD><EFBFBD>\ &jazyky
|
||||
|
||||
menutrans &Folding &Foldy
|
||||
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
|
||||
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ <20><>dek\ kurzoru<Tab>zv
|
||||
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &P
|
||||
menutrans &Older\ List<Tab>:cold Sta&r<EFBFBD><EFBFBD>\ seznam<Tab>:cold
|
||||
menutrans N&ewer\ List<Tab>:cnew N&ov<EFBFBD>j<EFBFBD><EFBFBD>\ seznam<Tab>:cnew
|
||||
menutrans Error\ &Window Chybov<EFBFBD>\ o&kno
|
||||
menutrans SeT\ Compiler Nas&taven<EFBFBD>\ kompil<EFBFBD>toru
|
||||
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
|
||||
menutrans &Open<Tab>:copen &Otev<EFBFBD><EFBFBD>t<Tab>:copen
|
||||
menutrans &Close<Tab>:cclose &Zav<EFBFBD><EFBFBD>t<Tab>:cclose
|
||||
|
||||
@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Sko
|
||||
menutrans Jump\ &back<Tab>^T Sko<EFBFBD>it\ &zp<EFBFBD>t<Tab>^T
|
||||
menutrans Build\ &Tags\ File &Vytvo<EFBFBD>it\ soubor\ tag<EFBFBD>
|
||||
|
||||
menutrans &Spelling &Kontrola\ pravopisu
|
||||
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
|
||||
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
|
||||
menutrans To\ Next\ error<Tab>]s &Dal<EFBFBD><EFBFBD>\ chyba<Tab>]s
|
||||
menutrans To\ Previous\ error<Tab>[s &P<EFBFBD>edchoz<EFBFBD>\ chyba<Tab>[s
|
||||
menutrans Suggest\ Corrections<Tab>z? &N<EFBFBD>vrh\ oprav<Tab>z?
|
||||
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
|
||||
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
|
||||
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
|
||||
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
|
||||
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
|
||||
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
|
||||
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
|
||||
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
|
||||
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
|
||||
menutrans &Find\ More\ Languages Nal<EFBFBD>zt\ dal<EFBFBD><EFBFBD>\ &jazyky
|
||||
|
||||
menutrans &Folding &Foldy
|
||||
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
|
||||
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ <20><>dek\ kurzoru<Tab>zv
|
||||
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &P
|
||||
menutrans &Older\ List<Tab>:cold Sta&r<EFBFBD><EFBFBD>\ seznam<Tab>:cold
|
||||
menutrans N&ewer\ List<Tab>:cnew N&ov<EFBFBD>j<EFBFBD><EFBFBD>\ seznam<Tab>:cnew
|
||||
menutrans Error\ &Window Chybov<EFBFBD>\ o&kno
|
||||
menutrans SeT\ Compiler Nas&taven<EFBFBD>\ kompil<EFBFBD>toru
|
||||
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
|
||||
menutrans &Open<Tab>:copen &Otev<EFBFBD><EFBFBD>t<Tab>:copen
|
||||
menutrans &Close<Tab>:cclose &Zav<EFBFBD><EFBFBD>t<Tab>:cclose
|
||||
|
||||
@@ -88,6 +88,23 @@ menutrans &Jump\ to\ this\ tag<Tab>g^] &Skocit\ na\ tag<Tab>g^]
|
||||
menutrans Jump\ &back<Tab>^T Skocit\ &zpet<Tab>^T
|
||||
menutrans Build\ &Tags\ File &Vytvorit\ soubor\ tagu
|
||||
|
||||
menutrans &Spelling &Kontrola\ pravopisu
|
||||
menutrans &Spell\ Check\ On Kontrola\ pravopisu\ &zapnuta
|
||||
menutrans Spell\ Check\ &Off Kontrola\ pravopisu\ &vypnuta
|
||||
menutrans To\ Next\ error<Tab>]s &Dalsi\ chyba<Tab>]s
|
||||
menutrans To\ Previous\ error<Tab>[s &Predchozi\ chyba<Tab>[s
|
||||
menutrans Suggest\ Corrections<Tab>z? &Navrh\ oprav<Tab>z?
|
||||
menutrans Repeat\ correction<Tab>:spellrepall Zopakovat\ &opravu<Tab>:spellrepall
|
||||
menutrans Set\ language\ to\ "en" Nastav\ jazyk\ na\ "en"
|
||||
menutrans Set\ language\ to\ "en_au" Nastav\ jazyk\ na\ "en_au"
|
||||
menutrans Set\ language\ to\ "en_ca" Nastav\ jazyk\ na\ "en_ca"
|
||||
menutrans Set\ language\ to\ "en_gb" Nastav\ jazyk\ na\ "en_gb"
|
||||
menutrans Set\ language\ to\ "en_nz" Nastav\ jazyk\ na\ "en_nz"
|
||||
menutrans Set\ language\ to\ "en_us" Nastav\ jazyk\ na\ "en_us"
|
||||
menutrans Set\ language\ to\ "cz" Nastav\ jazyk\ na\ "cz"
|
||||
menutrans Set\ language\ to\ "cs_cz" Nastav\ jazyk\ na\ "cs_cz"
|
||||
menutrans &Find\ More\ Languages Nalezt\ dalsi\ &jazyky
|
||||
|
||||
menutrans &Folding &Foldy
|
||||
menutrans &Enable/Disable\ folds<Tab>zi &Ano/Ne<Tab>zi
|
||||
menutrans &View\ Cursor\ Line<Tab>zv &Zobrazit\ radek\ kurzoru<Tab>zv
|
||||
@@ -119,6 +136,7 @@ menutrans &Previous\ Error<Tab>:cp &Predchozi\ chyba<Tab>:cp
|
||||
menutrans &Older\ List<Tab>:cold Sta&rsi\ seznam<Tab>:cold
|
||||
menutrans N&ewer\ List<Tab>:cnew N&ovejsi\ seznam<Tab>:cnew
|
||||
menutrans Error\ &Window Chybove\ o&kno
|
||||
menutrans SeT\ Compiler Nas&taveni\ kompilatoru
|
||||
menutrans &Update<Tab>:cwin O&bnovit<Tab>:cwin
|
||||
menutrans &Open<Tab>:copen &Otevrit<Tab>:copen
|
||||
menutrans &Close<Tab>:cclose &Zavrit<Tab>:cclose
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Menu Translations: Espa<70>ol
|
||||
" Maintainer: Alejandro L<>pez-Valencia <dradul@yahoo.com>
|
||||
" Last Change: 2004 May 12
|
||||
" Maintainer: Alejandro L<>pez-Valencia <dradul@users.sourceforge.net>
|
||||
" Version: 6.4.p0-1
|
||||
" Last Change: 2005 Dec 01
|
||||
"
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -86,7 +87,7 @@ menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! Activar/Desactivar\ compatiblida
|
||||
|
||||
menutrans Search\ &Path\.\.\. Ruta\ de\ &b<EFBFBD>squeda\.\.\.
|
||||
|
||||
menutrans Ta&g\ Files\.\.\. Ficheros\ de\ <EFBFBD>ta&gs<EFBFBD>\.\.\.
|
||||
menutrans Ta&g\ Files\.\.\. Ficheros\ de\ &etiquetas\.\.\.
|
||||
|
||||
" GUI options
|
||||
menutrans Toggle\ &Toolbar Ocultar/Mostrar\ barra\ de\ &herramientas
|
||||
@@ -102,7 +103,7 @@ menutrans F&ile\ Settings Opciones\ del\ &fichero
|
||||
|
||||
" Boolean options
|
||||
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Activar/Desactivar\ &numeraci<EFBFBD>n\ de\ l<EFBFBD>neas<Tab>:set\ nu!
|
||||
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Activar/Desactivar\ modo\ <EFBFBD>&list<EFBFBD><Tab>:set\ list!
|
||||
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Activar/Desactivar\ modo\ de\ lista<Tab>:set\ list!
|
||||
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Activar/Desactivar\ &quiebre\ de\ l<EFBFBD>neas<Tab>:set\ wrap!
|
||||
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Activar/Desactivar\ quiebre\ entre\ &palabras<Tab>:set\ lbr!
|
||||
menutrans Toggle\ &expand-tab<Tab>:set\ et! Activar/Desactivar\ &expansi<EFBFBD>n\ de\ marcas\ de\ \tabulado<Tab>:set\ et!
|
||||
@@ -151,9 +152,9 @@ menutrans slovak eslovaco
|
||||
|
||||
" Programming menu
|
||||
menutrans &Tools &Herramientas
|
||||
menutrans &Jump\ to\ this\ tag<Tab>g^] &Saltar\ a\ este\ <EFBFBD>tag<EFBFBD><Tab>g^]
|
||||
menutrans &Jump\ to\ this\ tag<Tab>g^] &Saltar\ a\ este\ etiqueta<Tab>g^]
|
||||
menutrans Jump\ &back<Tab>^T Saltar\ &atr<EFBFBD>s<Tab>^T
|
||||
menutrans Build\ &Tags\ File Crear\ fichero\ de\ <EFBFBD>&tags<EFBFBD>\
|
||||
menutrans Build\ &Tags\ File Crear\ fichero\ de\ &etiquetas\
|
||||
menutrans &Diff Modo\ de\ &diferencias
|
||||
menutrans &Folding &Plegado
|
||||
menutrans &Make<Tab>:make Ejecutar\ <20>&Make<EFBFBD><Tab>:make
|
||||
@@ -260,8 +261,8 @@ if has("toolbar")
|
||||
if 0 " disabled; These are in the Windows menu
|
||||
tmenu ToolBar.New Ventana nueva
|
||||
tmenu ToolBar.WinSplit Dividir ventana
|
||||
tmenu ToolBar.WinMax Ventana m<EFBFBD>xima
|
||||
tmenu ToolBar.WinMin Ventana m<EFBFBD>nima
|
||||
tmenu ToolBar.WinMax Altura m<EFBFBD>xima
|
||||
tmenu ToolBar.WinMin Altura m<EFBFBD>nima
|
||||
tmenu ToolBar.WinVSplit Dividir verticalmente
|
||||
tmenu ToolBar.WinMaxWidth Anchura m<EFBFBD>xima
|
||||
tmenu ToolBar.WinMinWidth Anchura m<EFBFBD>nima
|
||||
@@ -269,11 +270,11 @@ if has("toolbar")
|
||||
endif
|
||||
tmenu ToolBar.LoadSesn Cargar sesi<EFBFBD>n
|
||||
tmenu ToolBar.SaveSesn Guardar sesi<EFBFBD>n
|
||||
tmenu ToolBar.RunScript Ejecutar un <EFBFBD>script<EFBFBD>
|
||||
tmenu ToolBar.RunScript Ejecutar un archivo de <20>rdenes
|
||||
tmenu ToolBar.Make Ejecutar <20>Make<EFBFBD>
|
||||
tmenu ToolBar.Shell Abrir una <EFBFBD>Shell<EFBFBD>
|
||||
tmenu ToolBar.RunCtags Generar un fichero de <EFBFBD>tags<EFBFBD>
|
||||
tmenu ToolBar.TagJump Saltar a un <EFBFBD>tag<EFBFBD>
|
||||
tmenu ToolBar.Shell Abrir un int<EFBFBD>rprete de comandos
|
||||
tmenu ToolBar.RunCtags Generar un fichero de etiquetas
|
||||
tmenu ToolBar.TagJump Saltar a una etiqueta
|
||||
tmenu ToolBar.Help Ayuda
|
||||
tmenu ToolBar.FindHelp Buscar en la ayuda...
|
||||
endfun
|
||||
@@ -282,15 +283,15 @@ endif
|
||||
" Syntax menu
|
||||
menutrans &Syntax &Sintaxis
|
||||
menutrans &Show\ filetypes\ in\ menu &Mostrar\ listas\ de\ <20>tipo\ de\ fichero<EFBFBD>
|
||||
menutrans Set\ '&syntax'\ only Activar\ s<EFBFBD>lo\ <EFBFBD>sintaxis<EFBFBD>
|
||||
menutrans Set\ '&syntax'\ only Activar\ s<EFBFBD>lo\ sintaxis
|
||||
menutrans Set\ '&filetype'\ too Activar\ tambi<EFBFBD>n\ <20>tipo\ de\ fichero<EFBFBD>
|
||||
menutrans &Off &Desactivar\ <EFBFBD>sintaxis<EFBFBD>
|
||||
menutrans &Manual <EFBFBD>sintaxis<EFBFBD>\ &manual
|
||||
menutrans A&utomatic <EFBFBD>sintaxis<EFBFBD>\ a&utom<EFBFBD>tica
|
||||
menutrans &Off &Desactivar\ sintaxis
|
||||
menutrans &Manual sintaxis\ &manual
|
||||
menutrans A&utomatic sintaxis\ a&utom<EFBFBD>tica
|
||||
menutrans on/off\ for\ &This\ file Activar/Desactivar\ en\ es&te\ fichero
|
||||
menutrans Co&lor\ test &Prueba\ de\ colores
|
||||
menutrans &Highlight\ test Prueba\ de\ &realzado
|
||||
menutrans &Convert\ to\ HTML &Convertir\ en\ HTML
|
||||
menutrans &Convert\ to\ HTML &Convertir\ a\ HTML
|
||||
|
||||
" Find Help dialog text
|
||||
let g:menutrans_help_dialog = "Introduzca un nombre de comando o palabra para obtener ayuda;\n\nAnteponga i_ para comandos de entrada (e.g.: i_CTRL-X)\nAnteponga c_ para comandos de la l<>nea de comandos (e.g.: c_<Del>)\nAnteponga ` para un nombre de opci<63>n (e.g.: `shiftwidth`)"
|
||||
|
||||
@@ -12,11 +12,19 @@ The other files contain some handy utilities. They also serve as examples for
|
||||
how to use Vi and Vim functionality.
|
||||
|
||||
dvorak for when you use a Dvorak keyboard
|
||||
|
||||
justify.vim user function for justifying text
|
||||
|
||||
matchit.vim + matchit.txt make % match if-fi, HTML tags, and much more
|
||||
|
||||
less.sh + less.vim make Vim work like less (or more)
|
||||
|
||||
shellmenu.vim menus for editing shell scripts in the GUI version
|
||||
|
||||
swapmous.vim swap left and right mouse buttons
|
||||
|
||||
editexisting.vim when editing a file that is already edited with
|
||||
another Vim instance
|
||||
|
||||
This one is only for Unix. It can be found in the extra archive:
|
||||
file_select.vim macros that make a handy file selector
|
||||
|
||||
100
runtime/macros/editexisting.vim
Normal file
100
runtime/macros/editexisting.vim
Normal file
@@ -0,0 +1,100 @@
|
||||
" Vim Plugin: Edit the file with an existing Vim if possible
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2005 Dec 15
|
||||
|
||||
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
|
||||
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
|
||||
" automatically use the latest version.
|
||||
|
||||
" This plugin serves two purposes:
|
||||
" 1. On startup, if we were invoked with one file name argument and the file
|
||||
" is not modified then try to find another Vim instance that is editing
|
||||
" this file. If there is one then bring it to the foreground and exit.
|
||||
" 2. When a file is edited and a swap file exists for it, try finding that
|
||||
" other Vim and bring it to the foreground. Requires Vim 7, because it
|
||||
" uses the SwapExists autocommand event.
|
||||
|
||||
" Function that finds the Vim instance that is editing "filename" and brings
|
||||
" it to the foreground.
|
||||
func s:EditElsewhere(filename)
|
||||
let fname_esc = substitute(a:filename, "'", "''", "g")
|
||||
|
||||
let servers = serverlist()
|
||||
while servers != ''
|
||||
" Get next server name in "servername"; remove it from "servers".
|
||||
let i = match(servers, "\n")
|
||||
if i == -1
|
||||
let servername = servers
|
||||
let servers = ''
|
||||
else
|
||||
let servername = strpart(servers, 0, i)
|
||||
let servers = strpart(servers, i + 1)
|
||||
endif
|
||||
|
||||
" Skip ourselves.
|
||||
if servername ==? v:servername
|
||||
continue
|
||||
endif
|
||||
|
||||
" Check if this server is editing our file.
|
||||
if remote_expr(servername, "bufloaded('" . fname_esc . "')")
|
||||
" Yes, bring it to the foreground.
|
||||
if has("win32")
|
||||
call remote_foreground(servername)
|
||||
endif
|
||||
call remote_expr(servername, "foreground()")
|
||||
|
||||
if remote_expr(servername, "exists('*EditExisting')")
|
||||
" Make sure the file is visible in a window (not hidden).
|
||||
" If v:swapcommand exists and is set, send it to the server.
|
||||
if exists("v:swapcommand")
|
||||
let c = substitute(v:swapcommand, "'", "''", "g")
|
||||
call remote_expr(servername, "EditExisting('" . fname_esc . "', '" . c . "')")
|
||||
else
|
||||
call remote_expr(servername, "EditExisting('" . fname_esc . "', '')")
|
||||
endif
|
||||
endif
|
||||
|
||||
if !(has('vim_starting') && has('gui_running') && has('gui_win32'))
|
||||
" Tell the user what is happening. Not when the GUI is starting
|
||||
" though, it would result in a message box.
|
||||
echomsg "File is being edited by " . servername
|
||||
sleep 2
|
||||
endif
|
||||
return 'q'
|
||||
endif
|
||||
endwhile
|
||||
return ''
|
||||
endfunc
|
||||
|
||||
" When the plugin is loaded and there is one file name argument: Find another
|
||||
" Vim server that is editing this file right now.
|
||||
if argc() == 1 && !&modified
|
||||
if s:EditElsewhere(expand("%:p")) == 'q'
|
||||
quit
|
||||
endif
|
||||
endif
|
||||
|
||||
" Setup for handling the situation that an existing swap file is found.
|
||||
try
|
||||
au! SwapExists * let v:swapchoice = s:EditElsewhere(expand("<afile>:p"))
|
||||
catch
|
||||
" Without SwapExists we don't do anything for ":edit" commands
|
||||
endtry
|
||||
|
||||
" Function used on the server to make the file visible and possibly execute a
|
||||
" command.
|
||||
func! EditExisting(fname, command)
|
||||
let n = bufwinnr(a:fname)
|
||||
if n > 0
|
||||
exe n . "wincmd w"
|
||||
else
|
||||
exe "split " . escape(a:fname, ' #%"|')
|
||||
endif
|
||||
|
||||
if a:command != ''
|
||||
exe "normal " . a:command
|
||||
endif
|
||||
|
||||
redraw
|
||||
endfunc
|
||||
@@ -1,6 +1,6 @@
|
||||
" Script to define the syntax menu in synmenu.vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2004 Dec 17
|
||||
" Last Change: 2006 Jan 12
|
||||
|
||||
" This is used by "make menu" in the src directory.
|
||||
edit <sfile>:p:h/synmenu.vim
|
||||
@@ -155,7 +155,10 @@ SynMenu DE.Elinks\ config:elinks
|
||||
SynMenu DE.Elm\ filter\ rules:elmfilt
|
||||
SynMenu DE.Embedix\ Component\ Description:ecd
|
||||
SynMenu DE.ERicsson\ LANGuage:erlang
|
||||
SynMenu DE.ESMTP\ rc:esmtprc
|
||||
SynMenu DE.ESQL-C:esqlc
|
||||
SynMenu DE.Essbase\ script:csc
|
||||
SynMenu DE.Esterel:esterel
|
||||
SynMenu DE.Eterm\ config:eterm
|
||||
SynMenu DE.Exim\ conf:exim
|
||||
SynMenu DE.Expect:expect
|
||||
@@ -183,7 +186,9 @@ SynMenu FG.Grub:grub
|
||||
SynMenu FG.GNU\ Server\ Pages:gsp
|
||||
SynMenu FG.GNUplot:gnuplot
|
||||
SynMenu FG.GrADS\ scripts:grads
|
||||
SynMenu FG.Gretl:gretl
|
||||
SynMenu FG.Groff:groff
|
||||
SynMenu FG.Groovy:groovy
|
||||
SynMenu FG.GTKrc:gtkrc
|
||||
|
||||
SynMenu HIJK.Haskell.Haskell:haskell
|
||||
@@ -194,6 +199,7 @@ SynMenu HIJK.Hex\ dump.XXD:xxd
|
||||
SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex
|
||||
SynMenu HIJK.HTML.HTML:html
|
||||
SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4
|
||||
SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby
|
||||
SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah
|
||||
SynMenu HIJK.HTML.HTML/OS:htmlos
|
||||
SynMenu HIJK.HTML.XHTML:xhtml
|
||||
@@ -279,6 +285,7 @@ SynMenu Me-NO.MUSHcode:mush
|
||||
SynMenu Me-NO.Muttrc:muttrc
|
||||
SynMenu Me-NO.Nastran\ input/DMAP:nastran
|
||||
SynMenu Me-NO.Natural:natural
|
||||
SynMenu Me-NO.Netrc:netrc
|
||||
SynMenu Me-NO.Novell\ NCF\ batch:ncf
|
||||
SynMenu Me-NO.Not\ Quite\ C\ (LEGO):nqc
|
||||
SynMenu Me-NO.Nroff:nroff
|
||||
@@ -307,6 +314,7 @@ SynMenu PQ.Pike:pike
|
||||
SynMenu PQ.Pine\ RC:pine
|
||||
SynMenu PQ.Pinfo\ RC:pinfo
|
||||
SynMenu PQ.PL/M:plm
|
||||
SynMenu PQ.PL/SQL:plsql
|
||||
SynMenu PQ.PLP:plp
|
||||
SynMenu PQ.PO\ (GNU\ gettext):po
|
||||
SynMenu PQ.Postfix\ main\ config:pfmain
|
||||
@@ -314,6 +322,7 @@ SynMenu PQ.PostScript.PostScript:postscr
|
||||
SynMenu PQ.PostScript.PostScript\ Printer\ Description:ppd
|
||||
SynMenu PQ.Povray.Povray\ scene\ descr:pov
|
||||
SynMenu PQ.Povray.Povray\ configuration:povini
|
||||
SynMenu PQ.Prescribe\ (Kyocera):prescribe
|
||||
SynMenu PQ.Printcap:pcap
|
||||
SynMenu PQ.Procmail:procmail
|
||||
SynMenu PQ.Product\ Spec\ File:psf
|
||||
@@ -433,6 +442,7 @@ SynMenu TUV.TSS.Optics:tssop
|
||||
SynMenu TUV.UIT/UIL:uil
|
||||
SynMenu TUV.UnrealScript:uc
|
||||
SynMenu TUV.Valgrind:valgrind
|
||||
SynMenu TUV.Verilog-AMS\ HDL:verilogams
|
||||
SynMenu TUV.Verilog\ HDL:verilog
|
||||
SynMenu TUV.Vgrindefs:vgrindefs
|
||||
SynMenu TUV.VHDL:vhdl
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Oct 01
|
||||
" Last Change: 2006 Jan 27
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -1034,7 +1034,7 @@ endif
|
||||
" Select a session to load; default to current session name if present
|
||||
fun! s:LoadVimSesn()
|
||||
if strlen(v:this_session) > 0
|
||||
let name = v:this_session
|
||||
let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
|
||||
else
|
||||
let name = "Session.vim"
|
||||
endif
|
||||
@@ -1046,7 +1046,7 @@ fun! s:SaveVimSesn()
|
||||
if strlen(v:this_session) == 0
|
||||
let v:this_session = "Session.vim"
|
||||
endif
|
||||
execute "browse mksession! " . v:this_session
|
||||
execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
|
||||
endfun
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2004 Jul 27
|
||||
" Last change: 2005 Dec 28
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
@@ -54,7 +54,13 @@ if has("virtualedit")
|
||||
let c = col(".")
|
||||
normal i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
" Avoid a beep when the text ends at the window edge.
|
||||
let vb_save = &vb
|
||||
let t_vb_save = &t_vb
|
||||
set vb t_vb=
|
||||
normal l
|
||||
let &vb = vb_save
|
||||
let &t_vb = t_vb_save
|
||||
endif
|
||||
let &ve = ove
|
||||
endfunc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Oct 02
|
||||
" Last Change: 2006 Jan 13
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -725,6 +725,8 @@ if has("digraphs")
|
||||
endif
|
||||
call append("$", "tildeop\tthe \"~\" command behaves like an operator")
|
||||
call <SID>BinOptionG("top", &top)
|
||||
call append("$", "operatorfunc\tfunction called for the\"g@\" operator")
|
||||
call <SID>OptionG("opfunc", &opfunc)
|
||||
call append("$", "showmatch\tWhen inserting a bracket, briefly jump to its match")
|
||||
call <SID>BinOptionG("sm", &sm)
|
||||
call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'")
|
||||
|
||||
@@ -35,7 +35,7 @@ set cpo&vim
|
||||
" Local Browsing: {{{2
|
||||
augroup FileExplorer
|
||||
au!
|
||||
au BufEnter * call s:LocalBrowse(expand("<amatch>"))
|
||||
au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
|
||||
augroup END
|
||||
|
||||
" Network Browsing Reading Writing: {{{2
|
||||
@@ -47,10 +47,10 @@ augroup Network
|
||||
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
|
||||
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
|
||||
endif
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>")
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>")
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>")
|
||||
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>")
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'Nread 0r "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
|
||||
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
|
||||
augroup END
|
||||
|
||||
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
|
||||
@@ -69,6 +69,12 @@ com! -nargs=? -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
|
||||
" Commands: NetrwSettings {{{2
|
||||
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
|
||||
|
||||
" Maps:
|
||||
if !hasmapto('<Plug>NetrwBrowseX')
|
||||
nmap <unique> gx <Plug>NetrwBrowseX
|
||||
endif
|
||||
nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LocalBrowse: {{{2
|
||||
fun! s:LocalBrowse(dirname)
|
||||
@@ -76,7 +82,7 @@ fun! s:LocalBrowse(dirname)
|
||||
" the BufEnter event causes triggering when attempts to write to
|
||||
" the DBG buffer are made.
|
||||
if isdirectory(a:dirname)
|
||||
call netrw#DirBrowse(a:dirname)
|
||||
silent! call netrw#DirBrowse(a:dirname)
|
||||
endif
|
||||
" not a directory, ignore it
|
||||
endfun
|
||||
|
||||
15
runtime/plugin/spellfile.vim
Normal file
15
runtime/plugin/spellfile.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
" Vim plugin for downloading spell files
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Feb 01
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded
|
||||
" - when 'compatible' is set
|
||||
" - some autocommands are already taking care of spell files
|
||||
if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing")
|
||||
finish
|
||||
endif
|
||||
let loaded_spellfile_plugin = 1
|
||||
|
||||
" The function is in the autoload directory.
|
||||
autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>'))
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2005 Oct 12
|
||||
" Last change: 2006 Feb 01
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -184,7 +184,7 @@ else
|
||||
" - "*** " in first line and "--- " in second line (context diff).
|
||||
" - "# It was generated by makepatch " in the second line (makepatch diff).
|
||||
" - "Index: <filename>" in the first line (CVS file)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
|
||||
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
|
||||
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
|
||||
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
|
||||
|
||||
22
runtime/spell/cleanadd.vim
Normal file
22
runtime/spell/cleanadd.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Vim script to clean the ll.xxxxx.add files of commented out entries
|
||||
" Author: Antonio Colombo, Bram Moolenaar
|
||||
" Last Update: 2006 Jan 19
|
||||
|
||||
" Time in seconds after last time an ll.xxxxx.add file was updated
|
||||
" Default is one hour.
|
||||
if !exists("g:spell_clean_limit")
|
||||
let g:spell_clean_limit = 60 * 60
|
||||
endif
|
||||
|
||||
" Loop over all the runtime/spell/*.add files.
|
||||
for s:fname in split(globpath(&rtp, "spell/*.add"), "\n")
|
||||
if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit
|
||||
silent exe "split " . escape(s:fname, ' \')
|
||||
echo "Processing" s:fname
|
||||
silent! g/^#/d
|
||||
silent update
|
||||
close
|
||||
endif
|
||||
endfor
|
||||
|
||||
echo "Done"
|
||||
Binary file not shown.
BIN
runtime/spell/en.ascii.sug
Normal file
BIN
runtime/spell/en.ascii.sug
Normal file
Binary file not shown.
Binary file not shown.
BIN
runtime/spell/en.latin1.sug
Normal file
BIN
runtime/spell/en.latin1.sug
Normal file
Binary file not shown.
Binary file not shown.
BIN
runtime/spell/en.utf-8.sug
Normal file
BIN
runtime/spell/en.utf-8.sug
Normal file
Binary file not shown.
@@ -16,8 +16,7 @@ $SPELLDIR/fo.latin1.spl : $FILES
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
|
||||
|
||||
$SPELLDIR/fo.utf-8.spl : $FILES
|
||||
:sys env LANG=fo_FO.UTF-8
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
|
||||
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/fo fo_FO" -c q
|
||||
|
||||
../README_fo.txt : README_fo_FO.txt Copyright
|
||||
:cat $source >! $target
|
||||
|
||||
@@ -16,8 +16,7 @@ $SPELLDIR/gd.latin1.spl : $FILES
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
|
||||
|
||||
$SPELLDIR/gd.utf-8.spl : $FILES
|
||||
:sys env LANG=gd_GB.UTF-8
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
|
||||
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/gd gd_GB" -c q
|
||||
|
||||
../README_gd.txt : README_gd_GB.txt
|
||||
:copy $source $target
|
||||
|
||||
@@ -12,11 +12,11 @@ FILES = gl_ES.aff gl_ES.dic
|
||||
all: $SPELLDIR/gl.latin1.spl $SPELLDIR/gl.utf-8.spl ../README_gl.txt
|
||||
|
||||
$SPELLDIR/gl.latin1.spl : $FILES
|
||||
:sys env LANG=gl_ES.ISO8859-1
|
||||
:sys env LANG=es_ES.ISO8859-1
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
|
||||
|
||||
$SPELLDIR/gl.utf-8.spl : $FILES
|
||||
:sys env LANG=gl_ES.UTF-8
|
||||
:sys env LANG=es_ES.UTF-8
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
|
||||
|
||||
../README_gl.txt : README_gl_ES.txt
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
# aap generate all the .spl files
|
||||
# aap diff create all the diff files
|
||||
|
||||
# "hu" is at the end, because it takes a very long time.
|
||||
LANG = af am bg ca cs cy da de el en eo es fr fo ga gd gl he hr id it ku
|
||||
la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
|
||||
tet th tl tn uk yi zu hu
|
||||
|
||||
# "hu" is at the end, because it takes a very long time.
|
||||
#
|
||||
# TODO:
|
||||
# Finnish doesn't work, the dictionary fi_FI.zip file contains hyphenation...
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,7 @@ $SPELLDIR/tl.latin1.spl : $FILES
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
|
||||
|
||||
$SPELLDIR/tl.utf-8.spl : $FILES
|
||||
:sys env LANG=tl_PH.UTF-8
|
||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
|
||||
:sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/tl tl_PH" -c q
|
||||
|
||||
../README_tl.txt : README_tl_PH.txt
|
||||
:copy $source $target
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Feb 26
|
||||
" Last Change: 2005 Dec 04
|
||||
" (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
|
||||
" (XHTML support by Panagiotis Issaris <takis@lumumba.luc.ac.be>)
|
||||
|
||||
@@ -164,6 +164,8 @@ else
|
||||
let s:html_encoding = substitute(s:vim_encoding, 'cp', 'windows-', '')
|
||||
elseif s:vim_encoding == 'sjis'
|
||||
let s:html_encoding = 'Shift_JIS'
|
||||
elseif s:vim_encoding == 'big5'
|
||||
let s:html_encoding = "Big5"
|
||||
elseif s:vim_encoding == 'euc-cn'
|
||||
let s:html_encoding = 'GB_2312-80'
|
||||
elseif s:vim_encoding == 'euc-tw'
|
||||
|
||||
104
runtime/syntax/eviews.vim
Normal file
104
runtime/syntax/eviews.vim
Normal file
@@ -0,0 +1,104 @@
|
||||
" Vim syntax file
|
||||
" Language: Eviews (http://www.eviews.com)
|
||||
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Last Change: 2006 Jan 11
|
||||
" Filenames: *.prg
|
||||
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
else
|
||||
set iskeyword=@,48-57,_,.
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" Comment
|
||||
syn match eComment /\'.*/
|
||||
|
||||
" Constant
|
||||
" string enclosed in double quotes
|
||||
syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
" number with no fractional part or exponent
|
||||
syn match eNumber /\d\+/
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match eFloat /\d\+[Ee][-+]\=\d\+/
|
||||
|
||||
" Identifier
|
||||
" identifier with leading letter and optional following keyword characters
|
||||
syn match eIdentifier /\a\k*/
|
||||
|
||||
" Eviews Programing Language
|
||||
syn keyword eProgLang @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop @temppath then @time to @toc wend while include call subroutine endsub and or
|
||||
|
||||
" Eviews Objects, Views and Procedures
|
||||
syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
|
||||
|
||||
|
||||
" Standard Eviews Commands
|
||||
syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair
|
||||
|
||||
" Constant Identifier
|
||||
syn match eConstant /\!\k*/
|
||||
" String Identifier
|
||||
syn match eStringId /%\k*/
|
||||
" Command Identifier
|
||||
syn match eCommand /@\k*/
|
||||
|
||||
" Special
|
||||
syn match eDelimiter /[,;:]/
|
||||
|
||||
" Error
|
||||
syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
|
||||
syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
|
||||
syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
|
||||
syn match eError /[)\]}]/
|
||||
syn match eBraceError /[)}]/ contained
|
||||
syn match eCurlyError /[)\]]/ contained
|
||||
syn match eParenError /[\]}]/ contained
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_r_syn_inits")
|
||||
if version < 508
|
||||
let did_r_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
HiLink eComment Comment
|
||||
HiLink eConstant Identifier
|
||||
HiLink eStringId Identifier
|
||||
HiLink eCommand Type
|
||||
HiLink eString String
|
||||
HiLink eNumber Number
|
||||
HiLink eBoolean Boolean
|
||||
HiLink eFloat Float
|
||||
HiLink eConditional Conditional
|
||||
HiLink eProgLang Statement
|
||||
HiLink eOVP Statement
|
||||
HiLink eStdCmd Statement
|
||||
HiLink eIdentifier Normal
|
||||
HiLink eDelimiter Delimiter
|
||||
HiLink eError Error
|
||||
HiLink eBraceError Error
|
||||
HiLink eCurlyError Error
|
||||
HiLink eParenError Error
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax="eviews"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
102
runtime/syntax/gretl.vim
Normal file
102
runtime/syntax/gretl.vim
Normal file
@@ -0,0 +1,102 @@
|
||||
" Vim syntax file
|
||||
" Language: gretl (http://gretl.sf.net)
|
||||
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Last Change: 2006 Jan 6
|
||||
" Filenames: *.inp *.gretl
|
||||
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
else
|
||||
set iskeyword=@,48-57,_,.
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" Constant
|
||||
" string enclosed in double quotes
|
||||
syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
" number with no fractional part or exponent
|
||||
syn match gNumber /\d\+/
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match gFloat /\d\+[Ee][-+]\=\d\+/
|
||||
|
||||
" Gretl commands
|
||||
syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls
|
||||
|
||||
"Gretl genr functions
|
||||
syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem
|
||||
|
||||
" Identifier
|
||||
" identifier with leading letter and optional following keyword characters
|
||||
syn match gIdentifier /\a\k*/
|
||||
|
||||
" Variable with leading $
|
||||
syn match gVariable /\$\k*/
|
||||
" Arrow
|
||||
syn match gArrow /<-/
|
||||
|
||||
" Special
|
||||
syn match gDelimiter /[,;:]/
|
||||
|
||||
" Error
|
||||
syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend
|
||||
syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
|
||||
syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
|
||||
syn match gError /[)\]}]/
|
||||
syn match gBraceError /[)}]/ contained
|
||||
syn match gCurlyError /[)\]]/ contained
|
||||
syn match gParenError /[\]}]/ contained
|
||||
|
||||
" Comment
|
||||
syn match gComment /#.*/
|
||||
syn match gBCstart /(\*/
|
||||
syn match gBCend /\*)/
|
||||
|
||||
syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)"
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_r_syn_inits")
|
||||
if version < 508
|
||||
let did_r_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
HiLink gComment Comment
|
||||
HiLink gCommentStart Comment
|
||||
HiLink gBlockComment Comment
|
||||
HiLink gString String
|
||||
HiLink gNumber Number
|
||||
HiLink gBoolean Boolean
|
||||
HiLink gFloat Float
|
||||
HiLink gCommands Repeat
|
||||
HiLink gGenrFunc Type
|
||||
HiLink gDelimiter Delimiter
|
||||
HiLink gError Error
|
||||
HiLink gBraceError Error
|
||||
HiLink gCurlyError Error
|
||||
HiLink gParenError Error
|
||||
HiLink gIdentifier Normal
|
||||
HiLink gVariable Identifier
|
||||
HiLink gArrow Repeat
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax="gretl"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Java
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/java.vim
|
||||
" Last Change: 2005 Nov 04
|
||||
" Last Change: 2006 Jan 15
|
||||
|
||||
" Please check :help java.vim for comments on some of the options available.
|
||||
|
||||
@@ -65,48 +65,42 @@ syn match javaUserLabelRef "\k\+" contained
|
||||
syn match javaVarArg "\.\.\."
|
||||
syn keyword javaScopeDecl public protected private abstract
|
||||
|
||||
if exists("java_highlight_java_lang_ids") || exists("java_highlight_java_lang") || exists("java_highlight_all")
|
||||
if exists("java_highlight_java_lang_ids")
|
||||
let java_highlight_all=1
|
||||
endif
|
||||
if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang")
|
||||
" java.lang.*
|
||||
syn match javaLangClass "\<System\>"
|
||||
syn keyword javaLangClass Cloneable Comparable Runnable Boolean Byte Class
|
||||
syn keyword javaLangClass Character CharSequence ClassLoader Compiler Double Float
|
||||
syn keyword javaLangClass Integer InheritableThreadLocal Long Math Number Object Package Process
|
||||
syn keyword javaLangClass Runtime RuntimePermission InheritableThreadLocal
|
||||
syn keyword javaLangClass SecurityManager Short String StrictMath StackTraceElement
|
||||
syn keyword javaLangClass StringBuffer Thread ThreadGroup
|
||||
syn keyword javaLangClass ThreadLocal Throwable Void ArithmeticException
|
||||
syn keyword javaLangClass ArrayIndexOutOfBoundsException AssertionError
|
||||
syn keyword javaLangClass ArrayStoreException ClassCastException
|
||||
syn keyword javaLangClass ClassNotFoundException
|
||||
syn keyword javaLangClass CloneNotSupportedException Exception
|
||||
syn keyword javaLangClass IllegalAccessException
|
||||
syn keyword javaLangClass IllegalArgumentException
|
||||
syn keyword javaLangClass IllegalMonitorStateException
|
||||
syn keyword javaLangClass IllegalStateException
|
||||
syn keyword javaLangClass IllegalThreadStateException
|
||||
syn keyword javaLangClass IndexOutOfBoundsException
|
||||
syn keyword javaLangClass InstantiationException InterruptedException
|
||||
syn keyword javaLangClass NegativeArraySizeException NoSuchFieldException
|
||||
syn keyword javaLangClass NoSuchMethodException NullPointerException
|
||||
syn keyword javaLangClass NumberFormatException RuntimeException
|
||||
syn keyword javaLangClass SecurityException StringIndexOutOfBoundsException
|
||||
syn keyword javaLangClass UnsupportedOperationException
|
||||
syn keyword javaLangClass AbstractMethodError ClassCircularityError
|
||||
syn keyword javaLangClass ClassFormatError Error ExceptionInInitializerError
|
||||
syn keyword javaLangClass IllegalAccessError InstantiationError
|
||||
syn keyword javaLangClass IncompatibleClassChangeError InternalError
|
||||
syn keyword javaLangClass LinkageError NoClassDefFoundError
|
||||
syn keyword javaLangClass NoSuchFieldError NoSuchMethodError
|
||||
syn keyword javaLangClass OutOfMemoryError StackOverflowError
|
||||
syn keyword javaLangClass ThreadDeath UnknownError UnsatisfiedLinkError
|
||||
syn keyword javaLangClass UnsupportedClassVersionError VerifyError
|
||||
syn keyword javaLangClass VirtualMachineError
|
||||
syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException
|
||||
syn cluster javaTop add=javaR_JavaLang
|
||||
syn cluster javaClasses add=javaR_JavaLang
|
||||
JavaHiLink javaR_JavaLang javaR_Java
|
||||
syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary
|
||||
syn cluster javaTop add=javaC_JavaLang
|
||||
syn cluster javaClasses add=javaC_JavaLang
|
||||
JavaHiLink javaC_JavaLang javaC_Java
|
||||
syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError
|
||||
syn cluster javaTop add=javaE_JavaLang
|
||||
syn cluster javaClasses add=javaE_JavaLang
|
||||
JavaHiLink javaE_JavaLang javaE_Java
|
||||
syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException
|
||||
syn cluster javaTop add=javaX_JavaLang
|
||||
syn cluster javaClasses add=javaX_JavaLang
|
||||
JavaHiLink javaX_JavaLang javaX_Java
|
||||
|
||||
JavaHiLink javaR_Java javaR_
|
||||
JavaHiLink javaC_Java javaC_
|
||||
JavaHiLink javaE_Java javaE_
|
||||
JavaHiLink javaX_Java javaX_
|
||||
JavaHiLink javaX_ javaExceptions
|
||||
JavaHiLink javaR_ javaExceptions
|
||||
JavaHiLink javaE_ javaExceptions
|
||||
JavaHiLink javaC_ javaConstant
|
||||
|
||||
syn keyword javaLangObject clone equals finalize getClass hashCode
|
||||
syn keyword javaLangObject notify notifyAll toString wait
|
||||
JavaHiLink javaLangClass javaConstant
|
||||
JavaHiLink javaLangObject javaConstant
|
||||
syn cluster javaTop add=javaLangObject,javaLangClass
|
||||
syn cluster javaClasses add=javaLangClass
|
||||
syn cluster javaTop add=javaLangObject
|
||||
endif
|
||||
|
||||
if filereadable(expand("<sfile>:p:h")."/javaid.vim")
|
||||
@@ -162,13 +156,15 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp'
|
||||
" syntax coloring for javadoc comments (HTML)
|
||||
syntax include @javaHtml <sfile>:p:h/html.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaTodo,@Spell
|
||||
syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags
|
||||
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
|
||||
syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
|
||||
|
||||
syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||
syn match javaDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
|
||||
syn match javaDocParam contained "\s\S\+"
|
||||
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
|
||||
syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||
syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
|
||||
syn match javaDocParam contained "\s\S\+"
|
||||
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
|
||||
syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam
|
||||
syn match javaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
|
||||
syntax case match
|
||||
endif
|
||||
|
||||
@@ -323,6 +319,7 @@ if version >= 508 || !exists("did_java_syn_inits")
|
||||
JavaHiLink javaCommentTitle SpecialComment
|
||||
JavaHiLink javaDocTags Special
|
||||
JavaHiLink javaDocParam Function
|
||||
JavaHiLink javaDocSeeTagParam Function
|
||||
JavaHiLink javaCommentStar javaComment
|
||||
|
||||
JavaHiLink javaType Type
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: M4
|
||||
" Maintainer: Claudio Fleiner
|
||||
" Maintainer: Claudio Fleiner (claudio@fleiner.com)
|
||||
" URL: http://www.fleiner.com/vim/syntax/m4.vim
|
||||
" Last Change: 2001 Apr 26
|
||||
" Last Change: 2005 Jan 15
|
||||
|
||||
" This file will highlight user function calls if they use only
|
||||
" capital letters and have at least one argument (i.e. the '('
|
||||
@@ -23,9 +23,9 @@ endif
|
||||
" define the m4 syntax
|
||||
syn match m4Variable contained "\$\d\+"
|
||||
syn match m4Special contained "$[@*#]"
|
||||
syn match m4Comment "dnl\>.*" contains=SpellErrors
|
||||
syn match m4Constants "\(\<m4_\)\=__file__"
|
||||
syn match m4Constants "\(\<m4_\)\=__line__"
|
||||
syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
|
||||
syn match m4Constants "\<\(m4_\)\=__file__"
|
||||
syn match m4Constants "\<\(m4_\)\=__line__"
|
||||
syn keyword m4Constants divnum sysval m4_divnum m4_sysval
|
||||
syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top
|
||||
syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
" Vim syntax file
|
||||
" Language: R (GNU S)
|
||||
" Maintainer: Tom Payne <tom@tompayne.org>
|
||||
" Last Change: 2003 May 11
|
||||
" Filenames: *.r
|
||||
" URL: http://www.tompayne.org/vim/syntax/r.vim
|
||||
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Last Change: 2006 January 12
|
||||
" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
|
||||
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
|
||||
|
||||
" First maintainer Tom Payne <tom@tompayne.org>
|
||||
" Modified to make syntax less colourful and added the highlighting of
|
||||
" R assignment arrow
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -54,9 +58,10 @@ syn keyword rConstant LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant NULL
|
||||
syn keyword rBoolean FALSE TRUE
|
||||
syn keyword rNumber NA
|
||||
syn match rArrow /<\{1,2}-/
|
||||
|
||||
" Type
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
|
||||
" Special
|
||||
syn match rDelimiter /[,;:]/
|
||||
@@ -89,8 +94,9 @@ if version >= 508 || !exists("did_r_syn_inits")
|
||||
HiLink rStatement Statement
|
||||
HiLink rConditional Conditional
|
||||
HiLink rRepeat Repeat
|
||||
HiLink rIdentifier Identifier
|
||||
HiLink rType Type
|
||||
HiLink rIdentifier Normal
|
||||
HiLink rArrow Statement
|
||||
HiLink rType Type
|
||||
HiLink rDelimiter Delimiter
|
||||
HiLink rError Error
|
||||
HiLink rBraceError Error
|
||||
@@ -102,3 +108,4 @@ endif
|
||||
let b:current_syntax="r"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user