Compare commits

...

99 Commits

Author SHA1 Message Date
Bram Moolenaar
8ada17c4d9 updated for version 7.0182 2006-01-19 22:16:24 +00:00
Bram Moolenaar
05a7bb363b updated for version 7.0182 2006-01-19 22:09:32 +00:00
Bram Moolenaar
c32840f267 updated for version 7.0181 2006-01-14 21:23:38 +00:00
Bram Moolenaar
04dbce064e updated for version 7.0181 2006-01-14 21:20:41 +00:00
Bram Moolenaar
316059c019 updated for version 7.0181 2006-01-14 21:18:42 +00:00
Bram Moolenaar
ea8bd73212 updated for version 7.0181 2006-01-14 21:15:59 +00:00
Bram Moolenaar
a40ceaf88a updated for version 7.0180 2006-01-13 22:35:40 +00:00
Bram Moolenaar
4770d09abd updated for version 7.0179 2006-01-12 23:22:24 +00:00
Bram Moolenaar
1cbe5f739d updated for version 7.0178 2005-12-29 22:51:09 +00:00
Bram Moolenaar
c7486e034e updated for version 7.0178 2005-12-29 22:48:26 +00:00
Bram Moolenaar
86e01085a1 updated for version 7.0178 2005-12-29 22:45:34 +00:00
Bram Moolenaar
371baa928d updated for version 7.0178 2005-12-29 22:43:53 +00:00
Bram Moolenaar
ebefac63f3 updated for version 7.0177 2005-12-28 22:39:57 +00:00
Bram Moolenaar
cc984263d7 updated for version 7.0176 2005-12-23 22:19:46 +00:00
Bram Moolenaar
0ce33f34a4 updated for version 7.0176 2005-12-23 22:16:03 +00:00
Bram Moolenaar
8fa0445c4f updated for version 7.0176 2005-12-23 22:13:51 +00:00
Bram Moolenaar
5c2f050d91 updated for version 7.0176 2005-12-23 22:11:04 +00:00
Bram Moolenaar
f4cd3e8074 updated for version 7.0175 2005-12-22 22:47:02 +00:00
Bram Moolenaar
bb1004ee56 updated for version 7.0174 2005-12-19 22:15:59 +00:00
Bram Moolenaar
a9b1e74b5d updated for version 7.0174 2005-12-19 22:14:58 +00:00
Bram Moolenaar
195d6357b4 updated for version 7.0174 2005-12-19 22:08:24 +00:00
Bram Moolenaar
46b8015066 updated for version 7.0174 2005-12-19 22:06:56 +00:00
Bram Moolenaar
e3226be91a updated for version 7.0173 2005-12-18 22:10:00 +00:00
Bram Moolenaar
d35f9711d4 updated for version 7.0173 2005-12-18 22:02:33 +00:00
Bram Moolenaar
da1b1a7357 updated for version 7.0173 2005-12-18 21:59:16 +00:00
Bram Moolenaar
3b18181f28 updated for version 7.0172 2005-12-17 22:10:02 +00:00
Bram Moolenaar
acf534595b updated for version 7.0172 2005-12-17 22:06:52 +00:00
Bram Moolenaar
97d29a1ace updated for version 7.0172 2005-12-17 22:02:57 +00:00
Bram Moolenaar
146522e760 updated for version 7.0171 2005-12-16 21:55:46 +00:00
Bram Moolenaar
83c465c705 updated for version 7.0171 2005-12-16 21:53:56 +00:00
Bram Moolenaar
12033fb4bf updated for version 7.0171 2005-12-16 21:49:31 +00:00
Bram Moolenaar
bca84a12bd updated for version 7.0170 2005-12-14 22:08:35 +00:00
Bram Moolenaar
38f1825274 updated for version 7.0170 2005-12-14 22:04:43 +00:00
Bram Moolenaar
61da4986dd updated for version 7.0170 2005-12-14 22:02:18 +00:00
Bram Moolenaar
6496966ad1 updated for version 7.0170 2005-12-14 21:59:55 +00:00
Bram Moolenaar
b2c2efa53a updated for version 7.0169 2005-12-13 20:09:08 +00:00
Bram Moolenaar
c6d8db78b1 updated for version 7.0169 2005-12-13 20:04:55 +00:00
Bram Moolenaar
b0bf8580c3 updated for version 7.0169 2005-12-13 20:02:15 +00:00
Bram Moolenaar
900b4d77f0 updated for version 7.0168 2005-12-12 22:05:50 +00:00
Bram Moolenaar
2c7a29c7fd updated for version 7.0168 2005-12-12 22:02:31 +00:00
Bram Moolenaar
5b962cf71c updated for version 7.0168 2005-12-12 21:58:40 +00:00
Bram Moolenaar
63a121b750 updated for version 7.0167 2005-12-11 21:36:39 +00:00
Bram Moolenaar
b348038631 updated for version 7.0167 2005-12-11 21:33:32 +00:00
Bram Moolenaar
292ad19e92 updated for version 7.0167 2005-12-11 21:29:51 +00:00
Bram Moolenaar
cdbac1ee33 updated for version 7.0167 2005-12-11 21:27:22 +00:00
Bram Moolenaar
cc016f5410 updated for version 7.0166 2005-12-10 20:23:46 +00:00
Bram Moolenaar
e5180526fd updated for version 7.0166 2005-12-10 20:19:46 +00:00
Bram Moolenaar
24552beda0 updated for version 7.0166 2005-12-10 20:17:30 +00:00
Bram Moolenaar
43abc52195 updated for version 7.0166 2005-12-10 20:15:02 +00:00
Bram Moolenaar
ba930509b0 updated for version 7.0165 2005-12-08 22:05:05 +00:00
Bram Moolenaar
18f9a79673 updated for version 7.0165 2005-12-08 22:02:51 +00:00
Bram Moolenaar
77197e44d6 updated for version 7.0165 2005-12-08 22:00:22 +00:00
Bram Moolenaar
d5bc83f576 updated for version 7.0164 2005-12-07 21:07:59 +00:00
Bram Moolenaar
4e330bbf21 updated for version 7.0164 2005-12-07 21:04:31 +00:00
Bram Moolenaar
b815dac061 updated for version 7.0164 2005-12-07 20:59:24 +00:00
Bram Moolenaar
be79f90adc updated for version 7.0164 2005-12-07 20:56:14 +00:00
Bram Moolenaar
e64ac77a28 updated for version 7.0164 2005-12-07 20:54:59 +00:00
Bram Moolenaar
241a8aaa48 updated for version 7.0163 2005-12-06 20:04:44 +00:00
Bram Moolenaar
9372a11ca6 updated for version 7.0163 2005-12-06 19:59:18 +00:00
Bram Moolenaar
cef9dcc37e updated for version 7.0163 2005-12-06 19:50:41 +00:00
Bram Moolenaar
943d2b5b80 updated for version 7.0162 2005-12-02 00:50:49 +00:00
Bram Moolenaar
f4d1145328 updated for version 7.0162 2005-12-02 00:46:37 +00:00
Bram Moolenaar
c6039d8fcb updated for version 7.0162 2005-12-02 00:44:04 +00:00
Bram Moolenaar
bba577a242 updated for version 7.0161 2005-11-28 23:05:55 +00:00
Bram Moolenaar
36c31f71ad updated for version 7.0161 2005-11-28 23:01:53 +00:00
Bram Moolenaar
9835862c81 updated for version 7.0161 2005-11-28 22:58:23 +00:00
Bram Moolenaar
a39571032c updated for version 7.0161 2005-11-28 22:56:19 +00:00
Bram Moolenaar
c64d13ad5b updated for version 7.0160 2005-11-26 23:48:46 +00:00
Bram Moolenaar
16d8f87b45 updated for version 7.0160 2005-11-26 23:46:11 +00:00
Bram Moolenaar
5fe38612c9 updated for version 7.0160 2005-11-26 23:45:02 +00:00
Bram Moolenaar
3d2381ec09 updated for version 7.0160 2005-11-26 23:42:09 +00:00
Bram Moolenaar
b4d392824a updated for version 7.0160 2005-11-26 23:40:59 +00:00
Bram Moolenaar
12625caaa3 updated for version 7.0159 2005-11-25 19:58:47 +00:00
Bram Moolenaar
1afcace307 updated for version 7.0159 2005-11-25 19:54:28 +00:00
Bram Moolenaar
c20658076d updated for version 7.0159 2005-11-25 19:50:52 +00:00
Bram Moolenaar
a5792f5890 updated for version 7.0158 2005-11-23 21:25:05 +00:00
Bram Moolenaar
af289d333a updated for version 7.0157 2005-10-12 21:01:44 +00:00
Bram Moolenaar
a5fac54aea updated for version 7.0157 2005-10-12 20:58:49 +00:00
Bram Moolenaar
61036991ab updated for version 7.0157 2005-10-12 20:54:52 +00:00
Bram Moolenaar
8349fd7c7e updated for version 7.0157 2005-10-12 20:52:20 +00:00
Bram Moolenaar
784c614cb1 updated for version 7.0156 2005-10-11 20:34:58 +00:00
Bram Moolenaar
95b28ecc4a updated for version 7.0156 2005-10-11 20:32:28 +00:00
Bram Moolenaar
202795bed4 updated for version 7.0156 2005-10-11 20:29:39 +00:00
Bram Moolenaar
a5fb28b609 updated for version 7.0155 2005-10-10 21:00:54 +00:00
Bram Moolenaar
d5cdbeb8dd updated for version 7.0155 2005-10-10 20:59:28 +00:00
Bram Moolenaar
196dfbcca1 updated for version 7.0154 2005-10-04 09:16:35 +00:00
Bram Moolenaar
ac30844d60 updated for version 7.0154 2005-10-04 09:14:13 +00:00
Bram Moolenaar
4b77947252 updated for version 7.0154 2005-10-04 09:12:31 +00:00
Bram Moolenaar
8d4f404a7b updated for version 7.0154 2005-10-04 09:08:17 +00:00
Bram Moolenaar
9b9714bee4 updated for version 7.0154 2005-10-04 09:06:09 +00:00
Bram Moolenaar
761b1131b8 updated for version 7.0153 2005-10-03 22:05:45 +00:00
Bram Moolenaar
07d4d7328a updated for version 7.0153 2005-10-03 22:04:08 +00:00
Bram Moolenaar
1c7715dfe4 updated for version 7.0153 2005-10-03 22:02:18 +00:00
Bram Moolenaar
bb15b65864 updated for version 7.0153 2005-10-03 21:52:09 +00:00
Bram Moolenaar
69e0ff94dc updated for version 7.0152 2005-09-30 21:23:56 +00:00
Bram Moolenaar
c54b8a78fa updated for version 7.0152 2005-09-30 21:20:29 +00:00
Bram Moolenaar
f25fd51b89 updated for version 7.0152 2005-09-30 21:15:37 +00:00
Bram Moolenaar
4effc80a8c updated for version 7.0152 2005-09-30 21:12:02 +00:00
Bram Moolenaar
482aaeb058 updated for version 7.0151 2005-09-29 18:26:07 +00:00
312 changed files with 81374 additions and 33713 deletions

View File

@@ -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 \
@@ -52,6 +52,7 @@ SRC_ALL1 = \
src/ops.c \
src/option.c \
src/option.h \
src/popupmenu.c \
src/quickfix.c \
src/regexp.c \
src/regexp.h \
@@ -71,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 \
@@ -111,6 +111,7 @@ SRC_ALL2 = \
src/proto/normal.pro \
src/proto/ops.pro \
src/proto/option.pro \
src/proto/popupmenu.pro \
src/proto/quickfix.pro \
src/proto/regexp.pro \
src/proto/screen.pro \
@@ -136,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 \
@@ -153,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 \
@@ -183,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 \
@@ -217,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 \
@@ -362,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)
@@ -427,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 \
@@ -459,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 \
@@ -533,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 \
@@ -685,6 +668,7 @@ LANG_GEN = \
runtime/tutor/tutor.ko.* \
runtime/tutor/tutor.pl.* \
runtime/tutor/tutor.ru.* \
runtime/tutor/tutor.sk.* \
runtime/tutor/tutor.zh.* \
runtime/spell/README.txt \
runtime/spell/??/*.diff \
@@ -700,6 +684,9 @@ LANG_GEN_BIN = \
runtime/spell/en.ascii.spl \
runtime/spell/en.latin1.spl \
runtime/spell/en.utf-8.spl \
runtime/spell/en.ascii.sug \
runtime/spell/en.latin1.sug \
runtime/spell/en.utf-8.sug \
# all files for lang archive
LANG_SRC = \

View File

@@ -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,12 +64,12 @@ 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.
MAJOR = 6
MINOR = 3
MAJOR = 7
MINOR = 0aa
# Uncomment this line if the Win32s version is to be included.
#DOSBIN_S = dosbin_s
@@ -80,10 +78,11 @@ MINOR = 3
#
# - 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 = 3
# "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 -)
@@ -423,12 +378,15 @@ dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
-rm -rf dist/vim$(VERSION)rt.zip
cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
# Split in two parts to avoid a "argument list too long" error.
dosrt_unix2dos: dist prepare no_title.vim
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(RT_ALL) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
tar cf - \
$(RT_SCRIPTS) \
$(RT_DOS) \
$(RT_NO_UNIX) \
@@ -590,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) \

View File

@@ -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

View File

@@ -4,6 +4,12 @@ These are functions used by plugins and for general use. They will be loaded
automatically when the function is invoked. See ":help autoload".
gzip.vim for editing compressed files
netrw.vim browsing (remote) directories and editing remote files
tar.vim browsing tar files
zip.vim browsing zip files
Occult completion files:
ccomplete.vim C
ccomplete.vim C
csscomplete.vim HTML / CSS
htmlcomplete.vim HTML

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Sep 13
" Last Change: 2005 Dec 18
" This function is used for the 'omnifunc' option.
@@ -10,27 +10,52 @@ function! ccomplete#Complete(findstart, base)
" Locate the start of the item, including "." and "->".
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w\|\.'
if line[start - 1] =~ '\w'
let start -= 1
elseif line[start - 1] =~ '\.'
if lastword == -1
let lastword = start
endif
let start -= 1
elseif start > 1 && line[start - 2] == '-' && line[start - 1] == '>'
if lastword == -1
let lastword = start
endif
let start -= 2
else
break
endif
endwhile
return start
" 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
" Return list of matches.
let base = s:prepended . a:base
" Split item in words, keep empty word after "." or "->".
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
let items = split(a:base, '\.\|->', 1)
let items = split(base, '\.\|->', 1)
if len(items) <= 1
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
endif
" Only one part, no "." or "->": complete from tags file.
" When local completion is wanted CTRL-N would have been used.
return map(taglist('^' . a:base), 'v:val["name"]')
return map(taglist('^' . base), 'v:val["name"]')
endif
" Find the variable items[0].
@@ -62,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
@@ -88,10 +113,7 @@ function! ccomplete#Complete(findstart, base)
endif
endif
" The basetext is up to the last "." or "->" and won't be changed. The
" matching members are concatenated to this.
let basetext = matchstr(a:base, '.*\(\.\|->\)')
return map(res, 'basetext . v:val["match"]')
return map(res, 'v:val["match"]')
endfunc
" Find composing type in "lead" and match items[0] with it.

View File

@@ -1,12 +1,19 @@
" Vim completion script
" Language: CSS 2.1
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Sep 23
" Last Change: 2005 Oct 12
function! csscomplete#CompleteCSS(findstart, base)
if a:findstart
" We need whole line to proper checking
return 0
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
let start -= 1
endwhile
let b:compl_context = getline('.')[0:compl_begin]
return start
else
" There are few chars important for context:
" ^ ; : { } /* */
@@ -14,14 +21,19 @@ else
" Depending on their relative position to cursor we will now what should
" be completed.
" 1. if nearest are ^ or { or ; current word is property
" 2. if : it is value
" 2. if : it is value (with exception of pseudo things)
" 3. if } we are outside of css definitions
" 4. for comments ignoring is be the easiest but assume they are the same
" as 1.
" 5. if @ complete at-rule
" 6. if ! complete important
let line = a:base
if exists("b:compl_context")
let line = b:compl_context
unlet! b:compl_context
else
let line = a:base
endif
let res = []
let res2 = []
let borders = {}
@@ -67,19 +79,19 @@ else
let borders[exclam] = "exclam"
endif
if len(borders) == 0 || borders[min(keys(borders))] =~ '^\(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
" Complete properties
let values = split("azimuth background-attachment background-color background-image background-position background-repeat background border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border bottom caption-side clear clip color content counter-increment counter-reset cue-after cue-before cue cursor direction display elevation empty-cells float font-family font-size font-style font-variant font-weight font height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page-break-after page-break-before page-break-inside pause-after pause-before pause pitch-range pitch play-during position quotes richness right speak-header speak-numeral speak-punctuation speak speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space widows width word-spacing z-index")
let values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
let propbase = matchstr(line, '.\{-}\ze[a-zA-Z-]*$')
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_property
call add(res, propbase . m.': ')
call add(res, m . ':')
elseif m =~? entered_property
call add(res2, propbase . m.': ')
call add(res2, m . ':')
endif
endfor
@@ -179,7 +191,7 @@ else
elseif prop == 'font-family'
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
elseif prop == 'font-size'
return []
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
elseif prop == 'font-style'
let values = ["normal", "italic", "oblique"]
elseif prop == 'font-variant'
@@ -187,7 +199,7 @@ else
elseif prop == 'font-weight'
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
elseif prop == 'font'
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\(height\|width\)$'
let values = ["auto"]
elseif prop =~ '^\(left\|rigth\)$'
@@ -304,18 +316,24 @@ else
elseif prop == 'z-index'
let values = ["auto"]
else
return []
" If no property match it is possible we are outside of {} and
" trying to complete pseudo-(class|element)
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
if ",a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var," =~ ','.element.','
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
else
return []
endif
endif
" Complete values
let valbase = matchstr(line, '.\{-}\ze[a-zA-Z0-9#,.(_-]*$')
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
for m in values
if m =~? '^'.entered_value
call add(res, valbase . m)
call add(res, m)
elseif m =~? entered_value
call add(res2, valbase . m)
call add(res2, m)
endif
endfor
@@ -328,14 +346,13 @@ else
elseif borders[min(keys(borders))] == 'exclam'
" Complete values
let impbase = matchstr(line, '.\{-}!\s*\ze[a-zA-Z ]*$')
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
let values = ["important"]
for m in values
if m =~? '^'.entered_imp
call add(res, impbase . m)
call add(res, m)
endif
endfor
@@ -381,9 +398,9 @@ else
for m in values
if m =~? '^'.entered_atruleafter
call add(res, atruleafterbase . m)
call add(res, m)
elseif m =~? entered_atruleafter
call add(res2, atruleafterbase . m)
call add(res2, m)
endif
endfor
@@ -393,14 +410,13 @@ else
let values = ["charset", "page", "media", "import", "font-face"]
let atrulebase = matchstr(line, '.*@\ze[a-zA-Z -]*$')
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_atrule
call add(res, atrulebase . m.' ')
call add(res, m .' ')
elseif m =~? entered_atrule
call add(res2, atrulebase . m.' ')
call add(res2, m .' ')
endif
endfor

View File

@@ -1,39 +1,77 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Sep 23
" Last Change: 2005 Now 20
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start >= 0 && line[start - 1] !~ '<'
let start -= 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
let start -= 1
endwhile
if start < 0
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
let curpos = line('.')
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
if stylestart <= curpos && styleend >= curpos
let b:csscompl = 1
let start = 0
endif
if stylestart <= curpos && styleend >= curpos
let start = col('.') - 1
let b:csscompl = 1
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
let start -= 1
endwhile
endif
endif
if !exists("b:csscompl")
let b:compl_context = getline('.')[0:(compl_begin)]
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
else
let b:compl_context = getline('.')[0:compl_begin]
endif
return start
else
" Initialize base return lists
let res = []
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
return csscomplete#CompleteCSS(0, a:base)
return csscomplete#CompleteCSS(0, context)
endif
if a:base =~ '>'
" Generally if a:base contains > it means we are outside of tag and
" Make entities completion
if exists("b:entitiescompl")
unlet! b:entitiescompl
if !exists("g:xmldata_xhtml10s")
runtime! autoload/xml/xhtml10s.vim
endif
let entities = g:xmldata_xhtml10s['vimxmlentities']
for m in entities
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
endif
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action - with one exception: <style> span { bo
if a:base =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, a:base)
if context =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, context)
else
return []
endif
@@ -43,34 +81,32 @@ function! htmlcomplete#CompleteTags(findstart, base)
let coreattrs = ["id", "class", "style", "title"]
let i18n = ["lang", "xml:lang", "dir=\"ltr\" ", "dir=\"rtl\" "]
let events = ["onclick", "ondblclick", "onmousedown", "onmouseup", "onmousemove",
\ "onmouseout", "onkeypress", "onkeydown", "onkeyup"]
\ "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"]
let focus = ["accesskey", "tabindex", "onfocus", "onblur"]
let coregroup = coreattrs + i18n + events
let res = []
let res2 = []
" find tags matching with "a:base"
" If a:base contains > it means we are already outside of tag and we
" find tags matching with "context"
" If context contains > it means we are already outside of tag and we
" should abandon action
" If a:base contains white space it is attribute.
" If context contains white space it is attribute.
" It could be also value of attribute...
" We have to get first word to offer
" proper completions
let tag = split(a:base)[0]
if context == ''
let tag = ''
else
let tag = split(context)[0]
endif
" Get last word, it should be attr name
let attr = matchstr(a:base, '.*\s\zs.*')
let attr = matchstr(context, '.*\s\zs.*')
" Possible situations where any prediction would be difficult:
" 1. Events attributes
if a:base =~ '\s'
if context =~ '\s'
" Sort out style, class, and on* cases
" Perfect solution for style would be switching for CSS completion. Is
" it possible?
" Also retrieving class names from current file and linked
" stylesheets.
if a:base =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
if a:base =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if a:base =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
if context =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "class"
elseif a:base =~ "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
elseif context =~ "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
@@ -81,6 +117,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
let head = getline(search('<head\>'), search('<\/head>'))
let headjoined = join(copy(head), ' ')
if headjoined =~ '<style'
" Remove possibly confusing CSS operators
let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g')
if search_for == 'class'
let styleheadlines = split(stylehead)
@@ -217,27 +254,27 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
" We need special version of sbase
let classbase = matchstr(a:base, ".*[\"']")
let classbase = matchstr(context, ".*[\"']")
let classquote = matchstr(classbase, '.$')
let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*")
for m in sort(values)
if m =~? '^'.entered_class
call add(res, classbase . m . classquote . ' ')
call add(res, m . classquote)
elseif m =~? entered_class
call add(res2, classbase . m . classquote . ' ')
call add(res2, m . classquote)
endif
endfor
return res + res2
elseif a:base =~ "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, a:base)
elseif context =~ "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
let stripbase = matchstr(a:base, ".*\\(on[a-z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" Now we have a:base stripped from all chars up to style/class.
let stripbase = matchstr(context, ".*\\(on[a-z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" Now we have context stripped from all chars up to style/class.
" It may fail with some strange style value combinations.
if stripbase !~ "[\"']"
return []
@@ -254,11 +291,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
elseif attrname == 'xml:space'
let values = ["preserve"]
elseif attrname == 'shape'
if a:base =~ '^a\>'
let values = ["rect"]
else
let values = ["rect", "circle", "poly", "default"]
endif
let values = ["rect", "circle", "poly", "default"]
elseif attrname == 'valuetype'
let values = ["data", "ref", "object"]
elseif attrname == 'method'
@@ -287,13 +320,13 @@ function! htmlcomplete#CompleteTags(findstart, base)
endfor
endif
elseif attrname == 'type'
if a:base =~ '^input'
if context =~ '^input'
let values = ["text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"]
elseif a:base =~ '^button'
elseif context =~ '^button'
let values = ["button", "submit", "reset"]
elseif a:base =~ '^style'
elseif context =~ '^style'
let values = ["text/css"]
elseif a:base =~ '^script'
elseif context =~ '^script'
let values = ["text/javascript"]
endif
else
@@ -305,7 +338,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
" We need special version of sbase
let attrbase = matchstr(a:base, ".*[\"']")
let attrbase = matchstr(context, ".*[\"']")
let attrquote = matchstr(attrbase, '.$')
for m in values
@@ -313,23 +346,23 @@ function! htmlcomplete#CompleteTags(findstart, base)
" alphabetically but sort them. Those beginning with entered
" part will be as first choices
if m =~ '^'.entered_value
call add(res, attrbase . m . attrquote.' ')
call add(res, m . attrquote.' ')
elseif m =~ entered_value
call add(res2, attrbase . m . attrquote.' ')
call add(res2, m . attrquote.' ')
endif
endfor
return res + res2
endif
" Shorten a:base to not include last word
let sbase = matchstr(a:base, '.*\ze\s.*')
if tag =~ '^\(abbr\|acronym\|b\|bdo\|big\|caption\|cite\|code\|dd\|dfn\|div\|dl\|dt\|em\|fieldset\|h\d\|kbd\|li\|noscript\|ol\|p\|samp\|small\|span\|strong\|sub\|sup\|tt\|ul\|var\)$'
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
if tag =~ '^\(abbr\|acronym\|address\|b\|bdo\|big\|caption\|cite\|code\|dd\|dfn\|div\|dl\|dt\|em\|fieldset\|h\d\|hr\|i\|kbd\|li\|noscript\|ol\|p\|samp\|small\|span\|strong\|sub\|sup\|tt\|ul\|var\)$'
let attrs = coregroup
elseif tag == 'a'
let attrs = coregroup + focus + ["charset", "type", "name", "href", "hreflang", "rel", "rev", "shape", "coords"]
elseif tag == 'area'
let attrs = coregroup
let attrs = coregroup + focus + ["shape", "coords", "href", "nohref", "alt"]
elseif tag == 'base'
let attrs = ["href", "id"]
elseif tag == 'blockquote'
@@ -339,27 +372,27 @@ function! htmlcomplete#CompleteTags(findstart, base)
elseif tag == 'br'
let attrs = coreattrs
elseif tag == 'button'
let attrs = coreattrs + focus + ["name", "value", "type"]
let attrs = coregroup + focus + ["name", "value", "type"]
elseif tag == '^\(col\|colgroup\)$'
let attrs = coreattrs + ["span", "width", "align", "char", "charoff", "valign"]
let attrs = coregroup + ["span", "width", "align", "char", "charoff", "valign"]
elseif tag =~ '^\(del\|ins\)$'
let attrs = coreattrs + ["cite", "datetime"]
let attrs = coregroup + ["cite", "datetime"]
elseif tag == 'form'
let attrs = coreattrs + ["action", "method=\"get\" ", "method=\"post\" ", "enctype", "onsubmit", "onreset", "accept", "accept-charset"]
let attrs = coregroup + ["action", "method=\"get\" ", "method=\"post\" ", "enctype", "onsubmit", "onreset", "accept", "accept-charset"]
elseif tag == 'head'
let attrs = i18n + ["id", "profile"]
elseif tag == 'html'
let attrs = i18n + ["id", "xmlns"]
elseif tag == 'img'
let attrs = coreattrs + ["src", "alt", "longdesc", "height", "width", "usemap", "ismap"]
let attrs = coregroup + ["src", "alt", "longdesc", "height", "width", "usemap", "ismap"]
elseif tag == 'input'
let attrs = coreattrs + focus + ["type", "name", "value", "checked", "disabled", "readonly", "size", "maxlength", "src", "alt", "usemap", "onselect", "onchange", "accept"]
let attrs = coregroup + ["type", "name", "value", "checked", "disabled", "readonly", "size", "maxlength", "src", "alt", "usemap", "onselect", "onchange", "accept"]
elseif tag == 'label'
let attrs = coreattrs + ["for", "accesskey", "onfocus", "onblur"]
let attrs = coregroup + ["for", "accesskey", "onfocus", "onblur"]
elseif tag == 'legend'
let attrs = coreattrs + ["accesskey"]
let attrs = coregroup + ["accesskey"]
elseif tag == 'link'
let attrs = coreattrs + ["charset", "href", "hreflang", "type", "rel", "rev", "media"]
let attrs = coregroup + ["charset", "href", "hreflang", "type", "rel", "rev", "media"]
elseif tag == 'map'
let attrs = i18n + events + ["id", "class", "style", "title", "name"]
elseif tag == 'meta'
@@ -367,31 +400,31 @@ function! htmlcomplete#CompleteTags(findstart, base)
elseif tag == 'title'
let attrs = i18n + ["id"]
elseif tag == 'object'
let attrs = coreattrs + ["declare", "classid", "codebase", "data", "type", "codetype", "archive", "standby", "height", "width", "usemap", "name", "tabindex"]
let attrs = coregroup + ["declare", "classid", "codebase", "data", "type", "codetype", "archive", "standby", "height", "width", "usemap", "name", "tabindex"]
elseif tag == 'optgroup'
let attrs = coreattrs + ["disbled", "label"]
let attrs = coregroup + ["disbled", "label"]
elseif tag == 'option'
let attrs = coreattrs + ["disbled", "selected", "value", "label"]
let attrs = coregroup + ["disbled", "selected", "value", "label"]
elseif tag == 'param'
let attrs = ["id", "name", "value", "valuetype", "type"]
elseif tag == 'pre'
let attrs = coreattrs + ["xml:space"]
let attrs = coregroup + ["xml:space"]
elseif tag == 'q'
let attrs = coreattrs + ["cite"]
let attrs = coregroup + ["cite"]
elseif tag == 'script'
let attrs = ["id", "charset", "type=\"text/javascript\"", "type", "src", "defer", "xml:space"]
elseif tag == 'select'
let attrs = coreattrs + ["name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange"]
let attrs = coregroup + ["name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange"]
elseif tag == 'style'
let attrs = coreattrs + ["id", "type=\"text/css\"", "type", "media", "title", "xml:space"]
elseif tag == 'table'
let attrs = coreattrs + ["summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding"]
let attrs = coregroup + ["summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding"]
elseif tag =~ '^\(thead\|tfoot\|tbody\|tr\)$'
let attrs = coreattrs + ["align", "char", "charoff", "valign"]
let attrs = coregroup + ["align", "char", "charoff", "valign"]
elseif tag == 'textarea'
let attrs = coreattrs + focus + ["name", "rows", "cols", "disabled", "readonly", "onselect", "onchange"]
let attrs = coregroup + ["name", "rows", "cols", "disabled", "readonly", "onselect", "onchange"]
elseif tag =~ '^\(th\|td\)$'
let attrs = coreattrs + ["abbr", "headers", "scope", "rowspan", "colspan", "align", "char", "charoff", "valign"]
let attrs = coregroup + ["abbr", "headers", "scope", "rowspan", "colspan", "align", "char", "charoff", "valign"]
else
return []
endif
@@ -399,15 +432,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
for m in sort(attrs)
if m =~ '^'.attr
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
call add(res, sbase.' '.m)
call add(res, m)
else
call add(res, sbase.' '.m.'="')
call add(res, m.'="')
endif
elseif m =~ attr
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
call add(res2, sbase.' '.m)
call add(res2, m)
else
call add(res2, sbase.' '.m.'="')
call add(res2, m.'="')
endif
endif
endfor
@@ -417,73 +450,23 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
" Close tag
let b:unaryTagsStack = "base meta link hr br param img area input col"
if a:base =~ '^\/'
let opentag = htmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return ["/".opentag.">"]
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
endif
" Deal with tag completion.
let opentag = htmlcomplete#GetLastOpenTag("b:unaryTagsStack")
" Clusters
let special = "br span bdo map object img"
let phrase = "em strong dfn code q samp kbd var cite abbr acronym sub sup"
let inlineforms = "input select textarea label button"
let miscinline = "ins del script"
let inline = "a ".special." ".phrase." ".inlineforms." tt i b big small"
let misc = "noscript ".miscinline
let block = "p h1 h2 h3 h4 h5 h6 div ul ol dl pre hr blockquote address fieldset table"
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
if opentag == 'a'
let tags = split("tt i b big small ".special." ".phrase." ".inlineforms." ".miscinline)
elseif opentag =~ '^\(abbr\|acronym\|address\|b\|p\|h\d\|dt\|span\|bdo\|em\|strong\|dfn\|code\|samp\|kbd\|var\|cite\|q\|sub\|sup\|tt\|i\|big\|small\|label\|caption\)$'
let tags = split(inline." ".miscinline)
elseif opentag == 'pre'
let tags = split("a tt i b big small br span bdo map ".phrase." ".miscinline." ".inlineforms)
elseif opentag == 'html'
let tags = ["head", "body"]
elseif opentag == 'legend'
let tags = split(inline." ".miscinline)
elseif opentag == 'head'
let tags = ["title", "base", "scipt", "style", "meta", "link", "object"]
elseif opentag =~ '^\(noscript\|body\|blockquote\)$'
let tags = split("form ".block." ".misc)
elseif opentag =~ '^\(ul\|ol\)$'
let tags = ["li"]
elseif opentag == 'dl'
let tags = ["dt", "dd"]
elseif opentag =~ '^\(ins\|del\|th\|td\|dd\|div\|li\)$'
let tags = split("form ".block." ".inline." ".misc)
elseif opentag == 'object'
let tags = split("param form ".block." ".inline." ".misc)
elseif opentag == 'fieldset'
let tags = split("legend form ".block." ".inline." ".misc)
elseif opentag == 'map'
let tags = split("area form ".block." ".misc)
elseif opentag == 'form'
let tags = split(block." ".misc)
elseif opentag == 'select'
let tags = ["optgroup", "option"]
elseif opentag == 'optgroup'
let tags = ["option"]
elseif opentag == 'colgroup'
let tags = ["col"]
elseif opentag == '^\(textarea\|option\|script\|style\|title\)$'
let tags = ['empty']
elseif opentag == 'button'
let tags = ["p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "ul", "ol", "dl", "table"]
elseif opentag =~ '^\(thead\|tfoot\|tbody\)$'
let tags = ["tr"]
elseif opentag == 'tr'
let tags = ["th", "td"]
elseif opentag == 'table'
let tags = ["caption", "col", "colgroup", "thead", "tfoot", "tbody", "tr"]
else
return []
if !exists("g:xmldata_xhtml10s")
runtime! autoload/xml/xhtml10s.vim
endif
for m in tags
if m =~ '^'.a:base
let tags = g:xmldata_xhtml10s[opentag][0]
for m in sort(tags)
if m =~ '^'.context
call add(res, m)
elseif m =~ a:base
elseif m =~ context
call add(res2, m)
endif
endfor
@@ -492,133 +475,3 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
endfunction
" MM: This is greatly reduced closetag.vim used with kind permission of Steven
" Mueller
" Changes: strip all comments; delete error messages
" Author: Steven Mueller <diffusor@ugcs.caltech.edu>
" Last Modified: Tue May 24 13:29:48 PDT 2005
" Version: 0.9.1
function! htmlcomplete#GetLastOpenTag(unaryTagsStack)
let linenum=line('.')
let lineend=col('.') - 1 " start: cursor position
let first=1 " flag for first line searched
let b:TagStack='' " main stack of tags
let startInComment=s:InComment()
let tagpat='</\=\(\k\|[-:]\)\+\|/>'
while (linenum>0)
let line=getline(linenum)
if first
let line=strpart(line,0,lineend)
else
let lineend=strlen(line)
endif
let b:lineTagStack=''
let mpos=0
let b:TagCol=0
while (mpos > -1)
let mpos=matchend(line,tagpat)
if mpos > -1
let b:TagCol=b:TagCol+mpos
let tag=matchstr(line,tagpat)
if exists('b:closetag_disable_synID') || startInComment==s:InCommentAt(linenum, b:TagCol)
let b:TagLine=linenum
call s:Push(matchstr(tag,'[^<>]\+'),'b:lineTagStack')
endif
let lineend=lineend-mpos
let line=strpart(line,mpos,lineend)
endif
endwhile
while (!s:EmptystackP('b:lineTagStack'))
let tag=s:Pop('b:lineTagStack')
if match(tag, '^/') == 0 "found end tag
call s:Push(tag,'b:TagStack')
elseif s:EmptystackP('b:TagStack') && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag
return tag
else
let endtag=s:Peekstack('b:TagStack')
if endtag == '/'.tag || endtag == '/'
call s:Pop('b:TagStack') "found a open/close tag pair
elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error
return ''
endif
endif
endwhile
let linenum=linenum-1 | let first=0
endwhile
return ''
endfunction
function! s:InComment()
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment'
endfunction
function! s:InCommentAt(line, col)
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment'
endfunction
function! s:SetKeywords()
let g:IsKeywordBak=&iskeyword
let &iskeyword='33-255'
endfunction
function! s:RestoreKeywords()
let &iskeyword=g:IsKeywordBak
endfunction
function! s:Push(el, sname)
if !s:EmptystackP(a:sname)
exe 'let '.a:sname."=a:el.' '.".a:sname
else
exe 'let '.a:sname.'=a:el'
endif
endfunction
function! s:EmptystackP(sname)
exe 'let stack='.a:sname
if match(stack,'^ *$') == 0
return 1
else
return 0
endif
endfunction
function! s:Instack(el, sname)
exe 'let stack='.a:sname
call s:SetKeywords()
let m=match(stack, '\<'.a:el.'\>')
call s:RestoreKeywords()
if m < 0
return 0
else
return 1
endif
endfunction
function! s:Peekstack(sname)
call s:SetKeywords()
exe 'let stack='.a:sname
let top=matchstr(stack, '\<.\{-1,}\>')
call s:RestoreKeywords()
return top
endfunction
function! s:Pop(sname)
if s:EmptystackP(a:sname)
return ''
endif
exe 'let stack='.a:sname
call s:SetKeywords()
let loc=matchend(stack,'\<.\{-1,}\>')
exe 'let '.a:sname.'=strpart(stack, loc+1, strlen(stack))'
let top=strpart(stack, match(stack, '\<'), loc)
call s:RestoreKeywords()
return top
endfunction
function! s:Clearstack(sname)
exe 'let '.a:sname."=''"
endfunction

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
" NetrwFileHandlers: contains various extension-based file handlers for
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: Aug 15, 2005
" Version: 6
" Date: Oct 12, 2005
" Version: 7
" 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
" notice is copied with it. Like anything else that's free,
" NetrwFileHandlers.vim is provided *as is* and comes with no
" netrwFileHandlers.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. In no
" event will the copyright holder be liable for any damages
" resulting from the use of this software.
@@ -17,18 +17,27 @@
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("g:loaded_NetrwFileHandlers") || &cp
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let s:keepcpo= &cpo
set cpo&vim
let g:loaded_NetrwFileHandlers= "v6"
let g:loaded_netrwFileHandlers= "v7"
" ---------------------------------------------------------------------
" NetrwFileHandler_html: handles html when the user hits "x" when the {{{1
" netrwFileHandlers#Init: {{{1
" This functions is here to allow a call to this function to autoload
" the netrwFileHandlers.vim file
fun! netrwFileHandlers#Init()
" call Dfunc("netrwFileHandlers#Init()")
" call Dret("netrwFileHandlers#Init")
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_html: handles html when the user hits "x" when the {{{1
" cursor is atop a *.html file
fun! NetrwFileHandler_html(pagefile)
" call Dfunc("NetrwFileHandler_html(".a:pagefile.")")
fun! netrwFileHandlers#NFH_html(pagefile)
" call Dfunc("netrwFileHandlers#NFH_html(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
@@ -39,19 +48,19 @@ fun! NetrwFileHandler_html(pagefile)
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
else
" call Dret("NetrwFileHandler_html 0")
" call Dret("netrwFileHandlers#NFH_html 0")
return 0
endif
" call Dret("NetrwFileHandler_html 1")
" call Dret("netrwFileHandlers#NFH_html 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_htm: handles html when the user hits "x" when the {{{1
" netrwFileHandlers#NFH_htm: handles html when the user hits "x" when the {{{1
" cursor is atop a *.htm file
fun! NetrwFileHandler_htm(pagefile)
" call Dfunc("NetrwFileHandler_htm(".a:pagefile.")")
fun! netrwFileHandlers#NFH_htm(pagefile)
" call Dfunc("netrwFileHandlers#NFH_htm(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
@@ -62,18 +71,18 @@ fun! NetrwFileHandler_htm(pagefile)
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
else
" call Dret("NetrwFileHandler_htm 0")
" call Dret("netrwFileHandlers#NFH_htm 0")
return 0
endif
" call Dret("NetrwFileHandler_htm 1")
" call Dret("netrwFileHandlers#NFH_htm 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_jpg: {{{1
fun! NetrwFileHandler_jpg(jpgfile)
" call Dfunc("NetrwFileHandler_jpg(jpgfile<".a:jpgfile.">)")
" netrwFileHandlers#NFH_jpg: {{{1
fun! netrwFileHandlers#NFH_jpg(jpgfile)
" call Dfunc("netrwFileHandlers#NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:jpgfile
@@ -81,156 +90,156 @@ fun! NetrwFileHandler_jpg(jpgfile)
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
else
" call Dret("NetrwFileHandler_jpg 0")
" call Dret("netrwFileHandlers#NFH_jpg 0")
return 0
endif
" call Dret("NetrwFileHandler_jpg 1")
" call Dret("netrwFileHandlers#NFH_jpg 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_gif: {{{1
fun! NetrwFileHandler_gif(giffile)
" call Dfunc("NetrwFileHandler_gif(giffile<".a:giffile.">)")
" netrwFileHandlers#NFH_gif: {{{1
fun! netrwFileHandlers#NFH_gif(giffile)
" call Dfunc("netrwFileHandlers#NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:giffile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
else
" call Dret("NetrwFileHandler_gif 0")
" call Dret("netrwFileHandlers#NFH_gif 0")
return 0
endif
" call Dret("NetrwFileHandler_gif 1")
" call Dret("netrwFileHandlers#NFH_gif 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_png: {{{1
fun! NetrwFileHandler_png(pngfile)
" call Dfunc("NetrwFileHandler_png(pngfile<".a:pngfile.">)")
" netrwFileHandlers#NFH_png: {{{1
fun! netrwFileHandlers#NFH_png(pngfile)
" call Dfunc("netrwFileHandlers#NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pngfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
else
" call Dret("NetrwFileHandler_png 0")
" call Dret("netrwFileHandlers#NFH_png 0")
return 0
endif
" call Dret("NetrwFileHandler_png 1")
" call Dret("netrwFileHandlers#NFH_png 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_pnm: {{{1
fun! NetrwFileHandler_pnm(pnmfile)
" call Dfunc("NetrwFileHandler_pnm(pnmfile<".a:pnmfile.">)")
" netrwFileHandlers#NFH_pnm: {{{1
fun! netrwFileHandlers#NFH_pnm(pnmfile)
" call Dfunc("netrwFileHandlers#NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pnmfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
else
" call Dret("NetrwFileHandler_pnm 0")
" call Dret("netrwFileHandlers#NFH_pnm 0")
return 0
endif
" call Dret("NetrwFileHandler_pnm 1")
" call Dret("netrwFileHandlers#NFH_pnm 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_bmp: visualize bmp files {{{1
fun! NetrwFileHandler_bmp(bmpfile)
" call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)")
" netrwFileHandlers#NFH_bmp: visualize bmp files {{{1
fun! netrwFileHandlers#NFH_bmp(bmpfile)
" call Dfunc("netrwFileHandlers#NFH_bmp(bmpfile<".a:bmpfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
else
" call Dret("NetrwFileHandler_bmp 0")
" call Dret("netrwFileHandlers#NFH_bmp 0")
return 0
endif
" call Dret("NetrwFileHandler_bmp 1")
" call Dret("netrwFileHandlers#NFH_bmp 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_pdf: visualize pdf files {{{1
fun! NetrwFileHandler_pdf(pdf)
" " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
" netrwFileHandlers#NFH_pdf: visualize pdf files {{{1
fun! netrwFileHandlers#NFH_pdf(pdf)
" " call Dfunc("netrwFileHandlers#NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs "'.a:pdf.'"'
else
" " call Dret("NetrwFileHandler_pdf 0")
" " call Dret("netrwFileHandlers#NFH_pdf 0")
return 0
endif
" " call Dret("NetrwFileHandler_pdf 1")
" " call Dret("netrwFileHandlers#NFH_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_doc: visualize doc files {{{1
fun! NetrwFileHandler_doc(doc)
" " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
" netrwFileHandlers#NFH_doc: visualize doc files {{{1
fun! netrwFileHandlers#NFH_doc(doc)
" " call Dfunc("netrwFileHandlers#NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:doc.'"'
redraw!
else
" " call Dret("NetrwFileHandler_doc 0")
" " call Dret("netrwFileHandlers#NFH_doc 0")
return 0
endif
" " call Dret("NetrwFileHandler_doc 1")
" " call Dret("netrwFileHandlers#NFH_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
" netrwFileHandlers#NFH_sxw: visualize sxw files {{{1
fun! netrwFileHandlers#NFH_sxw(sxw)
" " call Dfunc("netrwFileHandlers#NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:sxw.'"'
redraw!
else
" " call Dret("NetrwFileHandler_sxw 0")
" " call Dret("netrwFileHandlers#NFH_sxw 0")
return 0
endif
" " call Dret("NetrwFileHandler_sxw 1")
" " call Dret("netrwFileHandlers#NFH_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_xls: visualize xls files {{{1
fun! NetrwFileHandler_xls(xls)
" " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
" netrwFileHandlers#NFH_xls: visualize xls files {{{1
fun! netrwFileHandlers#NFH_xls(xls)
" " call Dfunc("netrwFileHandlers#NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc "'.a:xls.'"'
redraw!
else
" " call Dret("NetrwFileHandler_xls 0")
" " call Dret("netrwFileHandlers#NFH_xls 0")
return 0
endif
" " call Dret("NetrwFileHandler_xls 1")
" " call Dret("netrwFileHandlers#NFH_xls 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_ps: handles PostScript files {{{1
fun! NetrwFileHandler_ps(ps)
" call Dfunc("NetrwFileHandler_ps()")
" netrwFileHandlers#NFH_ps: handles PostScript files {{{1
fun! netrwFileHandlers#NFH_ps(ps)
" call Dfunc("netrwFileHandlers#NFH_ps()")
if executable("gs")
exe "silent! !gs ".a:ps
redraw!
@@ -244,18 +253,18 @@ fun! NetrwFileHandler_ps(ps)
exe "silent! !gswin32 \"".a:ps.'"'
redraw!
else
" call Dret("NetrwFileHandler_ps 0")
" call Dret("netrwFileHandlers#NFH_ps 0")
return 0
endif
" call Dret("NetrwFileHandler_ps 1")
" call Dret("netrwFileHandlers#NFH_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_eps: handles encapsulated PostScript files {{{1
fun! NetrwFileHandler_eps(eps)
" call Dfunc("NetrwFileHandler_ps()")
" netrwFileHandlers#NFH_eps: handles encapsulated PostScript files {{{1
fun! netrwFileHandlers#NFH_eps(eps)
" call Dfunc("netrwFileHandlers#NFH_ps()")
if executable("gs")
exe "silent! !gs ".a:eps
redraw!
@@ -269,40 +278,40 @@ fun! NetrwFileHandler_eps(eps)
exe "silent! !gswin32 \"".a:eps.'"'
redraw!
else
" call Dret("NetrwFileHandler_ps 0")
" call Dret("netrwFileHandlers#NFH_ps 0")
return 0
endif
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_fig: handles xfig files {{{1
fun! NetrwFileHandler_fig(fig)
" call Dfunc("NetrwFileHandler_fig()")
" netrwFileHandlers#NFH_fig: handles xfig files {{{1
fun! netrwFileHandlers#NFH_fig(fig)
" call Dfunc("netrwFileHandlers#NFH_fig()")
if executable("xfig")
exe "silent! !xfig ".a:fig
redraw!
else
" call Dret("NetrwFileHandler_fig 0")
" call Dret("netrwFileHandlers#NFH_fig 0")
return 0
endif
" call Dret("NetrwFileHandler_fig 1")
" call Dret("netrwFileHandlers#NFH_fig 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_obj: handles tgif's obj files {{{1
fun! NetrwFileHandler_obj(obj)
" call Dfunc("NetrwFileHandler_obj()")
" netrwFileHandlers#NFH_obj: handles tgif's obj files {{{1
fun! netrwFileHandlers#NFH_obj(obj)
" call Dfunc("netrwFileHandlers#NFH_obj()")
if has("unix") && executable("tgif")
exe "silent! !tgif ".a:obj
redraw!
else
" call Dret("NetrwFileHandler_obj 0")
" call Dret("netrwFileHandlers#NFH_obj 0")
return 0
endif
" call Dret("NetrwFileHandler_obj 1")
" call Dret("netrwFileHandlers#NFH_obj 1")
return 1
endfun

View File

@@ -1,12 +1,12 @@
" NetrwSettings.vim: makes netrw settings simpler
" Last Change: Aug 16, 2005
" netrwSettings.vim: makes netrw settings simpler
" Date: Oct 12, 2005
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 3
" Version: 4
" 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
" notice is copied with it. Like anything else that's free,
" NetrwSettings.vim is provided *as is* and comes with no
" netrwSettings.vim is 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
@@ -16,16 +16,20 @@
" synagogues, preaching the gospel of the kingdom, and healing
" every disease and every sickness among the people.
" Load Once: {{{1
if exists("g:loaded_NetrwSettings") || &cp
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_NetrwSettings = "v3"
let g:loaded_netrwSettings = "v4"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
fun! NetrwSettings#NetrwSettings()
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#NetSavePosn()
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
endif
above wincmd s
enew
@@ -68,6 +72,7 @@ fun! NetrwSettings#NetrwSettings()
put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
let s:netrw_protocol_stop= line(".")
put = ''
@@ -90,7 +95,6 @@ fun! NetrwSettings#NetrwSettings()
put = 'let g:netrw_hide = '.g:netrw_hide
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir

View File

@@ -0,0 +1,216 @@
"pycomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin
" Version: 0.2
" Last Updated: 5 January 2006
"
" TODO
" * local variables *inside* class members
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
import sys
import __builtin__
LOCALDEFS = \
['LOCALDEFS', 'clean_up','eval_source_code', \
'get_completions', '__builtin__', '__builtins__', \
'dbg', '__name__', 'vim', 'sys']
#comment/uncomment one line at a time to enable/disable debugging
def dbg(msg):
pass
# print(msg)
#it seems that by this point, vim has already stripped the base
# matched in the findstart=1 section, so we will create the
# statement from scratch
def get_completions(base):
stmt = vim.eval('expand("<cWORD>")')+base
dbg("parsed statement => %s" % stmt)
eval_source_code()
try:
dbg("eval: %s" % stmt)
if len(stmt.split('.')) == 1:
all = globals().keys() + dir(__builtin__)
match = stmt
else:
rindex= stmt.rfind('.')
all = dir(eval(stmt[:rindex]))
match = stmt[rindex+1:]
completions = []
dbg("match == %s" % match)
for m in all:
#TODO: remove private (_foo) functions?
if m.find('__') != 0 and \
m.find(match) == 0 and \
m not in LOCALDEFS:
dbg("matched... %s, %s" % (m, m.find(match)))
completions.append(m)
dbg("all completions: %s" % completions)
vim.command("let g:pycomplete_completions = %s" % completions)
except:
dbg("exception: %s" % sys.exc_info()[1])
vim.command("let g:pycomplete_completions = []")
clean_up()
#yes, this is a quasi-functional python lexer
def eval_source_code():
import tokenize
import keyword
import StringIO
s = StringIO.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 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:
continue
#import statement
elif str == 'import':
for type, str, begin, end, line in g:
if str == ';' or type == tokenize.NEWLINE: break
dbg("found [import %s]" % str)
stmts.append("import %s" % str)
#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
mem = ''
for type, str, begin, end, line in g:
if str == ';' or type == tokenize.NEWLINE: break
mem += (str + ',')
if len(mem) > 0:
dbg("found [from %s import %s]" % (mod, mem[:-1]))
stmts.append("from %s import %s" % (mod, mem[:-1]))
#class declaration
elif str == 'class':
type, str, begin, end, line = g.next()
classname = str
dbg("found [class %s]" % classname)
level = 0
members = []
#we don't care about the meat of the members,
# only the signatures, so we'll replace the bodies
# with 'pass' for evaluation
for type, str, begin, end, line in g:
if type == tokenize.INDENT:
level += 1
elif type == tokenize.DEDENT:
level -= 1
if level == 0: break;
elif str == 'def':
#TODO: if name begins with '_', keep private
memberstr = ''
for type, str, begin, end, line in g:
if str == ':': break
memberstr += str
dbg(" member [%s]" % memberstr)
members.append(memberstr)
#TODO parse self.blah = something lines
#elif str == "self" && next && str == "." ...blah...
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("keyword = %s" % str)
lineNo = begin[0]
else:
if line.find("=") == -1: continue
var = str
type, str, begin, end, line = g.next()
dbg('next = %s' % str)
if str != '=': continue
type, str, begin, end, line = g.next()
if type == tokenize.NEWLINE:
continue
elif type == tokenize.STRING or str == 'str':
stmts.append('%s = str' % var)
elif str == '[' or str == 'list':
stmts.append('%s= list' % var)
elif str == '{' or str == 'dict':
stmts.append('%s = dict' % var)
elif type == tokenize.NUMBER:
continue
elif str == 'Set':
stmts.append('%s = Set' % var)
elif str == 'open' or str == 'file':
stmts.append('%s = file' % var)
else:
inst = str
for type, str, begin, end, line in g:
if type == tokenize.NEWLINE:
break
inst += str
if len(inst) > 0:
dbg("found [%s = %s]" % (var, inst))
stmts.append('%s = %s' % (var, inst))
lineNo = begin[0]
for s in stmts:
try:
dbg("evaluating: %s\n" % s)
exec(s) in globals()
except:
pass
except:
dbg("exception: %s" % sys.exc_info()[1])
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
call s:DefPython()
" vim: set et ts=4:

View File

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

View File

@@ -1,79 +1,188 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Dec 24, 2005
" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
"
" tar.vim -- a Vim plugin for browsing tarfiles
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
" Distributed under the GNU General Public License.
" Contains many ideas from Michael Toren's <tar.vim>
"
" Version: 2
" Date: Sep 14, 2005
" Modified By: Charles E. Campbell, Jr.
"
" Updates are available from <http://michael.toren.net/code/>. If you
" find this script useful, or have suggestions for improvements, please
" let me know.
" Also look there for further comments and documentation.
"
" This part defines the functions. The autocommands are in plugin/tar.vim.
if exists("g:loaded_tar") || &cp
finish
endif
let g:loaded_tar= "v2"
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
" 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,
" tarPlugin.vim is 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.
" ---------------------------------------------------------------------
" tar#Read: {{{1
fun! tar#Read(argument, cleanup)
" call Dfunc("tar#Read(argument<".a:argument."> cleanup=".a:cleanup.")")
let l:argument = a:argument
let l:argument = substitute(l:argument, '^tarfile:', '', '')
let l:argument = substitute(l:argument, '^\~', $HOME, '')
" Initialization: {{{1
let s:keepcpo= &cpo
set cpo&vim
if exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v7"
let l:tarfile = l:argument
while 1
if (l:tarfile == "" || l:tarfile == "/")
echo "***error*** (tar#Read) Could not find a readable tarfile in path:" l:argument
" call Dret("tar#Read")
return
endif
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
let g:tar_browseoptions= "Ptf"
endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "OPxf"
endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if filereadable(l:tarfile) " found it!
break
endif
" ----------------
" Functions: {{{1
" ----------------
let l:tarfile = fnamemodify(l:tarfile, ":h")
endwhile
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
let repkeep= &report
set report=10
let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
" sanity checks
if !executable("tar")
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
if a:tarfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let &report= repkeep
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
return
endif
if &ma != 1
set ma
endif
let w:tarfile= a:tarfile
if (l:toextract == "")
" call Dret("tar#Read")
return
endif
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nobuflisted
setlocal nowrap
set ft=tar
let l:cat = s:TarCatCommand(l:tarfile)
execute "r !" . l:cat . " < '" . l:tarfile . "'"
\ " | tar OPxf - '" . l:toextract . "'"
" give header
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
0d
$
if (a:cleanup)
0d "blank line
execute "doautocmd BufReadPost " . expand("%")
setlocal nomod
silent preserve
endif
" call Dret("tar#Read")
if a:tarfile =~# '\.\(gz\|tgz\)$'
exe "silent r! gzip -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
elseif a:tarfile =~# '\.bz2$'
exe "silent r! bzip2 -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
else
exe "silent r! tar -".g:tar_browseoptions." '".a:tarfile."'"
endif
silent %g@/$@d
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
let &report= repkeep
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{1
fun! tar#Write(argument)
" call Dfunc("tar#Write(argument<".a:argument.">)")
"
" TarBrowseSelect: {{{2
fun! s:TarBrowseSelect()
" call Dfunc("TarBrowseSelect() w:tarfile<".w:tarfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
" about to make a new window, need to use w:tarfile
let tarfile= w:tarfile
let curfile= expand("%")
new
wincmd _
let s:tblfile_{winnr()}= curfile
" call Decho("exe e tarfile:".tarfile.':'.fname)
exe "e tarfile:".tarfile.':'.fname
filetype detect
let &report= repkeep
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
" call Decho("tarfile<".tarfile."> fname<".fname.">")
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 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
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
exe "silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'"
endif
let w:tarfile= a:fname
exe "file tarfile:".fname
" cleanup
0d
set nomod
let &report= repkeep
" call Dret("tar#Read : w:tarfile<".w:tarfile.">")
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{2
fun! tar#Write(fname)
" call Dfunc("tar#Write(fname<".a:fname.">) w:tarfile<".w:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
let repkeep= &report
set report=10
" sanity checks
if !executable("tar")
echo "***error*** (TarWrite) sorry, your system doesn't appear to have the tar pgm"
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
endif
if !exists("*mkdir")
echo "***error*** (TarWrite) sorry, mkdir() doesn't work on your system"
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
endif
@@ -91,136 +200,118 @@ fun! tar#Write(argument)
try
exe "cd ".escape(tmpdir,' \')
catch /^Vim\%((\a\+)\)\=:E344/
echo "***error*** (TarWrite) cannot cd to temporary directory"
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
endtry
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_TARVIM_/
if isdirectory("_TARVIM_")
call s:Rmdir("_TARVIM_")
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_TARVIM_")
cd _TARVIM_
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
let tarfile = curdir."/".substitute(a:argument,'tarfile:\([^/]\{-}\)/.*$','\1','')
let path = substitute(a:argument,'^.\{-}/','','')
let dirpath = substitute(path,'/\=[^/]\+$','','')
" call Decho("path <".path.">")
" call Decho("dirpath<".dirpath.">")
call mkdir(dirpath,"p")
exe "w! ".path
if executable("cygpath")
let path = substitute(system("cygpath ".path),'\n','','e')
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
" handle compressed archives
if tarfile =~# '\.gz'
call system("gzip -d ".tarfile)
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip '".tarfile."'"
elseif tarfile =~# '\.tgz'
call system("gzip -d ".tarfile)
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip '".tarfile."'"
let tgz = 1
elseif tarfile =~# '\.bz2'
call system("bzip2 -d ".tarfile)
let tarfile = substitute(tarfile,'\.bz2','','e')
let compress= "bzip2 '".tarfile."'"
endif
" call Decho("tar --delete -f ".tarfile." ".path)
call system("tar --delete -f ".tarfile." ".path)
if v:shell_error != 0
echo "***error*** (TarWrite) sorry, your tar pgm doesn't support deletion of ".path
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
" call Decho("tar -rf ".tarfile." ".path)
call system("tar -rf ".tarfile." ".path)
" call Decho("tarfile<".tarfile."> fname<".fname.">")
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.">")
exe "w! ".fname
if executable("cygpath")
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
endif
" delete old file from tarfile
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
call system("tar --delete -f '".tarfile."' '".fname."'")
if v:shell_error != 0
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
" update tarfile with new file
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
if v:shell_error != 0
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif exists("compress")
" call Decho("call system(".compress.")")
call system(compress)
if exists("tgz")
" call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")")
call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e'))
endif
endif
endif
" support writing tarfiles across a network
if s:tblfile_{winnr()} =~ '^\a\+://'
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
let tblfile= s:tblfile_{winnr()}
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".tarfile
call netrw#NetWrite(tblfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:tblfile_{winnr()}
endif
endif
" cleanup and restore current directory
cd ..
call s:Rmdir("_TARVIM_")
call s:Rmdir("_ZIPVIM_")
exe "cd ".escape(curdir,' \')
setlocal nomod
let &report= repkeep
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" tar#Browse: {{{1
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal filetype=
setlocal nobuflisted
setlocal buftype=nofile
setlocal wrap
setlocal syntax=tar
let l:tarfile = a:tarfile
let b:tarfile = l:tarfile
let l:cat = s:TarCatCommand(l:tarfile)
if ! filereadable(l:tarfile)
let l:tarfile = substitute(l:tarfile, '^tarfile:', '', '')
endif
if ! filereadable(l:tarfile)
echo "***error*** (tar#Browse) File not readable:" l:tarfile
" call Dret("tar#Browse")
return
endif
call s:Say("\" tar.vim version " . g:loaded_tar)
call s:Say("\" Browsing tarfile " . l:tarfile)
call s:Say("\" Hit ENTER to view a file in a new window")
call s:Say("")
silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
0d "blank line
/^$/1
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
" call Dret("tar#Browse")
endfun
" ---------------------------------------------------------------------
" TarBrowseSelect: {{{1
fun! s:TarBrowseSelect()
let l:line = getline(".")
if (l:line =~ '^" ')
return
endif
if (l:line =~ '/$')
echo "Please specify a file, not a directory"
return
endif
let l:selection = "tarfile:" . b:tarfile . "/" . l:line
new
wincmd _
execute "e " . l:selection
endfun
" ---------------------------------------------------------------------
" TarCatCommand: kludge to deal with compressed archives {{{1
fun! s:TarCatCommand(tarfile)
" call Dfunc("s:TarCatCommand(tarfile<".a:tarfile.">)")
if a:tarfile =~# '\.\(gz\|tgz\|Z\)$'
let l:cat = "gzip -d -c"
elseif a:tarfile =~# '\.bz2$'
let l:cat = "bzip2 -d -c"
else
let l:cat = "cat"
endif
" call Dret("s:TarCatCommand ".l:cat)
return l:cat
endfun
" ---------------------------------------------------------------------
" Say: {{{1
fun! s:Say(string)
let @" = a:string
$ put
endfun
" ---------------------------------------------------------------------
" Rmdir: {{{1
" Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
@@ -235,6 +326,8 @@ fun! s:Rmdir(fname)
" call Dret("Rmdir")
endfun
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim:set ts=8 sts=4 sw=4 fdm=marker:
" ------------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

View File

@@ -0,0 +1,428 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Nov 22
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
" descriptive to avoid any future conflicts. For example 'xhtml10s' should be
" name for data of XHTML 1.0 Strict and 'xhtml10t' for XHTML 1.0 Transitional
" User interface will be provided by XMLns command defined ...
" Currently supported canonicals are:
" xhtml10s - XHTML 1.0 Strict
" xsl - XSL
function! xmlcomplete#CreateConnection(canonical, ...)
" When only one argument provided treat name as default namespace (without
" 'prefix:').
if exists("a:1")
let users = a:1
else
let users = 'DEFAULT'
endif
" Source data file. Due to suspected errors in autoload do it with
" :runtime.
" TODO: make it properly (using autoload, that is) later
exe "runtime autoload/xml/".a:canonical.".vim"
" Remove all traces of unexisting files to return [] when trying
" omnicomplete something
" TODO: give warning about non-existing canonicals - should it be?
if !exists("g:xmldata_".a:canonical)
unlet! g:xmldata_connection
return 0
endif
" We need to initialize Dictionary to add key-value pair
if !exists("g:xmldata_connection")
let g:xmldata_connection = {}
endif
let g:xmldata_connection[users] = a:canonical
endfunction
function! xmlcomplete#CreateEntConnection(...)
if a:0 > 0
let g:xmldata_entconnect = a:1
else
let g:xmldata_entconnect = 'DEFAULT'
endif
endfunction
function! xmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
let start -= 1
endwhile
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
let b:compl_context = getline('.')[0:(compl_begin)]
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:')
if b:xml_namespace == ''
let b:xml_namespace = 'DEFAULT'
endif
return start
else
" There is no connction of namespace and data file. Abandon action
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
return []
endif
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
unlet! b:compl_context
" Make entities completion
if exists("b:entitiescompl")
unlet! b:entitiescompl
if !exists("g:xmldata_entconnect") || g:xmldata_entconnect == 'DEFAULT'
let values = g:xmldata{'_'.g:xmldata_connection['DEFAULT']}['vimxmlentities']
else
let values = g:xmldata{'_'.g:xmldata_entconnect}['vimxmlentities']
endif
" Get only lines with entity declarations but throw out
" parameter-entities - they may be completed in future
let entdecl = filter(getline(1, "$"), 'v:val =~ "<!ENTITY\\s\\+[^%]"')
if len(entdecl) > 0
let intent = map(copy(entdecl), 'matchstr(v:val, "<!ENTITY\\s\\+\\zs\\(\\k\\|[.-:]\\)\\+\\ze")')
let values = intent + values
endif
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
endif
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action
return []
endif
" find tags matching with "a:base"
" If a:base contains white space it is attribute.
" It could be also value of attribute...
" We have to get first word to offer
" proper completions
if context == ''
let tag = ''
else
let tag = split(context)[0]
endif
" Get rid of namespace
let tag = substitute(tag, '^'.b:xml_namespace.':', '', '')
" Get last word, it should be attr name
let attr = matchstr(context, '.*\s\zs.*')
" Possible situations where any prediction would be difficult:
" 1. Events attributes
if context =~ '\s'
" If attr contains =\s*[\"'] we catched value of attribute
if attr =~ "=\s*[\"']"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')
let entered_value = matchstr(attr, ".*=\\s*[\"']\\zs.*")
if tag =~ '^[?!]'
" Return nothing if we are inside of ! or ? tag
return []
else
let values = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][attrname]
endif
if len(values) == 0
return []
endif
" We need special version of sbase
let attrbase = matchstr(context, ".*[\"']")
let attrquote = matchstr(attrbase, '.$')
for m in values
" This if is needed to not offer all completions as-is
" alphabetically but sort them. Those beginning with entered
" part will be as first choices
if m =~ '^'.entered_value
call add(res, m . attrquote.' ')
elseif m =~ entered_value
call add(res2, m . attrquote.' ')
endif
endfor
return res + res2
endif
if tag =~ '?xml'
" Two possible arguments for <?xml> plus variation
let attrs = ['encoding', 'version="1.0"', 'version']
elseif tag =~ '^!'
" Don't make completion at all
return []
else
let attrs = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1])
endif
for m in sort(attrs)
if m =~ '^'.attr
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
call add(res, m)
elseif m =~ '='
call add(res, m)
else
call add(res, m.'="')
endif
elseif m =~ attr
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
call add(res, m)
elseif m =~ '='
call add(res, m)
else
call add(res2, m.'="')
endif
endif
endfor
return res + res2
endif
" Close tag
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
endif
" Complete elements of XML structure
" TODO: #REQUIRED, #IMPLIED, #FIXED, #PCDATA - but these should be detected like
" entities - in first run
" keywords: CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS
" are hardly recognizable but keep it in reserve
" also: EMPTY ANY SYSTEM PUBLIC DATA
if context =~ '^!'
let tags = ['!ELEMENT', '!DOCTYPE', '!ATTLIST', '!ENTITY', '!NOTATION', '![CDATA[', '![INCLUDE[', '![IGNORE[']
for m in tags
if m =~ '^'.context
let m = substitute(m, '^!\[\?', '', '')
call add(res, m)
elseif m =~ context
let m = substitute(m, '^!\[\?', '', '')
call add(res2, m)
endif
endfor
return res + res2
endif
" Complete text declaration
let g:co = context
if context =~ '^?'
let tags = ['?xml']
for m in tags
if m =~ '^'.context
call add(res, substitute(m, '^?', '', ''))
elseif m =~ context
call add(res, substitute(m, '^?', '', ''))
endif
endfor
return res + res2
endif
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
let opentag = substitute(opentag, '^\k*:', '', '')
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
let context = substitute(context, '^\k*:', '', '')
if b:xml_namespace == 'DEFAULT'
let b:xml_namespace = ''
else
let b:xml_namespace .= ':'
endif
for m in tags
if m =~ '^'.context
call add(res, b:xml_namespace.m)
elseif m =~ context
call add(res2, b:xml_namespace.m)
endif
endfor
return res + res2
endif
endfunction
" MM: This is greatly reduced closetag.vim used with kind permission of Steven
" Mueller
" Changes: strip all comments; delete error messages; add checking for
" namespace
" Author: Steven Mueller <diffusor@ugcs.caltech.edu>
" Last Modified: Tue May 24 13:29:48 PDT 2005
" Version: 0.9.1
function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
let linenum=line('.')
let lineend=col('.') - 1 " start: cursor position
let first=1 " flag for first line searched
let b:TagStack='' " main stack of tags
let startInComment=s:InComment()
if exists("b:xml_namespace")
if b:xml_namespace == 'DEFAULT'
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
else
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
endif
else
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
endif
while (linenum>0)
let line=getline(linenum)
if first
let line=strpart(line,0,lineend)
else
let lineend=strlen(line)
endif
let b:lineTagStack=''
let mpos=0
let b:TagCol=0
while (mpos > -1)
let mpos=matchend(line,tagpat)
if mpos > -1
let b:TagCol=b:TagCol+mpos
let tag=matchstr(line,tagpat)
if exists('b:closetag_disable_synID') || startInComment==s:InCommentAt(linenum, b:TagCol)
let b:TagLine=linenum
call s:Push(matchstr(tag,'[^<>]\+'),'b:lineTagStack')
endif
let lineend=lineend-mpos
let line=strpart(line,mpos,lineend)
endif
endwhile
while (!s:EmptystackP('b:lineTagStack'))
let tag=s:Pop('b:lineTagStack')
if match(tag, '^/') == 0 "found end tag
call s:Push(tag,'b:TagStack')
elseif s:EmptystackP('b:TagStack') && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag
return tag
else
let endtag=s:Peekstack('b:TagStack')
if endtag == '/'.tag || endtag == '/'
call s:Pop('b:TagStack') "found a open/close tag pair
elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error
return ''
endif
endif
endwhile
let linenum=linenum-1 | let first=0
endwhile
return ''
endfunction
function! s:InComment()
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment'
endfunction
function! s:InCommentAt(line, col)
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment'
endfunction
function! s:SetKeywords()
let g:IsKeywordBak=&iskeyword
let &iskeyword='33-255'
endfunction
function! s:RestoreKeywords()
let &iskeyword=g:IsKeywordBak
endfunction
function! s:Push(el, sname)
if !s:EmptystackP(a:sname)
exe 'let '.a:sname."=a:el.' '.".a:sname
else
exe 'let '.a:sname.'=a:el'
endif
endfunction
function! s:EmptystackP(sname)
exe 'let stack='.a:sname
if match(stack,'^ *$') == 0
return 1
else
return 0
endif
endfunction
function! s:Instack(el, sname)
exe 'let stack='.a:sname
call s:SetKeywords()
let m=match(stack, '\<'.a:el.'\>')
call s:RestoreKeywords()
if m < 0
return 0
else
return 1
endif
endfunction
function! s:Peekstack(sname)
call s:SetKeywords()
exe 'let stack='.a:sname
let top=matchstr(stack, '\<.\{-1,}\>')
call s:RestoreKeywords()
return top
endfunction
function! s:Pop(sname)
if s:EmptystackP(a:sname)
return ''
endif
exe 'let stack='.a:sname
call s:SetKeywords()
let loc=matchend(stack,'\<.\{-1,}\>')
exe 'let '.a:sname.'=strpart(stack, loc+1, strlen(stack))'
let top=strpart(stack, match(stack, '\<'), loc)
call s:RestoreKeywords()
return top
endfunction
function! s:Clearstack(sname)
exe 'let '.a:sname."=''"
endfunction

View File

@@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Sep 16, 2005
" Version: 2
" 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= "v2"
let g:loaded_zip= "v6"
" ----------------
" Functions: {{{1
@@ -32,18 +32,25 @@ let g:loaded_zip= "v2"
" zip#Browse: {{{2
fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
let repkeep= &report
set report=10
" sanity checks
if !executable("unzip")
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Browse")
return
endif
if !filereadable(a:zipfile)
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("zip#Browse")
if a:zipfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let &report= repkeep
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
if &ma != 1
@@ -74,23 +81,28 @@ fun! zip#Browse(zipfile)
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
let &report= repkeep
" call Dret("zip#Browse")
endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile.">")
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
endif
if fname =~ '/$'
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
endif
@@ -99,19 +111,25 @@ fun! s:ZipBrowseSelect()
" get zipfile to the new-window
let zipfile= substitute(w:zipfile,'.zip$','','e')
let curfile= expand("%")
new
wincmd _
let s:zipfile_{winnr()}= curfile
exe "e zipfile:".zipfile.':'.fname
filetype detect
" call Dret("ZipBrowseSelect")
let &report= repkeep
" call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" zip#Read: {{{2
fun! zip#Read(fname,mode)
" call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">")
@@ -122,24 +140,29 @@ fun! zip#Read(fname,mode)
0d
set nomod
let &report= repkeep
" call Dret("zip#Read")
endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.")")
" call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
" sanity checks
if !executable("zip")
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
if !exists("*mkdir")
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
@@ -159,6 +182,7 @@ fun! zip#Write(fname)
catch /^Vim\%((\a\+)\)\=:E344/
echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endtry
@@ -174,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
@@ -192,6 +221,21 @@ fun! zip#Write(fname)
if v:shell_error != 0
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif s:zipfile_{winnr()} =~ '^\a\+://'
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
" call Decho("handle writing <".zipfile.".zip> across network as <".netzipfile.">")
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".zipfile.".zip"
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
endif
" cleanup and restore current directory
@@ -200,6 +244,7 @@ fun! zip#Write(fname)
exe "cd ".escape(curdir,' \')
setlocal nomod
let &report= repkeep
" call Dret("zip#Write")
endfun

View File

@@ -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%.%#

View File

@@ -2,14 +2,8 @@
" Language: eRuby
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.sourceforge.net
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" ----------------------------------------------------------------------------
if exists("current_compiler")

17
runtime/compiler/fpc.vim Normal file
View File

@@ -0,0 +1,17 @@
" Vim compiler file
" Compiler: FPC 2.1
" Maintainer: Jaroslaw Blasiok <jaro3000@o2.pl>
" Last Change: 2005 October 07
if exists("current_compiler")
finish
endif
let current_compiler = "fpc"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
" NOTE: compiler must be runned with -vb to write whole source path, not only file
" name.
CompilerSet errorformat=%f(%l\\,%c)\ %m

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: HP aCC
" Maintainer: Matthias Ulrich <matthias-ulrich@web.de>
" URL: http://www.subhome.de/vim/hp_acc.vim
" Last Change: 2004 Mar 27
" URL: http://www.subhome.de/vim/hp_acc.vim
" Last Change: 2005 Nov 19
"
" aCC --version says: "HP ANSI C++ B3910B A.03.13"
" This compiler has been tested on:
@@ -10,6 +10,10 @@
"
" Tim Brown's aCC is: "HP ANSI C++ B3910B A.03.33"
" and it also works fine...
"
" Now suggestions by aCC are supported (compile flag aCC +w).
" Thanks to Tim Brown again!!
"
if exists("current_compiler")
finish
@@ -21,6 +25,7 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
endif
CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m,
\%A%tarning\ (suggestion)\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#,
\%A%tarning\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#,
\%Z\ \ \ \ %p^%.%#,
\%-C%.%#

View File

@@ -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

View File

@@ -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,

View File

@@ -5,18 +5,12 @@
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" ----------------------------------------------------------------------------
"
" Changelog:
" 0.2: script saves and restores 'cpoptions' value to prevent problems with
" line continuations
" 0.1: initial release
" 0.2: script saves and restores 'cpoptions' value to prevent problems with
" line continuations
" 0.1: initial release
"
" Contributors:
" Hugh Sasse <hgs@dmu.ac.uk>

View File

@@ -2,14 +2,8 @@
" Language: Test::Unit - Ruby Unit Testing Framework
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.sourceforge.net
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" ----------------------------------------------------------------------------
if exists("current_compiler")
@@ -28,7 +22,7 @@ CompilerSet makeprg=testrb
CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
\%C%m\ [%f:%l]:,
\%E\ %\\+%\\d%\\+)\ Error:,
\%E\ %\\+%\\d%\\+)\ Error:,
\%C%m:,
\%C\ \ \ \ %f:%l:%.%#,
\%C%m,

View File

@@ -72,6 +72,8 @@ DOCS = \
pi_gzip.txt \
pi_netrw.txt \
pi_spec.txt \
pi_tar.txt \
pi_zip.txt \
print.txt \
quickfix.txt \
quickref.txt \

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Jul 30
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
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,195 @@ 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
|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 +371,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 +418,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,15 +511,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.
WARNING: This event is triggered when making a
change, just before the change is applied to
the text. 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
@@ -343,104 +584,136 @@ 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.
*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.
@@ -457,142 +730,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}*
@@ -810,6 +947,10 @@ option will not cause any commands to be executed.
autocommands for that group. Note: if you use an
undefined group name, Vim gives you an error message.
After applying the autocommands the modelines are
processed, so that their overrule the settings from
autocommands, like what happens when editing a file.
*:doautoa* *:doautoall*
:doautoa[ll] [group] {event} [fname]
Like ":doautocmd", but apply the autocommands to each
@@ -916,10 +1057,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
@@ -1036,5 +1175,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:

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Sep 17
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
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()
@@ -562,7 +566,7 @@ argument for the command, which has a different meaning. For example:
"name"
==============================================================================
4. Ex command-line ranges *cmdline-ranges* *[range]* *E16* *E493*
4. Ex command-line ranges *cmdline-ranges* *[range]* *E16*
Some Ex commands accept a line range in front of them. This is noted as
[range]. It consists of one or more line specifiers, separated with ',' or
@@ -648,11 +652,15 @@ When folds are active the line numbers are rounded off to include the whole
closed fold. See |fold-behavior|.
Reverse Range
Reverse Range *E493*
A range should have the lower line number first. If this is not the case, Vim
will ask you if it should swap the line numbers. This is not done within the
global command ":g".
will ask you if it should swap the line numbers.
Backwards range given, OK to swap ~
This is not done within the global command ":g".
You can use ":silent" before a command to avoid the question, the range will
always be swapped then.
Count and Range *N:*
@@ -688,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()|.

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
*editing.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -398,8 +398,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 +408,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 +418,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

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1272,12 +1272,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
@@ -1372,6 +1373,14 @@ v:progname Contains the name (with path removed) with which Vim was
v:register The name of the register supplied to the last normal mode
command. Empty if none were supplied. |getreg()| |setreg()|
*v:scrollstart* *scrollstart-variable*
v:scrollstart String describing the script or function that caused the
screen to scroll up. It's only set when it is empty, thus the
first reason is remembered. It is set to "Unknown" for a
typed command.
This can be used to find out why your script causes the
hit-enter prompt.
*v:servername* *servername-variable*
v:servername The resulting registered |x11-clientserver| name if any.
Read-only.
@@ -1392,6 +1401,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
@@ -1626,7 +1658,8 @@ simplify( {filename}) String simplify filename as much as possible
sort( {list} [, {func}]) List sort {list}, using {func} to compare
soundfold( {word}) String sound-fold {word}
spellbadword() String badly spelled word at cursor
spellsuggest( {word} [, {max}]) List spelling suggestions
spellsuggest( {word} [, {max} [, {capital}]])
List spelling suggestions
split( {expr} [, {pat} [, {keepempty}]])
List make List from {pat} separated {expr}
strftime( {format}[, {time}]) String time in specified format
@@ -1868,6 +1901,7 @@ cindent({lnum}) *cindent()*
relevant. {lnum} is used just like in |getline()|.
When {lnum} is invalid or Vim was not compiled the |+cindent|
feature, -1 is returned.
See |C-indenting|.
*col()*
col({expr}) The result is a Number, which is the byte index of the column
@@ -2166,6 +2200,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: >
@@ -2175,8 +2217,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
@@ -3227,6 +3273,10 @@ maparg({name}[, {mode}]) *maparg()*
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
@@ -3614,6 +3664,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}
@@ -4076,19 +4128,23 @@ spellbadword([{sentence}])
used.
*spellsuggest()*
spellsuggest({word} [, {max}])
spellsuggest({word} [, {max} [, {capital}]])
Return a List with spelling suggestions to replace {word}.
When {max} is given up to this number of suggestions are
returned. Otherwise up to 25 suggestions are returned.
When the {capital} argument is given and it's non-zero only
suggestions with a leading capital will be given. Use this
after a match with 'spellcapcheck'.
{word} can be a badly spelled word followed by other text.
This allows for joining two words that were split. The
suggestions also include the following text, thus you can
replace a line.
{word} may also be a good word. Similar words will then be
returned. {word} itself is also included, most likely as the
first entry, thus this can be used to check spelling.
returned. {word} itself is not included in the suggestions,
although it may appear capitalized.
The spelling information for the current window is used. The
'spell' option must be set and the values of 'spelllang' and
@@ -4180,7 +4236,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
@@ -4329,6 +4385,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.
@@ -4570,7 +4630,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.
@@ -5036,6 +5096,9 @@ This also works when reading a variable that has not been set yet: >
:let l = foo#bar#lvar
However, when the autoload script was already loaded it won't be loaded again
for an unknown variable.
When assigning a value to such a variable nothing special happens. This can
be used to pass settings to the autoload script before it's loaded: >
@@ -5158,7 +5221,7 @@ This would call the function "my_func_whizz(parameter)".
always converted to the type of the option.
For an option local to a window or buffer the effect
is just like using the |:set| command: both the local
value and the global value is changed.
value and the global value are changed.
Example: >
:let &path = &path . ',/usr/local/include'
@@ -6749,7 +6812,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:
@@ -6759,6 +6822,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*

View File

@@ -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*

View File

@@ -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

View File

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

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -9,6 +9,7 @@ Perl and Vim *perl* *Perl*
1. Editing Perl files |perl-editing|
2. Compiling VIM with Perl interface |perl-compiling|
3. Using the Perl interface |perl-using|
4. Dynamic loading |perl-dynamic|
{Vi does not have any of these commands}
@@ -259,4 +260,22 @@ function: >
endif
Note that "EOF" must be at the start of the line.
==============================================================================
4. Dynamic loading *perl-dynamic*
On MS-Windows the Perl library can be loaded dynamically. The |:version|
output then includes |+perl/dyn|.
This means that Vim will search for the Perl DLL file only when needed. When
you don't use the Perl interface you don't need it, thus you can use Vim
without this DLL file.
To use the Perl interface the Perl DLL must be in your search path. In a
console window type "path" to see what directories are used.
The name of the DLL must match the Perl version Vim was compiled with.
Currently the name is "perl58.dll". That is for Perl 5.8. To know for
sure edit "gvim.exe" and search for "perl\d*.dll\c".
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Paul Moore
@@ -11,6 +11,7 @@ The Python Interface to Vim *python* *Python*
3. Buffer objects |python-buffer|
4. Range objects |python-range|
5. Window objects |python-window|
6. Dynamic loading |python-dynamic|
{Vi does not have any of these commands}
@@ -299,5 +300,22 @@ Window attributes are:
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.
==============================================================================
6. Dynamic loading *python-dynamic*
On MS-Windows the Python library can be loaded dynamically. The |:version|
output then includes |+python/dyn|.
This means that Vim will search for the Python DLL file only when needed.
When you don't use the Python interface you don't need it, thus you can use
Vim without this DLL file.
To use the Python interface the Python DLL must be in your search path. In a
console window type "path" to see what directories are used.
The name of the DLL must match the Python version Vim was compiled with.
Currently the name is "python24.dll". That is for Python 2.4. To know for
sure edit "gvim.exe" and search for "python\d*.dll\c".
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Aug 31
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Shugo Maeda
@@ -11,6 +11,7 @@ The Ruby Interface to Vim *ruby* *Ruby*
3. VIM::Buffer objects |ruby-buffer|
4. VIM::Window objects |ruby-window|
5. Global variables |ruby-globals|
6. Dynamic loading |ruby-dynamic|
{Vi does not have any of these commands}
*E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
@@ -166,12 +167,29 @@ cursor = [{row}, {col}]
Sets the cursor position to {row} and {col}.
==============================================================================
4. Global variables *ruby-globals*
5. Global variables *ruby-globals*
There are two global variables.
$curwin The current window object.
$curbuf The current buffer object.
==============================================================================
6. Dynamic loading *ruby-dynamic*
On MS-Windows the Ruby library can be loaded dynamically. The |:version|
output then includes |+ruby/dyn|.
This means that Vim will search for the Ruby DLL file only when needed. When
you don't use the Ruby interface you don't need it, thus you can use Vim
without this DLL file.
To use the Ruby interface the Ruby DLL must be in your search path. In a
console window type "path" to see what directories are used.
The name of the DLL must match the Ruby version Vim was compiled with.
Currently the name is "ruby18.dll". That is for Ruby 1.8. To know for sure
edit "gvim.exe" and search for "ruby\d*.dll\c".
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Ingo Wilken
@@ -14,6 +14,7 @@ The Tcl Interface to Vim *tcl* *Tcl* *TCL*
6. Miscellaneous; Output from Tcl |tcl-misc| |tcl-output|
7. Known bugs & problems |tcl-bugs|
8. Examples |tcl-examples|
9. Dynamic loading |tcl-dynamic|
{Vi does not have any of these commands} *E280* *E281*
@@ -508,5 +509,22 @@ startup file (usually "~/.vimrc" on Unix):
tclfile ~/.vimrc.tcl
endif
==============================================================================
9. Dynamic loading *tcl-dynamic*
On MS-Windows the Tcl library can be loaded dynamically. The |:version|
output then includes |+tcl/dyn|.
This means that Vim will search for the Tcl DLL file only when needed. When
you don't use the Tcl interface you don't need it, thus you can use Vim
without this DLL file.
To use the Tcl interface the Tcl DLL must be in your search path. In a
console window type "path" to see what directories are used.
The name of the DLL must match the Tcl version Vim was compiled with.
Currently the name is "tcl83.dll". That is for Tcl 8.3. To know for sure
edit "gvim.exe" and search for "tcl\d*.dll\c".
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2005 Sep 13
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
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,16 +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 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) spelled word
|zX| zX re-apply 'foldlevel'
|z^| z^ cursor on line N (default line above
window), otherwise like "z-"
@@ -780,6 +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 spelled word
|zh| zh when 'wrap' off scroll screen N characters
to the right
|zi| zi toggle 'foldenable'
@@ -796,6 +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) 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"
@@ -1063,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
@@ -1250,6 +1257,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
@@ -1347,7 +1355,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
@@ -1371,7 +1379,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
@@ -1381,6 +1389,7 @@ The commands are sorted on the non-optional part of their name.
|:stop| :st[op] suspend the editor or escape to a shell
|:stag| :sta[g] split window and jump to a tag
|:startinsert| :star[tinsert] start Insert mode
|:startgreplace| :startg[replace] start Virtual Replace mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2005 Sep 23
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
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*
-----------------------------------------------------------------------
@@ -952,8 +952,32 @@ 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*
*popupmenu-completion*
Vim can display the matches in a simplistic popup menu.
The menu is used when:
- The 'completeopt' option contains "menu".
- The terminal supports at least 8 colors.
- There are at least two matches.
While the menu is displayed these keys have a special meaning:
<CR> and <Enter>: Accept the currently selected match
<Up>: Select the previous match, as if CTRL-P was used
<Down>: Select the next match, as if CTRL-N was used
<PageUp>: Select a match several entries back
<PageDown>: Select a match several entries further
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|
PmenuSel selected item |hl-PmenuSel|
PmenuSbar scrollbar |hl-PmenuSbar|
PmenuThumb thumb of the scrollbar |hl-PmenuThumb|
Filetype-specific remarks for omni completion *compl-omni-filetypes*
C *ft-c-omni*
Completion of C code requires a tags file. You should use Exuberant ctags,
@@ -986,7 +1010,14 @@ When the same structure name appears in multiple places all possible members
are included.
(X)HTML *ft-html-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*
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
@@ -998,23 +1029,143 @@ also works for other versions of HTML. Features:
a tag)
- when attribute has limited number of possible values help to complete
them
- complete names of entities
- complete values of "class" and "id" attributes with data obtained from
style tag and included CSS files
- when completing "style" attribute or working inside of "style" tag
switch to |ft-css-omni| completion
- when used after "</" CTRL-X CTRL-O will close the last opened tag
File htmlcomplete.vim provides through |autoload| mechanism
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
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)
- inside of tag complete proper attributes (no width attribute for an
a tag)
- when attribute has limited number of possible values help to complete
them
- 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*
Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim)
XML data files are stored in "autoload/xml" directory in 'runtimepath'. They
have meaningful name which will be used in commands. It should be unique name
which will not create conflicts in future. For example name xhtml10s.vim means
it is data file for XHTML 1.0 Strict.
File contains one variable with fixed name: g:xmldata_xhtml10s . It is
compound from two parts:
1. "g:xmldata_" general prefix
2. "xhtml10s" name of file and name of described XML dialect
Part two must be exactly the same as name of file.
Variable is data structure in form of |Dictionary|. Keys are tag names and
values are two element |List|. First element of List is also List with
names of possible children, second element is |Dictionary| with names of
attributes as keys and possible values of attributes as values. Example: >
let g:xmldata_crippledhtml = {
\ "html":
\ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"],
\ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}],
\ "script":
\ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [],
\ "defer": ["BOOL"], "xml:space": ["preserve"]}],
\ "meta":
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
\ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}]
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]}
This example should be put in "autoload/xml/crippledhtml.vim" file.
In example are visible two special elements:
1. "vimxmlentities" - special key with List containing entities of this XML
dialect.
2. "BOOL" - value of attribute key showing if attribute should be inserted
bare ("defer" vs. 'defer="'). It can be the only element of List of
attribute values.
Note: Tag names in data file MUST not contain namespace description. Check
xsl.vim for example.
Commands
: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|
command. First (obligatory) argument is name of data (xhtml10s, xsl). Second
argument is code of namespace (h, xsl). When used without second argument
dialect will be used as default - without namespace declaration. For example
to use XML completion in .xsl files: >
:XMLns xhtml10s
:XMLns xsl xsl
: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
Usage
While used in situation (after declarations from previous part, | is
cursor position): >
<|
Will complete to appropriate XHTML tag, and in this situation: >
<xsl:|
Will complete to appropriate XSL tag.
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 htmlcomplete#GetLastOpenTag("b:unaryTagsStack")
:echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
CSS *ft-css-omni*
Complete properties and their appropriate values according to CSS 2.1
specification.
==============================================================================
@@ -1143,6 +1294,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
the function or script is finished.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
*:startgreplace*
:startg[replace][!] Just like |:startreplace|, but use Virtual Replace
mode, like with |gR|.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
==============================================================================

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2005 Sep 22
*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.
@@ -966,8 +1099,10 @@ completion can be enabled:
-complete=custom,{func} custom completion, defined via {func}
-complete=customlist,{func} custom completion, defined via {func}
Custom completion *:command-completion-custom*
*E467* *E468*
Custom completion *:command-completion-custom*
*:command-completion-customlist*
*E467* *E468*
It is possible to define customized completion schemes via the "custom,{func}"
or the "customlist,{func}" completion argument. The {func} part should be a
function with the following prototype >
@@ -981,13 +1116,13 @@ For the "custom" argument, the function should return the completion
candidates one per line in a newline separated string.
For the "customlist" argument, the function should return the completion
candidates as a Vim List. Non-string items in the list are ignored.
candidates as a Vim List. Non-string items in the list are ignored.
The function arguments are:
ArgLead the leading portion of the argument currently being
completed on
CmdLine the entire command line
CursorPos the cursor position in it
CursorPos the cursor position in it (byte index)
The function may use these for determining context. For the "custom"
argument, it is not necessary to filter candidates against the (implicit
pattern in) ArgLead. Vim will do filter the candidates with its regexp engine
@@ -1009,6 +1144,7 @@ the 'path' option: >
: return split(globpath(&path, a:ArgLead), "\n")
:endfun
<
Range handling *E177* *E178*
By default, user-defined commands do not accept a line number range. However,

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Jul 09
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -484,6 +484,12 @@ conversion needs to be done. These conversions are supported:
request a very large buffer, more than Vim is willing to provide).
Try getting another iconv() implementation.
*iconv-dynamic*
On MS-Windows Vim can be compiled with the |+iconv/dyn| feature. This means
Vim will search for the "iconv.dll" and "libiconv.dll" libraries. When
neither of them can be found Vim will still work but some conversions won't be
possible.
==============================================================================
4. Using a terminal *mbyte-terminal*

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
*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.
@@ -589,6 +590,7 @@ The file is read-only and you are making a change to it anyway. You can use
the |FileChangedRO| autocommand event to avoid this message (the autocommand
must reset the 'readonly' option). See 'modifiable' to completely disallow
making changes to a file.
This message is only given for the first change after 'readonly' has been set.
*W13* >
Warning: File "{filename}" has been created after editing started
@@ -768,6 +770,9 @@ To reduce the number of hit-enter prompts:
- Add flags to 'shortmess'.
- Reset 'showcmd' and/or 'ruler'.
If your script causes the hit-enter prompt and you don't know why, you may
find the |v:scrollstart| variable useful.
Also see 'mouse'. The hit-enter message is highlighted with the |hl-Question|
group.

View File

@@ -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"

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -76,10 +76,8 @@ achieve special effects. These options come in three forms:
comma separated list, a comma is added, unless the
value was empty.
If the option is a list of flags, superfluous flags
are removed. Otherwise there is no check for doubled
values. You can avoid this by removing a value first.
Example: >
:set guioptions-=T guioptions+=T
are removed. When adding a flag that was already
present the option value doesn't change.
< Also see |:set-args| above.
{not in Vi}
@@ -988,6 +986,9 @@ A jump table for the options with a short description can be found at |Q_op|.
Watch out for special characters, see |option-backslash|.
When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the
default value. "/tmp/*" is only used for Unix.
Note that the default also makes sure that "crontab -e" works (when a
backup would be made by renaming the original file crontab won't see
the newly created file). Also see 'backupcopy' and |crontab|.
*'balloondelay'* *'bdlay'*
'balloondelay' 'bdlay' number (default: 600)
@@ -1435,6 +1436,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
@@ -1596,8 +1598,8 @@ 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|
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
@@ -1617,7 +1619,7 @@ A jump table for the options with a short description can be found at |Q_op|.
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
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
@@ -1683,6 +1685,18 @@ A jump table for the options with a short description can be found at |Q_op|.
set completefunc=CompleteMonths
<
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu")
global
{not in Vi}
Options for Insert mode completion |ins-completion|.
Currently the only supported value is:
menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
*'confirm'* *'cf'* *'noconfirm'* *'nocf'*
'confirm' 'cf' boolean (default off)
global
@@ -1805,7 +1819,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*
@@ -1874,6 +1888,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.
@@ -1963,11 +1982,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
@@ -2526,7 +2545,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
@@ -2536,7 +2557,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
@@ -2915,10 +2938,11 @@ A jump table for the options with a short description can be found at |Q_op|.
The name of an external program that will be used to format the lines
selected with the "gq" command. The program must take the input on
stdin and produce the output on stdout. The Unix program "fmt" is
such a program. If this option is an empty string, the internal
format function will be used |C-indenting|. Environment variables are
expanded |:set_env|. See |option-backslash| about including spaces
and backslashes.
such a program.
If this option is an empty string, the internal format function will
be used |C-indenting|.
Environment variables are expanded |:set_env|. See |option-backslash|
about including spaces and backslashes.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -3382,7 +3406,9 @@ A jump table for the options with a short description can be found at |Q_op|.
f:Folded,F:FoldColumn,A:DiffAdd,
C:DiffChange,D:DiffDelete,T:DiffText,
>:SignColumn,B:SpellBad,P:SpellCap,
R:SpellRare,L:SpellLocal")
R:SpellRare,L:SpellLocal,
+:Pmenu,=:PmenuSel,
x:PmenuSbar,X:PmenuThumb")
global
{not in Vi}
This option can be used to set highlighting mode for various
@@ -3423,6 +3449,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-SpellCap| P word that should start with capital|spell|
|hl-SpellRare| R rare word |spell|
|hl-SpellLocal| L word from other region |spell|
|hl-Pmenu| + popup menu normal line
|hl-PmenuSel| = popup menu normal line
|hl-PmenuSbar| x popup menu scrollbar
|hl-PmenuThumb| X popup menu scrollbar thumb
The display modes are:
r reverse (termcap entry "mr" and "me")
@@ -3649,8 +3679,11 @@ A jump table for the options with a short description can be found at |Q_op|.
value is for C programs. This option is used for the commands "[i",
"]I", "[d", etc.
Normally the 'isfname' option is used to recognize the file name that
comes after the matched pattern. But if both "\zs" and "\ze" appear
in the pattern then the text spanned by them is used as the file name.
comes after the matched pattern. But if "\zs" appears in the pattern
then the text matched from "\zs" to the end, or until "\ze" if it
appears, is used as the file name. Use this to include characters
that are not in 'isfname', such as a space. You can then use
'includeexpr' to process the matched text.
See |option-backslash| about including spaces and backslashes.
*'includeexpr'* *'inex'*
@@ -3699,7 +3732,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'smartindent' indenting.
When 'paste' is set this option is not used for indenting.
The expression is evaluated with |v:lnum| set to the line number for
which the indent is to be computed. The cursor is also as this line
which the indent is to be computed. The cursor is also in this line
when the expression is evaluated (but it may be moved around).
The expression must return the number of spaces worth of indent. It
can return "-1" to keep the current indent (this means 'autoindent' is
@@ -4068,7 +4101,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.
@@ -4563,12 +4597,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
@@ -4610,12 +4644,22 @@ 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|
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*
'osfiletype' 'oft' string (RISC-OS default: "Text",
others default: "")
@@ -5662,13 +5706,13 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
The minimal number of screen columns to keep to the left and to the
right of the cursor if 'nowrap' is set. Setting this option to a value
greater than 0 while having |'sidescroll'| also at a non-zero value
makes some context visible in the line you are scrolling in
horizontally (except at the end and beginning of the line). Setting
this option to a large value (like 999) has the effect of keeping the
cursor horizontally centered in the window, as long as one does not
come too close to the beginning or end of the line.
right of the cursor if 'nowrap' is set. Setting this option to a
value greater than 0 while having |'sidescroll'| also at a non-zero
value makes some context visible in the line you are scrolling in
horizontally (except at beginning of the line). Setting this option
to a large value (like 999) has the effect of keeping the cursor
horizontally centered in the window, as long as one does not come too
close to the beginning of the line.
NOTE: This option is set to 0 when 'compatible' is set.
Example: Try this together with 'sidescroll' and 'listchars' as
@@ -5843,7 +5887,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:
@@ -5862,7 +5906,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.
@@ -5884,7 +5928,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.
@@ -6006,6 +6050,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.

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Sep 12
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
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
@@ -800,8 +804,8 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
*/\%l* */\%>l* */\%<l*
\%23l Matches in a specific line.
\%<23l Matches above a specific line.
\%>23l Matches below a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
These three can be used to match specific lines in a buffer. The "23"
can be any line number. The first line is 1. {not in Vi}
WARNING: When inserting or deleting lines Vim does not automatically

View File

@@ -1,8 +1,8 @@
*pi_netrw.txt* For Vim version 7.0. Last change: Aug 25, 2005
*pi_netrw.txt* For Vim version 7.0. Last change: Nov 28, 2005
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
*dav* *http* *network* *rcp* *scp*
*fetch* *netrw* *Nread* *rsync* *sftp*
*ftp* *netrw.vim* *Nwrite* *netrw-file*
@@ -25,7 +25,7 @@
4. Transparent File Transfer............................|netrw-transparent|
5. Ex Commands..........................................|netrw-ex|
6. Variables and Options................................|netrw-var|
7. Directory Browser....................................|netrw-browse| {{{1
7. Directory Browsing...................................|netrw-browse| {{{1
Maps...............................................|netrw-maps|
Exploring..........................................|netrw-explore-cmds|
Quick Reference Commands Table.....................|netrw-browse-cmds|
@@ -40,7 +40,7 @@
Making A New Directory.............................|netrw-d|
Deleting Files Or Directories......................|netrw-delete|
Renaming Files Or Directories......................|netrw-move|
Hiding Files Or Directories........................|g:netrw-a|
Hiding Files Or Directories........................|netrw-a|
Edit File Or Directory Hiding List.................|netrw-h|
Browsing With A Horizontally Split Window..........|netrw-o|
Preview Window.....................................|netrw-p|
@@ -194,8 +194,8 @@ file using root-relative paths, use the full path:
2. 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 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
(<netrw.vim>) using plugin techniques. It currently supports both reading and
writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
dav/cadaver, rsync, or sftp.
http is currently supported read-only via use of wget or fetch.
@@ -206,24 +206,23 @@ FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
ex. vim ftp://hostname/path/to/file
<
The characters preceding the colon specify the protocol to use;
in the example, its ftp. The <netrw.vim> script then formulates
a command or a series of commands (typically ftp) which it issues
to an external program (ftp, scp, etc) which does the actual file
transfer/protocol. Files are read from/written to a temporary file
(under Unix/Linux, /tmp/...) which the <netrw.vim> script will
clean up.
The characters preceding the colon specify the protocol to use; in the
example, its ftp. The <netrw.vim> script then formulates a command or a
series of commands (typically ftp) which it issues to an external program
(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
from/written to a temporary file (under Unix/Linux, /tmp/...) which the
<netrw.vim> script will clean up.
One may modify any protocol's implementing external application
by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
which is defaulted to "scp -q").
One may modify any protocol's implementing external application by setting a
variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
"scp -q").
Ftp, an old protocol, seems to be blessed by numerous implementations.
Unfortunately, some implementations are noisy (ie., add junk to the end
of the file). Thus, concerned users may decide to write a NetReadFixup()
function that will clean up after reading with their ftp. Some Unix systems
(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
but is not noisy and more convenient, actually, for <netrw.vim> to use.
Unfortunately, some implementations are noisy (ie., add junk to the end of the
file). Thus, concerned users may decide to write a NetReadFixup() function
that will clean up after reading with their ftp. Some Unix systems (ie.,
FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
not noisy and more convenient, actually, for <netrw.vim> to use.
Consequently, if "fetch" is executable, it will be used to do reads for
ftp://... (and http://...) . See |netrw-var| for more about this.
@@ -332,8 +331,9 @@ The script attempts to get passwords for ftp invisibly using |inputsecret()|,
a built-in Vim function. See |netrw-uidpass| for how to change the password
after one has set it.
Unfortunately there doesn't appear to be a way for netrw to feed a password
to scp. Thus every transfer via scp will require re-entry of the password.
Unfortunately there doesn't appear to be a way for netrw to feed a password to
scp. Thus every transfer via scp will require re-entry of the password.
However, |netrw-listhack| can help with this problem.
==============================================================================
@@ -341,21 +341,28 @@ to scp. Thus every transfer via scp will require re-entry of the password.
Network-oriented file transfers are available by default whenever
|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
system's vim-plugin directory and is sourced automatically whenever you
bring up vim.
system's vim-plugin directory and is sourced automatically whenever you bring
up vim. I suggest that, at a minimum, you have at least the following in your
<.vimrc> customization file: >
set nocp
if version >= 600
filetype plugin indent on
endif
<
==============================================================================
4. 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.
Thus one may use files across networks as if they were local. >
Thus one may use files across networks just as simply as if they were local. >
vim ftp://[user@]machine/path
...
:wq
See |netrw-activate| for more on how to encourage your vim to use plugins
such as netrw.
==============================================================================
5. Ex Commands *netrw-ex*
@@ -369,15 +376,14 @@ additional commands available.
:[range]Nw {netfile} [{netfile}]...
Write the specified lines to the {netfile}.
:Nread
Read the specified lines into the current
:Nread Read the specified lines into the current
buffer from the file specified in
b:netrw_lastfile.
:Nread {netfile} {netfile}...
Read the {netfile} after the current line.
*netrw-uidpass*
*netrw-uidpass*
:call NetUserPass()
If b:netrw_uid and b:netrw_passwd don't exist,
this function query the user for them.
@@ -401,10 +407,11 @@ additional commands available.
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:
>
-------------
Netrw Options
-------------
(also see |netrw-settings|) >
-------------
Netrw Options
-------------
Option Meaning
-------------- -----------------------------------------------
<
@@ -427,7 +434,7 @@ behavior. These variables typically may be set in the user's <.vimrc> file:
g:netrw_silent =0 transfers done normally
=1 transfers done silently
g:netrw_uid Holds current user-id for ftp.
=1 use alternate ftp (user uid password)
=1 use alternate ftp (user uid password)
(see |netrw-options|)
g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
=1 use WinNT/2K/XP's rcp, binary mode
@@ -481,12 +488,12 @@ 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 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.
The g:netrw_..._cmd variables specify the external program to use handle the
associated protocol (rcp, ftp, etc), plus any options.
The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
whatever the current request is for a hostname.
@@ -519,8 +526,8 @@ userid and password. The transferred file is put into a temporary file.
The temporary file is then read into the main editing session window that
requested it and the temporary file deleted.
If your ftp doesn't accept the "user" command and immediately just demands
a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
If your ftp doesn't accept the "user" command and immediately just demands a
userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
*netrw-cadaver*
To handle the SSL certificate dialog for untrusted servers, one may pull
@@ -547,12 +554,12 @@ messages) you may write a NetReadFixup(tmpfile) function:
endif
endfunction
>
The NetReadFixup() function will be called if it exists and thus allows
you to customize your reading process. As a further example, <netrw.vim>
contains just such a function to handle Windows 95 ftp. For whatever
reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
and so it is desirable to automate their removal. Here's some code taken
from <netrw.vim> itself:
The NetReadFixup() function will be called if it exists and thus allows you to
customize your reading process. As a further example, <netrw.vim> contains
just such a function to handle Windows 95 ftp. For whatever reason, Windows
95's ftp dumps four blank lines at the end of a transfer, and so it is
desirable to automate their removal. Here's some code taken from <netrw.vim>
itself:
>
if has("win95") && g:netrw_win95ftp
fun! NetReadFixup(method, line1, line2)
@@ -565,7 +572,7 @@ from <netrw.vim> itself:
>
==============================================================================
7. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
7. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
MAPS *netrw-maps*
?................Help.......................................|netrw-help|
@@ -656,12 +663,13 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
: connect to address [0-9a-fA-F:]*
: No route to host$'
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
messages, banners, and whatnot that one doesn't
want masquerading as "directories" and "files".
Use this pattern to remove such embedded
messages. By default its value is:
'^total\s\+\d\+$'
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
listing. Defaults:
unix or g:netrw_cygwin set: : "ls -lF"
otherwise "dir"
*g:netrw_hide* if true, the hiding list is used
default: =0
*g:netrw_keepdir* =1 (default) keep current directory immune from
the browsing directory.
@@ -676,16 +684,11 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
*g:netrw_longlist* if =1, then long listing will be default
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
listing. Defaults:
unix or g:netrw_cygwin set: : "ls -lF"
otherwise "dir"
*g:netrw_list_hide* comma separated pattern list for hiding files
default: ""
*g:netrw_local_mkdir* command for making a local directory
default: "ssh HOSTNAME mkdir"
default: "mkdir"
*g:netrw_local_rmdir* remove directory command (rmdir)
default: "rmdir"
@@ -709,9 +712,6 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
*g:netrw_rmf_cmd* command for removing softlinks
default: "ssh HOSTNAME rm -f"
*g:netrw_hide* if true, the hiding list is used
default: =0
*g:netrw_sort_by* sort by "name", "time", or "size"
default: "name"
@@ -723,6 +723,18 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
default: '[\/]$,*,\.bak$,\.o$,\.h$,
\.info$,\.swp$,\.obj$'
*g:netrw_ssh_cmd* One may specify an executable command
to use instead of ssh for remote actions
such as listing, file removal, etc.
default: ssh
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
messages, banners, and whatnot that one doesn't
want masquerading as "directories" and "files".
Use this pattern to remove such embedded
messages. By default its value is:
'^total\s\+\d\+$'
*g:netrw_timefmt* specify format string to strftime() (%c)
default: "%c"
@@ -732,7 +744,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
Netrw supports the browsing of directories on the local system and on remote
hosts, including generating listing directories, entering directories, editing
hosts, including listing files and directories, entering directories, editing
files therein, deleting files/directories, making new directories, and moving
(renaming) files and directories. The Netrw browser generally implements the
previous explorer maps and commands for remote directories, although details
@@ -743,13 +755,15 @@ ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
in its remote browsing. Any other protocol will be used for file transfers,
but otherwise the ssh protocol will be used to do remote directory browsing.
To enter the netrw directory browser, simply attempt to read a "file" with a
To use Netrw's remote directory browser, simply attempt to read a "file" with a
trailing slash and it will be interpreted as a request to list a directory:
vim [protocol]://[user@]hostname/path/
If you'd like to avoid entering the password in for directory listings, scp,
ssh interaction, etc, see |netrw-listhack|.
For local directories, the trailing slash is not required.
If you'd like to avoid entering the password in for remote directory listings
with ssh or scp, see |netrw-listhack|.
*netrw-explore* *netrw-pexplore*
*netrw-hexplore* *netrw-sexplore*
@@ -783,7 +797,8 @@ By default, these commands use the current file's directory. However, one
may explicitly provide a directory (path) to use.
(Following needs v7.0 or later) *netrw-starstar*
When Explore, Sexplore, Hexplore, or Vexplore are used like
When Explore, Sexplore, Hexplore, or Vexplore are used with a **,
such as:
>
:Explore **/filename_pattern
<
@@ -797,7 +812,8 @@ The directory display is updated to show the subdirectory containing a
matching file. One may then proceed to the next (or previous) matching files'
directories by using Nexplore or Pexplore, respectively. If your console or
gui produces recognizable shift-up or shift-down sequences, then you'll likely
find the following mappings convenient:
find using shift-downarrow and shift-uparrow convenient. They're mapped by
netrw:
<s-down> == Nexplore, and
<s-up> == Pexplore.
@@ -822,11 +838,12 @@ refresh a local directory by using ":e .".
GOING UP *netrw--*
To go up a directory, press - or his the <cr> when atop the ../ directory
To go up a directory, press "-" or press the <cr> when atop the ../ directory
entry in the listing.
Netrw will modify the command in |g:netrw_list_cmd| to perform the directory
listing operation. By default the command is:
Netrw will use the command in |g:netrw_list_cmd| to perform the directory
listing operation after changing HOSTNAME to the host specified by the
user-provided url. By default netrw provides the command as:
ssh HOSTNAME ls -FLa
@@ -841,7 +858,13 @@ BROWSING *netrw-cr*
Browsing is simple: move the cursor onto a file or directory of interest.
Hitting the <cr> (the return key) will select the file or directory.
Directories will themselves be listed, and files will be opened using the
protocol given in the original read request.
protocol given in the original read request.
CAVEAT: There are three forms of listing (see |netrw-i|). Netrw assumes
that two or more spaces delimit filenames and directory names for the long
and wide listing formats. Thus, if your filename or directory name has two
or more spaces embedded in it, or any trailing spaces, then you'll need to
use the "thin" format to select it.
OBTAINING A FILE *netrw-O*
@@ -849,7 +872,21 @@ OBTAINING A FILE *netrw-O*
When browsing a remote directory, one may obtain a file under the cursor (ie.
get a copy on your local machine, but not edit it) by pressing the O key.
Only ftp and scp are supported for this operation (but since these two are
available for browsing, that shouldn't be a problem).
available for browsing, that shouldn't be a problem). The status bar
will then show, on its right hand side, a message like "Obtaining filename".
The statusline will be restored after the transfer is complete.
Netrw can also "obtain" a file using the local browser. Netrw's display
of a directory is not necessarily the same as Vim's "current directory",
unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
a file using the local browser (by putting the cursor on it) and pressing
"O" will then "obtain" the file; ie. copy it to Vim's current directory.
Related topics:
* To see what the current directory is, use |:pwd|
* To make the currently browsed directory the current directory, see |netrw-c|
* To automatically make the currently browsed directory the current
directory, see |g:netrw_keepdir|.
THIN, LONG, AND WIDE LISTINGS *netrw-i*
@@ -859,21 +896,27 @@ The "i" map cycles between the thin, long, and wide listing formats.
The short listing format gives just the files' and directories' names.
The long listing is either based on the "ls" command via ssh for remote
directories or displays the filename, file size (in bytes), and the
time and date of last modification for local directories.
directories or displays the filename, file size (in bytes), and the time and
date of last modification for local directories. With the long listing
format, netrw is not able to recognize filenames which have trailing spaces.
Use the thin listing format for such files.
The wide listing format has a multi-column display of the various
files in the netrw current directory, rather like the Unix "ls" presents.
In this mode the "b" and "B" maps are not available; instead, use
Nb (|netrw-Nb|) and NB (|netrw-NB|).
The wide listing format has a multi-column display of the various files in the
netrw current directory, rather like the Unix "ls" presents. In this mode the
"b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB
(|netrw-NB|). The wide listing format uses two or more contiguous spaces to
delineate filenames; when using that format, netrw won't be able to recognize
or use filenames which have two or more contiguous spaces embedded in the name
or any trailing spaces. The thin listing format will, however, work with such
files.
MAKING A NEW DIRECTORY *netrw-d*
With the "d" map one may make a new directory either remotely (which
depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
the global variable g:netrw_local_mkdir). Netrw will issue a request for the
new directory's name. A bare <CR> at that point will abort the making of the
With the "d" map one may make a new directory either remotely (which depends
on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
global variable g:netrw_local_mkdir). Netrw will issue a request for the new
directory's name. A bare <CR> at that point will abort the making of the
directory. Attempts to make a local directory that already exists (as either
a file or a directory) will be detected, reported on, and ignored.
@@ -881,12 +924,12 @@ a file or a directory) will be detected, reported on, and ignored.
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
Deleting/removing files and directories involves moving the cursor to the
file/directory to be deleted and pressing "D". Directories must be empty first
before they can be successfully removed. If the directory is a softlink to a
directory, then netrw will make two requests to remove the directory before
succeeding. Netrw will ask for confirmation before doing the removal(s).
You may select a range of lines with the "V" command (visual selection),
and then pressing "D".
file/directory to be deleted and pressing "D". Directories must be empty
first before they can be successfully removed. If the directory is a softlink
to a directory, then netrw will make two requests to remove the directory
before succeeding. Netrw will ask for confirmation before doing the
removal(s). You may select a range of lines with the "V" command (visual
selection), and then pressing "D".
The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
to control the attempts to remove files and directories. The g:netrw_rm_cmd
@@ -921,19 +964,19 @@ One may rename a block of files and directories by selecting them with
the V (|linewise-visual|).
HIDING FILES OR DIRECTORIES *g:netrw-a*
HIDING FILES OR DIRECTORIES *netrw-a*
Netrw's browsing facility allows one to use the hiding list in one of
three 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.
Netrw's browsing facility allows one to use the hiding list in one of three
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 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" key to show all files,
hide matching files, or to show only the matching files.
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
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"
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*
@@ -941,7 +984,8 @@ EDIT FILE OR DIRECTORY HIDING LIST *netrw-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
delimited by commas. Files and/or directories satisfying these patterns will
either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
either be hidden (ie. not shown) or be the only ones displayed (see
|netrw-a|).
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz*
@@ -950,9 +994,9 @@ Normally one enters a file or directory using the <cr>. However, the "o" map
allows one to open a new window to hold the new directory listing or file. A
horizontal split is used. (for vertical splitting, see |netrw-v|)
Normally, the o key splits the window horizontally with the new window
and cursor at the top. To change to splitting the window horizontally
with the new window and cursor at the bottom, have
Normally, the o key splits the window horizontally with the new window and
cursor at the top. To change to splitting the window horizontally with the
new window and cursor at the bottom, have
let g:netrw_alto = 1
@@ -961,30 +1005,30 @@ in your <.vimrc>.
PREVIEW WINDOW *netrw-p* *netrw-preview*
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.
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.
SELECTING SORTING STYLE *netrw-s* *netrw-sort*
One may select the sorting style by name, time, or (file) size. The
"s" map allows one to circulate amongst the three choices; the directory
listing will automatically be refreshed to reflect the selected style.
One may select the sorting style by name, time, or (file) size. The "s" map
allows one to circulate amongst the three choices; the directory listing will
automatically be refreshed to reflect the selected style.
EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence*
When "Sorted by" is name, one may specify priority via the sorting
sequence (g:netrw_sort_sequence). The sorting sequence typically
prioritizes the name-listing by suffix, although any pattern will do.
Patterns are delimited by commas. The default sorting sequence is:
When "Sorted by" is name, one may specify priority via the sorting sequence
(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
name-listing by suffix, although any pattern will do. Patterns are delimited
by commas. The default sorting sequence is:
>
[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
<
The lone * is where all filenames not covered by one of the other
patterns will end up. One may change the sorting sequence by modifying
the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
or by using the "S" map.
The lone * is where all filenames not covered by one of the other patterns
will end up. One may change the sorting sequence by modifying the
g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
using the "S" map.
REVERSING SORTING ORDER *netrw-r* *netrw-reverse*
@@ -1011,20 +1055,20 @@ q map to list both the bookmarks and history. (see |netrw-q|)
BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
Normally one enters a file or directory using the <cr>. However, the "v"
map allows one to open a new window to hold the new directory listing or
file. A vertical split is used. (for horizontal splitting, see |netrw-o|)
Normally one enters a file or directory using the <cr>. However, the "v" map
allows one to open a new window to hold the new directory listing or file. A
vertical split is used. (for horizontal splitting, see |netrw-o|)
Normally, the v key splits the window vertically with the new window
and cursor at the left. To change to splitting the window vertically
with the new window and cursor at the right, have
Normally, the v key splits the window vertically with the new window and
cursor at the left. To change to splitting the window vertically with the new
window and cursor at the right, have
let g:netrw_altv = 1
in your <.vimrc>.
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
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
@@ -1033,24 +1077,24 @@ handler varies:
* 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.
* otherwise the NetrwFileHandler plugin is used.
* otherwise the netrwFileHandler plugin is used.
The file's suffix is used by these various approaches to determine an
appropriate application to use to "handle" these files. Such things
as OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript
(*.ps, *.eps) can be handled.
appropriate application to use to "handle" these files. Such things as
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
*.eps) can be handled.
The NetrwFileHandler applies a user-defined function to a file, based on its
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!
>
Ex. mypgm.html x ->
NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
netrwFileHandler_html("scp://user@host/some/path/mypgm.html")
<
See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
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
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.
@@ -1063,8 +1107,8 @@ g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
currently browsed directory be the current directory.
With the default setting for g:netrw_keepdir, in order to make the two
directories the same, use the "c" map (just type c). That map will set
the current directory to the current browsing directory.
directories the same, use the "c" map (just type c). That map will set the
current directory to the current browsing directory.
BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
@@ -1087,8 +1131,8 @@ To change directory back to a bookmarked directory, use
{cnt}B
Any count may be used to reference any of the bookmarks. See |netrw-b|
for how to bookmark a directory and |netrw-q| for how to list them.
Any count may be used to reference any of the bookmarks. See |netrw-b| on
how to bookmark a directory and |netrw-q| on how to list bookmarks.
When wide listing is in use (see |netrw-i|), then the B map is not available;
instead, use {cnt}NB.
@@ -1118,9 +1162,9 @@ NETRW SETTINGS *netrw-settings*
With the NetrwSettings.vim plugin, >
:NetrwSettings
will bring up a window with the many variables that netrw uses for its
settings. You may change any of their values; when you save the file,
the settings therein will be used. One may also press "?" on any of
the lines for help on what each of the variables do.
settings. You may change any of their values; when you save the file, the
settings therein will be used. One may also press "?" on any of the lines for
help on what each of the variables do.
==============================================================================
@@ -1201,10 +1245,10 @@ which is loaded automatically at startup (assuming :set nocp).
1. Get the <Decho.vim> script, available as:
http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
as "Decho, a vimL debugging aid"
http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
as "Decho, a vimL debugging aid"
or
http://vim.sourceforge.net/scripts/script.php?script_id=120
http://vim.sourceforge.net/scripts/script.php?script_id=120
and put it into your local plugin directory.
@@ -1240,6 +1284,46 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
10. History *netrw-history*
v76: * "directory is missing" error message now restores echo
highlighting
v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
* if the binary option is set, then NetWrite() will only write
the whole file (line numbers don't make sense with this).
Supports writing of tar and zip files.
v74: * bugfix (vim, then :Explore) now works
* ctrl-L keeps cursor at same screen location (both local and
remote browsing)
* netrw now can read remote zip and tar files
* Obtain now uses WinXP ftp+.netrc successfully
v73: * bugfix -- scp://host/path/file was getting named incorrectly
* netrw detects use of earlier-than-7.0 version of vim and issues
a pertinent error message.
* netrwSettings.vim is now uses autoloading. Only
<netrwPlugin.vim> is needed as a pure plugin
(ie. always loaded).
v72: * bugfix -- formerly, one could prevent the loading of netrw
by "let g:loaded_netrw=1"; when autoloading became supported,
this feature was lost. It is now restored.
v71: * bugfix -- made some "set nomodifiable"s into setlocal variants
(allows :e somenewfile to be modifiable as usual)
* NetrwSettings calls a netrw function, thereby assuring that
netrw has loaded. However, if netrw does not load for whatever
reason, then NetrwSettings will now issue a warning message.
* For what reason I don't recall, when wget and fetch are both
not present, and an attempt to read a http://... url is made,
netrw exited. It now only returns.
* When ch=1, on the second and subsequent uses of browsing Netrw
would issue a blank line to clear the echo'd messages. This
caused an annoying "Hit-Enter" prompt; now a blank line message
is echo'd only if &ch>1.
v70: * when using |netrw-O|, the "Obtaining filename" message is now
shown using |hl-User9|. If User9 has not been defined, netrw
will define it.
v69: * Bugfix: win95/98 machines were experiencing a
"E121: Undefined variable: g:netrw_win95ftp" message
v68: * double-click-leftmouse selects word under mouse
v67: * Passwords which contain blanks will now be surrounded by
double-quotes automatically (Yongwei)
v66: * Netrw now seems to work with a few more Windows situations
* O now obtains a file: remote browsing file -> local copy,
locally browsing file -> current directory (see :pwd)
@@ -1353,7 +1437,7 @@ which is loaded automatically at startup (assuming :set nocp).
* special file viewing with:
(windows) rundll32 url.dll (gnome) gnome-open (kde)
kfmclient If none of these are on the executable path, then
NetrwFileHandlers.vim is used.
netrwFileHandlers.vim is used.
* directory bookmarking during both local and remote browsing
implemented
* one may view all, use the hiding list to suppress, or use the
@@ -1396,7 +1480,7 @@ which is loaded automatically at startup (assuming :set nocp).
Vim editor by Bram Moolenaar (Thanks, Bram!)
dav support by C Campbell
fetch support by Bram Moolenaar and C Campbell
ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM
ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
http support by Bram Moolenaar <bram@moolenaar.net>
rcp
rsync support by C Campbell (suggested by Erik Warendorph)
@@ -1406,11 +1490,13 @@ which is loaded automatically at startup (assuming :set nocp).
inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, fetch,...
Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
fetch,...
Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
Erik Warendorph -- for several suggestions (g:netrw_..._cmd
variables, rsync etc)
Doug Claar -- modifications to test for success with ftp operation
Doug Claar -- modifications to test for success with ftp
operation
==============================================================================
vim:tw=78:ts=8:ft=help:norl:fdm=marker

View File

@@ -1,4 +1,4 @@
*pi_spec.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*pi_spec.txt* For Vim version 7.0aa. Last change: 2005 Oct 03
by Gustavo Niemeyer ~
@@ -26,13 +26,13 @@ your maplocalleader key (default is '\') plus 'c'. If you do not have
|spec_chglog_format| set, the plugin will ask you for an email address
to use in this edit session.
Everytime you run the plugin, it will check to see if the last entry
in the changelog has been written today and by you. If it's the entry
mathes, it will just insert a new changelog item, otherwise it will
create a new changelog entry. If you are running with
|spec_chglog_release_info| enabled, it will also check if the name, version
and release matches. The plugin is smart enough to ask you if it should
update the package release, if you have not done so.
Every time you run the plugin, it will check to see if the last entry in the
changelog has been written today and by you. If the entry matches, it will
just insert a new changelog item, otherwise it will create a new changelog
entry. If you are running with |spec_chglog_release_info| enabled, it will
also check if the name, version and release matches. The plugin is smart
enough to ask you if it should update the package release, if you have not
done so.
Setting a map *spec-setting-a-map*
-------------

40
runtime/doc/pi_tar.txt Normal file
View File

@@ -0,0 +1,40 @@
*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 pi_tar.txt.
No warranty, express or implied. Use At-Your-Own-Risk.
==============================================================================
1. Contents *tar* *tar-contents*
1. Contents..................................................|tar-contents|
2. Usage.....................................................|tar-usage|
3. History...................................................|tar-history|
==============================================================================
2. Usage *tar-usage* *tar-manual*
When one edits a *.tar file, this plugin will handle displaying a
contents page. Select a file to edit by moving the cursor atop
the desired file, then hit the <return> key. After editing, one may
also write to the file. Currently, one may not make a new file in
tar archives via the plugin.
==============================================================================
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
Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
Oct 18, 2005 * handles writing to compressed archives
Nov 03, 2005 * handles writing tarfiles across a network using
netrw#NetWrite()
v2 * converted to use Vim7's new autoload feature by
Bram Moolenaar
v1 (original) * Michael Toren (see http://michael.toren.net/code/)
==============================================================================
vim:tw=78:ts=8:ft=help

View File

@@ -1,4 +1,4 @@
*zip.txt* Zip File Interface Sep 16, 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*
@@ -20,12 +21,24 @@ Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
==============================================================================
2. Usage *zip-usage* *zip-manual*
When one edits a *.zip file, this plugin will handle displaying a
contents page. Select a file to edit by moving the cursor atop
the desired file, then hit the <return> key. After editing, one may
also write to the file. Currently, one may not make a new file in
zip archives via the plugin.
==============================================================================
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)
* began testing under Windows; works thus far
* filetype detection fixed
v1 Sep 15, 2005 * Initial release, had browsin, reading, and writing
Nov 03, 2005 * handles writing zipfiles across a network using
netrw#NetWrite()
v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
==============================================================================
vim:tw=78:ts=8:ft=help

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Aug 31
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,8 +110,8 @@ The following quickfix commands can be used:
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
*: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.
@@ -123,18 +123,28 @@ 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|
*: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, '$')
<
*: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(".")
<
*:cl* *:clist*
:cl[ist] [from] [, [to]]
@@ -635,7 +645,7 @@ The "%f" conversion may depend on the current 'isfname' setting. "~/" is
expanded to the home directory and environment variables are expanded.
The "%f" and "%m" conversions have to detect the end of the string. This
normally happens by matching following characters and items. When nohting is
normally happens by matching following characters and items. When nothing is
following the rest of the line is matched. If "%f" is followed by a '%' or a
backslash, it will look for a sequence of 'isfname' characters.

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Sep 13
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -633,6 +633,7 @@ Short explanation of each option: *option-list*
|'compatible'| |'cp'| behave Vi-compatible as much as possible
|'complete'| |'cpt'| specify how Insert mode completion works
|'completefunc'| |'cfu'| function to be used for Insert mode completion
|'completeopt'| |'cot'| options for Insert mode completion
|'confirm'| |'cf'| ask what to do about unsaved/read-only files
|'conskey'| |'consk'| get keys directly from console (MS-DOS only)
|'copyindent'| |'ci'| make 'autoindent' use existing indent structure
@@ -773,6 +774,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
@@ -936,7 +938,9 @@ Short explanation of each option: *option-list*
|:clist| :cl list all errors
|:cfile| :cf read errors from the file 'errorfile'
|:cgetfile| :cg like :cfile but don't jump to the first error
|:caddfile| :cad add errors from the error file to the current
|:caddfile| :caddf add errors from the error file to the current
quickfix list
|:caddexpr| :cad add errors from an expression to the current
quickfix list
|:cbuffer| :cb read errors from text in a buffer
|:cexpr| :cex read errors from an expression

View File

@@ -1,4 +1,4 @@
*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*

View File

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

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
*spell.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,7 +35,7 @@ Vim only checks words for spelling, there is no grammar check.
If the 'mousemodel' option is set to "popup" and the cursor is on a badly
spelled word or it is "popup_setpos" and the mouse pointer is on a badly
spelled word, then the popup menu will contain an submenu to replace the bad
spelled word, then the popup menu will contain a submenu to replace the bad
word. Note: this slows down the appearance of the popup menu.
To search for the next misspelled word:
@@ -124,8 +124,8 @@ 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.
@@ -143,7 +143,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 +156,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 +172,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*
@@ -206,7 +212,7 @@ Always use lowercase letters for the language and region names.
When adding a word with |zg| or another command it's always added for all
regions. You can change that by manually editing the 'spellfile'. See
|spell-wordlist-format|. Note that the regions as specified in the files in
'spellfile' are only used when all entries in "spelllang" specify the same
'spellfile' are only used when all entries in 'spelllang' specify the same
region (not counting files specified by their .spl name).
*spell-german*
@@ -296,7 +302,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.
@@ -421,7 +432,7 @@ then Vim will try to guess.
*:mksp* *:mkspell*
:mksp[ell][!] [-ascii] {outname} {inname} ...
Generate a Vim spell file word lists. Example: >
Generate a Vim spell file from word lists. Example: >
:mkspell /tmp/nl nl_NL.words
< *E751*
When {outname} ends in ".spl" it is used as the output
@@ -531,6 +542,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.
@@ -550,10 +566,10 @@ maintains a word list.
Note that we avoid the word "dictionary" here. That is because the goal of
spell checking differs from writing a dictionary (as in the book). For
spelling we need a list of words that are OK, thus should not to be
highlighted. Person and company names will not appear in a dictionary, but do
appear in a word list. And some old words are rarely used while they are
common misspellings. These do appear in a dictionary but not in a word list.
spelling we need a list of words that are OK, thus should not be highlighted.
Person and company names will not appear in a dictionary, but do appear in a
word list. And some old words are rarely used while they are common
misspellings. These do appear in a dictionary but not in a word list.
There are two formats: A straight list of words and a list using affix
compression. The files with affix compression are used by Myspell (Mozilla
@@ -569,13 +585,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 +602,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 +628,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 +651,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 +701,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 +709,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 +814,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 +848,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 +915,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 +974,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
@@ -884,22 +1007,31 @@ Of course, the letter used should itself not appear in any word! The letter
must be ASCII, thus a single byte.
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 +1054,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 +1073,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 +1135,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 +1172,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 +1251,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 +1288,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 +1299,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 +1316,17 @@ 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
p ~ ~roduce a .sug file next to the .spl file. This used to find suggestions by
their sound-a-like form quickly. At the cost of a lot of memory.
To avoid producing a .sug file use this item in the affix file:
NOSUGFILE ~
SOUND-A-LIKE *spell-SAL*
In the affix file SAL items can be used to define the sounds-a-like mechanism
@@ -1194,7 +1375,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:

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2005 Jun 30
*starting.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -789,17 +789,19 @@ accordingly. Vim proceeds in this order:
4. Load the plugin scripts. *load-plugins*
This does the same as the command: >
:runtime! plugin/*.vim
:runtime! plugin/**/*.vim
< The result is that all directories in the 'runtimepath' option will be
searched for the "plugin" sub-directory and all files ending in ".vim"
will be sourced (in alphabetical order per directory).
will be sourced (in alphabetical order per directory), also in
subdirectories.
Loading plugins won't be done when:
- The 'loadplugins' option was reset in a vimrc file.
- 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
@@ -1200,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.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Sep 13
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1460,6 +1460,25 @@ may be changed by the user if s/he is experiencing synchronization
difficulties (such as may happen with large lex files).
LISP *lisp.vim* *ft-lisp-syntax*
The lisp syntax highlighting provides two options: >
g:lisp_instring : if it exists, then "(...)" strings are highlighted
as if the contents of the string were lisp.
Useful for AutoLisp.
g:lisp_rainbow : if it exists and is nonzero, then differing levels
of parenthesization will receive different
highlighting.
<
The g:lisp_rainbow option provides 10 levels of individual colorization for
the parentheses and backquoted parentheses. Because of the quantity of
colorization levels, unlike non-rainbow highlighting, the rainbow mode
specifies its highlighting using ctermfg and guifg, thereby bypassing the
usual colorscheme control using standard highlighting groups. The actual
highlighting used depends on the dark/bright setting (see |'bg'|).
LITE *lite.vim* *ft-lite-syntax*
There are two options for the lite syntax highlighting.
@@ -1865,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*
@@ -2116,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.
@@ -3197,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*
@@ -3562,7 +3617,7 @@ You can clear specific sync patterns with: >
==============================================================================
11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
This commands lists all the syntax items: >
This command lists all the syntax items: >
:sy[ntax] [list]
@@ -3926,6 +3981,14 @@ NonText '~' and '@' at the end of the window, characters from
doesn't fit at the end of the line).
*hl-Normal*
Normal normal text
*hl-Pmenu*
Pmenu Popup menu: normal item.
*hl-PmenuSel*
PmenuSel Popup menu: selected item.
*hl-PmenuSbar*
PmenuSbar Popup menu: scrollbar.
*hl-PmenuThumb*
PmenuThumb Popup menu: Thumb of the scrollbar.
*hl-Question*
Question |hit-enter| prompt and yes/no questions
*hl-Search*

View File

@@ -120,10 +120,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'compatible' options.txt /*'compatible'*
'complete' options.txt /*'complete'*
'completefunc' options.txt /*'completefunc'*
'completeopt' options.txt /*'completeopt'*
'confirm' options.txt /*'confirm'*
'consk' options.txt /*'consk'*
'conskey' options.txt /*'conskey'*
'copyindent' options.txt /*'copyindent'*
'cot' options.txt /*'cot'*
'cp' options.txt /*'cp'*
'cpo' options.txt /*'cpo'*
'cpoptions' options.txt /*'cpoptions'*
@@ -612,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'*
@@ -1009,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*
@@ -1060,6 +1065,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+gettext various.txt /*+gettext*
+hangul_input various.txt /*+hangul_input*
+iconv various.txt /*+iconv*
+iconv/dyn various.txt /*+iconv\/dyn*
+insert_expand various.txt /*+insert_expand*
+jumplist various.txt /*+jumplist*
+keymap various.txt /*+keymap*
@@ -1083,18 +1089,22 @@ $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*
+path_extra various.txt /*+path_extra*
+perl various.txt /*+perl*
+perl/dyn various.txt /*+perl\/dyn*
+postscript various.txt /*+postscript*
+printer various.txt /*+printer*
+profile various.txt /*+profile*
+python various.txt /*+python*
+python/dyn various.txt /*+python\/dyn*
+quickfix various.txt /*+quickfix*
+rightleft various.txt /*+rightleft*
+ruby various.txt /*+ruby*
+ruby/dyn various.txt /*+ruby\/dyn*
+scrollbind various.txt /*+scrollbind*
+signs various.txt /*+signs*
+smartindent various.txt /*+smartindent*
@@ -1107,6 +1117,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+tag_binary various.txt /*+tag_binary*
+tag_old_static various.txt /*+tag_old_static*
+tcl various.txt /*+tcl*
+tcl/dyn various.txt /*+tcl\/dyn*
+terminfo various.txt /*+terminfo*
+termresponse various.txt /*+termresponse*
+textobjects various.txt /*+textobjects*
@@ -1648,6 +1659,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*
@@ -1661,6 +1673,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:TOhtml syntax.txt /*:TOhtml*
:Vexplore pi_netrw.txt /*:Vexplore*
:X editing.txt /*:X*
:XMLent insert.txt /*:XMLent*
:XMLns insert.txt /*:XMLns*
:\bar cmdline.txt /*:\\bar*
:_! cmdline.txt /*:_!*
:_# cmdline.txt /*:_#*
@@ -1770,6 +1784,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*
@@ -1837,6 +1853,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:command map.txt /*:command*
:command-completion map.txt /*:command-completion*
:command-completion-custom map.txt /*:command-completion-custom*
:command-completion-customlist map.txt /*:command-completion-customlist*
:command-verbose map.txt /*:command-verbose*
:comment eval.txt /*:comment*
:comp quickfix.txt /*:comp*
@@ -2132,9 +2149,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*
@@ -2198,6 +2221,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*
@@ -2458,6 +2483,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*
@@ -2685,6 +2711,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>*
@@ -3023,7 +3051,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*
@@ -3764,7 +3791,17 @@ 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*
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*
@@ -3964,8 +4001,11 @@ 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*
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*
@@ -4168,6 +4208,7 @@ added-5.8 version5.txt /*added-5.8*
added-6.1 version6.txt /*added-6.1*
added-6.2 version6.txt /*added-6.2*
added-6.3 version6.txt /*added-6.3*
added-6.4 version6.txt /*added-6.4*
added-BeOS version5.txt /*added-BeOS*
added-Mac version5.txt /*added-Mac*
added-VMS version5.txt /*added-VMS*
@@ -4183,7 +4224,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()*
@@ -4214,7 +4254,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*
@@ -4403,6 +4445,7 @@ changed-5.8 version5.txt /*changed-5.8*
changed-6.1 version6.txt /*changed-6.1*
changed-6.2 version6.txt /*changed-6.2*
changed-6.3 version6.txt /*changed-6.3*
changed-6.4 version6.txt /*changed-6.4*
changelist motion.txt /*changelist*
changelog.vim syntax.txt /*changelog.vim*
changetick eval.txt /*changetick*
@@ -4517,6 +4560,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*
@@ -4649,6 +4693,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*
@@ -4908,6 +4953,7 @@ fixed-5.8 version5.txt /*fixed-5.8*
fixed-6.1 version6.txt /*fixed-6.1*
fixed-6.2 version6.txt /*fixed-6.2*
fixed-6.3 version6.txt /*fixed-6.3*
fixed-6.4 version6.txt /*fixed-6.4*
fname_diff-variable eval.txt /*fname_diff-variable*
fname_in-variable eval.txt /*fname_in-variable*
fname_new-variable eval.txt /*fname_new-variable*
@@ -5002,6 +5048,7 @@ ft-java-syntax syntax.txt /*ft-java-syntax*
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax*
ft-lisp-syntax syntax.txt /*ft-lisp-syntax*
ft-lite-syntax syntax.txt /*ft-lite-syntax*
ft-lpc-syntax syntax.txt /*ft-lpc-syntax*
ft-lua-syntax syntax.txt /*ft-lua-syntax*
@@ -5045,6 +5092,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*
@@ -5054,6 +5102,8 @@ ft-verilog-indent indent.txt /*ft-verilog-indent*
ft-vim-indent indent.txt /*ft-vim-indent*
ft-vim-syntax syntax.txt /*ft-vim-syntax*
ft-xf86conf-syntax syntax.txt /*ft-xf86conf-syntax*
ft-xhtml-omni insert.txt /*ft-xhtml-omni*
ft-xml-omni insert.txt /*ft-xml-omni*
ft-xml-syntax syntax.txt /*ft-xml-syntax*
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
ftdetect filetype.txt /*ftdetect*
@@ -5083,7 +5133,6 @@ g'a motion.txt /*g'a*
g, motion.txt /*g,*
g0 motion.txt /*g0*
g8 various.txt /*g8*
g:netrw-a pi_netrw.txt /*g:netrw-a*
g:netrw_alto pi_netrw.txt /*g:netrw_alto*
g:netrw_altv pi_netrw.txt /*g:netrw_altv*
g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
@@ -5117,6 +5166,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*
@@ -5134,6 +5184,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*
@@ -5298,7 +5349,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*
@@ -5354,6 +5404,10 @@ hl-ModeMsg syntax.txt /*hl-ModeMsg*
hl-MoreMsg syntax.txt /*hl-MoreMsg*
hl-NonText syntax.txt /*hl-NonText*
hl-Normal syntax.txt /*hl-Normal*
hl-Pmenu syntax.txt /*hl-Pmenu*
hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
hl-PmenuSel syntax.txt /*hl-PmenuSel*
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
hl-Question syntax.txt /*hl-Question*
hl-Scrollbar syntax.txt /*hl-Scrollbar*
hl-Search syntax.txt /*hl-Search*
@@ -5506,6 +5560,7 @@ icon-changed version4.txt /*icon-changed*
iconise starting.txt /*iconise*
iconize starting.txt /*iconize*
iconv() eval.txt /*iconv()*
iconv-dynamic mbyte.txt /*iconv-dynamic*
ident-search tips.txt /*ident-search*
if_cscop.txt if_cscop.txt /*if_cscop.txt*
if_mzsch.txt if_mzsch.txt /*if_mzsch.txt*
@@ -5547,6 +5602,7 @@ inputrestore() eval.txt /*inputrestore()*
inputsave() eval.txt /*inputsave()*
inputsecret() eval.txt /*inputsecret()*
ins-completion insert.txt /*ins-completion*
ins-completion-menu insert.txt /*ins-completion-menu*
ins-expandtab insert.txt /*ins-expandtab*
ins-reverse rileft.txt /*ins-reverse*
ins-smarttab insert.txt /*ins-smarttab*
@@ -5599,7 +5655,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*
@@ -5650,6 +5705,7 @@ linefeed intro.txt /*linefeed*
linewise motion.txt /*linewise*
linewise-register change.txt /*linewise-register*
linewise-visual visual.txt /*linewise-visual*
lisp.vim syntax.txt /*lisp.vim*
lispindent() eval.txt /*lispindent()*
list-identity eval.txt /*list-identity*
list-index eval.txt /*list-index*
@@ -5815,6 +5871,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*
@@ -5856,6 +5913,7 @@ netrw-O pi_netrw.txt /*netrw-O*
netrw-R pi_netrw.txt /*netrw-R*
netrw-S pi_netrw.txt /*netrw-S*
netrw-U pi_netrw.txt /*netrw-U*
netrw-a pi_netrw.txt /*netrw-a*
netrw-activate pi_netrw.txt /*netrw-activate*
netrw-b pi_netrw.txt /*netrw-b*
netrw-bookmark pi_netrw.txt /*netrw-bookmark*
@@ -5948,7 +6006,6 @@ 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*
@@ -5961,6 +6018,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*
@@ -6102,6 +6160,7 @@ perl-SetHeight if_perl.txt /*perl-SetHeight*
perl-SetOption if_perl.txt /*perl-SetOption*
perl-Windows if_perl.txt /*perl-Windows*
perl-compiling if_perl.txt /*perl-compiling*
perl-dynamic if_perl.txt /*perl-dynamic*
perl-editing if_perl.txt /*perl-editing*
perl-overview if_perl.txt /*perl-overview*
perl-patterns pattern.txt /*perl-patterns*
@@ -6127,6 +6186,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*
@@ -6165,6 +6225,7 @@ python-buffers if_pyth.txt /*python-buffers*
python-command if_pyth.txt /*python-command*
python-commands if_pyth.txt /*python-commands*
python-current if_pyth.txt /*python-current*
python-dynamic if_pyth.txt /*python-dynamic*
python-error if_pyth.txt /*python-error*
python-eval if_pyth.txt /*python-eval*
python-examples if_pyth.txt /*python-examples*
@@ -6269,6 +6330,7 @@ repeat.txt repeat.txt /*repeat.txt*
repeating repeat.txt /*repeating*
replacing change.txt /*replacing*
replacing-ex insert.txt /*replacing-ex*
reselect-Visual visual.txt /*reselect-Visual*
resolve() eval.txt /*resolve()*
restore-position tips.txt /*restore-position*
restricted-mode starting.txt /*restricted-mode*
@@ -6300,6 +6362,7 @@ ruby if_ruby.txt /*ruby*
ruby-buffer if_ruby.txt /*ruby-buffer*
ruby-command if_ruby.txt /*ruby-command*
ruby-commands if_ruby.txt /*ruby-commands*
ruby-dynamic if_ruby.txt /*ruby-dynamic*
ruby-evaluate if_ruby.txt /*ruby-evaluate*
ruby-globals if_ruby.txt /*ruby-globals*
ruby-message if_ruby.txt /*ruby-message*
@@ -6363,6 +6426,7 @@ scroll.txt scroll.txt /*scroll.txt*
scrollbind-quickadj scroll.txt /*scrollbind-quickadj*
scrollbind-relative scroll.txt /*scrollbind-relative*
scrolling scroll.txt /*scrolling*
scrollstart-variable eval.txt /*scrollstart-variable*
sdl.vim syntax.txt /*sdl.vim*
search() eval.txt /*search()*
search-commands pattern.txt /*search-commands*
@@ -6431,35 +6495,73 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
spell-ACCENT spell.txt /*spell-ACCENT*
spell-BAD spell.txt /*spell-BAD*
spell-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-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*
@@ -6473,6 +6575,7 @@ 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*
@@ -6538,7 +6641,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*
@@ -6743,6 +6849,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*
@@ -6763,6 +6876,7 @@ tcl-buffer-windows if_tcl.txt /*tcl-buffer-windows*
tcl-bugs if_tcl.txt /*tcl-bugs*
tcl-command if_tcl.txt /*tcl-command*
tcl-commands if_tcl.txt /*tcl-commands*
tcl-dynamic if_tcl.txt /*tcl-dynamic*
tcl-ex-commands if_tcl.txt /*tcl-ex-commands*
tcl-examples if_tcl.txt /*tcl-examples*
tcl-expr if_tcl.txt /*tcl-expr*
@@ -6948,9 +7062,13 @@ v:prevcount eval.txt /*v:prevcount*
v:profiling eval.txt /*v:profiling*
v:progname eval.txt /*v:progname*
v:register eval.txt /*v:register*
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*
@@ -7080,6 +7198,7 @@ version-5.8 version5.txt /*version-5.8*
version-6.1 version6.txt /*version-6.1*
version-6.2 version6.txt /*version-6.2*
version-6.3 version6.txt /*version-6.3*
version-6.4 version6.txt /*version-6.4*
version-variable eval.txt /*version-variable*
version4.txt version4.txt /*version4.txt*
version5.txt version5.txt /*version5.txt*
@@ -7098,7 +7217,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*
@@ -7118,7 +7236,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*
@@ -7253,6 +7370,7 @@ xim mbyte.txt /*xim*
xim-input-style mbyte.txt /*xim-input-style*
xiterm syntax.txt /*xiterm*
xml-folding syntax.txt /*xml-folding*
xml-omni-datafile insert.txt /*xml-omni-datafile*
xml.vim syntax.txt /*xml.vim*
xpm.vim syntax.txt /*xpm.vim*
xterm-8-bit term.txt /*xterm-8-bit*
@@ -7288,7 +7406,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*
@@ -7324,6 +7442,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*

View File

@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 7.0aa. Last change: 2005 Jul 12
*tagsrch.txt* For Vim version 7.0aa. Last change: 2005 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -440,7 +440,7 @@ directory. If it is not found there, then the file "/home/user/commontags"
will be searched for the tag.
This can be switched off by including the 'd' flag in 'cpoptions', to make
it Vi compatible. "./tags" will than be the tags file in the current
it Vi compatible. "./tags" will then be the tags file in the current
directory, instead of the tags file in the directory where the current file
is.

View File

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

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,33 +30,141 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Spelling:
- Suggestions for "the the" includes "thee the" but not "the thee"?
- CTRL-X s doesn't consider 'spellcapcheck'.
- Spellbadword() returns a list with bad word and reason it's bad.
This doesn't work when highlighting is the same for some mistakes.
- spellsuggest() needs a way to require a capital. A flag or context?
Evaluate 'balloonexpr' in the sandbox only when it was set from an unsafe
place (e.g., modeline)? Patch from Sumner Hayes, Jan 12. Also use for other
options?
Win32: Composing char appears on next position. (Tony Mechelynck)
":saveas asdf.c" should set 'filetype' to c when it's empty. Also for ":w
asdf.c" when it sets the buffer filename.
Support subdirectories in plugin directory? (Nikolai Weibull)
When ":cclose" is used the buffer is not wiped out and is no longer recognized
as a quickfix buffer, thus it's not reused either.
Change 'include' so that it can match the file name when \zs and \ze are
included. (docs already done tentatively).
Patch to support lists and dicts for the Python interface. (G. Sumner Hayes,
Jan 12). Docs in a previous patch.
Use free_tv() instead of clear_tv() and vim_free().
ccomplete:
- How to use a popup menu?
- When using page-up/page-down in menu it sometimes jumps more than a page.
- When an option is set: In completion mode and the user types (identifier)
characters, advance to the first match instead of removing the popup menu.
If there is no match remove the selection. (Yegappan Lakshmanan)
- Complete the longest common match instead of the first match?
For all kinds of completions? Configurable?
- Window resize when poup is displayed.
- When completing something that is a structure, add the "." or "->" right
away. How to figure out if it's a pointer or not?
- When a typedef or struct is local to a file only use it in that file?
- 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).
- Provide a function to popup the menu, so that an insert mode mapping can
start it (with a specific selection).
- !_TAG_FILE_FORMAT and it's ilk are listed in the global completions
Can't reproduce it right now...
When 'foldcolumn' is 1 show more + to be able to open all folds? (Donohue)
spelling:
- Include script to cleanup a .add file. (Antonio Colombo, Jan 9)
- suggestions for "macARONI" doesn't include "macaroni", they are all allcap.
suggestion for "KG" to "kg" when it's keepcase.
- Autocommand event for when a spell file is missing. Allows making a plugin
that fetches the file over internet. Pattern == language.
- 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)
use "\/" instead of SLASH item?
is COMPLEXPREFIXES necessary now that we have flags for affixes?
- Look into hungarian dictionary:
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
- Support flags on a suffix. Used for second level affixes, rare and
nocomp. The flags may also be used for compounding. Default is an OR
mechanism with the flags of the word. Adding "compset" on the affixes
means the compound flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
support both).
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- Implement COMPOUNDFORBIDFLAG.
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to use
same wordlist for hyphenation.
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
- Finding suggestions with sound folding is slow. Somehow store the
sound-folded words and link to the words it comes from?
- Also use the spelling dictionary for dictionary completion.
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
- Add a command like "zg" that selects one of the files 'spellfile'.
- Add a "zug" command that undoes "zg"? Deletes the good word instead of
adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio
Colombo)
GTK: get an X error while exiting quickly after starting (running the tests).
Caused by new GTK library?
X Error: BadWindow (invalid Window parameter) 3
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.
Is it easy to have an item in a pattern that matches with a mark location?
Similar to |/\%>l| and |/\%c|. (Benji Fisher)
Win32 installer: Default _vimrc contains absolute path to diff.exe. After
upgrading it becomes invalid. Fix it automatically somehow? Use $VIMRUNTIME
in the path instead of filling it the path? At least give a clear error
message.
In diff mode deleting lines is very slow. E.g., when diffing two .po files
and then sourcing po/cleaup.vim.
7 Add plugins for formatting. Should be able to make a choice depending on
the language of a file (English/Korean/Japanese/etc.).
Setting the 'langformat' option to "chinese" would load the
"format/chinese.vim" plugin.
Edward L. Fox explains how it should be done for most Asian languages. (2005
Nov 24)
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
- Add default key mappings for the command key (Alan Schmitt)
use http://macvim.org/OSX/files/gvimrc
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1)
Also add search???() function that returns list with lnum and col.
Win32: Use the free downloadable compiler 7.1. 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
@@ -69,6 +177,17 @@ Autoload:
helpfile doc/myscript.txt
For the "helpfile" item ":helptags" is run.
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
mappings for normal keys can be removed from Select mode.
When expanding on the command line, recognize shell commands, such as ":!cmd".
Complete command names by searching in $PATH. When completing file names
escape special characters ";&<>(){}". (Adri Verhoef)
Are there more commands where v:swapcommand can be set to something useful?
Put autocommand event names in a hashtable for faster lookup?
Awaiting response:
- Win32: tearoff menu window should have a scrollbar when it's taller than
the screen.
@@ -88,10 +207,11 @@ PLANNED FOR VERSION 7.0:
make it work for all completion methods.
UI:
- Display the list of choices right under the place where they
would be inserted in a kind of meny (use scrollbar when there are many
alternatives).
At first in a terminal, then add GUI implementations.
- Complete longest common string first, like 'wildmode' "longest:full".
- Add an "auto" mode: after typing a character (or string) completion is
done for the longest common string. plugin defines the possible
characters/strings. (Martin Stubenschrott)
- GUI implementation of the popup menu.
- When using tags, show match in preview window (function prototype,
struct member, etc.).
Or use one window for matches, another for context/info (Doug Kearns,
@@ -168,6 +288,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
@@ -194,9 +316,9 @@ PLANNED FOR VERSION 7.0:
For GTK Neil Bird has a patch to use Vim like a widget.
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
can be selected with CTRL-V. Allow '$' (end of line) for col2.
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye,
assisted by Mikolaj Machowski. Should work like an IDE. Try to keep it
generic. Also found here: http://skawina.eu.org/mikolaj/vimgdb
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye.
Should work like an IDE. Try to keep it generic. Now found here:
http://clewn.sf.net.
And the idevim plugin/script.
To be able to start the debugger from inside Vim: For GUI run a program
with a netbeans connection; for console: start a program that splits the
@@ -210,6 +332,8 @@ PLANNED FOR VERSION 7.0:
implement part in Java and then connect to Vim. Some hints from Alexandru
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
198 standard http://www.jcp.org/en/jsr/detail?id=198.
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
Plugin that uses a terminal emulator: http://vimplugin.sf.net
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
Especially when using the scrollbar. Typing a cursor-movement command
scrolls back to where the cursor is.
@@ -219,6 +343,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",
@@ -233,7 +358,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.
@@ -304,11 +429,12 @@ 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 gui_mch_browsedir() for Motif, Mac OS/X.
Add extra list of file locations. A bit like the quickfix list, but there is
one per window. Can be used with:
:ltag list of matching tags, like :tselect
Patch from Yegappan Lakshmanan, Jan 13.
Commands to use the location list:
:lnext next location
:lprevious :lNext previous location
@@ -345,6 +471,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.
@@ -356,7 +487,9 @@ Awaiting updated patches:
How does this work? Missing comments.
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
Update 2004 Sep 10
More docs. Search in 'runtimepath'?
Another patch from Edward L. Fox (2005 Nov 24)
Search in 'runtimepath'?
More docs about how to use this.
How to get the messages into the .po files?
--- did not respond (yet) --
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
@@ -398,7 +531,7 @@ Awaiting updated patches:
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
Patch by Jason Holt, 2003 May 23.
Patch by Jason Holt, 2003 May 23. Uses mlock.
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
7 Add ! register, for shell commands. (patch from Grenie)
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
@@ -517,14 +650,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
@@ -794,7 +919,16 @@ MSDOS, OS/2 and Win32:
8 OS/2: Add Extended Attributes support and define HAVE_ACL.
8 OS/2: When editing a file name "foo.txt" that is actually called FOO.txt,
writing uses "foo.txt". Should obtain the real file name.
8 Should $USERPROFILE be used instead of $HOMEDRIVE/$HOMEPATH?
8 Should $USERPROFILE be preferred above $HOMEDRIVE/$HOMEPATH? No, but it's
a good fallback, thus use:
$HOME
$HOMEDRIVE$HOMEPATH
SHGetSpecialFolderPath(NULL, lpzsPath, CSIDL_APPDATA, FALSE);
$USERPROFILE
SHGetSpecialFolderPath(NULL, lpzsPath, CSIDL_COMMON_APPDATA, FALSE);
$ALLUSERSPROFILE
$SYSTEMDRIVE\
C:\
8 Win32 console: <M-Up> and <M-Down> don't work. (Geddes) We don't have
special keys for these. Should use modifier + key.
8 Win32 console: caps-lock makes non-alpha keys work like with shift.
@@ -806,8 +940,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)
@@ -998,8 +1130,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
@@ -1337,15 +1467,12 @@ 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/
- Version 1.1.0 is out now, look into that.
- Lots of code depends on LANG, that isn't right. Enable each mechanism
in the affix file separately.
- Example with compounding dash is bad, gets in the way of setting
@@ -1366,8 +1493,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/
@@ -1383,30 +1510,27 @@ Spell checking:
8 Make "en-rare" spell file? Ask Charles Campbell.
8 The English dictionaries for different regions are not consistent in their
use of words with a dash.
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
7 Insert mode completion mechanism that uses the spell word lists.
8 Add hl groups to 'spelllang'?
:set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
More complicated: Regions with different languages? E.g., comments
in English, strings in German (po file).
8 Implement compound words when it works for Myspell. Current idea has the
problem that "foo/X" always allows "foofoo", there is no way to specify a
word can only be at the start or end, or that only certain words combine.
Diff mode:
8 Use diff mode to show the changes made in a buffer (compared to the file).
Use an unnamed buffer, like doing:
new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
Also show difference with the file when editing started? Should show what
can be undone. (Tom Popovich)
7 Add cursor-binding: when moving the cursor in one diff'ed buffer, also
move it in other diff'ed buffers, so that CTRL-W commands go to the same
location.
Folding:
(commands still available: zg zG zI zJ zK zp zP zq zQ zV zw zW zy zY;
secondary: zB zS zT zZ)
(commands still available: zI zJ zK zp zP zq zQ zV zy zY;
secondary: zB zS zT zZ, z=)
8 Add "z/" and "z?" for searching in not folded text only.
8 Add different highlighting for a fold line depending on the fold level.
(Noel Henson)
@@ -1431,8 +1555,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.
@@ -1469,7 +1593,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.
@@ -1576,6 +1699,11 @@ Syntax highlighting:
re-insert the [] if possible.
8 Make it possible to use color of text for Visual highlight group (like for
the Cursor).
8 It would be useful to make the highlight group name an expression. Then
when there is a match, the expression would be evaluated to find out what
highlight group to use. Could be used to check if the shell used in a
password file appears in /etc/shells. (Nikolai Weibull)
syn match =s:checkShell(v:match) contained 'pattern'
8 Make it possible to only highlight a sub-expression of a match. Like
using "\1" in a ":s" command.
8 Support for deleting syntax items:
@@ -1782,7 +1910,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:
@@ -1798,8 +1925,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?
@@ -1868,7 +1993,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).
@@ -1929,7 +2054,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
@@ -2181,6 +2306,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
@@ -2250,8 +2376,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
@@ -2523,7 +2648,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.
@@ -2606,7 +2731,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.
@@ -2756,8 +2881,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:
@@ -2998,20 +3124,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.
@@ -3021,8 +3154,6 @@ Options:
7 There is 'titleold', why is there no 'iconold'? (Chazelas)
7 Make 'scrolloff' a global-local option, so that it can be different in the
quickfix window, for example. (Gary Holloway)
7 Add plugins for formatting. Should be able to make a choice depending on
the language of a file (English/Korean/Japanese/etc.).
External commands:
@@ -3289,6 +3420,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
@@ -3350,7 +3482,8 @@ Various improvements:
7 Add a way to define an item list with a pattern in 'formatoptions'. The
'n' flag doesn't work for "6.3" or "6a.".
8 Add 'formatexpr' option: Used for formatting operator "gq" instead of the
builtin formatting or 'formatprg'.
builtin formatting or 'formatprg'. Or use a string that starts with "="
in 'formatprg': "=MyFormat()".
8 Allow using a trailing space to signal a paragraph that continues on the
next line (MIME text/plain; format=flowed, RFC 2646). Can be used for
continuous formatting. Could use 'autoformat' option, which specifies a
@@ -3653,6 +3786,11 @@ From vile:
Far future and "big" extensions:
- Instead of using a Makefile and autoconf, use a simple shell script to
find the C compiler and do everything with C code. Translate something
like an Aap recipe and configure.in to C. Avoids depending on Python,
thus will work everywhere. With batch file to find the C compiler it
would also work on MS-Windows.
- Make it easy to setup Vim for groups of users: novice vi users, novice
Vim users, C programmers, xterm users, GUI users,...
- Change layout of blocks in swap file: Text at the start, with '\n' in

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 7.0aa. Last change: 2005 Aug 12
*uganda.txt* For Vim version 7.0aa. Last change: 2005 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -211,9 +211,26 @@ Sending money:
Check the ICCF web site for the latest information! See |iccf| for the URL.
USA and Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
USA: The methods mentioned below can be used. Alternatively, you
can send a check to the Nehemiah Group Outreach Society
(NGOS). This will reduce banking costs and you can get an IRS
tax receipt. The NGOS forwards the funds directly to the
Kibaale project in Uganda. Checks must be made payable to
NGOS but please note on the check "donation Kibaale". Mail
checks to:
NGOS
P.O. Box 50862
Indianapolis, IN 45250
Questions regarding the Nehemiah Group Outreach Society (NGOS)
should be directed to: Ross deMerchant, Executive Director -
r.demerchant AT sbcglobal DOT net.
For sponsoring a child contact KCF in Canada (see below) and
send the check to NGOS in Indianapolis.
Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
take care of the Canadian sponsors for the children in
Kibaale. You can send them a one time donation directly.
Kibaale. KCF forwards 100% of the money to the project in
Uganda. You can send them a one time donation directly.
Please send me a note so that I know what has been donated
because of Vim. Ask KCF for information about sponsorship.
Kibaale Children's Fund c/o Pacific Academy
@@ -223,12 +240,10 @@ USA and Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
Phone: 604-581-5353
If you make a donation to Kibaale Children's Fund (KCF) you
will receive a tax receipt which can be submitted with your
tax return (under the Free Trade Agreement tax receipts issued
by an organization registered in Canada are fully accepted by
the IRS in the USA, with a few conditions).
tax return.
Holland: Transfer to the account of "Stichting ICCF Holland" in Venlo.
This will allow for tax deduction (if you live in Holland)!
This will allow for tax deduction if you live in Holland.
Postbank, nr. 4548774
Germany: It is possible to make donations that allow for a tax return.
@@ -252,7 +267,7 @@ Credit Card: You can use PayPal to send money with a Credit card. This is
https://www.paypal.com/affil/pal=Bram%40iccf-holland.org
The e-mail address for sending the money to is:
Bram@iccf-holland.org
For amounts above 400 Euro ($500) sending a cheque is
For amounts above 400 Euro ($500) sending a check is
preferred.
Others: Transfer to one of these accounts if possible:
@@ -264,11 +279,11 @@ Others: Transfer to one of these accounts if possible:
Rabobank Venlo, account 3765.05.117
Swift code: RABO NL 2U
under the name "Bram Moolenaar", Venlo
Otherwise, send a cheque in euro or US dollars to the address
Otherwise, send a check in euro or US dollars to the address
below. Minimal amount: $70 (my bank does not accept smaller
amounts for foreign cheques, sorry)
amounts for foreign check, sorry)
Address to send cheques to:
Address to send checks to:
stichting ICCF Holland
Bram Moolenaar
Clematisstraat 30

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
*usr_05.txt* For Vim version 7.0aa. Last change: 2005 Oct 04
VIM USER MANUAL - by Bram Moolenaar
@@ -327,6 +327,11 @@ Example for Unix (assuming you didn't have a plugin directory yet): >
That's all! Now you can use the commands defined in this plugin to justify
text.
Instead of putting plugins directly into the plugin/ directory, you may
better organize them by putting them into subdirectories under plugin/.
As an example, consider using "~/.vim/plugin/perl/*.vim" for all your Perl
plugins.
FILETYPE PLUGINS *add-filetype-plugin* *ftplugins*

View File

@@ -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
@@ -2114,7 +2114,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 +2139,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

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -295,7 +295,8 @@ N *+gettext* message translations |multi-lang|
*+GUI_Motif* Unix only: Motif |GUI|
*+GUI_Photon* QNX only: Photon |GUI|
m *+hangul_input* Hangul input support |hangul|
*+iconv* Compiled with the |iconv()| function, may have |/dyn|
*+iconv* Compiled with the |iconv()| function
*+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
N *+insert_expand* |insert_expand| Insert mode completion
N *+jumplist* |jumplist|
B *+keymap* |'keymap'|
@@ -320,19 +321,23 @@ 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
checking in automatic commands. |autocmd-osfiletypes|
N *+path_extra* Up/downwards search in 'path' and 'tags'
m *+perl* Perl interface |perl|, may have |/dyn|
m *+perl* Perl interface |perl|
m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
*+postscript* |:hardcopy| writes a PostScript file
N *+printer* |:hardcopy| command
H *+profile* |:profile| command
m *+python* Python interface |python|, may have |/dyn|
m *+python* Python interface |python|
m *+python/dyn* Python interface |python-dynamic| |/dyn|
N *+quickfix* |:make| and |quickfix| commands
B *+rightleft* Right to left typing |'rightleft'|
m *+ruby* Ruby interface |ruby|, may have |/dyn|
m *+ruby* Ruby interface |ruby|
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
N *+scrollbind* |'scrollbind'|
B *+signs* |:sign|
N *+smartindent* |'smartindent'|
@@ -345,7 +350,8 @@ N *+syntax* Syntax highlighting |syntax|
N *+tag_binary* binary searching in tags file |tag-binary-search|
N *+tag_old_static* old method for static tags |tag-old-static|
m *+tag_any_white* any white space allowed in tags file |tag-any-white|
m *+tcl* Tcl interface |tcl|, may have |/dyn|
m *+tcl* Tcl interface |tcl|
m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
*+terminfo* uses |terminfo| instead of termcap
N *+termresponse* support for |t_RV| and |v:termresponse|
N *+textobjects* |text-objects| selection

View File

@@ -1,4 +1,4 @@
*version6.txt* For Vim version 7.0aa. Last change: 2005 Apr 18
*version6.txt* For Vim version 7.0aa. Last change: 2005 Oct 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -80,6 +80,11 @@ Changed |changed-6.3|
Added |added-6.3|
Fixed |fixed-6.3|
VERSION 6.4 |version-6.4|
Changed |changed-6.4|
Added |added-6.4|
Fixed |fixed-6.4|
==============================================================================
INCOMPATIBLE CHANGES *incompatible-6*
@@ -13841,4 +13846,685 @@ Problem: After Visually selecting four characters, changing it to other
Solution: Don't store the size of the Visual area when redo is active.
Files: src/normal.c
==============================================================================
VERSION 6.4 *version-6.4*
This section is about improvements made between version 6.3 and 6.4.
This is a bug-fix release. There are also a few new features. The major
number of new items is in the runtime files and translations.
The big MS-Windows version now uses:
Ruby version 1.8.3
Perl version 5.8.7
Python version 2.4.2
Changed *changed-6.4*
-------
Removed runtime/tools/tcltags, Exuberant ctags does it better.
Added *added-6.4*
-----
Alsaconf syntax file (Nikolai Weibull)
Eruby syntax, indent, compiler and ftplugin file (Doug Kearns)
Esterel syntax file (Maurizio Tranchero)
Mathematica indent file (Steve Layland)
Netrc syntax file (Nikolai Weibull)
PHP compiler file (Doug Kearns)
Pascal indent file (Neil Carter)
Prescribe syntax file (Klaus Muth)
Rubyunit compiler file (Doug Kearns)
SMTPrc syntax file (Kornel Kielczewski)
Sudoers syntax file (Nikolai Weibull)
TPP syntax file (Gerfried Fuchs)
VHDL ftplugin file (R. Shankar)
Verilog-AMS syntax file (S. Myles Prather)
Bulgarian keymap (Alberto Mardegan)
Canadian keymap (Eric Joanis)
Hungarian menu translations in UTF-8 (Kantra Gergely)
Ukrainian menu translations (Bohdan Vlasyuk)
Irish message translations (Kevin Patrick Scannell)
Configure also checks for tclsh8.4.
Fixed *fixed-6.4*
-----
"dFxd;" deleted the character under the cursor, "d;" didn't remember the
exclusiveness of the motion.
When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one
line for the cmdline. (Christian Robinson) Invoke command_height() after the
GUI has started up.
Gcc would warn "dereferencing type-punned pointer will break strict -aliasing
rules". Avoid using typecasts for variable pointers.
Gcc 3.x interprets the -MM argument differently. Change "-I /path" to
"-isystem /path" for "make depend".
Patch 6.3.001
Problem: ":browse split" gives the file selection dialog twice. (Gordon
Bazeley) Same problem for ":browse diffpatch".
Solution: Reset cmdmod.browse before calling do_ecmd().
Files: src/diff.c, src/ex_docmd.c
Patch 6.3.002
Problem: When using translated help files with non-ASCII latin1 characters
in the first line the utf-8 detection is wrong.
Solution: Properly detect utf-8 characters. When a mix of encodings is
detected continue with the next language and avoid a "no matches"
error because of "got_int" being set. Add the directory name to
the error message for a duplicate tag.
Files: src/ex_cmds.c
Patch 6.3.003
Problem: Crash when using a console dialog and the first choice does not
have a default button. (Darin Ohashi)
Solution: Allocate two more characters for the [] around the character for
the default choice.
Files: src/message.c
Patch 6.3.004
Problem: When searching for a long string (140 chars in a 80 column
terminal) get three hit-enter prompts. (Robert Webb)
Solution: Avoid the hit-enter prompt when giving the message for wrapping
around the end of the buffer. Don't give that message again when
the string was not found.
Files: src/message.c, src/search.c
Patch 6.3.005
Problem: Crash when searching for a pattern with a character offset and
starting in a closed fold. (Frank Butler)
Solution: Check for the column to be past the end of the line. Also fix
that a pattern with a character offset relative to the end isn't
read back from the viminfo properly.
Files: src/search.c
Patch 6.3.006
Problem: ":breakadd file *foo" prepends the current directory to the file
pattern. (Hari Krishna Dara)
Solution: Keep the pattern as-is.
Files: src/ex_cmds2.c
Patch 6.3.007
Problem: When there is a buffer with 'buftype' set to "nofile" and using a
":cd" command, the swap file is not deleted when exiting.
Solution: Use the full path of the swap file also for "nofile" buffers.
Files: src/fileio.c
Patch 6.3.008
Problem: Compiling fails under OS/2.
Solution: Include "e_screenmode" also for OS/2. (David Sanders)
Files: src/globals.h
Patch 6.3.009 (after 6.3.006)
Problem: ":breakadd file /path/foo.vim" does not match when a symbolic link
is involved. (Servatius Brandt)
Solution: Do expand the pattern when it does not start with "*".
Files: runtime/doc/repeat.txt, src/ex_cmds2.c
Patch 6.3.010
Problem: When writing to a named pipe there is an error for fsync()
failing.
Solution: Ignore the fsync() error for devices.
Files: src/fileio.c
Patch 6.3.011
Problem: Crash when the completion function of a user-command uses a
"normal :cmd" command. (Hari Krishna Dara)
Solution: Save the command line when invoking the completion function.
Files: src/ex_getln.c
Patch 6.3.012
Problem: Internal lalloc(0) error when using a complicated multi-line
pattern in a substitute command. (Luc Hermitte)
Solution: Avoid going past the end of a line.
Files: src/ex_cmds.c
Patch 6.3.013
Problem: Crash when editing a command line and typing CTRL-R = to evaluate
a function that uses "normal :cmd". (Hari Krishna Dara)
Solution: Save and restore the command line when evaluating an expression
for CTRL-R =.
Files: src/ex_getln.c, src/ops.c, src/proto/ex_getln.pro,
src/proto/ops.pro
Patch 6.3.014
Problem: When using Chinese or Taiwanese the default for 'helplang' is
wrong. (Simon Liang)
Solution: Use the part of the locale name after "zh_".
Files: src/option.c
Patch 6.3.015
Problem: The string that winrestcmd() returns may end in garbage.
Solution: NUL-terminate the string. (Walter Briscoe)
Files: src/eval.c
Patch 6.3.016
Problem: The default value for 'define' has "\s" before '#'.
Solution: Add a star after "\s". (Herculano de Lima Einloft Neto)
Files: src/option.c
Patch 6.3.017
Problem: "8zz" may leave the cursor beyond the end of the line. (Niko
Maatjes)
Solution: Correct the cursor column after moving to another line.
Files: src/normal.c
Patch 6.3.018
Problem: ":0argadd zero" added the argument after the first one, instead of
before it. (Adri Verhoef)
Solution: Accept a zero range for ":argadd".
Files: src/ex_cmds.h
Patch 6.3.019
Problem: Crash in startup for debug version. (David Rennals)
Solution: Move the call to nbdebug_wait() to after allocating NameBuff.
Files: src/main.c
Patch 6.3.020
Problem: When 'encoding' is "utf-8" and 'delcombine' is set, "dw" does not
delete a word but only a combining character of the first
character, if there is one. (Raphael Finkel)
Solution: Correctly check that one character is being deleted.
Files: src/misc1.c
Patch 6.3.021
Problem: When the last character of a file name is a multi-byte character
and the last byte is a path separator, the file cannot be edited.
Solution: Check for the last byte to be part of a multi-byte character.
(Taro Muraoka)
Files: src/fileio.c
Patch 6.3.022 (extra)
Problem: Win32: When the last character of a file name is a multi-byte
character and the last byte is a path separator, the file cannot
be written. A trail byte that is a space makes that a file cannot
be opened from the command line.
Solution: Recognize double-byte characters when parsing the command line.
In mch_stat() check for the last byte to be part of a multi-byte
character. (Taro Muraoka)
Files: src/gui_w48.c, src/os_mswin.c
Patch 6.3.023
Problem: When the "to" part of a mapping starts with its "from" part,
abbreviations for the same characters is not possible. For
example, when <Space> is mapped to something that starts with a
space, typing <Space> does not expand abbreviations.
Solution: Only disable expanding abbreviations when a mapping is not
remapped, don't disable it when the RHS of a mapping starts with
the LHS.
Files: src/getchar.c, src/vim.h
Patch 6.3.024
Problem: In a few places a string in allocated memory is not terminated
with a NUL.
Solution: Add ga_append(NUL) in script_get(), gui_do_findrepl() and
serverGetVimNames().
Files: src/ex_getln.c, src/gui.c, src/if_xcmdsrv.c, src/os_mswin.c
Patch 6.3.025 (extra)
Problem: Missing NUL for list of server names.
Solution: Add ga_append(NUL) in serverGetVimNames().
Files: src/os_mswin.c
Patch 6.3.026
Problem: When ~/.vim/after/syntax/syncolor.vim contains a command that
reloads the colors an endless loop and/or a crash may occur.
Solution: Only free the old value of an option when it was originally
allocated. Limit recursiveness of init_highlight() to 5 levels.
Files: src/option.c, src/syntax.c
Patch 6.3.027
Problem: VMS: Writing a file may insert extra CR characters. Not all
terminals are recognized correctly. Vt320 doesn't support colors.
Environment variables are not expanded correctly.
Solution: Use another method to write files. Add vt320 termcap codes for
colors. (Zoltan Arpadffy)
Files: src/fileio.c, src/misc1.c, src/os_unix.c, src/structs.h,
src/term.c
Patch 6.3.028
Problem: When appending to a file the BOM marker may be written. (Alex
Jakushev)
Solution: Do not write the BOM marker when appending.
Files: src/fileio.c
Patch 6.3.029
Problem: Crash when inserting a line break. (Walter Briscoe)
Solution: In the syntax highlighting code, don't use an old state after a
change was made, current_col may be past the end of the line.
Files: src/syntax.c
Patch 6.3.030
Problem: GTK 2: Crash when sourcing a script that deletes the menus, sets
'encoding' to "utf-8" and loads the menus again. GTK error
message when tooltip text is in a wrong encoding.
Solution: Don't copy characters from the old screen to the new screen when
switching 'encoding' to utf-8, they may be invalid. Only set the
tooltip when it is valid utf-8.
Files: src/gui_gtk.c, src/mbyte.c, src/proto/mbyte.pro, src/screen.c
Patch 6.3.031
Problem: When entering a mapping and pressing Tab halfway the command line
isn't redrawn properly. (Adri Verhoef)
Solution: Reposition the cursor after drawing over the "..." of the
completion attempt.
Files: src/ex_getln.c
Patch 6.3.032
Problem: Using Python 2.3 with threads doesn't work properly.
Solution: Release the lock after initialization.
Files: src/if_python.c
Patch 6.3.033
Problem: When a mapping ends in a Normal mode command of more than one
character Vim doesn't return to Insert mode.
Solution: Check that the mapping has ended after obtaining all characters of
the Normal mode command.
Files: src/normal.c
Patch 6.3.034
Problem: VMS: crash when using ":help".
Solution: Avoid using "tags-??", some Open VMS systems can't handle the "?"
wildcard. (Zoltan Arpadffy)
Files: src/tag.c
Patch 6.3.035 (extra)
Problem: RISC OS: Compile errors.
Solution: Change e_screnmode to e_screenmode. Change the way
__riscosify_control is set. Improve the makefile. (Andy Wingate)
Files: src/os_riscos.c, src/search.c, src/Make_ro.mak
Patch 6.3.036
Problem: ml_get errors when the whole file is a fold, switching
'foldmethod' and doing "zj". (Christian J. Robinson) Was not
deleting the fold but creating a fold with zero lines.
Solution: Delete the fold properly.
Files: src/fold.c
Patch 6.3.037 (after 6.3.032)
Problem: Warning for unused variable.
Solution: Change the #ifdefs for the saved thread stuff.
Files: src/if_python.c
Patch 6.3.038 (extra)
Problem: Win32: When the "file changed" dialog pops up after a click that
gives gvim focus and not moving the mouse after that, the effect
of the click may occur when moving the mouse later. (Ken Clark)
Happened because the release event was missed.
Solution: Clear the s_button_pending variable when any input is received.
Files: src/gui_w48.c
Patch 6.3.039
Problem: When 'number' is set and inserting lines just above the first
displayed line (in another window on the same buffer), the line
numbers are not updated. (Hitier Sylvain)
Solution: When 'number' is set and lines are inserted/deleted redraw all
lines below the change.
Files: src/screen.c
Patch 6.3.040
Problem: Error handling does not always work properly and may cause a
buffer to be marked as if it's viewed in a window while it isn't.
Also when selecting "Abort" at the attention prompt.
Solution: Add enter_cleanup() and leave_cleanup() functions to move
saving/restoring things for error handling to one place.
Clear a buffer read error when it's unloaded.
Files: src/buffer.c, src/ex_docmd.c, src/ex_eval.c,
src/proto/ex_eval.pro, src/structs.h, src/vim.h
Patch 6.3.041 (extra)
Problem: Win32: When the path to a file has Russian characters, ":cd %:p:h"
doesn't work. (Valery Kondakoff)
Solution: Use a wide function to change directory.
Files: src/os_mswin.c
Patch 6.3.042
Problem: When there is a closed fold at the top of the window, CTRL-X
CTRL-E in Insert mode reduces the size of the fold instead of
scrolling the text up. (Gautam)
Solution: Scroll over the closed fold.
Files: src/move.c
Patch 6.3.043
Problem: 'hlsearch' highlighting sometimes disappears when inserting text
in PHP code with syntax highlighting. (Marcel Svitalsky)
Solution: Don't use pointers to remember where a match was found, use an
index. The pointers may become invalid when searching in other
lines.
Files: src/screen.c
Patch 6.3.044 (extra)
Problem: Mac: When 'linespace' is non-zero the Insert mode cursor leaves
pixels behind. (Richard Sandilands)
Solution: Erase the character cell before drawing the text when needed.
Files: src/gui_mac.c
Patch 6.3.045
Problem: Unusual characters in an option value may cause unexpected
behavior, especially for a modeline. (Ciaran McCreesh)
Solution: Don't allow setting termcap options or 'printdevice' in a
modeline. Don't list options for "termcap" and "all" in a
modeline. Don't allow unusual characters in 'filetype', 'syntax',
'backupext', 'keymap', 'patchmode' and 'langmenu'.
Files: src/option.c, runtime/doc/options.txt
Patch 6.3.046
Problem: ":registers" doesn't show multi-byte characters properly.
(Valery Kondakoff)
Solution: Get the length of each character before displaying it.
Files: src/ops.c
Patch 6.3.047 (extra)
Problem: Win32 with Borland C 5.5 on Windows XP: A new file is created with
read-only attributes. (Tony Mechelynck)
Solution: Don't use the _wopen() function for Borland.
Files: src/os_win32.c
Patch 6.3.048 (extra)
Problem: Build problems with VMS on IA64.
Solution: Add dependencies to the build file. (Zoltan Arpadffy)
Files: src/Make_vms.mms
Patch 6.3.049 (after 6.3.045)
Problem: Compiler warning for "char" vs "char_u" mixup. (Zoltan Arpadffy)
Solution: Add a typecast.
Files: src/option.c
Patch 6.3.050
Problem: When SIGHUP is received while busy exiting, non-reentrant
functions such as free() may cause a crash.
Solution: Ignore SIGHUP when exiting because of an error. (Scott Anderson)
Files: src/misc1.c, src/main.c
Patch 6.3.051
Problem: When 'wildmenu' is set and completed file names contain multi-byte
characters Vim may crash.
Solution: Reserve room for multi-byte characters. (Yasuhiro Matsumoto)
Files: src/screen.c
Patch 6.3.052 (extra)
Problem: Windows 98: typed keys that are not ASCII may not work properly.
For example with a Russian input method. (Jiri Jezdinsky)
Solution: Assume that the characters arrive in the current codepage instead
of UCS-2. Perform conversion based on that.
Files: src/gui_w48.c
Patch 6.3.053
Problem: Win32: ":loadview" cannot find a file with non-ASCII characters.
(Valerie Kondakoff)
Solution: Use mch_open() instead of open() to open the file.
Files: src/ex_cmds2.c
Patch 6.3.054
Problem: When 'insertmode' is set <C-L>4ixxx<C-L> hangs Vim. (Jens Paulus)
Vim is actually still working but redraw is disabled.
Solution: When stopping Insert mode with CTRL-L don't put an Esc in the redo
buffer but a CTRL-L.
Files: src/edit.c
Patch 6.3.055 (after 6.3.013)
Problem: Can't use getcmdline(), getcmdpos() or setcmdpos() with <C-R>=
when editing a command line. Using <C-\>e may crash Vim. (Peter
Winters)
Solution: When moving ccline out of the way for recursive use, make it
available to the functions that need it. Also save and restore
ccline when calling get_expr_line(). Make ccline.cmdbuf NULL at
the end of getcmdline().
Files: src/ex_getln.c
Patch 6.3.056
Problem: The last characters of a multi-byte file name may not be displayed
in the window title.
Solution: Avoid to remove a multi-byte character where the last byte looks
like a path separator character. (Yasuhiro Matsumoto)
Files: src/buffer.c, src/ex_getln.c
Patch 6.3.057
Problem: When filtering lines folds are not updated. (Carl Osterwisch)
Solution: Update folds for filtered lines.
Files: src/ex_cmds.c
Patch 6.3.058
Problem: When 'foldcolumn' is equal to the window width and 'wrap' is on
Vim may crash. Disabling the vertical split feature breaks
compiling. (Peter Winters)
Solution: Check for zero room for wrapped text. Make compiling without
vertical splits possible.
Files: src/move.c, src/quickfix.c, src/screen.c, src/netbeans.c
Patch 6.3.059
Problem: Crash when expanding an ":edit" command containing several spaces
with the shell. (Brian Hirt)
Solution: Allocate enough space for the quotes.
Files: src/os_unix.c
Patch 6.3.060
Problem: Using CTRL-R CTRL-O in Insert mode with an invalid register name
still causes something to be inserted.
Solution: Check the register name for being valid.
Files: src/edit.c
Patch 6.3.061
Problem: When editing a utf-8 file in an utf-8 xterm and there is a
multi-byte character in the last column, displaying is messed up.
(Jo<4A>l Rio)
Solution: Check for a multi-byte character, not a multi-column character.
Files: src/screen.c
Patch 6.3.062
Problem: ":normal! gQ" hangs.
Solution: Quit getcmdline() and do_exmode() when out of typeahead.
Files: src/ex_getln.c, src/ex_docmd.c
Patch 6.3.063
Problem: When a CursorHold autocommand changes to another window
(temporarily) 'mousefocus' stops working.
Solution: Call gui_mouse_correct() after triggering CursorHold.
Files: src/gui.c
Patch 6.3.064
Problem: line2byte(line("$") + 1) sometimes returns the wrong number.
(Charles Campbell)
Solution: Flush the cached line before counting the bytes.
Files: src/memline.c
Patch 6.3.065
Problem: The euro digraph doesn't always work.
Solution: Add an "e=" digraph for Unicode euro character and adjust the
help files.
Files: src/digraph.c, runtime/doc/digraph.txt
Patch 6.3.066
Problem: Backup file may get wrong permissions.
Solution: Use permissions of original file for backup file in more places.
Files: src/fileio.c
Patch 6.3.067 (after 6.3.066)
Problem: Newly created file gets execute permission.
Solution: Check for "perm" to be negative before using it.
Files: src/fileio.c
Patch 6.3.068
Problem: When editing a compressed file xxx.gz which is a symbolic link to
the actual file a ":write" renames the link.
Solution: Resolve the link, so that the actual file is renamed and
compressed.
Files: runtime/plugin/gzip.vim
Patch 6.3.069
Problem: When converting text with illegal characters Vim may crash.
Solution: Avoid that too much is subtracted from the length. (Da Woon Jung)
Files: src/mbyte.c
Patch 6.3.070
Problem: After ":set number linebreak wrap" and a vertical split, moving
the vertical separator far left will crash Vim. (Georg Dahn)
Solution: Avoid dividing by zero.
Files: src/charset.c
Patch 6.3.071
Problem: The message for CTRL-X mode is still displayed after an error for
'thesaurus' or 'dictionary' being empty.
Solution: Clear "edit_submode".
Files: src/edit.c
Patch 6.3.072
Problem: Crash in giving substitute message when language is Chinese and
encoding is utf-8. (Yongwei)
Solution: Make the msg_buf size larger when using multi-byte.
Files: src/vim.h
Patch 6.3.073
Problem: Win32 GUI: When the Vim window is partly above or below the
screen, scrolling causes display errors when the taskbar is not on
that side.
Solution: Use the SW_INVALIDATE flag when the Vim window is partly below or
above the screen.
Files: src/gui_w48.c
Patch 6.3.074
Problem: When mswin.vim is used and 'insertmode' is set, typing text in
Select mode and then using CTRL-V results in <SNR>99_Pastegi.
(Georg Dahn)
Solution: When restart_edit is set use "d" instead of "c" to remove the
selected text to avoid calling edit() twice.
Files: src/normal.c
Patch 6.3.075
Problem: After unloading another buffer, syntax highlighting in the current
buffer may be wrong when it uses "containedin". (Eric Arnold)
Solution: Use "buf" intead of "curbuf" in syntax_clear().
Files: src/syntax.c
Patch 6.3.076
Problem: Crash when using cscope and there is a parse error (e.g., line too
long). (Alexey I. Froloff)
Solution: Pass the actual number of matches to cs_manage_matches() and
correctly handle the error situation.
Files: src/if_cscope.c
Patch 6.3.077 (extra)
Problem: VMS: First character input after ESC was not recognized.
Solution: Added TRM$M_TM_TIMED in vms_read(). (Zoltan Arpadffy)
Files: src/os_vms.c
Patch 6.3.078 (extra, after 6.3.077)
Problem: VMS: Performance issue after patch 6.3.077
Solution: Add a timeout in the itemlist. (Zoltan Arpadffy)
Files: src/os_vms.c
Patch 6.3.079
Problem: Crash when executing a command in the command line window while
syntax highlighting is enabled. (Pero Brbora)
Solution: Don't use a pointer to a buffer that has been deleted.
Files: src/syntax.c
Patch 6.3.080 (extra)
Problem: Win32: With 'encoding' set to utf-8 while the current codepage is
Chinese editing a file with some specific characters in the name
fails.
Solution: Use _wfullpath() instead of _fullpath() when necessary.
Files: src/os_mswin.c
Patch 6.3.081
Problem: Unix: glob() may execute a shell command when it's not wanted.
(Georgi Guninski)
Solution: Verify the sandbox flag is not set.
Files: src/os_unix.c
Patch 6.3.082 (after 6.3.081)
Problem: Unix: expand() may execute a shell command when it's not wanted.
(Georgi Guninski)
Solution: A more generic solution than 6.3.081.
Files: src/os_unix.c
Patch 6.3.083
Problem: VMS: The vt320 termcap entry is incomplete.
Solution: Add missing function keys. (Zoltan Arpadffy)
Files: src/term.c
Patch 6.3.084 (extra)
Problem: Cygwin: compiling with DEBUG doesn't work. Perl path was ignored.
Failure when $(OUTDIR) already exists. "po" makefile is missing.
Solution: Use changes tested in Vim 7. (Tony Mechelynck)
Files: src/Make_cyg.mak, src/po/Make_cyg.mak
Patch 6.3.085
Problem: Crash in syntax highlighting code. (Marc Espie)
Solution: Prevent current_col going past the end of the line.
Files: src/syntax.c
Patch 6.3.086 (extra)
Problem: Can't produce message translation file with msgfmt that checks
printf strings.
Solution: Fix the Russian translation.
Files: src/po/ru.po, src/po/ru.cp1251.po
Patch 6.3.087
Problem: MS-DOS: Crash. (Jason Hood)
Solution: Don't call fname_case() with a NULL pointer.
Files: src/ex_cmds.c
Patch 6.3.088
Problem: Editing ".in" causes error E218. (Stefan Karlsson)
Solution: Require some characters before ".in". Same for ".orig" and others.
Files: runtime/filetype.vim
Patch 6.3.089
Problem: A session file doesn't work when created while the current
directory contains a space or the directory of the session files
contains a space. (Paolo Giarrusso)
Solution: Escape spaces with a backslash.
Files: src/ex_docmd.c
Patch 6.3.090
Problem: A very big value for 'columns' or 'lines' may cause a crash.
Solution: Limit the values to 10000 and 1000.
Files: src/option.c
Patch 6.4a.001
Problem: The Unix Makefile contained too many dependencies and a few
uncommented lines.
Solution: Run "make depend" with manual changes to avoid a gcc
incompatibility. Comment a few lines.
Files: src/Makefile
Patch 6.4b.001
Problem: Vim reports "Vim 6.4a" in the ":version" output.
Solution: Change "a" to "b". (Tony Mechelynck)
Files: src/version.h
Patch 6.4b.002
Problem: In Insert mode, pasting a multi-byte character after the end of
the line leaves the cursor just before that character.
Solution: Make sure "gP" leaves the cursor in the right place when
'virtualedit' is set.
Files: src/ops.c
Patch 6.4b.003 (after 6.4b.002)
Problem: The problem still exists when 'encoding' is set to "cp936".
Solution: Fix the problem in getvvcol(), compute the coladd field correctly.
Files: src/charset.c, src/ops.c
Patch 6.4b.004
Problem: Selecting a {} block with "viB" includes the '}' when there is an
empty line before it.
Solution: Don't advance the cursor to include a line break when it's already
at the line break.
Files: src/search.c
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2005 Sep 23
*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
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,7 @@ 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|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -67,6 +67,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:
@@ -166,7 +168,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
@@ -194,14 +196,12 @@ Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
The 'omnifunc' option is set by filetype plugins to define the function that
figures out the completion.
Currently only C is supported. |ft-c-omni|
Currently supported languages:
C |ft-c-omni|
XHTML |ft-html-omni|
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.)
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
MzScheme interface *new-MzScheme*
@@ -342,6 +342,18 @@ 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.
Various new items *new-items-7*
-----------------
@@ -355,6 +367,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: ~
@@ -366,6 +381,7 @@ Options: ~
'completefunc' The name of a function used for user-specified Insert
mode completion. CTRL-X CTRL-U can be used in Insert
mode to do any kind of completion. (Taro Muraoka)
'completeopt' Enable popup menu for Insert mode completion.
'omnifunc' The name of a function used for omni completion.
'quoteescape' Characters used to escape quotes inside a string.
Used for the a", a' and a` text objects. |a'|
@@ -394,18 +410,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).
@@ -422,8 +435,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).
New functions: ~
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: ~
|add()| append an item to a List
|append()| append List of lines to the buffer
@@ -497,6 +532,7 @@ 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)
New items in search patterns: ~
@@ -564,21 +600,23 @@ character selections can be used between two Vims. (Eckehard Berns)
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
"yyp".
Mac: GUI font selector. (Peter "Rain Dog" Cucka)
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.
@@ -603,6 +641,17 @@ the cursor position. Likewise for "1gD" and "gD".
'scrolljump' can be set to a negative number to scroll a percentage of the
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*
@@ -610,6 +659,9 @@ IMPROVEMENTS *improvements-7*
Move the help for printing to a separate help file. It's quite a lot now.
When ":silent" is used and a backwards range is given for an Ex command the
range is swapped automatically instead of asking if that is OK.
The pattern matching code was changed from a recursive function to an
iterative mechanism. This avoids out-of-stack errors. State is stored in
allocated memory, running out of memory can always be detected. Allows
@@ -624,10 +676,14 @@ 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
doesn not have a name that refers to a file and is written with BufWriteCmd
does not have a name that refers to a file and is written with BufWriteCmd
autocommands.
For lisp indenting and matching parenthesis: (Sergey Khorev)
@@ -686,6 +742,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
@@ -747,7 +807,7 @@ To count items (pattern matches) without changing the buffer the 'n' flag has
been added to |:substitute|. See |count-items|.
The "screen.linux" $TERM name is recognized to set the default for
'background' to "dark". (Ciaran McCreesh) Also for "cygwin".
'background' to "dark". (Ciaran McCreesh) Also for "cygwin" and "putty".
The |FileChangedShell| autocommand event can now use the |v:fcs_reason|
variable that specifies what triggered the event. |v:fcs_choice| can be used
@@ -807,7 +867,7 @@ For command-line completion the matches for various types of arguments are now
sorted: user commands, variables, syntax names, etc.
When no locale is set, thus using the "C" locale, Vim will work with latin1
characters, using it's own isupper()/toupper()/etc. functions.
characters, using its own isupper()/toupper()/etc. functions.
When using an rxvt terminal emulator guess the value of 'background' using the
COLORFGBG environment variable. (Ciaran McCreesh)
@@ -823,6 +883,48 @@ completion supported for the input. (Yegappan Lakshmanan)
"dp" works with more than two buffers in diff mode if there is only one where
'modifiable' is set.
When the 'include' option contains \zs the file name found is what is being
matched from \zs to the end or \ze. Useful to pass more to 'includeexpr'.
Loading plugins on startup now supports subdirectories in the plugin
directory. |load-plugins|
In the foldcolumn always show the '+' for a closed fold, so that it can be
opened easily. It may overwrite another character, esp. if 'foldcolumn' is 1.
It is now possible to get the W10 message again by setting 'readonly'. Useful
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.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -1051,10 +1153,6 @@ doing that a SIGHUP may arrive and disturbe us, thus ignore it. (Scott
Anderson) Also postpone SIGHUP, SIGQUIT and SIGTERM until it's safe to
handle. Added handle_signal().
When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one
line for the cmdline. (Christian Robinson) Invoke command_height() after the
GUI has started up.
When completing a file name on the command line backslashes are required for
white space. Was only done for a space, not for a Tab.
@@ -1323,7 +1421,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
@@ -1372,7 +1470,108 @@ searching for "qa" instead of quitting all windows.
GUI: When scrolling with the scrollbar and there is a line that doesn't fit
redrawing may fail. Make sure w_skipcol is valid before redrawing.
"dFxd;" deleted the character under the cursor, "d;" didn't remember the
exclusiveness of the motion.
Limit the values of 'columns' and 'lines' to avoid an overflow in Rows *
Columns. Fixed bad effects when running out of memory (command line would be
reversed, ":qa!" resulted in ":!aq").
Motif: "gvim -iconic" opened the window anyway. (David Harrison)
There is a tiny chance that a symlink gets created between checking for an
existing file and creating a file. Use the O_NOFOLLOW for open() if it's
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 set
"cmdline_busy" and disallow changing the buffer or jumpting 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:
"!;&()<>".
vim:tw=78:ts=8:ft=help:norl:

View File

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

View File

@@ -1,4 +1,4 @@
*visual.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*visual.txt* For Vim version 7.0aa. Last change: 2005 Oct 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -86,7 +86,7 @@ Visual Normal blockwise Visual linewise Visual
blockwise Visual Visual Normal linewise Visual
linewise Visual Visual blockwise Visual Normal
*gv* *v_gv*
*gv* *v_gv* *reselect-Visual*
gv Start Visual mode with the same area as the previous
area and the same mode.
In Visual mode the current and the previous Visual

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1100,18 +1100,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 +1119,7 @@ unlisted The buffer is not in the buffer list. It is not used for
normal editing, but to show a help file, remember a file name
or marks. The ":bdelete" command will also set this option,
thus it doesn't completely delete the buffer. Settings: >
:set nobuflisted
:setlocal nobuflisted
<
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Sep 25
" Last Change: 2006 Jan 12
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -285,6 +285,9 @@ au BufNewFile,BufRead */.calendar/*,
" C#
au BufNewFile,BufRead *.cs setf cs
" Cfengine
au BufNewFile,BufRead cfengine.conf setf cfengine
" Comshare Dimension Definition Language
au BufNewFile,BufRead *.cdl setf cdl
@@ -396,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 |
@@ -603,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
@@ -1346,6 +1352,9 @@ au BufNewFile,BufRead *.rtf setf rtf
" Ruby
au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby
" Rantfile is like Ruby
au BufNewFile,BufRead [rR]antfile,*.rant setf ruby
" S-lang (or shader language!)
au BufNewFile,BufRead *.sl setf slang
@@ -1609,9 +1618,19 @@ au BufNewFile,BufRead /etc/sysctl.conf setf sysctl
" Sudoers
au BufNewFile,BufRead /etc/sudoers,sudoers.tmp setf sudoers
" Tads (or Nroff)
" If the first line starts with '#' and contains 'perl' it's probably a Perl
" file.
fun! s:FTperl()
if getline(1)[0] == '#' && getline(1) =~ 'perl'
setf perl
return 1
endif
return 0
endfun
" Tads (or Nroff or Perl test file)
au BufNewFile,BufRead *.t
\ if !s:FTnroff() | setf tads | endif
\ if !s:FTnroff() && !s:FTperl() | setf tads | endif
" Tags
au BufNewFile,BufRead tags setf tags
@@ -1619,8 +1638,8 @@ au BufNewFile,BufRead tags setf tags
" TAK
au BufNewFile,BufRead *.tak setf tak
" Tcl
au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk setf tcl
" Tcl (JACL too)
au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl
" TealInfo
au BufNewFile,BufRead *.tli setf tli
@@ -1669,6 +1688,9 @@ au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
" TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp
" Trustees
au BufNewFile,BufRead trustees.conf setf trustees
" TSS - Geometry
au BufNewFile,BufReadPost *.tssgm setf tssgm

View File

@@ -1,15 +1,9 @@
" Vim filetype plugin
" Language: eRuby
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.sourceforge.net
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
" Only do this when not done yet for this buffer

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: jsp
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Changed: 2004 Jul 08
" Last Changed: 2005 Oct 10
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -46,7 +46,7 @@ if exists ("b:browsefilter")
let s:browsefilter = b:browsefilter . s:browsefilter
endif
if exists("b:match_words")
let s:match_words = b:match_words . ',' . s:matchwords
let s:match_words = b:match_words . ',' . s:match_words
endif
" Load the combined list of match_words for matchit.vim

View File

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

View File

@@ -1,38 +1,36 @@
" Vim settings file
" Language: OCaml
" Maintainers: Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at>
" Stefano Zacchiroli <zack@bononia.it>
" URL: http://www.oefai.at/~markus/vim/ftplugin/ocaml.vim
" Last Change: 2004 Apr 12 - better .ml/.mli-switching without Python (SZ)
" 2003 Nov 21 - match_words-patterns and .ml/.mli-switching (MM)
" 2003 Oct 16 - re-entered variable 'did_ocaml_dtypes' (MM)
" 2003 Oct 15 - added Stefano Zacchirolis (SZ) Python-code for
" displaying type annotations (MM)
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't do other file type settings for this buffer
let b:did_ftplugin = 1
" Language: OCaml
" Maintainer: David Baelde <firstname.name@ens-lyon.org>
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus.mottl@gmail.com>
" Stefano Zacchiroli <zack@bononia.it>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
" Last Change: 2005 Oct 13 - removed GPL; better matchit support (MM, SZ)
"
" if exists("b:did_ftplugin")
" finish
" endif
let b:did_ftplugin=1
" Error handling -- helps moving where the compiler wants you to go
let s:cposet=&cpoptions
set cpo-=C
" Error formats
setlocal efm=
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
\%Wocamlyacc:\ w\ -\ %m,
\%-Zmake%.%#,
\%C%m
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
\%Wocamlyacc:\ w\ -\ %m,
\%-Zmake%.%#,
\%C%m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f',
\%X%*\\a:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f
" Add mappings, unless the user didn't want this.
if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
" Uncommenting
" (un)commenting
if !hasmapto('<Plug>Comment')
nmap <buffer> <LocalLeader>c <Plug>LUncomOn
vmap <buffer> <LocalLeader>c <Plug>BUncomOn
@@ -41,46 +39,141 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
endif
nnoremap <buffer> <Plug>LUncomOn mz0i(* <ESC>$A *)<ESC>`z
nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^(\* \(.*\) \*)/\1/<CR>
nnoremap <buffer> <Plug>LUncomOff :s/^(\* \(.*\) \*)/\1/<CR>:noh<CR>
vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`<
vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
if !hasmapto('<Plug>Abbrev')
iabbrev <buffer> ASS (assert false)
iabbrev <buffer> ASS (assert false (* XXX *))
endif
endif
" Let % jump between structure elements (due to Issac Trotts)
let b:mw='\<let\>:\<and\>:\(\<in\>\|;;\),'
let b:mw=b:mw . '\<if\>:\<then\>:\<else\>,\<do\>:\<done\>,'
let b:mw=b:mw . '\<\(object\|sig\|struct\|begin\)\>:\<end\>'
let b:match_words=b:mw
let b:mw = ''
let b:mw = b:mw . ',\<let\>:\<and\>:\(\<in\>\|;;\)'
let b:mw = b:mw . ',\<if\>:\<then\>:\<else\>'
let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>,'
let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\<end\>'
let b:mw = b:mw . ',\<\(match\|try\)\>:\<with\>'
let b:match_words = b:mw
let b:match_ignorecase=0
" switching between interfaces (.mli) and implementations (.ml)
if !exists("g:did_ocaml_switch")
let g:did_ocaml_switch = 1
map ,s :call OCaml_switch(0)<CR>
map ,S :call OCaml_switch(1)<CR>
map <LocalLeader>s :call OCaml_switch(0)<CR>
map <LocalLeader>S :call OCaml_switch(1)<CR>
fun OCaml_switch(newwin)
if (match(bufname(""), "\\.mli$") >= 0)
let fname = substitute(bufname(""), "\\.mli$", ".ml", "")
if (a:newwin == 1)
exec "new " . fname
exec "new " . fname
else
exec "arge " . fname
exec "arge " . fname
endif
elseif (match(bufname(""), "\\.ml$") >= 0)
let fname = bufname("") . "i"
if (a:newwin == 1)
exec "new " . fname
exec "new " . fname
else
exec "arge " . fname
exec "arge " . fname
endif
endif
endfun
endif
" Vim support for OCaml 3.07 .annot files (requires Vim with python support)
" Folding support
" Get the modeline because folding depends on indentation
let s:s = line2byte(line('.'))+col('.')-1
if search('^\s*(\*:o\?caml:')
let s:modeline = getline(".")
else
let s:modeline = ""
endif
if s:s > 0
exe 'goto' s:s
endif
" Get the indentation params
let s:m = matchstr(s:modeline,'default\s*=\s*\d\+')
if s:m != ""
let s:idef = matchstr(s:m,'\d\+')
elseif exists("g:omlet_indent")
let s:idef = g:omlet_indent
else
let s:idef = 2
endif
let s:m = matchstr(s:modeline,'struct\s*=\s*\d\+')
if s:m != ""
let s:i = matchstr(s:m,'\d\+')
elseif exists("g:omlet_indent_struct")
let s:i = g:omlet_indent_struct
else
let s:i = s:idef
endif
" Set the folding method
if exists("g:ocaml_folding")
setlocal foldmethod=expr
setlocal foldexpr=OMLetFoldLevel(v:lnum)
endif
" - Only definitions below, executed once -------------------------------------
if exists("*OMLetFoldLevel")
finish
endif
function s:topindent(lnum)
let l = a:lnum
while l > 0
if getline(l) =~ '\s*\%(\<struct\>\|\<sig\>\|\<object\>\)'
return indent(l)
endif
let l = l-1
endwhile
return -s:i
endfunction
function OMLetFoldLevel(l)
" This is for not merging blank lines around folds to them
if getline(a:l) !~ '\S'
return -1
endif
" We start folds for modules, classes, and every toplevel definition
if getline(a:l) =~ '^\s*\%(\<val\>\|\<module\>\|\<class\>\|\<type\>\|\<method\>\|\<initializer\>\|\<inherit\>\|\<exception\>\|\<external\>\)'
exe 'return ">' (indent(a:l)/s:i)+1 '"'
endif
" Toplevel let are detected thanks to the indentation
if getline(a:l) =~ '^\s*let\>' && indent(a:l) == s:i+s:topindent(a:l)
exe 'return ">' (indent(a:l)/s:i)+1 '"'
endif
" We close fold on end which are associated to struct, sig or object.
" We use syntax information to do that.
if getline(a:l) =~ '^\s*end\>' && synIDattr(synID(a:l, indent(a:l)+1, 0), "name") != "ocamlKeyword"
return (indent(a:l)/s:i)+1
endif
" Folds end on ;;
if getline(a:l) =~ '^\s*;;'
exe 'return "<' (indent(a:l)/s:i)+1 '"'
endif
" Comments around folds aren't merged to them.
if synIDattr(synID(a:l, indent(a:l)+1, 0), "name") == "ocamlComment"
return -1
endif
return '='
endfunction
" Vim support for OCaml .annot files (requires Vim with python support)
"
" Executing OCamlPrintType(<mode>) function will display in the Vim bottom
" line(s) the type of an ocaml value getting it from the corresponding .annot
@@ -92,37 +185,15 @@ endif
" .annot files are parsed lazily the first time OCamlPrintType is invoked; is
" also possible to force the parsing using the OCamlParseAnnot() function.
"
" Hitting the <F3> key will cause OCamlPrintType function to be invoked with
" Typing ',3' will cause OCamlPrintType function to be invoked with
" the right argument depending on the current mode (visual or not).
"
" Copyright (C) <2003> Stefano Zacchiroli <zack@bononia.it>
" Copyright (C) <2003-2004> Stefano Zacchiroli <zack@bononia.it>
"
" Created: Wed, 01 Oct 2003 18:16:22 +0200 zack
" LastModified: Mon, 06 Oct 2003 11:05:39 +0200 zack
"
" This program is free software; you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation; either version 2 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program; if not, write to the Free Software
" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"
" LastModified: Wed, 25 Aug 2004 18:28:39 +0200 zack
if !has("python")
echo "Python support not found: OCaml .annot support disabled"
finish
endif
if !exists("g:did_ocaml_dtypes")
let g:did_ocaml_dtypes = 1
else
finish
endif
@@ -166,7 +237,7 @@ class Annotations:
at least two space characters.
- in each block, the two positions are respectively the start and the
- end of the range described by the block.
end of the range described by the block.
- in a position, the filename is the name of the file, the first num
is the line number, the second num is the offset of the beginning
of the line, the third num is the offset of the position itself.
@@ -182,7 +253,7 @@ class Annotations:
self.__timestamp = None # last parse action timestamp
self.__annot = {}
self.__re = re.compile(
'^"[^"]+"\s+(\d+)\s+(\d+)\s+(\d+)\s+"[^"]+"\s+(\d+)\s+(\d+)\s+(\d+)$')
'^"[^"]*"\s+(\d+)\s+(\d+)\s+(\d+)\s+"[^"]*"\s+(\d+)\s+(\d+)\s+(\d+)$')
def __parse(self, fname):
try:
@@ -210,7 +281,9 @@ class Annotations:
lineno += 1
if (line == ""): raise malformed_annotations(lineno)
type = string.join(type, "\n")
self.__annot[(line1, col1), (line2, col2)] = type
key = ((line1, col1), (line2, col2))
if not self.__annot.has_key(key):
self.__annot[key] = type
line = f.readline() # position line
f.close()
self.__filename = fname
@@ -285,7 +358,7 @@ def parseOCamlAnnot():
EOF
fun OCamlPrintType(current_mode)
fun! OCamlPrintType(current_mode)
if (a:current_mode == "visual")
python printOCamlType("visual")
else
@@ -293,9 +366,15 @@ fun OCamlPrintType(current_mode)
endif
endfun
fun OCamlParseAnnot()
fun! OCamlParseAnnot()
python parseOCamlAnnot()
endfun
map <F3> :call OCamlPrintType("normal")<RETURN>
vmap <F3> :call OCamlPrintType("visual")<RETURN>
map <LocalLeader>t :call OCamlPrintType("normal")<RETURN>
vmap <LocalLeader>t :call OCamlPrintType("visual")<RETURN>
let &cpoptions=s:cposet
unlet s:cposet
" vim:sw=2

View File

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

View File

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

View File

@@ -1,18 +1,12 @@
" Vim filetype plugin
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
" Info: $Id$
" URL: http://vim-ruby.sourceforge.net
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
"
" Original matchit support thanks to Ned Konz. See his ftplugin/ruby.vim at
" Original matchit support thanks to Ned Konz. See his ftplugin/ruby.vim at
" http://bike-nomad.com/vim/ruby.vim.
" ----------------------------------------------------------------------------
@@ -32,18 +26,18 @@ if exists("loaded_matchit") && !exists("b:match_words")
" TODO: improve optional do loops
let b:match_words =
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
\ '\|' .
\ '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
\ '\|' .
\ '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' .
\ '\)' .
\ ':' .
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
\ '\|' .
\ '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
\ '\|' .
\ '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
\ '\)' .
\ ':' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<end\>'
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<end\>'
let b:match_skip =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
@@ -66,12 +60,13 @@ setlocal commentstring=#\ %s
if !exists("s:rubypath")
if executable("ruby")
let s:code = "print ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"
if &shellxquote == "'"
let s:rubypath = system('ruby -e "puts (begin; require %q{rubygems}; Gem.all_load_paths; rescue LoadError; []; end + $:).join(%q{,})"')
let s:rubypath = system('ruby -e "' . s:code . '"')
else
let s:rubypath = system("ruby -e 'puts (begin; require %q{rubygems}; Gem.all_load_paths; rescue LoadError; []; end + $:).join(%q{,})'")
let s:rubypath = system("ruby -e '" . s:code . "'")
endif
let s:rubypath = substitute(s:rubypath,',.$',',,','')
let s:rubypath = '.,' . substitute(s:rubypath, '\%(^\|,\)\.\%(,\|$\)', ',,', '')
else
" If we can't call ruby to get its path, just default to using the
" current directory and the directory of the current file.
@@ -83,7 +78,7 @@ let &l:path = s:rubypath
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
\ "All Files (*.*)\t*.*\n"
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< "
@@ -97,7 +92,7 @@ unlet s:cpo_save
"
" 1. Look for the latest "matchit" plugin at
"
" http://www.vim.org/scripts/script.php?script_id=39
" http://www.vim.org/scripts/script.php?script_id=39
"
" It is also packaged with Vim, in the $VIMRUNTIME/macros directory.
"
@@ -108,16 +103,16 @@ unlet s:cpo_save
" 4. Ensure this file (ftplugin/ruby.vim) is installed.
"
" 5. Ensure you have this line in your $HOME/.vimrc:
" filetype plugin on
" filetype plugin on
"
" 6. Restart Vim and create the matchit documentation:
"
" :helptags ~/.vim/doc
" :helptags ~/.vim/doc
"
" Now you can do ":help matchit", and you should be able to use "%" on Ruby
" keywords. Try ":echo b:match_words" to be sure.
" keywords. Try ":echo b:match_words" to be sure.
"
" Thanks to Mark J. Reed for the instructions. See ":help vimrc" for the
" Thanks to Mark J. Reed for the instructions. See ":help vimrc" for the
" locations of plugin directories, etc., as there are several options, and it
" differs on Windows. Email gsinclair@soyabean.com.au if you need help.
"

View File

@@ -32,6 +32,15 @@ if exists("loaded_matchit")
\ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>'
endif
"
" For Omni completion, by Mikolaj Machowski.
if exists('&ofu')
setlocal ofu=xmlcomplete#CompleteTags
endif
command! -nargs=+ XMLns call xmlcomplete#CreateConnection(<f-args>)
command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
" Change the :browse e filter to primarily show xml-related files.
if has("gui_win32")
let b:browsefilter="XML Files (*.xml)\t*.xml\n" .

22
runtime/indent/d.vim Normal file
View File

@@ -0,0 +1,22 @@
" Vim indent file for the D programming language (version 0.137).
"
" Language: D
" Maintainer: Jason Mills<jmills@cs.mun.ca>
" Last Change: 2005 Nov 22
" Version: 0.1
"
" Please email me with bugs, comments, and suggestion. Put vim in the subject
" to ensure the email will not be marked has spam.
"
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" D indenting is a lot like the built-in C indenting.
setlocal cindent
" vim: ts=8 noet

View File

@@ -1,15 +1,9 @@
" Vim indent file
" Language: Ruby
" Language: Ruby
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org/
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
" Only load this indent file when no other was loaded.

View File

@@ -1,16 +1,16 @@
" Vim indent file
" Language: OCaml
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at>
" URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
" Last Change: 2004 Apr 11 - Added indent for 'class' (JY)
" 2003 Sep 16 - Added 'private' as keyword (JY)
" 2003 Mar 29 - Fixed bug with 'if' and 'else' (JY)
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/indent/ocaml.vim
" Last Change: 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
" 2005 Apr 11 - Fixed an indentation bug concerning "let" (MM)
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
finish
endif
let b:did_indent = 1
@@ -22,14 +22,16 @@ setlocal nosmartindent
setlocal textwidth=80
" Comment formatting
if (has("comments"))
setlocal comments=sr:(*,mb:*,ex:*)
setlocal fo=cqort
if !exists("no_ocaml_comments")
if (has("comments"))
setlocal comments=sr:(*,mb:*,ex:*)
setlocal fo=cqort
endif
endif
" Only define the function once.
if exists("*GetOCamlIndent")
finish
finish
endif
" Define some patterns:
@@ -42,254 +44,209 @@ let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object
let s:type = '^\s*\%(class\|let\|type\)\>.*='
" Skipping pattern, for comments
function s:SkipPattern(lnum, pat)
let def = prevnonblank(a:lnum - 1)
while def > 0 && getline(def) =~ a:pat
let def = prevnonblank(def - 1)
endwhile
return def
function s:GetLineWithoutFullComment(lnum)
let lnum = prevnonblank(a:lnum - 1)
let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '')
while lline =~ '^\s*$' && lnum > 0
let lnum = prevnonblank(lnum - 1)
let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '')
endwhile
return lnum
endfunction
" Indent for ';;' to match multiple 'let'
function s:GetInd(lnum, pat, lim)
let llet = search(a:pat, 'bW')
let old = indent(a:lnum)
while llet > 0
let old = indent(llet)
let nb = s:SkipPattern(llet, '^\s*(\*.*\*)\s*$')
if getline(nb) =~ a:lim
return old
endif
let llet = search(a:pat, 'bW')
endwhile
return old
let llet = search(a:pat, 'bW')
let old = indent(a:lnum)
while llet > 0
let old = indent(llet)
let nb = s:GetLineWithoutFullComment(llet)
if getline(nb) =~ a:lim
return old
endif
let llet = search(a:pat, 'bW')
endwhile
return old
endfunction
" Indent pairs
function s:FindPair(pstart, pmid, pend)
call search(a:pend, 'bW')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
call search(a:pend, 'bW')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
endfunction
" Indent 'let'
function s:FindLet(pstart, pmid, pend)
call search(a:pend, 'bW')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ s:beflet'))
call search(a:pend, 'bW')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ s:beflet'))
endfunction
function GetOCamlIndent()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" Find a non-commented line above the current line.
let lnum = s:GetLineWithoutFullComment(v:lnum)
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
let ind = indent(lnum)
let lline = getline(lnum)
let ind = indent(lnum)
let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '')
" Return double 'shiftwidth' after lines matching:
if lline =~ '^\s*|.*->\s*$'
return ind + &sw + &sw
endif
" Return double 'shiftwidth' after lines matching:
if lline =~ '^\s*|.*->\s*$'
return ind + &sw + &sw
endif
let line = getline(v:lnum)
let line = getline(v:lnum)
" Indent if current line begins with 'end':
if line =~ '^\s*end\>'
return s:FindPair(s:module, '','\<end\>')
" Indent if current line begins with 'end':
if line =~ '^\s*end\>'
return s:FindPair(s:module, '','\<end\>')
" Indent if current line begins with 'done' for 'do':
elseif line =~ '^\s*done\>'
return s:FindPair('\<do\>', '','\<done\>')
" Indent if current line begins with 'done' for 'do':
elseif line =~ '^\s*done\>'
return s:FindPair('\<do\>', '','\<done\>')
" Indent if current line begins with '}' or '>}':
elseif line =~ '^\s*\(\|>\)}'
return s:FindPair('{', '','}')
" Indent if current line begins with '}' or '>}':
elseif line =~ '^\s*\(\|>\)}'
return s:FindPair('{', '','}')
" Indent if current line begins with ']', '|]' or '>]':
elseif line =~ '^\s*\(\||\|>\)\]'
return s:FindPair('\[', '','\]')
" Indent if current line begins with ']', '|]' or '>]':
elseif line =~ '^\s*\(\||\|>\)\]'
return s:FindPair('\[', '','\]')
" Indent if current line begins with ')':
elseif line =~ '^\s*)'
return s:FindPair('(', '',')')
" Indent if current line begins with ')':
elseif line =~ '^\s*)'
return s:FindPair('(', '',')')
" Indent if current line begins with 'let':
elseif line =~ '^\s*let\>'
if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet
return s:FindLet(s:type, '','\<let\s*$')
else return ind
endif
" Indent if current line begins with 'let':
elseif line =~ '^\s*let\>'
if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet
return s:FindLet(s:type, '','\<let\s*$')
endif
" Indent if current line begins with 'class' or 'type':
elseif line =~ '^\s*\(class\|type\)\>'
if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim
return s:FindLet(s:type, '','\<\(class\|type\)\s*$')
else return ind
endif
" Indent if current line begins with 'class' or 'type':
elseif line =~ '^\s*\(class\|type\)\>'
if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim
return s:FindLet(s:type, '','\<\(class\|type\)\s*$')
endif
" Indent for pattern matching:
elseif line =~ '^\s*|'
if lline !~ '^\s*\(|[^\]]\|\(match\|type\|with\)\>\)\|\<\(function\|parser\|private\|with\)\s*$'
call search('|', 'bW')
return indent(searchpair('^\s*\(match\|type\)\>\|\<\(function\|parser\|private\|with\)\s*$', '', '^\s*|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") !~ "^\\s*|.*->"'))
else return ind
endif
" Indent for pattern matching:
elseif line =~ '^\s*|'
if lline !~ '^\s*\(|[^\]]\|\(match\|type\|with\)\>\)\|\<\(function\|parser\|private\|with\)\s*$'
call search('|', 'bW')
return indent(searchpair('^\s*\(match\|type\)\>\|\<\(function\|parser\|private\|with\)\s*$', '', '^\s*|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") !~ "^\\s*|.*->"'))
endif
" Indent if current line begins with ';;':
elseif line =~ '^\s*;;'
if lline !~ ';;\s*$'
return s:GetInd(v:lnum, s:letpat, s:letlim)
else return ind
endif
" Indent if current line begins with ';;':
elseif line =~ '^\s*;;'
if lline !~ ';;\s*$'
return s:GetInd(v:lnum, s:letpat, s:letlim)
endif
" Indent if current line begins with 'in':
elseif line =~ '^\s*in\>'
if lline !~ '^\s*\(let\|and\)\>'
return s:FindPair('\<let\>', '', '\<in\>')
else return ind
endif
" Indent if current line begins with 'in':
elseif line =~ '^\s*in\>'
if lline !~ '^\s*\(let\|and\)\>'
return s:FindPair('\<let\>', '', '\<in\>')
endif
" Indent if current line begins with 'else':
elseif line =~ '^\s*else\>'
if lline !~ '^\s*\(if\|then\)\>'
return s:FindPair('\<if\>', '', '\<else\>')
else return ind
endif
" Indent if current line begins with 'else':
elseif line =~ '^\s*else\>'
if lline !~ '^\s*\(if\|then\)\>'
return s:FindPair('\<if\>', '', '\<else\>')
endif
" Indent if current line begins with 'then':
elseif line =~ '^\s*then\>'
if lline !~ '^\s*\(if\|else\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
else return ind
endif
" Indent if current line begins with 'then':
elseif line =~ '^\s*then\>'
if lline !~ '^\s*\(if\|else\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
endif
" Indent if current line begins with 'and':
elseif line =~ '^\s*and\>'
if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$'
return ind - &sw
else return ind
endif
" Indent if current line begins with 'and':
elseif line =~ '^\s*and\>'
if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$'
return ind - &sw
endif
" Indent if current line begins with 'with':
elseif line =~ '^\s*with\>'
if lline !~ '^\s*\(match\|try\)\>'
return s:FindPair('\<\%(match\|try\)\>', '','\<with\>')
else return ind
endif
" Indent if current line begins with 'with':
elseif line =~ '^\s*with\>'
if lline !~ '^\s*\(match\|try\)\>'
return s:FindPair('\<\%(match\|try\)\>', '','\<with\>')
endif
" Indent if current line begins with 'exception':
elseif line =~ '^\s*exception\>'
if lline !~ s:lim . '\|' . s:letlim
return indent(search('^\s*\(\(external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
else return ind
endif
" Indent if current line begins with 'exception', 'external', 'include' or
" 'open':
elseif line =~ '^\s*\(exception\|external\|include\|open\)\>'
if lline !~ s:lim . '\|' . s:letlim
call search(line)
return indent(search('^\s*\(\(exception\|external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
endif
" Indent if current line begins with 'external':
elseif line =~ '^\s*external\>'
if lline !~ s:lim . '\|' . s:letlim
return indent(search('^\s*\(\(exception\|external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
else return ind
endif
" Indent if current line begins with 'val':
elseif line =~ '^\s*val\>'
if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim
return indent(search('^\s*\(\(exception\|include\|initializer\|method\|open\|type\|val\)\>\|external\>.*:\)', 'bW'))
endif
" Indent if current line begins with 'include':
elseif line =~ '^\s*include\>'
if lline !~ s:lim . '\|' . s:letlim
return indent(search('^\s*\(\(exception\|external\|open\|type\)\>\|val\>.*:\)', 'bW'))
else return ind
endif
" Indent if current line begins with 'constraint', 'inherit', 'initializer'
" or 'method':
elseif line =~ '^\s*\(constraint\|inherit\|initializer\|method\)\>'
if lline !~ s:obj
return indent(search('\<\(object\|object\s*(.*)\)\s*$', 'bW')) + &sw
endif
" Indent if current line begins with 'open':
elseif line =~ '^\s*open\>'
if lline !~ s:lim . '\|' . s:letlim
return indent(search('^\s*\(\(exception\|external\|include\|type\)\>\|val\>.*:\)', 'bW'))
else return ind
endif
endif
" Indent if current line begins with 'val':
elseif line =~ '^\s*val\>'
if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim
return indent(search('^\s*\(\(exception\|include\|initializer\|method\|open\|type\|val\)\>\|external\>.*:\)', 'bW'))
else return ind
endif
" Add a 'shiftwidth' after lines ending with:
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|parser\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
let ind = ind + &sw
" Indent if current line begins with 'constraint':
elseif line =~ '^\s*constraint\>'
if lline !~ s:obj
return indent(search('^\s*\(inherit\|initializer\|method\|val\)\>', 'bW'))
else return ind
endif
" Back to normal indent after lines ending with ';;':
elseif lline =~ ';;\s*$' && lline !~ '^\s*;;'
let ind = s:GetInd(v:lnum, s:letpat, s:letlim)
" Indent if current line begins with 'inherit':
elseif line =~ '^\s*inherit\>'
if lline !~ s:obj
return indent(search('^\s*\(constraint\|initializer\|method\|val\)\>', 'bW'))
else return ind
endif
" Back to normal indent after lines ending with 'end':
elseif lline =~ '\<end\s*$'
let ind = s:FindPair(s:module, '','\<end\>')
" Indent if current line begins with 'inherit':
elseif line =~ '^\s*initializer\>'
if lline !~ s:obj
return indent(search('^\s*\(constraint\|inherit\|method\|val\)\>', 'bW'))
else return ind
endif
" Back to normal indent after lines ending with 'in':
elseif lline =~ '\<in\s*$' && lline !~ '^\s*in\>'
let ind = s:FindPair('\<let\>', '', '\<in\>')
" Indent if current line begins with 'method':
elseif line =~ '^\s*method\>'
if lline !~ s:obj
return indent(search('^\s*\(\(constraint\|inherit\|initializer\|val\)\>\|method\>.*\(:\|=\)\)', 'bW'))
else return ind
endif
" Back to normal indent after lines ending with 'done':
elseif lline =~ '\<done\s*$'
let ind = s:FindPair('\<do\>', '','\<done\>')
endif
" Back to normal indent after lines ending with '}' or '>}':
elseif lline =~ '\(\|>\)}\s*$'
let ind = s:FindPair('{', '','}')
" Add a 'shiftwidth' after lines ending with:
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|parser\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
let ind = ind + &sw
" Back to normal indent after lines ending with ']', '|]' or '>]':
elseif lline =~ '\(\||\|>\)\]\s*$'
let ind = s:FindPair('\[', '','\]')
" Back to normal indent after lines ending with ';;':
elseif lline =~ ';;\s*$' && lline !~ '^\s*;;'
let ind = s:GetInd(v:lnum, s:letpat, s:letlim)
" Back to normal indent after comments:
elseif lline =~ '\*)\s*$'
call search('\*)', 'bW')
let ind = indent(searchpair('(\*', '', '\*)', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'))
" Back to normal indent after lines ending with 'end':
elseif lline =~ '\<end\s*$'
let ind = s:FindPair(s:module, '','\<end\>')
" Back to normal indent after lines ending with ')':
elseif lline =~ ')\s*$'
let ind = s:FindPair('(', '',')')
" Back to normal indent after lines ending with 'in':
elseif lline =~ '\<in\s*$' && lline !~ '^\s*in\>'
let ind = s:FindPair('\<let\>', '', '\<in\>')
" If this is a multiline comment then align '*':
elseif lline =~ '^\s*(\*' && line =~ '^\s*\*'
let ind = ind + 1
" Back to normal indent after lines ending with 'done':
elseif lline =~ '\<done\s*$'
let ind = s:FindPair('\<do\>', '','\<done\>')
endif
" Back to normal indent after lines ending with '}' or '>}':
elseif lline =~ '\(\|>\)}\s*$'
let ind = s:FindPair('{', '','}')
" Subtract a 'shiftwidth' after lines matching 'match ... with parser':
if lline =~ '\<match\>.*\<with\>\s*\<parser\s*$'
let ind = ind - &sw
endif
" Back to normal indent after lines ending with ']', '|]' or '>]':
elseif lline =~ '\(\||\|>\)\]\s*$'
let ind = s:FindPair('\[', '','\]')
" Back to normal indent after comments:
elseif lline =~ '\*)\s*$'
call search('\*)', 'bW')
let ind = indent(searchpair('(\*', '', '\*)', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'))
" Back to normal indent after lines ending with ')':
elseif lline =~ ')\s*$'
let ind = s:FindPair('(', '',')')
endif
" Subtract a 'shiftwidth' after lines matching 'match ... with parser':
if lline =~ '^\s*match\>.*\<with\>\s*\<parser\s*$'
let ind = ind - &sw
endif
return ind
return ind
endfunction

View File

@@ -2,27 +2,31 @@
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Last Change: 2005 September 22th
" Version: 1.181
"
" The change log and all the comments have been removed from this file.
"
" For a complete change log and fully commented code, download the script on
" 2072productions.com at the URI provided above.
" 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.
"
" For a complete change log and fully commented code, download the script on
" 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 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
" tags not at col 1 you'll have to indent your file 2 times (This script
" will automatically put HereDoc end tags at col 1).
"
"
" NOTE: If you are editing file in Unix file format and that (by accident)
" there are '\r' before new lines, this script won't be able to proceed
" correctly and will make many mistakes because it won't be able to match
@@ -34,31 +38,40 @@
" or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
" silently remove them when VIM load this script (at each bufread).
" Options: PHP_autoformatcomment = 0 to not enable autoformating of comment by
" default, if set to 0, this script will let the 'formatoptions' setting intact.
"
" Options: PHP_default_indenting = # of sw (default is 0), # of sw will be
" added to the indent of each line of PHP code.
" added to the indent of each line of PHP code.
"
" Options: PHP_removeCRwhenUnix = 1 to make the script automatically remove CR
" at end of lines (by default this option is unset), NOTE that you
" MUST remove CR when the fileformat is UNIX else the indentation
" won't be correct...
" at end of lines (by default this option is unset), NOTE that you
" MUST remove CR when the fileformat is UNIX else the indentation
" won't be correct...
"
" Options: PHP_BracesAtCodeLevel = 1 to indent the '{' and '}' at the same
" level than the code they contain.
" Exemple:
" Instead of:
" if ($foo)
" {
" foo();
" }
"
" You will write:
" if ($foo)
" level than the code they contain.
" Exemple:
" Instead of:
" if ($foo)
" {
" foo();
" foo();
" }
"
" NOTE: The script will be a bit slower if you use this option because
" some optimizations won't be available.
" You will write:
" if ($foo)
" {
" foo();
" }
"
" NOTE: The script will be a bit slower if you use this option because
" some optimizations won't be available.
if exists("b:did_indent")
@@ -82,6 +95,11 @@ else
let b:PHP_BracesAtCodeLevel = 0
endif
if exists("PHP_autoformatcomment")
let b:PHP_autoformatcomment = PHP_autoformatcomment
else
let b:PHP_autoformatcomment = 1
endif
let b:PHP_lastindented = 0
let b:PHP_indentbeforelast = 0
@@ -119,11 +137,17 @@ endif
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
"setlocal debug=msg " XXX
" setlocal debug=msg " XXX
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
@@ -141,7 +165,7 @@ function! GetLastRealCodeLNum(startline) " {{{
if lastline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let lastline = getline(lnum)
if lastline =~ '^\s*/\*'
@@ -184,6 +208,17 @@ function! GetLastRealCodeLNum(startline) " {{{
return lnum
endfunction " }}}
function! Skippmatch2()
let line = getline(".")
if line =~ '\%(".*\)\@<=/\*\%(.*"\)\@=' || line =~ '\%(//.*\)\@<=/\*'
return 1
else
return 0
endif
endfun
function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
if synname == "Delimiter" || synname == "phpParent" || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment
@@ -245,7 +280,7 @@ function! IslinePHP (lnum, tofind) " {{{
let cline = getline(a:lnum)
if a:tofind==""
let tofind = "^\\s*[\"']*\s*\\zs\\S"
let tofind = "^\\s*[\"']*\\s*\\zs\\S"
else
let tofind = a:tofind
endif
@@ -264,23 +299,36 @@ 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\>\|[|&]\)'
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
au BufWinEnter,Syntax *.php,*.php3,*.php4,*.php5 call ResetOptions()
au BufWinEnter,Syntax *.php,*.php3,*.php4,*.php5 call ResetOptions()
let s:autorestoptions = 1
endif
function! ResetOptions()
if ! b:optionsset
setlocal formatoptions=qroc
if b:PHP_autoformatcomment
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
setlocal formatoptions-=t
setlocal formatoptions+=q
setlocal formatoptions+=r
setlocal formatoptions+=o
setlocal formatoptions+=w
setlocal formatoptions+=c
setlocal formatoptions+=b
endif
let b:optionsset = 1
endif
endfunc
function! GetPhpIndent()
let b:GetLastRealCodeLNum_ADD = 0
let UserIsEditing=0
if b:PHP_oldchangetick != b:changedtick
let b:PHP_oldchangetick = b:changedtick
@@ -326,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"
@@ -376,7 +427,7 @@ function! GetPhpIndent()
if cline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
@@ -390,6 +441,7 @@ function! GetPhpIndent()
elseif cline =~? '<script\>'
let b:InPHPcode_and_script = 1
let b:GetLastRealCodeLNum_ADD = v:lnum
endif
endif
endif
@@ -418,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
@@ -447,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 " }}}
@@ -469,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
@@ -493,7 +548,7 @@ function! GetPhpIndent()
if cline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting

View File

@@ -1,16 +1,10 @@
" Vim indent file
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
" Developer: Nikolai Weibull <source at pcppopper.org>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org/
" Anon CVS: See above site
" Licence: GPL (http://www.gnu.org)
" Disclaimer:
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
" Developer: Nikolai Weibull <source at pcppopper.org>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
" 0. Initialization {{{1
@@ -42,17 +36,13 @@ set cpo&vim
let s:syng_strcom = '\<ruby\%(String\|StringDelimiter\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Escape\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings or comments.
let s:syng_strcom2 = '\<ruby\%(String' .
\ '\|Interpolation\|NoInterpolation\|Escape\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
let s:syng_string =
\ '\<ruby\%(String\|Interpolation\|NoInterpolation\|Escape\)\>'
\ '\<ruby\%(String\|StringDelimiter\|Interpolation\|NoInterpolation\|Escape\)\>'
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\'\<ruby\%(String\|Interpolation\|NoInterpolation\|Escape\|Documentation\)\>'
\'\<ruby\%(String\|StringDelimiter\|Interpolation\|NoInterpolation\|Escape\|Documentation\)\>'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
@@ -109,11 +99,6 @@ function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_strcom
endfunction
" Check if the character at lnum:col is inside a string or comment.
function s:IsInStringOrComment2(lnum, col)
return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_strcom2
endfunction
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_string
@@ -134,14 +119,14 @@ function s:PrevNonBlankNonString(lnum)
let line = getline(lnum)
if line =~ '^=begin$'
if in_block
let in_block = 0
let in_block = 0
else
break
break
endif
elseif !in_block && line =~ '^=end$'
let in_block = 1
elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
\ && s:IsInStringOrComment(lnum, strlen(line)))
\ && s:IsInStringOrComment(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
@@ -160,7 +145,7 @@ function s:GetMSL(lnum)
let line = getline(lnum)
let col = match(line, s:continuation_regex2) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
\ || s:IsInString(lnum, strlen(line))
let msl = lnum
else
break
@@ -181,9 +166,9 @@ function s:LineHasOpeningBrackets(lnum)
if !s:IsInStringOrComment(a:lnum, pos + 1)
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
let open_{idx - 1} = open_{idx - 1} - 1
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
@@ -246,13 +231,13 @@ function GetRubyIndent()
if s:Match(v:lnum, s:ruby_deindent_keywords)
call cursor(v:lnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
\ s:end_skip_expr) > 0
let line = getline('.')
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
let ind = virtcol('.') - 1
else
let ind = indent('.')
let ind = indent('.')
endif
endif
return ind
@@ -302,12 +287,12 @@ function GetRubyIndent()
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
let ind = indent(msl)
end
return ind
endif

File diff suppressed because it is too large Load Diff

View File

@@ -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.

File diff suppressed because it is too large Load Diff

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

View File

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

View File

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

View File

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

View File

@@ -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`)"

View File

@@ -1,6 +1,6 @@
" Menu Translations: Swedish
" Maintainer: Johan Svedberg <johan@svedberg.com>
" Last Change: 2005 April 23
" Last Change: 2005 Oct 09
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -22,8 +22,8 @@ menutrans &How-to\ links &Hur-g
menutrans &Find\.\.\. &S<EFBFBD>k\.\.\.
menutrans &Credits &Tack
menutrans Co&pying &Kopieringsr<EFBFBD>ttigheter
menutrans &Sponsor/Register &Sponsra/Registrering
menutrans O&rphans F&<EFBFBD>r<EFBFBD>lderl<EFBFBD>sa
menutrans &Sponsor/Register &Sponsra/Registrera
menutrans O&rphans &F<EFBFBD>r<EFBFBD>ldral<EFBFBD>sa
menutrans &Version &Version
menutrans &About &Om
@@ -76,7 +76,7 @@ menutrans Insert\ mode Infogningsl
menutrans Block\ and\ Insert Block\ och\ infogning
menutrans Always Alltid
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! V<EFBFBD>xla\ infogningsl<EFBFBD>ge<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! V<EFBFBD>xla\ Vi-kompatibelitet<Tab>:set\ cp!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! V<EFBFBD>xla\ Vi-kompabilitet<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. S<EFBFBD>kv<EFBFBD>g\.\.\.
menutrans Ta&g\ Files\.\.\. Taggfiler\.\.\.
menutrans Toggle\ &Toolbar V<EFBFBD>xla\ verktygsrad
@@ -93,8 +93,8 @@ menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! V
menutrans Toggle\ &expand-tab<Tab>:set\ et! V<EFBFBD>xla\ tab-expandering<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! V<EFBFBD>xla\ auto-indentering<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! V<EFBFBD>xla\ C-indentering<Tab>:set\ cin!
menutrans &Shiftwidth &Shiftbredd
menutrans Soft\ &Tabstop Mjuka\ &Tabbstopp
menutrans &Shiftwidth Shiftbredd
menutrans Soft &Tabstop Mjuk tab-stopp
menutrans Te&xt\ Width\.\.\. Textbredd\.\.\.
menutrans &File\ Format\.\.\. Filformat\.\.\.
@@ -127,7 +127,7 @@ menutrans &Close\ all\ folds<Tab>zM St
menutrans O&pen\ more\ folds<Tab>zr <09>ppna\ mer\ veck<Tab>zr
menutrans &Open\ all\ folds<Tab>zR <09>ppna\ mer\ veck<Tab>zR
menutrans Fold\ Met&hod Veckmetod
menutrans M&anual Manuell
menutrans M&anual Manual
menutrans I&ndent Indentering
menutrans E&xpression Uttryck
menutrans S&yntax Syntax
@@ -221,17 +221,15 @@ if has("toolbar")
endif
" Syntax menu
menutrans &Syntax &Syntax
menutrans Set\ '&syntax'\ only S<EFBFBD>tt\ bara\ 'syntax'
menutrans Set\ '&filetype'\ too S<EFBFBD>tt\ 'filetype'\ ocks<EFBFBD>
menutrans &Off &Av
menutrans &Manual &Manual
menutrans A&utomatic Automatiskt
menutrans &Syntax &Syntax
menutrans &Show\ filetypes\ in\ menu &Visa\ filtyper\ i\ meny
menutrans &Off &Av
menutrans &Manual &Manuellt
menutrans A&utomatic Automatiskt
menutrans on/off\ for\ &This\ file Av/P<EFBFBD>\ f<EFBFBD>r\ aktuell\ fil
menutrans Co&lor\ test F<EFBFBD>rgtest
menutrans &Highlight\ test Framh<EFBFBD>vningstest
menutrans &Convert\ to\ HTML Konvertera\ till\ &HTML
menutrans &Show\ individual\ choices Visa\ individuella\ val
menutrans Co&lor\ test F<EFBFBD>rgtest
menutrans &Highlight\ test Framh<EFBFBD>vningstest
menutrans &Convert\ to\ HTML Konvertera\ till\ &HTML
" dialog texts
let menutrans_no_file = "[Ingen fil]"

View File

@@ -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

View 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

View File

@@ -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

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Aug 16
" Last Change: 2005 Oct 01
" 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.
@@ -902,7 +902,7 @@ if has("spell")
endif
let curcol = col('.')
let w = spellbadword()
let [w, a] = spellbadword()
if col('.') > curcol " don't use word after the cursor
let w = ''
call cursor(0, curcol) " put the cursor back where it was

View File

@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2004 Jul 27
" Last change: 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

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