Compare commits

...

127 Commits

Author SHA1 Message Date
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
Bram Moolenaar
4463f296d0 updated for version 7.0150 2005-09-25 22:20:24 +00:00
Bram Moolenaar
1e01546026 updated for version 7.0150 2005-09-25 22:16:38 +00:00
Bram Moolenaar
bfd8fc0529 updated for version 7.0149 2005-09-20 23:22:24 +00:00
Bram Moolenaar
60a795aad6 updated for version 7.0148 2005-09-16 21:55:43 +00:00
Bram Moolenaar
6b730e111c updated for version 7.0148 2005-09-16 21:47:57 +00:00
Bram Moolenaar
58071af793 updated for version 7.0147 2005-09-14 21:41:18 +00:00
Bram Moolenaar
ab194816fe updated for version 7.0147 2005-09-14 21:40:12 +00:00
Bram Moolenaar
cd292719e0 updated for version 7.0147 2005-09-14 21:33:59 +00:00
Bram Moolenaar
4c903f9891 updated for version 7.0147 2005-09-14 21:32:32 +00:00
Bram Moolenaar
e6facf9490 updated for version 7.0146 2005-09-13 21:22:27 +00:00
Bram Moolenaar
f75a963eea updated for version 7.0146 2005-09-13 21:20:47 +00:00
Bram Moolenaar
5e0d6678ad updated for version 7.0146 2005-09-13 21:09:24 +00:00
Bram Moolenaar
6efa2b30f4 updated for version 7.0145 2005-09-10 19:26:26 +00:00
Bram Moolenaar
dcca87b394 updated for version 7.0145 2005-09-10 19:24:59 +00:00
Bram Moolenaar
578b49e4f7 updated for version 7.0145 2005-09-10 19:22:57 +00:00
Bram Moolenaar
32330d3c67 updated for version 7.0145 2005-09-10 19:16:33 +00:00
Bram Moolenaar
d43b6cf7de updated for version 7.0144 2005-09-09 19:53:42 +00:00
Bram Moolenaar
a4a0838802 updated for version 7.0144 2005-09-09 19:52:02 +00:00
Bram Moolenaar
e7eb9df59a updated for version 7.0144 2005-09-09 19:49:30 +00:00
Bram Moolenaar
a5373faa17 updated for version 7.0144 2005-09-09 19:47:12 +00:00
Bram Moolenaar
7ca3043e1e updated for version 7.0144 2005-09-09 19:44:31 +00:00
Bram Moolenaar
7bb4c6e3f6 updated for version 7.0143 2005-09-07 21:22:27 +00:00
Bram Moolenaar
caa0fcfa6b updated for version 7.0143 2005-09-07 21:21:14 +00:00
Bram Moolenaar
4615234489 updated for version 7.0143 2005-09-07 21:18:43 +00:00
Bram Moolenaar
ffb8ab0402 updated for version 7.0143 2005-09-07 21:15:32 +00:00
Bram Moolenaar
d1231f991a updated for version 7.0143 2005-09-07 21:12:33 +00:00
Bram Moolenaar
cafda4f893 updated for version 7.0142 2005-09-06 19:25:11 +00:00
Bram Moolenaar
4440382f3c updated for version 7.0142 2005-09-06 19:13:27 +00:00
Bram Moolenaar
dd2436f352 updated for version 7.0141 2005-09-05 22:14:46 +00:00
Bram Moolenaar
92d640fad1 updated for version 7.0141 2005-09-05 22:11:52 +00:00
Bram Moolenaar
8b96d64cb5 updated for version 7.0141 2005-09-05 22:05:30 +00:00
Bram Moolenaar
e344bead3e updated for version 7.0140 2005-09-01 20:46:49 +00:00
Bram Moolenaar
da2303d96b updated for version 7.0139 2005-08-30 21:55:26 +00:00
Bram Moolenaar
ac6e65f88d updated for version 7.0138 2005-08-29 22:25:38 +00:00
Bram Moolenaar
81f1ecbc4d updated for version 7.0137 2005-08-25 21:27:31 +00:00
Bram Moolenaar
955295684b updated for version 7.0137 2005-08-25 21:21:38 +00:00
Bram Moolenaar
6e7c7f3a19 updated for version 7.0136 2005-08-24 22:16:11 +00:00
Bram Moolenaar
5bcb2eba3d updated for version 7.0136 2005-08-24 22:09:56 +00:00
Bram Moolenaar
6de6853ce3 updated for version 7.0136 2005-08-24 22:08:48 +00:00
Bram Moolenaar
a2036d2b48 updated for version 7.0135 2005-08-23 21:04:20 +00:00
Bram Moolenaar
6f16eb817b updated for version 7.0135 2005-08-23 21:02:42 +00:00
Bram Moolenaar
7862282f2e updated for version 7.0135 2005-08-23 21:00:13 +00:00
Bram Moolenaar
a6c840d7d4 updated for version 7.0134 2005-08-22 22:59:46 +00:00
Bram Moolenaar
e52325c254 updated for version 7.0134 2005-08-22 22:54:29 +00:00
Bram Moolenaar
d52d9741ee updated for version 7.0133 2005-08-21 22:20:28 +00:00
Bram Moolenaar
90915b5d48 updated for version 7.0133 2005-08-21 22:17:52 +00:00
Bram Moolenaar
50c8195012 updated for version 7.0133 2005-08-21 22:14:09 +00:00
Bram Moolenaar
cee5560a4b updated for version 7.0133 2005-08-21 22:12:59 +00:00
Bram Moolenaar
d12a132603 updated for version 7.0133 2005-08-21 22:08:24 +00:00
Bram Moolenaar
8aff23a13e updated for version 7.0132 2005-08-19 20:40:30 +00:00
Bram Moolenaar
5195e45609 updated for version 7.0132 2005-08-19 20:32:47 +00:00
Bram Moolenaar
5b8d8fdb52 updated for version 7.0131 2005-08-16 23:01:50 +00:00
Bram Moolenaar
ae5bce1c12 updated for version 7.0130 2005-08-15 21:41:48 +00:00
Bram Moolenaar
90cfdbe040 updated for version 7.0129 2005-08-12 19:59:19 +00:00
Bram Moolenaar
e5b8e3d3c6 updated for version 7.0129 2005-08-12 19:48:49 +00:00
Bram Moolenaar
8c45cdf4cf updated for version 7.0128 2005-08-11 20:11:38 +00:00
Bram Moolenaar
488c6512d9 updated for version 7.0128 2005-08-11 20:09:58 +00:00
Bram Moolenaar
8b1e71fa25 updated for version 7.0128 2005-08-11 20:00:37 +00:00
Bram Moolenaar
8b59de9f2f updated for version 7.0128 2005-08-11 19:59:29 +00:00
Bram Moolenaar
0fa313a718 updated for version 7.0127 2005-08-10 21:07:57 +00:00
Bram Moolenaar
c388fbf9d9 updated for version 7.0126 2005-08-10 08:16:23 +00:00
Bram Moolenaar
670f9312cc updated for version 7.0126 2005-08-10 08:15:00 +00:00
Bram Moolenaar
aba2f487ff updated for version 7.0126 2005-08-10 07:57:38 +00:00
Bram Moolenaar
4f574c8ab1 updated for version 7.0126 2005-08-10 07:56:18 +00:00
Bram Moolenaar
329cc7e429 updated for version 7.0126 2005-08-10 07:51:35 +00:00
Bram Moolenaar
8af244281c updated for version 7.0125 2005-08-08 22:06:28 +00:00
Bram Moolenaar
f57907ec2c updated for version 7.0125 2005-08-08 22:02:16 +00:00
Bram Moolenaar
f6cf987574 updated for version 7.0125 2005-08-08 22:00:59 +00:00
Bram Moolenaar
648120b750 updated for version 7.0125 2005-08-08 21:57:35 +00:00
Bram Moolenaar
572cb561ac updated for version 7.0124 2005-08-05 21:35:02 +00:00
Bram Moolenaar
86eb7a2c03 updated for version 7.0124 2005-08-05 21:27:51 +00:00
Bram Moolenaar
0be6e647d1 updated for version 7.0123 2005-08-04 21:32:22 +00:00
Bram Moolenaar
1d94f9b30e updated for version 7.0123 2005-08-04 21:29:45 +00:00
Bram Moolenaar
04a09c1975 updated for version 7.0122 2005-08-01 22:02:32 +00:00
Bram Moolenaar
83bab71b3c updated for version 7.0122 2005-08-01 21:58:57 +00:00
Bram Moolenaar
d314b2519b updated for version 7.0122 2005-08-01 21:54:37 +00:00
Bram Moolenaar
ecf07c8910 updated for version 7.0122 2005-08-01 21:52:12 +00:00
Bram Moolenaar
78984f503c updated for version 7.0121 2005-08-01 07:19:10 +00:00
Bram Moolenaar
53805d1eaa updated for version 7.0121 2005-08-01 07:08:33 +00:00
Bram Moolenaar
34cf2f5f49 updated for version 7.0121 2005-08-01 07:04:56 +00:00
Bram Moolenaar
25ceb22747 updated for version 7.0120 2005-07-30 22:45:36 +00:00
Bram Moolenaar
5a8684e782 updated for version 7.0120 2005-07-30 22:43:24 +00:00
Bram Moolenaar
3a6c56e422 updated for version 7.0120 2005-07-30 22:37:17 +00:00
Bram Moolenaar
403bd9487a updated for version 7.0120 2005-07-30 22:36:01 +00:00
Bram Moolenaar
4be06f9e1b updated for version 7.0119 2005-07-29 22:36:03 +00:00
Bram Moolenaar
661b182095 updated for version 7.0118 2005-07-28 22:36:45 +00:00
Bram Moolenaar
cfc7d63267 updated for version 7.0118 2005-07-28 22:28:16 +00:00
Bram Moolenaar
87e25fdf80 updated for version 7.0117 2005-07-27 21:13:01 +00:00
Bram Moolenaar
231334e6ef updated for version 7.0116 2005-07-25 20:46:57 +00:00
Bram Moolenaar
027436338b updated for version 7.0116 2005-07-25 20:42:36 +00:00
Bram Moolenaar
c013cb66a6 updated for version 7.0115 2005-07-24 21:18:31 +00:00
Bram Moolenaar
81366db6d6 updated for version 7.0115 2005-07-24 21:16:51 +00:00
Bram Moolenaar
65de869c4f updated for version 7.0115 2005-07-24 21:09:41 +00:00
Bram Moolenaar
58d9823409 updated for version 7.0114 2005-07-23 22:25:46 +00:00
Bram Moolenaar
b01585904a updated for version 7.0113 2005-07-22 21:54:43 +00:00
Bram Moolenaar
d8c0087cce updated for version 7.0113 2005-07-22 21:52:15 +00:00
Bram Moolenaar
63b3ce8757 updated for version 7.0113 2005-07-22 21:46:50 +00:00
Bram Moolenaar
342337a1a0 updated for version 7.0112 2005-07-21 21:11:17 +00:00
Bram Moolenaar
4536002e30 updated for version 7.0112 2005-07-21 21:08:21 +00:00
Bram Moolenaar
a3ffd9c780 updated for version 7.0112 2005-07-21 21:03:15 +00:00
431 changed files with 57985 additions and 58274 deletions

View File

@@ -30,6 +30,7 @@ SRC_ALL1 = \
src/gui.h \
src/gui_beval.c \
src/gui_beval.h \
src/hardcopy.c \
src/hashtable.c \
src/keymap.h \
src/macros.h \
@@ -51,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 \
@@ -94,6 +96,7 @@ SRC_ALL2 = \
src/proto/getchar.pro \
src/proto/gui.pro \
src/proto/gui_beval.pro \
src/proto/hardcopy.pro \
src/proto/hashtable.pro \
src/proto/main.pro \
src/proto/mark.pro \
@@ -109,6 +112,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 \
@@ -375,6 +379,7 @@ SRC_MAC = \
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)
SRC_VMS = \
@@ -509,6 +514,8 @@ RT_SCRIPTS = \
runtime/delmenu.vim \
runtime/synmenu.vim \
runtime/makemenu.vim \
runtime/autoload/*.vim \
runtime/autoload/README.txt \
runtime/colors/*.vim \
runtime/colors/README.txt \
runtime/compiler/*.vim \
@@ -680,14 +687,19 @@ 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 \
runtime/spell/??/main.aap \
runtime/spell/yi/README.txt \
runtime/spell/main.aap \
runtime/spell/*.vim \
runtime/spell/fixdup \
# generic language files, binary
LANG_GEN_BIN = \
runtime/spell/README_en.txt \
runtime/spell/en.ascii.spl \
runtime/spell/en.latin1.spl \
runtime/spell/en.utf-8.spl \
@@ -697,6 +709,7 @@ LANG_SRC = \
src/po/README.txt \
src/po/README_mingw.txt \
src/po/README_mvc.txt \
src/po/check.vim \
src/po/cleanup.vim \
src/po/Makefile \
src/po/Make_cyg.mak \

View File

@@ -70,8 +70,8 @@ all install uninstall tools config configure proto depend lint tags types test t
# 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
@@ -423,12 +423,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) \

View File

@@ -0,0 +1,15 @@
The autoload directory is for standard Vim autoload scripts.
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
csscomplete.vim HTML / CSS
htmlcomplete.vim HTML

View File

@@ -0,0 +1,257 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Oct 06
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
if a:findstart
" 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'
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 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(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('^' . base), 'v:val["name"]')
endif
" Find the variable items[0].
" 1. in current function (like with "gd")
" 2. in tags file(s) (like with ":tag")
" 3. in current file (like with "gD")
let res = []
if searchdecl(items[0], 0, 1) == 0
" Found, now figure out the type.
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
endif
if len(res) == 0
" Find the variable in the tags file(s)
let diclist = taglist('^' . items[0] . '$')
let res = []
for i in range(len(diclist))
" New ctags has the "typename" field.
if has_key(diclist[i], 'typename')
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:]))
endif
" For a variable use the command, which must be a search pattern that
" shows the declaration of the variable.
if diclist[i]['kind'] == 'v'
let line = diclist[i]['cmd']
if line[0] == '/' && line[1] == '^'
let col = match(line, items[0])
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:]))
endif
endif
endfor
endif
if len(res) == 0 && searchdecl(items[0], 1) == 0
" Found, now figure out the type.
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
endif
" If the one and only match was what's already there and it is a composite
" type, add a "." or "->".
if len(res) == 1 && res[0]['match'] == items[-1] && len(s:SearchMembers(res, [''])) > 0
" If there is a '*' before the name use "->".
if match(res[0]['tagline'], '\*\s*' . res[0]['match']) > 0
let res[0]['match'] .= '->'
else
let res[0]['match'] .= '.'
endif
endif
return map(res, 'v:val["match"]')
endfunc
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" Return the list of matches.
function! s:Nextitem(lead, items)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
" Try to recognize the type of the variable. This is rough guessing...
let res = []
for tidx in range(len(tokens))
" Recognize "struct foobar" and "union foobar".
if (tokens[tidx] == 'struct' || tokens[tidx] == 'union') && tidx + 1 < len(tokens)
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items)
break
endif
" TODO: add more reserved words
if index(['int', 'float', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
continue
endif
" Use the tags file to find out if this is a typedef.
let diclist = taglist('^' . tokens[tidx] . '$')
for tagidx in range(len(diclist))
" New ctags has the "typename" field.
if has_key(diclist[tagidx], 'typename')
call extend(res, s:StructMembers(diclist[tagidx]['typename'], a:items))
continue
endif
" Only handle typedefs here.
if diclist[tagidx]['kind'] != 't'
continue
endif
" For old ctags we recognize "typedef struct aaa" and
" "typedef union bbb" in the tags file command.
let cmd = diclist[tagidx]['cmd']
let ei = matchend(cmd, 'typedef\s\+')
if ei > 1
let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<')
if len(cmdtokens) > 1
if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union'
let name = ''
" Use the first identifier after the "struct" or "union"
for ti in range(len(cmdtokens) - 1)
if cmdtokens[ti] =~ '^\w'
let name = cmdtokens[ti]
break
endif
endfor
if name != ''
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items))
endif
else
" Could be "typedef other_T some_T".
call extend(res, s:Nextitem(cmdtokens[0], a:items))
endif
endif
endif
endfor
if len(res) > 0
break
endif
endfor
return res
endfunction
" Return a list with resulting matches.
" Each match is a dictionary with "match" and "tagline" entries.
function! s:StructMembers(typename, items)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
if fnames == ''
return []
endif
let typename = a:typename
let qflist = []
while 1
exe 'silent! vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
break
endif
" No match for "struct:context::name", remove "context::" and try again.
let typename = substitute(typename, ':[^:]*::', ':', '')
endwhile
let matches = []
for l in qflist
let memb = matchstr(l['text'], '[^\t]*')
if memb =~ '^' . a:items[0]
call add(matches, {'match': memb, 'tagline': l['text']})
endif
endfor
if len(matches) > 0
" No further items, return the result.
if len(a:items) == 1
return matches
endif
" More items following. For each of the possible members find the
" matching following members.
return s:SearchMembers(matches, a:items[1:])
endif
" Failed to find anything.
return []
endfunction
" For matching members, find matches for following items.
function! s:SearchMembers(matches, items)
let res = []
for i in range(len(a:matches))
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e > 0
" Use typename field
let name = matchstr(line, '[^\t]*', e)
call extend(res, s:StructMembers(name, a:items))
else
" Use the search command (the declaration itself).
let s = match(line, '\t\zs/^')
if s > 0
let e = match(line, a:matches[i]['match'], s)
if e > 0
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items))
endif
endif
endif
endfor
return res
endfunc

View File

@@ -0,0 +1,430 @@
" Vim completion script
" Language: CSS 2.1
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Oct 12
function! csscomplete#CompleteCSS(findstart, base)
if a:findstart
" We need whole line to proper checking
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:
" ^ ; : { } /* */
" Where ^ is start of line and /* */ are comment borders
" 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 (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
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 = {}
" We need the last occurrence of char so reverse line
let revline = join(reverse(split(line, '.\zs')), '')
let openbrace = stridx(revline, '{')
let closebrace = stridx(revline, '}')
let colon = stridx(revline, ':')
let semicolon = stridx(revline, ';')
let opencomm = stridx(revline, '*/') " Line was reversed
let closecomm = stridx(revline, '/*') " Line was reversed
let style = stridx(revline, '=\s*elyts') " Line was reversed
let atrule = stridx(revline, '@')
let exclam = stridx(revline, '!')
if openbrace > -1
let borders[openbrace] = "openbrace"
endif
if closebrace > -1
let borders[closebrace] = "closebrace"
endif
if colon > -1
let borders[colon] = "colon"
endif
if semicolon > -1
let borders[semicolon] = "semicolon"
endif
if opencomm > -1
let borders[opencomm] = "opencomm"
endif
if closecomm > -1
let borders[closecomm] = "closecomm"
endif
if style > -1
let borders[style] = "style"
endif
if atrule > -1
let borders[atrule] = "atrule"
endif
if exclam > -1
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 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 entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_property
call add(res, m . ':')
elseif m =~? entered_property
call add(res2, m . ':')
endif
endfor
return res + res2
elseif borders[min(keys(borders))] == 'colon'
" Get name of property
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
if prop == 'azimuth'
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
elseif prop == 'background-attachment'
let values = ["scroll", "fixed"]
elseif prop == 'background-color'
let values = ["transparent", "rgb(", "#"]
elseif prop == 'background-image'
let values = ["url(", "none"]
elseif prop == 'background-position'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z]\+\)\?$'
let values = ["top", "center", "bottom"]
elseif vals =~ '^[a-zA-Z]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["left", "center", "right"]
else
return []
endif
elseif prop == 'background-repeat'
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'background'
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'border-collapse'
let values = ["collapse", "separate"]
elseif prop == 'border-color'
let values = ["rgb(", "#", "transparent"]
elseif prop == 'border-spacing'
return []
elseif prop == 'border-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)$'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-color'
let values = ["rgb(", "#", "transparent"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop == 'bottom'
let values = ["auto"]
elseif prop == 'caption-side'
let values = ["top", "bottom"]
elseif prop == 'clear'
let values = ["none", "left", "right", "both"]
elseif prop == 'clip'
let values = ["auto", "rect("]
elseif prop == 'color'
let values = ["rgb(", "#"]
elseif prop == 'content'
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
elseif prop =~ 'counter-\(increment\|reset\)$'
let values = ["none"]
elseif prop =~ '^\(cue-after\|cue-before\|cue\)$'
let values = ["url(", "none"]
elseif prop == 'cursor'
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
elseif prop == 'direction'
let values = ["ltr", "rtl"]
elseif prop == 'display'
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
elseif prop == 'elevation'
let values = ["below", "level", "above", "higher", "lower"]
elseif prop == 'empty-cells'
let values = ["show", "hide"]
elseif prop == 'float'
let values = ["left", "right", "none"]
elseif prop == 'font-family'
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
elseif prop == 'font-size'
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'
let values = ["normal", "small-caps"]
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", "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\)$'
let values = ["auto"]
elseif prop == 'letter-spacing'
let values = ["normal"]
elseif prop == 'line-height'
let values = ["normal"]
elseif prop == 'list-style-image'
let values = ["url(", "none"]
elseif prop == 'list-style-position'
let values = ["inside", "outside"]
elseif prop == 'list-style-type'
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
elseif prop == 'list-style'
return []
elseif prop == 'margin'
let values = ["auto"]
elseif prop =~ 'margin-\(right\|left\|top\|bottom\)$'
let values = ["auto"]
elseif prop == 'max-height'
let values = ["auto"]
elseif prop == 'max-width'
let values = ["none"]
elseif prop == 'min-height'
let values = ["none"]
elseif prop == 'min-width'
let values = ["none"]
elseif prop == 'orphans'
return []
elseif prop == 'outline-color'
let values = ["rgb(", "#"]
elseif prop == 'outline-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop == 'outline-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'outline'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9,()#]\+\)\?$'
let values = ["rgb(", "#"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["thin", "thick", "medium"]
else
return []
endif
elseif prop == 'overflow'
let values = ["visible", "hidden", "scroll", "auto"]
elseif prop == 'padding'
return []
elseif prop =~ 'padding-\(top\|right\|bottom\|left\)$'
return []
elseif prop =~ 'page-break-\(after\|before\)$'
let values = ["auto", "always", "avoid", "left", "right"]
elseif prop == 'page-break-inside'
let values = ["auto", "avoid"]
elseif prop =~ 'pause-\(after\|before\)$'
return []
elseif prop == 'pause'
return []
elseif prop == 'pitch-range'
return []
elseif prop == 'pitch'
let values = ["x-low", "low", "medium", "high", "x-high"]
elseif prop == 'play-during'
let values = ["url(", "mix", "repeat", "auto", "none"]
elseif prop == 'position'
let values = ["static", "relative", "absolute", "fixed"]
elseif prop == 'quotes'
let values = ["none"]
elseif prop == 'richness'
return []
elseif prop == 'speak-header'
let values = ["once", "always"]
elseif prop == 'speak-numeral'
let values = ["digits", "continuous"]
elseif prop == 'speak-punctuation'
let values = ["code", "none"]
elseif prop == 'speak'
let values = ["normal", "none", "spell-out"]
elseif prop == 'speech-rate'
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
elseif prop == 'stress'
return []
elseif prop == 'table-layout'
let values = ["auto", "fixed"]
elseif prop == 'text-align'
let values = ["left", "right", "center", "justify"]
elseif prop == 'text-decoration'
let values = ["none", "underline", "overline", "line-through", "blink"]
elseif prop == 'text-indent'
return []
elseif prop == 'text-transform'
let values = ["capitalize", "uppercase", "lowercase", "none"]
elseif prop == 'top'
let values = ["auto"]
elseif prop == 'unicode-bidi'
let values = ["normal", "embed", "bidi-override"]
elseif prop == 'vertical-align'
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
elseif prop == 'visibility'
let values = ["visible", "hidden", "collapse"]
elseif prop == 'voice-family'
return []
elseif prop == 'volume'
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
elseif prop == 'white-space'
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
elseif prop == 'widows'
return []
elseif prop == 'word-spacing'
let values = ["normal"]
elseif prop == 'z-index'
let values = ["auto"]
else
" 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 entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
for m in values
if m =~? '^'.entered_value
call add(res, m)
elseif m =~? entered_value
call add(res2, m)
endif
endfor
return res + res2
elseif borders[min(keys(borders))] == 'closebrace'
return []
elseif borders[min(keys(borders))] == 'exclam'
" Complete values
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
let values = ["important"]
for m in values
if m =~? '^'.entered_imp
call add(res, m)
endif
endfor
return res
elseif borders[min(keys(borders))] == 'atrule'
let afterat = matchstr(line, '.*@\zs.*')
if afterat =~ '\s'
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
if atrulename == 'media'
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
let atruleafterbase = matchstr(line, '.*@media\s\+\ze.*$')
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
elseif atrulename == 'import'
let atruleafterbase = matchstr(line, '.*@import\s\+\ze.*$')
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
if entered_atruleafter =~ "^[\"']"
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"\"".v:val')
elseif entered_atruleafter =~ "^url("
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"url(".v:val')
else
let values = ['"', 'url(']
endif
else
return []
endif
for m in values
if m =~? '^'.entered_atruleafter
call add(res, m)
elseif m =~? entered_atruleafter
call add(res2, m)
endif
endfor
return res + res2
endif
let values = ["charset", "page", "media", "import", "font-face"]
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_atrule
call add(res, m .' ')
elseif m =~? entered_atrule
call add(res2, m .' ')
endif
endfor
return res + res2
endif
return []
endif
endfunction

173
runtime/autoload/gzip.vim Normal file
View File

@@ -0,0 +1,173 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 26
" These functions are used by the gzip plugin.
" Function to check that executing "cmd [-f]" works.
" The result is cached in s:have_"cmd" for speed.
fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
let e = executable(name)
if e < 0
let r = system(name . " --version")
let e = (r !~ "not found" && r != "")
endif
exe "let s:have_" . name . "=" . e
endif
exe "return s:have_" . name
endfun
" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
" the flags in the compressed file.
" The only compression methods that can be detected are max speed (-1) and max
" compression (-9).
fun s:set_compression(line)
" get the Compression Method
let l:cm = char2nr(a:line[2])
" if it's 8 (DEFLATE), we can check for the compression level
if l:cm == 8
" get the eXtra FLags
let l:xfl = char2nr(a:line[8])
" max compression
if l:xfl == 2
let b:gzip_comp_arg = "-9"
" min compression
elseif l:xfl == 4
let b:gzip_comp_arg = "-1"
endif
endif
endfun
" After reading compressed file: Uncompress text in buffer with "cmd"
fun gzip#read(cmd)
" don't do anything if the cmd is not supported
if !s:check(a:cmd)
return
endif
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(getline(1))
endif
" make 'patchmode' empty, we don't want a copy of the written file
let pm_save = &pm
set pm=
" remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
let cpo_save = &cpo
set cpo-=a cpo-=A
" set 'modifiable'
let ma_save = &ma
setlocal ma
" when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("<afile>:e")
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "silent '[,']w " . tmpe
" uncompress the temp file: call system("gzip -dn tmp.gz")
call system(a:cmd . " " . tmpe)
if !filereadable(tmp)
" uncompress didn't work! Keep the compressed file then.
echoerr "Error: Could not read uncompressed file"
return
endif
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
setlocal nobin
if exists(":lockmarks")
execute "silent lockmarks " . l . "r " . tmp
else
execute "silent " . l . "r " . tmp
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
let &pm = pm_save
let &cpo = cpo_save
let &l:ma = ma_save
" When uncompressed the whole buffer, do autocommands
if empty
if &verbose >= 8
execute "doau BufReadPost " . expand("%:r")
else
execute "silent! doau BufReadPost " . expand("%:r")
endif
endif
endfun
" After writing compressed file: Compress written file with "cmd"
fun gzip#write(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
" Rename the file before compressing it.
let nm = resolve(expand("<afile>"))
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
else
call system(a:cmd . " " . nmt)
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun gzip#appre(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
let nm = expand("<afile>")
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(readfile(nm, "b", 1)[0])
endif
" Rename to a weird name to avoid the risk of overwriting another file
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
let nmte = nmt . "." . expand("<afile>:e")
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
call system(a:cmd . " -c " . nmte . " > " . nmt)
call rename(nmte, nm . &patchmode)
else
call system(a:cmd . " " . nmte)
endif
call rename(nmt, nm)
endif
endif
endfun
" find a file name for the file to be compressed. Use "name" without an
" extension if possible. Otherwise use a weird name to avoid overwriting an
" existing file.
fun s:tempname(name)
let fn = fnamemodify(a:name, ":r")
if !filereadable(fn) && !isdirectory(fn)
return fn
endif
return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
endfun
" vim: set sw=2 :

View File

@@ -0,0 +1,477 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" 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
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 stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
let curpos = line('.')
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, context)
endif
" 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 context =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, context)
else
return []
endif
endif
" Set attribute groups
let coreattrs = ["id", "class", "style", "title"]
let i18n = ["lang", "xml:lang", "dir=\"ltr\" ", "dir=\"rtl\" "]
let events = ["onclick", "ondblclick", "onmousedown", "onmouseup", "onmousemove",
\ "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"]
let focus = ["accesskey", "tabindex", "onfocus", "onblur"]
let coregroup = coreattrs + i18n + events
" find tags matching with "context"
" If context contains > it means we are already outside of tag and we
" should abandon action
" If context contains white space it is attribute.
" It could be also value of attribute...
" We have to get first word to offer
" proper completions
if context == ''
let tag = ''
else
let tag = split(context)[0]
endif
" 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'
" Sort out style, class, and on* cases
if context =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
if context =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "class"
elseif context =~ "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
" 1. Find lines of <link stylesheet>
" 1a. Check file for @import
" 2. Extract filename(s?) of stylesheet,
call cursor(1,1)
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)
let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(headjoined, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let headclasslines = split(templines)
call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
let internal = 1
else
let internal = 0
endif
let styletable = []
let secimportfiles = []
let filestable = filter(copy(head), "v:val =~ '\\(@import\\|link.*stylesheet\\)'")
for line in filestable
if line =~ "@import"
let styletable += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")]
elseif line =~ "<link"
let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")]
endif
endfor
for file in styletable
if filereadable(file)
let stylesheet = readfile(file)
let secimport = filter(copy(stylesheet), "v:val =~ '@import'")
if len(secimport) > 0
for line in secimport
let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")
let secfile = fnamemodify(file, ":p:h").'/'.secfile
let secimportfiles += [secfile]
endfor
endif
endif
endfor
let cssfiles = styletable + secimportfiles
let classes = []
for file in cssfiles
if filereadable(file)
let stylesheet = readfile(file)
let stylefile = join(stylesheet, ' ')
let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g')
if search_for == 'class'
let stylesheet = split(stylefile)
let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(stylefile, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let stylelines = split(templines)
let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
endif
" We gathered classes definitions from all external files
let classes += classlines
endfor
if internal == 1
let classes += headclasslines
endif
if search_for == 'class'
let elements = {}
for element in classes
if element =~ '^\.'
let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let class = substitute(class, ':.*', '', '')
if has_key(elements, 'common')
let elements['common'] .= ' '.class
else
let elements['common'] = class
endif
else
let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
if tagname != ''
if has_key(elements, tagname)
let elements[tagname] .= ' '.class
else
let elements[tagname] = class
endif
endif
endif
endfor
if has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements[tag]." ".elements['common'])
elseif has_key(elements, tag) && !has_key(elements, 'common')
let values = split(elements[tag])
elseif !has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements['common'])
else
return []
endif
elseif search_for == 'id'
" Find used IDs
" 1. Catch whole file
let filelines = getline(1, line('$'))
" 2. Find lines with possible id
let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"')
" 3a. Join all filtered lines
let id_string = join(used_id_lines, ' ')
" 3b. And split them to be sure each id is in separate item
let id_list = split(id_string, 'id\s*=\s*')
" 4. Extract id values
let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")')
let joined_used_id = ','.join(used_id, ',').','
let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")')
let values = []
for element in classes
if joined_used_id !~ ','.element.','
let values += [element]
endif
endfor
endif
" We need special version of sbase
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, m . classquote)
elseif m =~? entered_class
call add(res2, m . classquote)
endif
endfor
return res + res2
elseif context =~ "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
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 []
endif
endif
" 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.*")
let values = []
if attrname == 'media'
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
elseif attrname == 'xml:space'
let values = ["preserve"]
elseif attrname == 'shape'
let values = ["rect", "circle", "poly", "default"]
elseif attrname == 'valuetype'
let values = ["data", "ref", "object"]
elseif attrname == 'method'
let values = ["get", "post"]
elseif attrname == 'dir'
let values = ["ltr", "rtl"]
elseif attrname == 'frame'
let values = ["void", "above", "below", "hsides", "lhs", "rhs", "vsides", "box", "border"]
elseif attrname == 'rules'
let values = ["none", "groups", "rows", "all"]
elseif attrname == 'align'
let values = ["left", "center", "right", "justify", "char"]
elseif attrname == 'valign'
let values = ["top", "middle", "bottom", "baseline"]
elseif attrname == 'scope'
let values = ["row", "col", "rowgroup", "colgroup"]
elseif attrname == 'href'
" Now we are looking for local anchors defined by name or id
if entered_value =~ '^#'
let file = join(getline(1, line('$')), ' ')
" Split it be sure there will be one id/name element in
" item, it will be also first word [a-zA-Z0-9_-] in element
let oneelement = split(file, "\\(meta \\)\\@<!\\(name\\|id\\)\\s*=\\s*[\"']")
for i in oneelement
let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")]
endfor
endif
elseif attrname == 'type'
if context =~ '^input'
let values = ["text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"]
elseif context =~ '^button'
let values = ["button", "submit", "reset"]
elseif context =~ '^style'
let values = ["text/css"]
elseif context =~ '^script'
let values = ["text/javascript"]
endif
else
return []
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
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
if tag =~ '^\(abbr\|acronym\|address\|b\|bdo\|big\|caption\|cite\|code\|dd\|dfn\|div\|dl\|dt\|em\|fieldset\|h\d\|hr\|i\|kbd\|li\|noscript\|ol\|p\|samp\|small\|span\|strong\|sub\|sup\|tt\|ul\|var\)$'
let attrs = coregroup
elseif tag == 'a'
let attrs = coregroup + focus + ["charset", "type", "name", "href", "hreflang", "rel", "rev", "shape", "coords"]
elseif tag == 'area'
let attrs = coregroup + focus + ["shape", "coords", "href", "nohref", "alt"]
elseif tag == 'base'
let attrs = ["href", "id"]
elseif tag == 'blockquote'
let attrs = coregroup + ["cite"]
elseif tag == 'body'
let attrs = coregroup + ["onload", "onunload"]
elseif tag == 'br'
let attrs = coreattrs
elseif tag == 'button'
let attrs = coregroup + focus + ["name", "value", "type"]
elseif tag == '^\(col\|colgroup\)$'
let attrs = coregroup + ["span", "width", "align", "char", "charoff", "valign"]
elseif tag =~ '^\(del\|ins\)$'
let attrs = coregroup + ["cite", "datetime"]
elseif tag == 'form'
let attrs = coregroup + ["action", "method=\"get\" ", "method=\"post\" ", "enctype", "onsubmit", "onreset", "accept", "accept-charset"]
elseif tag == 'head'
let attrs = i18n + ["id", "profile"]
elseif tag == 'html'
let attrs = i18n + ["id", "xmlns"]
elseif tag == 'img'
let attrs = coregroup + ["src", "alt", "longdesc", "height", "width", "usemap", "ismap"]
elseif tag == 'input'
let attrs = coregroup + ["type", "name", "value", "checked", "disabled", "readonly", "size", "maxlength", "src", "alt", "usemap", "onselect", "onchange", "accept"]
elseif tag == 'label'
let attrs = coregroup + ["for", "accesskey", "onfocus", "onblur"]
elseif tag == 'legend'
let attrs = coregroup + ["accesskey"]
elseif tag == 'link'
let attrs = coregroup + ["charset", "href", "hreflang", "type", "rel", "rev", "media"]
elseif tag == 'map'
let attrs = i18n + events + ["id", "class", "style", "title", "name"]
elseif tag == 'meta'
let attrs = i18n + ["id", "http-equiv", "content", "scheme", "name"]
elseif tag == 'title'
let attrs = i18n + ["id"]
elseif tag == 'object'
let attrs = coregroup + ["declare", "classid", "codebase", "data", "type", "codetype", "archive", "standby", "height", "width", "usemap", "name", "tabindex"]
elseif tag == 'optgroup'
let attrs = coregroup + ["disbled", "label"]
elseif tag == 'option'
let attrs = coregroup + ["disbled", "selected", "value", "label"]
elseif tag == 'param'
let attrs = ["id", "name", "value", "valuetype", "type"]
elseif tag == 'pre'
let attrs = coregroup + ["xml:space"]
elseif tag == 'q'
let attrs = coregroup + ["cite"]
elseif tag == 'script'
let attrs = ["id", "charset", "type=\"text/javascript\"", "type", "src", "defer", "xml:space"]
elseif tag == 'select'
let attrs = coregroup + ["name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange"]
elseif tag == 'style'
let attrs = coreattrs + ["id", "type=\"text/css\"", "type", "media", "title", "xml:space"]
elseif tag == 'table'
let attrs = coregroup + ["summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding"]
elseif tag =~ '^\(thead\|tfoot\|tbody\|tr\)$'
let attrs = coregroup + ["align", "char", "charoff", "valign"]
elseif tag == 'textarea'
let attrs = coregroup + ["name", "rows", "cols", "disabled", "readonly", "onselect", "onchange"]
elseif tag =~ '^\(th\|td\)$'
let attrs = coregroup + ["abbr", "headers", "scope", "rowspan", "colspan", "align", "char", "charoff", "valign"]
else
return []
endif
for m in sort(attrs)
if m =~ '^'.attr
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
call add(res, m)
else
call add(res, m.'="')
endif
elseif m =~ attr
if m =~ '^\(ismap\|defer\|declare\|nohref\|checked\|disabled\|selected\|readonly\)$' || m =~ '='
call add(res2, 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
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
if !exists("g:xmldata_xhtml10s")
runtime! autoload/xml/xhtml10s.vim
endif
let tags = g:xmldata_xhtml10s[opentag][0]
for m in tags
if m =~ '^'.context
call add(res, m)
elseif m =~ context
call add(res2, m)
endif
endfor
return res + res2
endif
endfunction

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,43 @@
" 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 31, 2004
" Version: 3
" 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
" 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.
"
" Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1
" is eternal life in Christ Jesus our Lord.
" ---------------------------------------------------------------------
" Prevent Reloading: {{{1
if exists("g:loaded_netrwfilehandlers") || &cp
" Load Once: {{{1
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwfilehandlers= "v3"
let s:keepcpo= &cpo
set cpo&vim
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://','')
@@ -26,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://','')
@@ -49,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
@@ -68,171 +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_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("gs")
exe 'silent! !gs "'.a:sxw.'"'
else
" " call Dret("NetrwFileHandler_sxw 0")
return 0
endif
" " call Dret("NetrwFileHandler_sxw 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!
@@ -246,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!
@@ -271,43 +278,44 @@ 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
let &cpo= s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=4 fdm=marker

View File

@@ -0,0 +1,161 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Oct 12, 2005
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" 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
" 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.
"
" Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
" 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
finish
endif
let g:loaded_netrwSettings = "v4"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
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
setlocal noswapfile bh=wipe
set ft=vim
file Netrw\ Settings
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_longlist")
let g:netrw_longlist= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
let g:netrw_silent= 0
endif
if !exists("g:netrw_use_nt_rcp")
let g:netrw_use_nt_rcp= 0
endif
if !exists("g:netrw_ftp")
let g:netrw_ftp= 0
endif
if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: (by Charles E. Campbell, Jr.)'
put ='+ Press ? with cursor atop any line for help '
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
put ='+ Netrw Protocol Commands'
put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
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 = ''
put ='+Netrw Transfer Control'
put = 'let g:netrw_cygwin = '.g:netrw_cygwin
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
put = ''
put ='+ Netrw Browser Control'
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
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_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
put = 'let g:netrw_longlist = '.g:netrw_longlist
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press ?'
1d
silent %s/^+/"/e
res 99
silent %s/= \([^0-9].*\)$/= '\1'/e
silent %s/= $/= ''/e
1
set nomod
map <buffer> <silent> ? :call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun
" ---------------------------------------------------------------------
" NetrwSettingHelp: {{{2
fun! NetrwSettingHelp()
" call Dfunc("NetrwSettingHelp()")
let curline = getline(".")
if curline =~ '='
let varhelp = substitute(curline,'^\s*let ','','e')
let varhelp = substitute(varhelp,'\s*=.*$','','e')
" call Decho("trying help ".varhelp)
try
exe "he ".varhelp
catch /^Vim\%((\a\+)\)\=:E149/
echo "***sorry*** no help available for <".varhelp.">"
endtry
elseif line(".") < s:netrw_settings_stop
he netrw-settings
elseif line(".") < s:netrw_protocol_stop
he netrw-externapp
elseif line(".") < s:netrw_xfer_stop
he netrw-variables
else
he netrw-browse-var
endif
" call Dret("NetrwSettingHelp")
endfun
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim:ts=8 fdm=marker

311
runtime/autoload/tar.vim Normal file
View File

@@ -0,0 +1,311 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Nov 18, 2005
" Version: 4
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
"
" 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.
" ---------------------------------------------------------------------
" Initialization: {{{1
let s:keepcpo= &cpo
set cpo&vim
if exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v4"
" ---------------------------------------------------------------------
" 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
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
" 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()
" 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
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
return
endif
if &ma != 1
set ma
endif
let w:tarfile= a:tarfile
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nobuflisted
setlocal nowrap
set ft=tar
" 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: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
%g@/$@d
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
endfun
" ---------------------------------------------------------------------
" TarBrowseSelect: {{{2
fun! s:TarBrowseSelect()
" call Dfunc("TarBrowseSelect() w:tarfile<".w:tarfile."> curfile<".expand("%").">")
let fname= getline(".")
" call Decho("fname<".fname.">")
" sanity check
if fname =~ '^"'
" 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
" 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 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 a:fname =~# '\.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
" 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()}.">")
" 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()
" call Dret("tar#Write")
return
endif
if !exists("*mkdir")
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()
" call Dret("tar#Write")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "cd ".escape(tmpdir,' \')
catch /^Vim\%((\a\+)\)\=:E344/
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("tar#Write")
return
endtry
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
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
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
" call Decho("tarfile<".tarfile."> fname<".fname.">")
let dirpath = substitute(fname,'/[^/]\+$','','e')
if tarfile !~ '/'
let tarfile= curdir.'/'.tarfile
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
call mkdir(dirpath,"p")
exe "w! ".fname
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
endif
" 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("_ZIPVIM_")
exe "cd ".escape(curdir,' \')
setlocal nomod
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf ".a:fname)
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf ".a:fname)
else
call system("del /S ".a:fname)
endif
endif
" call Dret("Rmdir")
endfun
" ------------------------------------------------------------------------
" 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

246
runtime/autoload/zip.vim Normal file
View File

@@ -0,0 +1,246 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Nov 14, 2005
" Version: 4
" 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
" 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,
" zipPlugin.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.
" ---------------------------------------------------------------------
" Initialization: {{{1
let s:keepcpo= &cpo
set cpo&vim
if exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v4"
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" zip#Browse: {{{2
fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
" 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()
" call Dret("zip#Browse")
return
endif
if !filereadable(a:zipfile)
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
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
if &ma != 1
set ma
endif
let w:zipfile= a:zipfile
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nobuflisted
setlocal nowrap
set ft=tar
" give header
exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'"
exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
$put =''
0d
$
exe "silent r! unzip -l ".a:zipfile
$d
silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
silent 4,$s/^\%(.*\)\s\+\(\S\)/\1/
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
" call Dret("zip#Browse")
endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
let fname= getline(".")
" sanity check
if fname =~ '^"'
" 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()
" call Dret("ZipBrowseSelect")
return
endif
" call Decho("fname<".fname.">")
" 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 : 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 zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "r! unzip -p ".zipfile." ".fname
" cleanup
0d
set nomod
" call Dret("zip#Read")
endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
" 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()
" 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()
" call Dret("zip#Write")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "cd ".escape(tmpdir,' \')
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()
" call Dret("zip#Write")
return
endtry
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
let dirpath = substitute(fname,'/[^/]\+$','','e')
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
" call Decho("zip -u ".zipfile.".zip ".fname)
call system("zip -u ".zipfile.".zip ".fname)
if v:shell_error != 0
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
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
cd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".escape(curdir,' \')
setlocal nomod
" call Dret("zip#Write")
endfun
" ---------------------------------------------------------------------
" Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf ".a:fname)
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf ".a:fname)
else
call system("del /S ".a:fname)
endif
endif
" call Dret("Rmdir")
endfun
" ------------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

View File

@@ -0,0 +1,41 @@
" Vim compiler file
" Language: eRuby
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
if exists("current_compiler")
finish
endif
let current_compiler = "eruby"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
if exists("eruby_compiler") && eruby_compiler == "eruby"
CompilerSet makeprg=eruby
else
CompilerSet makeprg=erb
endif
CompilerSet errorformat=
\eruby:\ %f:%l:%m,
\%+E%f:%l:\ parse\ error,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-C%\tfrom\ %f:%l:in\ %.%#,
\%-Z%\tfrom\ %f:%l,
\%-Z%p^,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

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,12 +1,16 @@
" Vim compiler file
" Compiler: Ruby syntax check and/or error reporting
" Maintainer: Tim Hammerquist <timmy@cpan.org>
" Last Change: Tue Jul 16 00:38:00 PDT 2002
" Language: Ruby
" Function: Syntax check and/or error reporting
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
"
" 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>
@@ -22,6 +26,7 @@
" This is my first experience with 'errorformat' and compiler plugins and
" I welcome any input from more experienced (or clearer-thinking)
" individuals.
" ----------------------------------------------------------------------------
if exists("current_compiler")
finish
@@ -59,4 +64,4 @@ CompilerSet errorformat=
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ft=vim
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

View File

@@ -0,0 +1,35 @@
" Vim compiler file
" Language: Test::Unit - Ruby Unit Testing Framework
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
if exists("current_compiler")
finish
endif
let current_compiler = "rubyunit"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=testrb
CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
\%C%m\ [%f:%l]:,
\%E\ %\\+%\\d%\\+)\ Error:,
\%C%m:,
\%C\ \ \ \ %f:%l:%.%#,
\%C%m,
\%Z\ %#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

View File

@@ -19,6 +19,7 @@ DOCS = \
change.txt \
cmdline.txt \
debugger.txt \
debug.txt \
develop.txt \
diff.txt \
digraph.txt \
@@ -139,6 +140,7 @@ HTMLS = \
autocmd.html \
change.html \
cmdline.html \
debug.html \
debugger.html \
develop.html \
diff.html \

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Nov 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -155,6 +155,17 @@ argument behavior differs from that for defining and removing autocommands.
In order to list buffer-local autocommands, use a pattern in the form <buffer>
or <buffer=N>. See |autocmd-buflocal|.
*:autocmd-verbose*
When 'verbose' is non-zero, listing an autocommand will also display where it
was last defined. Example: >
:verbose autocmd BufEnter
FileExplorer BufEnter
* call s:LocalBrowse(expand("<amatch>"))
Last set from /usr/share/vim/vim-7.0/plugin/NetrwPlugin.vim
<
See |:verbose-cmd| for more information.
==============================================================================
5. Events *autocmd-events* *E215* *E216*
@@ -313,9 +324,11 @@ 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
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.
*FocusGained*
FocusGained When Vim got input focus. Only for the GUI
@@ -487,7 +500,7 @@ VimLeave Before exiting Vim, just after writing the
VimLeavePre.
To detect an abnormal exit use |v:dying|.
*EncodingChanged*
EncodingChanged Fires off when the 'encoding' option is
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
@@ -542,6 +555,18 @@ QuickFixCmdPre *QuickFixCmdPre*
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*
@@ -787,6 +812,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

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2005 Jun 25
*change.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -682,8 +682,8 @@ For the definition of a pattern, see |pattern|.
*sub-replace-special* *:s\=*
When the {string} starts with "\=" it is evaluated as an expression, see
|sub-replace-expression|. Otherwise these characters in {string} have a
special meaning:
|sub-replace-expression|. You can use that for any special characters.
Otherwise these characters in {string} have a special meaning:
*:s%*
When {string} is equal to "%" and '/' is included with the 'cpotions' option,
then the {string} of the previous substitute command is used. |cpo-/|
@@ -771,9 +771,12 @@ Be careful: The separation character must not appear in the expression!
Consider using a character like "@" or ":". There is no problem if the result
of the expression contains the separation character.
Example: >
Examples: >
:s@\n@\="\r" . expand("$HOME") . "\r"@
This replaces an end-of-line with a new line containing the value of $HOME.
This replaces an end-of-line with a new line containing the value of $HOME. >
s/E/\="\<Char-0x20ac>"/g
This replaces 'E' characters with an euro sign. Read more in |<Char->|.
4.3 Search and replace *search-replace*
@@ -1531,4 +1534,8 @@ The details about sorting depend on the library function used. There is no
guarantee that sorting is "stable" or obeys the current locale. You will have
to try it out.
The sorting itself cannot be interrupted, because of using a system library
function. You can interrupt the preparation (for undo) and putting the sorted
lines into the buffer. In the last case you may end up with duplicated lines.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Jul 05
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Nov 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,6 +153,7 @@ 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)
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
@@ -191,7 +192,8 @@ CTRL-\ e {expr} *c_CTRL-\_e*
to finish it. It's most useful in mappings though. See
|expression|.
See |c_CTRL-R_=| for inserting the result of an expression.
Useful functions are |getcmdline()| and |getcmdpos()|.
Useful functions are |getcmdtype()|, |getcmdline()| and
|getcmdpos()|.
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.
@@ -203,7 +205,9 @@ CTRL-\ e {expr} *c_CTRL-\_e*
:call setcmdpos(strlen(cmd))
:return cmd
:endfunc
<
< This doesn't work recursively, thus not when already editing
an expression.
*c_CTRL-Y*
CTRL-Y When there is a modeless selection, copy the selection into
the clipboard. |modeless-selection|
@@ -558,7 +562,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
@@ -644,11 +648,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:*

69
runtime/doc/debug.txt Normal file
View File

@@ -0,0 +1,69 @@
*debug.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
Debugging Vim *debug-vim*
This is for debugging Vim itself, when it doesn't work properly.
1. Location of a crash, using gcc and gdb |debug-gcc|
2. Windows Bug Reporting |debug-win32|
==============================================================================
1. Location of a crash, using gcc and gdb *debug-gcc*
When Vim crashes in one of the test files, and you are using gcc for
compilation, here is what you can do to find out exactly where Vim crashes.
This also applies when using the MingW tools.
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
which you can uncomment).
2. Execute these commands (replace "11" with the test that fails): >
cd testdir
gdb ../vim
run -u unix.vim -U NONE -s dotest.in test11.in
3. Check where Vim crashes, gdb should give a message for this.
4. Get a stack trace from gdb with this command: >
where
< You can check out different places in the stack trace with: >
frame 3
< Replace "3" with one of the numbers in the stack trace.
==============================================================================
2. Windows Bug Reporting *debug-win32*
If the Windows version of Vim crashes in a reproducible manner,
you can take some steps to provide a useful bug report.
First, you must obtain the debugger symbols (PDB) file for your executable:
gvim.pdb for gvim.exe, or vim.pdb for vim.exe. It should be available
from the same place that you obtained the executable. Be sure to use
the PDB that matches the EXE.
If you built the executable yourself with the Microsoft Visual C++ compiler,
then the PDB was built with the EXE.
You can download the Microsoft Visual C++ Toolkit from
http://msdn.microsoft.com/visualc/vctoolkit2003/
This contains the command-line tools, but not the Visual Studio IDE.
The Debugging Tools for Windows can be downloaded from
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
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.)
=========================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0aa. Last change: 2005 Jun 13
*develop.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,7 +123,8 @@ VIM IS... MAINTAINABLE *design-maintain*
- The source code should not become a mess. It should be reliable code.
- Use the same layout in all files to make it easy to read |coding-style|.
- Use comments in a useful way!
- Use comments in a useful way! Quoting the function name and argument names
is NOT useful. Do explain what they are for.
- Porting to another platform should be made easy, without having to change
too much platform-independent code.
- Use the object-oriented spirit: Put data and code together. Minimize the
@@ -237,8 +238,8 @@ get_env_value() Linux system function
VARIOUS *style-various*
Typedef'ed names should end in "_t": >
typedef int some_t;
Typedef'ed names should end in "_T": >
typedef int some_T;
Define'ed names should be uppercase: >
#define SOME_THING
Features always start with "FEAT_": >

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0aa. Last change: 2005 Apr 26
*diff.txt* For Vim version 7.0aa. Last change: 2005 Sep 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -218,7 +218,7 @@ It is an error if there is no change for the cursor to move to.
==============================================================================
4. Diff copying *copy-diffs* *E99* *E100* *E101* *E102* *E103*
*merge*
There are two commands to copy text from one buffer to another. The result is
that the buffers will be equal within the specified range.
@@ -235,6 +235,8 @@ that the buffers will be equal within the specified range.
Modify another buffer to undo difference with the current
buffer. Just like ":diffget" but the other buffer is modified
instead of the current one.
When [bufspec] is omitted and there is more than one other
buffer in diff mode where 'modifiable' is set this fails.
See below for [range].
*do*

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0aa. Last change: 2005 Mar 06
*digraph.txt* For Vim version 7.0aa. Last change: 2005 Sep 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -166,7 +166,8 @@ EURO
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
added for this. Note the difference between latin1, where the digraph Cu is
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
used for the euro sign, while both of them are the character 164, 0xa4.
used for the euro sign, while both of them are the character 164, 0xa4. For
compatibility with zsh Eu can also be used for the euro sign.
*digraph-table*
char digraph hex dec official name ~

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2005 May 21
*editing.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -354,14 +354,32 @@ file1 file2") embedded spaces must be escaped with a backslash.
*wildcard*
Wildcards in {file} are expanded. Which wildcards are supported depends on
the system. These are the common ones:
* matches anything, including nothing
? matches one character
* matches anything, including nothing
** matches anything, including nothing, recurses into directories
[abc] match 'a', 'b' or 'c'
To avoid the special meaning of the wildcards prepend a backslash. However,
on MS-Windows the backslash is a path separator and "path\[abc]" is still seen
as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
is to use "path\[[]abc]". Then the file "path[abc]" literally.
*starstar-wildcard*
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
This allows searching a directory tree. This goes up to 100 directories deep.
Example: >
:n **/*.txt
Finds files:
ttt.txt
subdir/ttt.txt
a/b/c/d/ttt.txt
When non-wildcard characters are used these are only matched in the first
directory. Example: >
:n /usr/inc**/*.h
Finds files:
/usr/include/types.h
/usr/include/sys/types.h
/usr/inc_old/types.h
*backtick-expansion* *`-expansion*
On Unix and a few other systems you can also use backticks in the file name,
for example: >
@@ -1406,7 +1424,7 @@ problem goes away the next day.
The file searching is currently used for the 'path', 'cdpath' and 'tags'
options. There are three different types of searching:
1) Downward search:
1) Downward search: *starstar*
Downward search uses the wildcards '*', '**' and possibly others
supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 18
*eval.txt* For Vim version 7.0aa. Last change: 2005 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1372,6 +1372,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.
@@ -1474,6 +1482,8 @@ call( {func}, {arglist} [, {dict}])
char2nr( {expr}) Number ASCII value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
col( {expr}) Number column nr of cursor or mark
complete_add( {expr}) Number add completion match
complete_check() Number check for key typed during completion
confirm( {msg} [, {choices} [, {default} [, {type}]]])
Number number of choice picked by user
copy( {expr}) any make a shallow copy of {expr}
@@ -1511,11 +1521,14 @@ foreground( ) Number bring the Vim window to the foreground
function( {name}) Funcref reference to function {name}
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
getbufline( {expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
getchar( [expr]) Number get one character from the user
getcharmod( ) Number modifiers for the last typed character
getbufvar( {expr}, {varname}) variable {varname} in buffer {expr}
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
getcmdtype() String return the current command-line type
getcwd() String the current working directory
getfperm( {fname}) String file permissions of file {fname}
getfsize( {fname}) Number size in bytes of file {fname}
@@ -1546,7 +1559,8 @@ iconv( {expr}, {from}, {to}) String convert encoding of {expr}
indent( {lnum}) Number indent of line {lnum}
index( {list}, {expr} [, {start} [, {ic}]])
Number index in {list} where {expr} appears
input( {prompt} [, {text}]) String get input from the user
input( {prompt} [, {text} [, {completion}]])
String get input from the user
inputdialog( {p} [, {t} [, {c}]]) String like input() but in a GUI dialog
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
@@ -1583,6 +1597,7 @@ mode() String current editing mode
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}) String single char with ASCII value {expr}
prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
printf( {fmt}, {expr1}...) String format text
range( {expr} [, {max} [, {stride}]])
List items from {expr} to {max}
readfile({fname} [, {binary} [, {max}]])
@@ -1602,6 +1617,8 @@ repeat( {expr}, {count}) String repeat {expr} {count} times
resolve( {filename}) String get filename a shortcut points to
reverse( {list}) List reverse {list} in-place
search( {pattern} [, {flags}]) Number search for {pattern}
searchdecl({name} [, {global} [, {thisblock}]])
Number search for variable declaration
searchpair( {start}, {middle}, {end} [, {flags} [, {skip}]])
Number search for other end of start/end pair
server2client( {clientid}, {string})
@@ -1617,7 +1634,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
@@ -1638,7 +1656,8 @@ synIDattr( {synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans( {synID}) Number translated syntax ID of {synID}
system( {expr} [, {input}]) String output of shell command/filter {expr}
taglist({expr}) List list of tags matching {expr}
taglist( {expr}) List list of tags matching {expr}
tagfiles() List tags files used
tempname() String name for a temporary file
tolower( {expr}) String the String {expr} switched to lowercase
toupper( {expr}) String the String {expr} switched to uppercase
@@ -1858,6 +1877,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
@@ -1883,6 +1903,22 @@ col({expr}) The result is a Number, which is the byte index of the column
\<C-O>:echo col(".") . "\n" <Bar>
\let &ve = save_ve<CR>
<
complete_add({expr}) *complete_add()*
Add {expr} to the list of matches. Only to be used by the
function specified with the 'completefunc' option.
Returns 0 for failure (empty string or out of memory),
1 when the match was added, 2 when the match was already in
the list.
complete_check() *complete_check()*
Check for a key typed while looking for completion matches.
This is to be used when looking for matches takes some time.
Returns non-zero when searching for matches is to be aborted,
zero otherwise.
Only to be used by the function specified with the
'completefunc' option.
*confirm()*
confirm({msg} [, {choices} [, {default} [, {type}]]])
Confirm() offers the user a dialog, from which a choice can be
@@ -1992,11 +2028,12 @@ cscope_connection([{num} , {dbpath} [, {prepend}]])
<
cursor({lnum}, {col}) *cursor()*
Positions the cursor at the column {col} in the line {lnum}.
The first column is one.
Does not change the jumplist.
If {lnum} is greater than the number of lines in the buffer,
the cursor will be positioned at the last line in the buffer.
If {lnum} is zero, the cursor will stay in the current line.
If {col} is greater than the number of characters in the line,
If {col} is greater than the number of bytes in the line,
the cursor will be positioned at the last character in the
line.
If {col} is zero, the cursor will stay in the current column.
@@ -2219,8 +2256,11 @@ expand({expr} [, {flag}]) *expand()*
expanded like a file name is expanded on the command line.
'suffixes' and 'wildignore' are used, unless the optional
{flag} argument is given and it is non-zero. Names for
non-existing files are included.
non-existing files are included. The "**" item can be used to
search in a directory tree. For example, to find all "README"
files in the current directory and below: >
:echo expand("**/README")
<
Expand() can also be used to expand variables and environment
variables that are only known in a shell. But this can be
slow, because a shell must be started. See |expr-env-expand|.
@@ -2409,6 +2449,30 @@ get({dict}, {key} [, {default}])
item is not available return {default}. Return zero when
{default} is omitted.
*getbufline()*
getbufline({expr}, {lnum} [, {end}])
Return a List with the lines starting from {lnum} to {end}
(inclusive) in the buffer {expr}. If {end} is omitted, a List
with only the line {lnum} is returned.
For the use of {expr}, see |bufname()| above.
For {lnum} and {end} "$" can be used for the last line of the
buffer. Otherwise a number must be used.
When {lnum} is smaller than 1 or bigger than the number of
lines in the buffer, an empty List is returned.
When {end} is greater than the number of lines in the buffer,
it is treated as {end} is set to the number of lines in the
buffer. When {end} is before {lnum} an empty List is
returned.
This function works only for loaded buffers. For unloaded and
non-existing buffers, an empty List is returned.
Example: >
:let lines = getbufline(bufnr("myfile"), 1, "$")
getbufvar({expr}, {varname}) *getbufvar()*
The result is the value of option or local buffer variable
@@ -2481,14 +2545,28 @@ getcmdline() *getcmdline()*
|c_CTRL-R_=|.
Example: >
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
< Also see |getcmdpos()| and |setcmdpos()|.
< Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
byte count. The first column is 1.
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=|. Returns 0 otherwise.
Also see |setcmdpos()| and |getcmdline()|.
Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|.
getcmdtype() *getcmdtype()*
Return the current command-line type. Possible return values
are:
: normal Ex command
> debug mode command |debug-mode|
/ forward search command
? backward search command
@ |input()| command
- |:insert| or |:append| command
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=|. Returns an empty string
otherwise.
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
*getcwd()*
getcwd() The result is a String, which is the name of the current
@@ -2572,7 +2650,7 @@ getline({lnum} [, {end}])
including line {end}.
{end} is used in the same way as {lnum}.
Non-existing lines are silently omitted.
When {end} is before {lnum} an error is given.
When {end} is before {lnum} an empty List is returned.
Example: >
:let start = line('.')
:let end = search("^$") - 1
@@ -2593,6 +2671,9 @@ getqflist() *getqflist()*
type type of the error, 'E', '1', etc.
valid non-zero: recognized error message
When there is no error list or it's empty an empty list is
returned.
Useful application: Find pattern matches in multiple files and
do something with them: >
:vimgrep /theword/jg *.c
@@ -2677,6 +2758,11 @@ globpath({path}, {expr}) *globpath()*
The 'wildignore' option applies: Names matching one of the
patterns in 'wildignore' will be skipped.
The "**" item can be used to search in a directory tree.
For example, to find all "README.txt" files in the directories
in 'runtimepath' and below: >
:echo globpath(&rtp, "**/README.txt")
<
*has()*
has({feature}) The result is a Number, which is 1 if the feature {feature} is
supported, zero otherwise. The {feature} argument is a
@@ -2850,19 +2936,34 @@ index({list}, {expr} [, {start} [, {ic}]]) *index()*
:if index(numbers, 123) >= 0
input({prompt} [, {text}]) *input()*
input({prompt} [, {text} [, {completion}]]) *input()*
The result is a String, which is whatever the user typed on
the command-line. The parameter is either a prompt string, or
a blank string (for no prompt). A '\n' can be used in the
prompt to start a new line. The highlighting set with
|:echohl| is used for the prompt. The input is entered just
like a command-line, with the same editing commands and
mappings. There is a separate history for lines typed for
input().
If the optional {text} is present, this is used for the
default reply, as if the user typed this.
NOTE: This must not be used in a startup file, for the
versions that only run in GUI mode (e.g., the Win32 GUI).
prompt to start a new line.
The highlighting set with |:echohl| is used for the prompt.
The input is entered just like a command-line, with the same
editing commands and mappings. There is a separate history
for lines typed for input().
Example: >
:if input("Coffee or beer? ") == "beer"
: echo "Cheers!"
:endif
<
If the optional {text} is present and not empty, this is used
for the default reply, as if the user typed this. Example: >
:let color = input("Color? ", "white")
< The optional {completion} argument specifies the type of
completion supported for the input. Without it completion is
not performed. The supported completion types are the same as
that can be supplied to a user-defined command using the
"-complete=" argument. Refer to |:command-completion| for
more information. Example: >
let fname = input("File: ", "", "file")
<
NOTE: This function must not be used in a startup file, for
the versions that only run in GUI mode (e.g., the Win32 GUI).
Note: When input() is called from within a mapping it will
consume remaining characters from that mapping, because a
mapping is handled like the characters were typed.
@@ -2871,13 +2972,7 @@ input({prompt} [, {text}]) *input()*
that further characters follow in the mapping, e.g., by using
|:execute| or |:normal|.
Example: >
:if input("Coffee or beer? ") == "beer"
: echo "Cheers!"
:endif
< Example with default text: >
:let color = input("Color? ", "white")
< Example with a mapping: >
Example with a mapping: >
:nmap \x :call GetFoo()<CR>:exe "/" . Foo<CR>
:function GetFoo()
: call inputsave()
@@ -2897,6 +2992,22 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
omitted an empty string is returned.
Hitting <Enter> works like pressing the OK button. Hitting
<Esc> works like pressing the Cancel button.
NOTE: Command-line completion is not supported.
inputlist({textlist}) *inputlist()*
{textlist} must be a list of strings. This list is displayed,
one string per line. The user will be prompted to enter a
number, which is returned.
The user can also select an item by clicking on it with the
mouse. For the first string 0 is returned. When clicking
above the first item a negative number is returned. When
clicking on the prompt one more than the length of {textlist}
is returned.
Make sure {textlist} has less then 'lines' entries, otherwise
it won't work. It's a good idea to put the entry number at
the start of the string. Example: >
let color = inputlist(['Select color:', '1. red',
\ '2. green', '3. blue'])
inputrestore() *inputrestore()*
Restore typeahead that was saved with a previous inputsave().
@@ -2921,6 +3032,7 @@ inputsecret({prompt} [, {text}]) *inputsecret()*
|history| stack.
The result is a String, which is whatever the user actually
typed on the command-line in response to the issued prompt.
NOTE: Command-line completion is not supported.
insert({list}, {item} [, {idx}]) *insert()*
Insert {item} at the start of List {list}.
@@ -3303,6 +3415,134 @@ nr2char({expr}) *nr2char()*
characters. nr2char(0) is a real NUL and terminates the
string, thus results in an empty string.
printf({fmt}, {expr1} ...) *printf()*
Return a String with {fmt}, where "%" items are replaced by
the formatted form of their respective arguments. Example: >
printf("%4d: E%d %.30s", lnum, errno, msg)
< May result in:
" 99: E42 asdfasdfasdfasdfasdfasdfasdfas" ~
Often used items are:
%s string
%6s string right-aligned in 6 characters
%c single byte
%d decimal number
%5d decimal number padded with spaces to 5 characters
%x hex number
%04x hex number padded with zeros to at least 4 characters
%X hex number using upper case letters
%o octal number
%% the % character
Conversion specifications start with '%' and end with the
conversion type. All other characters are copied unchanged to
the result.
The "%" starts a conversion specification. The following
arguments appear in sequence:
% [flags] [field-width] [.precision] type
flags
Zero or more of the following flags:
# The value should be converted to an "alternate
form". For c, d, and s conversions, this option
has no effect. For o conversions, the precision
of the number is increased to force the first
character of the output string to a zero (except
if a zero value is printed with an explicit
precision of zero).
For x and X conversions, a non-zero result has
the string "0x" (or "0X" for X conversions)
prepended to it.
0 (zero) Zero padding. For all conversions the converted
value is padded on the left with zeros rather
than blanks. If a precision is given with a
numeric conversion (d, o, x, and X), the 0 flag
is ignored.
- A negative field width flag; the converted value
is to be left adjusted on the field boundary.
The converted value is padded on the right with
blanks, rather than on the left with blanks or
zeros. A - overrides a 0 if both are given.
' ' (space) A blank should be left before a positive
number produced by a signed conversion (d).
+ A sign must always be placed before a number
produced by a signed conversion. A + overrides
a space if both are used.
field-width
An optional decimal digit string specifying a minimum
field width. If the converted value has fewer
characters than the field width, it will be padded
with spaces on the left (or right, if the
left-adjustment flag has been given) to fill out the
field width.
.precision
An optional precision, in the form of a period '.'
followed by an optional digit string. If the digit
string is omitted, the precision is taken as zero.
This gives the minimum number of digits to appear for
d, o, x, and X conversions, or the maximum number of
characters to be printed from a string for s
conversions.
type
A character that specifies the type of conversion to
be applied, see below.
A field width or precision, or both, may be indicated by an
asterisk '*' instead of a digit string. In this case, a
Number argument supplies the field width or precision. A
negative field width is treated as a left adjustment flag
followed by a positive field width; a negative precision is
treated as though it were missing. Example: >
:echo printf("%d: %.*s", nr, width, line)
< This limits the length of the text used from "line" to
"width" bytes.
The conversion specifiers and their meanings are:
doxX The Number argument is converted to signed decimal
(d), unsigned octal (o), or unsigned hexadecimal (x
and X) notation. The letters "abcdef" are used for
x conversions; the letters "ABCDEF" are used for X
conversions.
The precision, if any, gives the minimum number of
digits that must appear; if the converted value
requires fewer digits, it is padded on the left with
zeros.
In no case does a non-existent or small field width
cause truncation of a numeric field; if the result of
a conversion is wider than the field width, the field
is expanded to contain the conversion result.
c The Number argument is converted to a byte, and the
resulting character is written.
s The text of the String argument is used. If a
precision is specified, no more bytes than the number
specified are used.
% A '%' is written. No argument is converted. The
complete conversion specification is "%%".
Each argument can be Number or String and is converted
automatically to fit the conversion specifier. Any other
argument type results in an error message.
*E766* *E767*
The number of {exprN} arguments must exactly match the number
of "%" items. If there are not sufficient or too many
arguments an error is given. Up to 18 arguments can be used.
prevnonblank({lnum}) *prevnonblank()*
Return the line number of the first line at or above {lnum}
that is not blank. Example: >
@@ -3497,8 +3737,14 @@ search({pattern} [, {flags}]) *search()*
'n' do Not move the cursor
'w' wrap around the end of the file
'W' don't wrap around the end of the file
's' set the ' mark at the previous location of the
cursor.
If neither 'w' or 'W' is given, the 'wrapscan' option applies.
If the 's' flag is supplied, the ' mark is set, only if the
cursor is moved. The 's' flag cannot be combined with the 'n'
flag.
When a match has been found its line number is returned.
The cursor will be positioned at the match, unless the 'n'
flag is used).
@@ -3521,6 +3767,25 @@ search({pattern} [, {flags}]) *search()*
: let n = n + 1
:endwhile
<
searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()*
Search for the declaration of {name}.
With a non-zero {global} argument it works like |gD|, find
first match in the file. Otherwise it works like |gd|, find
first match in the function.
With a non-zero {thisblock} argument matches in a {} block
that ends before the cursor position are ignored. Avoids
finding variable declarations only valid in another scope.
Moves the cursor to the found match.
Returns zero for success, non-zero for failure.
Example: >
if searchdecl('myvar') == 0
echo getline('.')
endif
<
*searchpair()*
searchpair({start}, {middle}, {end} [, {flags} [, {skip}]])
Search for the match of a nested start-end pair. This can be
@@ -3795,25 +4060,49 @@ soundfold({word})
the method can be quite slow.
*spellbadword()*
spellbadword() Return the badly spelled word under or after the cursor.
The cursor is advanced to the start of the bad word.
When no bad word is found in the cursor line an empty String
is returned and the cursor doesn't move.
spellbadword([{sentence}])
Without argument: The result is the badly spelled word under
or after the cursor. The cursor is moved to the start of the
bad word. When no bad word is found in the cursor line the
result is an empty string and the cursor doesn't move.
With argument: The result is the first word in {sentence} that
is badly spelled. If there are no spelling mistakes the
result is an empty string.
The return value is a list with two items:
- The badly spelled word or an empty string.
- The type of the spelling error:
"bad" spelling mistake
"rare" rare word
"local" word only valid in another region
"caps" word should start with Capital
Example: >
echo spellbadword("the quik brown fox")
< ['quik', 'bad'] ~
The spelling information for the current window is used. The
'spell' option must be set and the value of 'spelllang' is
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
@@ -3893,12 +4182,12 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
*strlen()*
strlen({expr}) The result is a Number, which is the length of the String
{expr} in bytes. If you want to count the number of
multi-byte characters use something like this: >
{expr} in bytes.
If you want to count the number of multi-byte characters (not
counting composing characters) use something like this: >
:let len = strlen(substitute(str, ".", "x", "g"))
< Composing characters are not counted.
<
If the argument is a Number it is first converted to a String.
For other types an error is given.
Also see |len()|.
@@ -4060,7 +4349,8 @@ system({expr} [, {input}]) *system()* *E677*
taglist({expr}) *taglist()*
Returns a list of tags matching the regular expression {expr}.
Each list item is a dictionary with the following entries:
Each list item is a dictionary with at least the following
entries:
name name of the tag.
filename name of the file where the tag is
defined.
@@ -4079,7 +4369,7 @@ taglist({expr}) *taglist()*
information about these fields. For C code the fields
"struct", "class" and "enum" may appear, they give the name of
the entity the tag is contained in.
The ex-command 'cmd' can be either an ex search pattern, a
line number or a line number followed by a byte number.
@@ -4093,6 +4383,10 @@ taglist({expr}) *taglist()*
located by Vim. Refer to |tags-file-format| for the format of
the tags file generated by the different ctags tools.
*tagfiles()*
tagfiles() Returns a List with the file names used to search for tags for
the current buffer. This is the 'tags' option expanded.
tempname() *tempname()* *temp-file-name*
The result is a String, which is the name of a file that
@@ -4217,6 +4511,8 @@ winheight({nr}) *winheight()*
winline() The result is a Number, which is the screen line of the cursor
in the window. This is counting screen lines from the top of
the window. The first line is one.
If the cursor was moved the view on the file will be updated
first, this may cause a scroll.
*winnr()*
winnr([{arg}]) The result is a Number, which is the number of the current
@@ -4290,6 +4586,7 @@ arabic Compiled with Arabic support |Arabic|.
arp Compiled with ARP support (Amiga).
autocmd Compiled with autocommands support.
balloon_eval Compiled with |balloon-eval| support.
balloon_multiline GUI supports multiline balloons.
beos BeOS version of Vim.
browse Compiled with |:browse| support, and browse() will
work.
@@ -4478,7 +4775,8 @@ builtin functions. To prevent from using the same name in different scripts
avoid obvious, short names. A good habit is to start the function name with
the name of the script, e.g., "HTMLcolor()".
It's also possible to use curly braces, see |curly-braces-names|.
It's also possible to use curly braces, see |curly-braces-names|. And the
|autoload| facility is useful to define a function only when it's called.
*local-function*
A function local to a script must start with "s:". A local script function
@@ -4494,7 +4792,22 @@ instead of "s:" when the mapping is expanded outside of the script.
{name} can also be a Dictionary entry that is a
Funcref: >
:function dict.init
< *E124* *E125*
:fu[nction] /{pattern} List functions with a name matching {pattern}.
Example that lists all functions ending with "File": >
:function /File$
<
*:function-verbose*
When 'verbose' is non-zero, listing a function will also display where it was
last defined. Example: >
:verbose function SetFileTypeSH
function SetFileTypeSH(name)
Last set from /usr/share/vim/vim-7.0/filetype.vim
<
See |:verbose-cmd| for more information.
*E124* *E125*
:fu[nction][!] {name}([arguments]) [range] [abort] [dict]
Define a new function by the name {name}. The name
must be made of alphanumeric characters and '_', and
@@ -4722,7 +5035,7 @@ then define the function like this: >
echo "Done!"
endfunction
The file name and the name used before the colon in the function must match
The file name and the name used before the # in the function must match
exactly, and the defined function must have the name exactly as it will be
called.
@@ -4733,13 +5046,13 @@ a path separator. Thus when calling a function: >
Vim will look for the file "autoload/foo/bar.vim" in 'runtimepath'.
The name before the first colon must be at least two characters long,
otherwise it looks like a scope, such as "s:".
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: >
@@ -4862,7 +5175,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'
@@ -5062,8 +5375,8 @@ This would call the function "my_func_whizz(parameter)".
value of each item.
When an error is detected for a command inside the
loop, execution continues after the "endfor".
Changing {list} affects what items are used. Make a
copy if this is unwanted: >
Changing {list} inside the loop affects what items are
used. Make a copy if this is unwanted: >
:for item in copy(mylist)
< When not making a copy, Vim stores a reference to the
next item in the list, before executing the commands
@@ -5081,12 +5394,6 @@ This would call the function "my_func_whizz(parameter)".
changing. Unlet the variable at the end of the loop
to allow multiple item types.
:for {var} in {string}
:endfo[r] Like ":for" above, but use each character in {string}
as a list item.
Composing characters are used as separate characters.
A Number is first converted to a String.
:for [{var1}, {var2}, ...] in {listlist}
:endfo[r]
Like ":for" above, but each item in {listlist} must be

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*filetype.txt* For Vim version 7.0aa. Last change: 2005 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -44,15 +44,21 @@ Detail: The ":filetype on" command will load one of these files:
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
contents of the file.
To add your own file types, see |new-filetype| below.
To add your own file types, see |new-filetype| below. To search for help on a
filetype prepend "ft-" and optionally append "-syntax", "-indent" or
"-plugin". For example: >
:help ft-vim-indent
:help ft-vim-syntax
:help ft-man-plugin
If the file type is not detected automatically, or it finds the wrong type,
you can either set the 'filetype' option manually, or add a modeline to your
file. Example, for in an IDL file use the command: >
:set filetype=idl
or add this |modeline| to the file: >
/* vim: set filetype=idl : */
<
or add this |modeline| to the file:
/* vim: set filetype=idl : */ ~
*:filetype-plugin-on*
You can enable loading the plugin files for specific file types with: >
:filetype plugin on
@@ -132,16 +138,16 @@ kind of file it is. This doesn't always work. A number of global variables
can be used to overrule the filetype used for certain extensions:
file name variable ~
*.asa g:filetype_asa |aspvbs-syntax| |aspperl-syntax|
*.asp g:filetype_asp |aspvbs-syntax| |aspperl-syntax|
*.asm g:asmsyntax |asm-syntax|
*.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.asm g:asmsyntax |ft-asm-syntax|
*.prg g:filetype_prg
*.pl g:filetype_pl
*.inc g:filetype_inc
*.w g:filetype_w |cweb-syntax|
*.i g:filetype_i |progress-syntax|
*.p g:filetype_p |pascal-syntax|
*.sh g:bash_is_sh |sh-syntax|
*.w g:filetype_w |ft-cweb-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.p g:filetype_p |ft-pascal-syntax|
*.sh g:bash_is_sh |ft-sh-syntax|
*filetype-ignore*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
@@ -178,7 +184,8 @@ A. If you want to overrule all default file type checks.
< 3. To use the new filetype detection you must restart Vim.
The files in the "ftdetect" directory are used after all the default
checks, thus they can overrule a previously detected file type.
checks, thus they can overrule a previously detected file type. But you
can also use |:setfiletype| to keep a previously detected filetype.
B. If you want to detect your file after the default file type checks.
@@ -380,7 +387,7 @@ ways to change this:
3. Docs for the default filetype plugins. *ftplugin-docs*
CHANGELOG *changelog-plugin*
CHANGELOG *ft-changelog-plugin*
Allows for easy entrance of Changelog entries in Changelog files. There are
some commands, mappings, and variables worth exploring:
@@ -401,7 +408,7 @@ Local mappings:
Global mappings:
NOTE: The global mappings are accessed by sourcing the
ftplugin/changelog.vim file first, e.g. with >
runtime ftplugin/man.vim
runtime ftplugin/changelog.vim
< in your |.vimrc|.
<Leader>o Switches to the ChangeLog buffer opened for the
current directory, or opens it in a new buffer if it
@@ -466,7 +473,7 @@ under it. If not found, a new entry and item is prepended to the beginning of
the Changelog.
FORTRAN *fortran-plugin*
FORTRAN *ft-fortran-plugin*
Options:
'expandtab' is switched on to avoid tabs as required by the Fortran
@@ -476,10 +483,10 @@ Options:
'formatoptions' is set to break code and comment lines and to preserve long
lines. You can format comments with |gq|.
For further discussion of fortran_have_tabs and the method used for the
detection of source format see |fortran-syntax|.
detection of source format see |ft-fortran-syntax|.
MAIL *mail-plugin*
MAIL *ft-mail-plugin*
Options:
'modeline' is switched off to avoid the danger of trojan horses, and to
@@ -496,7 +503,7 @@ Local mappings:
to the end of the file in Normal mode. This means "> " is inserted in
each line.
MAN *man-plugin* *:Man*
MAN *ft-man-plugin* *:Man*
Displays a manual page in a nice way. Also see the user manual
|find-manpage|.
@@ -523,7 +530,7 @@ CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.
RPM SPEC *spec-plugin*
RPM SPEC *ft-spec-plugin*
Since the text for this plugin is rather long it has been put in a separate
file: |pi_spec.txt|.

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*fold.txt* For Vim version 7.0aa. Last change: 2005 Sep 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -512,7 +512,8 @@ FOLDCOLUMN *fold-foldcolumn*
'foldcolumn' is a number, which sets the width for a column on the side of the
window to indicate folds. When it is zero, there is no foldcolumn. A normal
value is 4 or 5. The minimal useful value is 2. The maximum is 12.
value is 4 or 5. The minimal useful value is 2, although 1 still provides
some information. The maximum is 12.
An open fold is indicated with a column that has a '-' at the top and '|'
characters below it. This column stops where the open fold stops. When folds

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.0aa. Last change: 2005 Jul 07
*gui.txt* For Vim version 7.0aa. Last change: 2005 Aug 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -79,7 +79,7 @@ All this happens AFTER the normal Vim initializations, like reading your
But the GUI window is only opened after all the initializations have been
carried out. If you want some commands to be executed just after opening the
GUI window, use the |GUIEnter| autocommand event. Example: >
:autocommand GUIEnter * winpos 100 50
:autocmd GUIEnter * winpos 100 50
You can use the gvimrc files to set up your own customized menus (see |:menu|)
and initialize other things that you may want to set up differently from the
@@ -736,9 +736,9 @@ from the main menu bar. You must then use the |:popup| or |:tearoff| command
to display it.
*popup-menu*
In the Win32, KDE, GTK+, Motif, Athena and Photon GUI, you can define the special
menu "PopUp". This is the menu that is displayed when the right mouse button
is pressed, if 'mousemodel' is set to popup or popup_setpos.
In the Win32, KDE, GTK+, Motif, Athena and Photon GUI, you can define the
special menu "PopUp". This is the menu that is displayed when the right mouse
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
5.3 Showing What Menus Are Mapped To *showing-menus*

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2005 Mar 19
*help.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
VIM - main help file
k
@@ -97,6 +97,7 @@ General subjects ~
|quotes.txt| remarks from users of Vim
|todo.txt| known problems and desired extensions
|develop.txt| development of Vim
|debug.txt| debugging Vim itself
|uganda.txt| Vim distribution conditions and what to do with your money
Basic editing ~

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 Mar 29
*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*
@@ -159,17 +160,36 @@ Methods:
buffer Returns the buffer displayed in the window.
height Returns the height of the window.
height = {n} Sets the window height to {n}.
width Returns the width of the window.
width = {n} Sets the window width to {n}.
cursor Returns a [row, col] array for the cursor position.
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 @@
*indent.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*indent.txt* For Vim version 7.0aa. Last change: 2005 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -449,7 +449,7 @@ $VIMRUNTIME/indent directory for examples.
REMARKS ABOUT SPECIFIC INDENT FILES ~
FORTRAN *fortran-indent*
FORTRAN *ft-fortran-indent*
Block if, select case, and where constructs are indented. Comments, labelled
statements and continuation lines are indented if the Fortran is in free
@@ -457,7 +457,7 @@ source form, whereas they are not indented if the Fortran is in fixed source
form because of the left margin requirements. Hence manual indent corrections
will be necessary for labelled statements and continuation lines when fixed
source form is being used. For further discussion of the method used for the
detection of source format see |fortran-syntax|.
detection of source format see |ft-fortran-syntax|.
Do loops ~
All do loops are left unindented by default. Do loops can be unstructured in
@@ -485,7 +485,7 @@ to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.
PYTHON *python-indent*
PYTHON *ft-python-indent*
The amount of indent can be set for the following situations. The examples
given are de the defaults. Note that the variables are set to an expression,
@@ -499,7 +499,7 @@ Indent for a continuation line: >
let g:pyindent_continue = '&sw * 2'
VERILOG *verilog-indent*
VERILOG *ft-verilog-indent*
General block statements such as if, for, case, always, initial, function,
specify and begin, etc., are indented. The module block statements (first
@@ -534,7 +534,7 @@ In addition, you can turn the verbose mode for debug issue: >
Make sure to do ":set cmdheight=2" first to allow the display of the message.
VIM *vim-indent*
VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash: >

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 06
*index.txt* For Vim version 7.0aa. Last change: 2005 Sep 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -150,12 +150,15 @@ commands in CTRL-X submode *i_CTRL-X_index*
|i_CTRL-X_CTRL-K| CTRL-X CTRL-K complete identifiers from dictionary
|i_CTRL-X_CTRL-L| CTRL-X CTRL-L complete whole lines
|i_CTRL-X_CTRL-N| CTRL-X CTRL-N next completion
|i_CTRL-X_CTRL-O| CTRL-X CTRL-O omni completion
|i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion
|i_CTRL-X_CTRL-S| CTRL-X CTRL-S spelling suggestions
|i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus
|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down
|i_CTRL-X_CTRL-U| CTRL-X CTRL-U complete with 'completefunc'
|i_CTRL-X_CTRL-V| CTRL-X CTRL-V complete like in : command line
|i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags
|i_CTRL-X_s| CTRL-X s spelling suggestions
{not available when compiled without the +insert_expand feature}
==============================================================================
@@ -684,6 +687,7 @@ tag char note action in Normal mode ~
of the current screen line
|g8| g8 print hex value of bytes used in UTF-8
character under the cursor
|g<| g< display previous command output
|g?| g? 2 Rot13 encoding operator
|g?g?| g?? 2 Rot13 encode current line
|g?g?| g?g? 2 Rot13 encode current line
@@ -1059,6 +1063,7 @@ 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
|: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
@@ -1066,6 +1071,7 @@ The commands are sorted on the non-optional part of their name.
|:cclose| :ccl[ose] close quickfix window
|:cd| :cd change directory
|:center| :ce[nter] format lines at the center
|:cexpr| :cex[pr] read errors from expr and jump to first
|:cfile| :cf[ile] read file with error messages and jump to first
|:cfirst| :cfir[st] go to the specified error, default first one
|:cgetfile| :cg[etfile] read file with error messages

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2005 Apr 08
*insert.txt* For Vim version 7.0aa. Last change: 2005 Nov 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -354,6 +354,8 @@ 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-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*
-----------------------------------------------------------------------
@@ -363,7 +365,8 @@ option.
The CTRL-O command sometimes has a side effect: If the cursor was beyond the
end of the line, it will be put on the last character in the line. In
mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
will then always put the cursor on it).
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
beware of the cursor possibly being beyond the end of the line.
The shifted cursor keys are not available on all terminals.
@@ -547,7 +550,7 @@ entering new data while keeping all the columns aligned.
==============================================================================
7. Insert mode completion *ins-completion*
In Insert and Replace modes, there are several commands to complete part of a
In Insert and Replace mode, there are several commands to complete part of a
keyword or line that has been typed. This is useful if you are using
complicated keywords (e.g., function names with capitals and underscores).
@@ -565,7 +568,10 @@ Completion can be done for:
7. file names |i_CTRL-X_CTRL-F|
8. definitions or macros |i_CTRL-X_CTRL-D|
9. Vim command-line |i_CTRL-X_CTRL-V|
10. keywords in 'complete' |i_CTRL-N|
10. User defined completion |i_CTRL-X_CTRL-U|
11. omni completion |i_CTRL-X_CTRL-O|
12. Spelling suggestions |i_CTRL-X_s|
13. keywords in 'complete' |i_CTRL-N|
All these (except 2) are done in CTRL-X mode. This is a sub-mode of Insert
and Replace modes. You enter CTRL-X mode by typing CTRL-X and one of the
@@ -612,12 +618,12 @@ Completing whole lines *compl-whole-line*
*i_CTRL-X_CTRL-L*
CTRL-X CTRL-L Search backwards for a line that starts with the
same characters as in the current line before the
cursor. Indent is ignored. The found line is
same characters as those in the current line before
the cursor. Indent is ignored. The matching line is
inserted in front of the cursor.
The 'complete' option is used to decide in which
buffers a match is searched for. But only loaded
buffers are used.
The 'complete' option is used to decide which buffers
are searched for a match. Only loaded buffers are
used.
CTRL-L or
CTRL-P Search backwards for next matching line. This line
replaces the previous matching line.
@@ -668,6 +674,9 @@ at least two characters is matched.
just type:
printf("(%g, %g, %g)", vector[0], ^P[1], ^P[2]);
The search wraps around the end of the file, the value of 'wrapscan' is not
used here.
Multiple repeats of the same completion are skipped; thus a different match
will be inserted at each CTRL-N and CTRL-P (unless there is only one
matching keyword).
@@ -839,7 +848,8 @@ CTRL-X CTRL-D Search in the current and included files for the
Completing Vim commands *compl-vim*
Completion is context-sensitive. It works like on the Command-line. It
completes an Ex command as well as its arguments.
completes an Ex command as well as its arguments. This is useful when writing
a Vim script.
*i_CTRL-X_CTRL-V*
CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
@@ -858,11 +868,11 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
completion, for example: >
:imap <Tab> <C-X><C-V>
User defined completing *compl-function*
User defined completion *compl-function*
Completion is done by a function that can be defined by the user with the
'completefunc' option. See the option for how the function is called and an
example.
'completefunc' option. See the 'completefunc' help for how the function
is called and an example.
*i_CTRL-X_CTRL-U*
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
@@ -875,6 +885,47 @@ CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
previous one.
Omni completion *compl-omni*
Completion is done by a function that can be defined by the user with the
'omnifunc' option. This is to be used for filetype-specific completion.
See the 'completefunc' help for how the function is called and an example.
For remarks about specific filetypes see |compl-omni-filetypes|.
*i_CTRL-X_CTRL-O*
CTRL-X CTRL-O Guess what kind of item is in front of the cursor and
find the first match for it.
CTRL-O or
CTRL-N Use the next match. This match replaces the previous
one.
CTRL-P Use the previous match. This match replaces the
previous one.
Spelling suggestions *compl-spelling*
A word before or at the cursor is located and correctly spelled words are
suggested to replace it. If there is a badly spelled word in the line, before
or under the cursor, the cursor is moved to after it. Otherwise the word just
before the cursor is used for suggestions, even though it isn't badly spelled.
NOTE: CTRL-S suspends display in many Unix terminals. Use 's' instead. Type
CTRL-Q to resume displaying.
*i_CTRL-X_CTRL-S* *i_CTRL-X_s*
CTRL-X CTRL-S or
CTRL-X s Locate the word in front of the cursor and find the
first spell suggestion for it.
CTRL-S or
CTRL-N Use the next suggestion. This replaces the previous
one. Note that you can't use 's' here.
CTRL-P Use the previous suggestion. This replaces the
previous one.
Completing keywords from different sources *compl-generic*
*i_CTRL-N*
@@ -900,6 +951,202 @@ CTRL-P Find previous match for words that start with the
copy the words following the previous expansion in
other contexts unless a double CTRL-X is used.
INSERT COMPLETION POPUP MENU *ins-completion-menu*
Vim can display the matches in a simplistic popup menu.
The menu is used when:
- The 'completeopt' option contains "menu".
- The 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
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,
because it adds extra information that is needed for completion. You can find
it here: http://ctags.sourceforge.net/
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
% ctags -R -f ~/.vim/systags /usr/include /usr/local/include
In your vimrc file add this tags file to the 'tags' option: >
set tags+=~/.vim/systags
When using CTRL-X CTRL-O after a name without any "." or "->" it is completed
from the tags file directly. This works for any identifier, also function
names. If you want to complete a local variable name, which does not appear
in the tags file, use CTRL-P instead.
When using CTRL-X CTRL-O after something that has "." or "->" Vim will attempt
to recognize the type of the variable and figure out what members it has.
This means only members valid for the variable will be listed.
When a member name already was complete, CTRL-X CTRL-O will add a "." or
"->" for composite types.
Vim doesn't include a C compiler, only the most obviously formatted
declarations are recognized. Preprocessor stuff may cause confusion.
When the same structure name appears in multiple places all possible members
are included.
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
also works for other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggest
inside of an a tag)
- inside of tag complete proper attributes (no width attribute for an
a tag)
- when attribute has limited number of possible values help to complete
them
- 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
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
XML *ft-xml-omni*
Vim 7 provides mechanism to context aware completion of XML files. It depends
on special |xml-data-file| and two commands: |:XMLns| and |:XMLent|. Features
are:
- 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-data-file| 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 xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
==============================================================================
8. Insert mode commands *inserting*
@@ -1004,6 +1251,7 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
Note that when using this command in a function or
script, the insertion only starts after the function
or script is finished.
This command does not work from |:normal|.
{not in Vi}
{not available when compiled without the +ex_extra
feature}

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.0aa. Last change: 2005 Jun 12
*intro.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -151,31 +151,19 @@ example and try to find out which settings or other things influence the
appearance of the bug. Try different machines, if possible. Send me patches
if you can!
In case of doubt, use: >
It will help to include information about the version of Vim you are using and
your setup. You can get the information with this command: >
:so $VIMRUNTIME/bugreport.vim
This will create a file "bugreport.txt" in the current directory, with a lot
of information of your environment. Before sending this out, check if it
doesn't contain any confidential information!
*debug-vim*
When Vim crashes in one of the test files, and you are using gcc for
compilation, here is what you can do to find out exactly where Vim crashes:
If Vim crashes, please try to find out where. You can find help on this here:
|debug.txt|.
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
which you can uncomment).
2. Execute these commands (replace "11" with the test that fails): >
cd testdir
gdb ../vim
run -u unix.vim -U NONE -s dotest.in test11.in
3. Check where Vim crashes, gdb should give a message for this.
4. Get a stack trace from gdb with this command: >
where
< You can check out different places in the stack trace with: >
frame 3
< Replace "3" with one of the numbers in the stack trace.
In case of doubt or when you wonder if the problem has already been fixed but
you can't find a fix for it, become a member of the vim-dev maillist and ask
your question there. |maillist|
*year-2000* *Y2K*
Since Vim internally doesn't use dates for editing, there is no year 2000

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2005 Jun 03
*map.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -273,6 +273,16 @@ with a space.
Note: When using mappings for Visual mode, you can use the "'<" mark, which
is the start of the last selected Visual area in the current buffer |'<|.
*:map-verbose*
When 'verbose' is non-zero, listing a key map will also display where it was
last defined. Example: >
:verbose map <C-W>*
n <C-W>* * <C-W><C-S>*
Last set from /home/abcd/.vimrc
See |:verbose-cmd| for more information.
*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
@@ -296,11 +306,12 @@ 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*
It's not possible to use a CTRL-C in the {lhs}. You just can't map CTRL-C.
The reason is that CTRL-C must always be available to break a running command.
Exception: When using the GUI version on MS-Windows CTRL-C can be mapped to
allow a Copy command to the clipboard. Use CTRL-Break to interrupt Vim.
*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
CTRL-C interrupts/breaks the command.
When using the GUI version on MS-Windows CTRL-C can be mapped to allow a Copy
command to the clipboard. Use CTRL-Break to interrupt Vim.
*map_space_in_lhs*
To include a space in {lhs} precede it with a CTRL-V (type two CTRL-Vs for
@@ -656,6 +667,16 @@ used in a |filetype-plugin| file. Example for a C plugin file: >
mode, '!' for both. These are the same as for
mappings, see |map-listing|.
*:abbreviate-verbose*
When 'verbose' is non-zero, listing an abbreviation will also display where it
was last defined. Example: >
:verbose abbreviate
! teh the
Last set from /home/abcd/vim/abbr.vim
See |:verbose-cmd| for more information.
:ab[breviate] {lhs} list the abbreviations that start with {lhs}
You may need to insert a CTRL-V (type it twice) to
avoid that a typed {lhs} is expanded, since
@@ -855,6 +876,17 @@ scripts.
:com[mand] {cmd} List the user-defined commands that start with {cmd}
*:command-verbose*
When 'verbose' is non-zero, listing a command will also display where it was
last defined. Example: >
:verbose command TOhtml
Name Args Range Complete Definition
TOhtml 0 % :call Convert2HTML(<line1>, <line2>)
Last set from /usr/share/vim/vim-7.0/plugin/tohtml.vim
<
See |:verbose-cmd| for more information.
*E174* *E182*
:com[mand][!] [{attr}...] {cmd} {rep}
Define a user command. The name of the command is
@@ -934,8 +966,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 >
@@ -949,13 +983,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
@@ -974,9 +1008,10 @@ the 'path' option: >
:com -nargs=1 -bang -complete=customlist,EditFileComplete
\ EditFile edit<bang> <args>
:fun EditFileComplete(A,L,P)
: return split(globpath(&path, a:ArgLead))
: 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,
@@ -1056,8 +1091,7 @@ To allow commands to pass their arguments on to a user-defined function, there
is a special form <f-args> ("function args"). This splits the command
arguments at spaces and Tabs, quotes each argument individually, and the
<f-args> sequence is replaced by the comma-separated list of quoted arguments.
See the Mycmd example below. When there is no argument, <f-args> also has no
argument.
See the Mycmd example below. If no arguments are given <f-args> is removed.
Examples >

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 Feb 13
*message.txt* For Vim version 7.0aa. Last change: 2005 Oct 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,6 +21,14 @@ depends on the 'shortmess' option.
The number of remembered messages is fixed at 20.
*g<*
The "g<" command can be used to see the last page of previous command output.
This is especially useful if you accidentally typed <Space> at the hit-enter
prompt.
Note: when you stopped the output with "q" at the more prompt only up to that
point will be displayed.
The previous command output is cleared when another command produces output.
If you are using translated messages, the first printed line tells who
maintains the messages or the translations. You can use this to contact the
maintainer when you spot a mistake.
@@ -279,6 +287,19 @@ Example: >
changes to: >
:w! /tmp/test
<
*E768* >
Swap file exists: {filename} (:silent! overrides)
You are protected from overwriting a file that is being edited by Vim. This
happens when you use ":w! filename" and a swapfile is found.
- If the swapfile was left over from an old crashed edit session you may want
to delete the swapfile. Edit {filename} to find out information about the
swapfile.
- If you want to write anyway prepend ":silent!" to the command. For example: >
:silent! w! /tmp/test
< The special command is needed, since you already added the ! for overwriting
an existing file.
*E139* >
File is loaded in another buffer
@@ -568,6 +589,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
@@ -714,9 +736,10 @@ a user-defined command.
This is an (incomplete) overview of various messages that Vim gives:
*hit-enter* *press-enter* *hit-return* *press-return* >
*hit-enter* *press-enter* *hit-return*
*press-return* *hit-enter-prompt*
Hit ENTER or type command to continue
Press ENTER or type command to continue
This message is given when there is something on the screen for you to read,
and the screen is about to be redrawn:
@@ -724,10 +747,13 @@ and the screen is about to be redrawn:
- Something is displayed on the status line that is longer than the width of
the window, or runs into the 'showcmd' or 'ruler' output.
-> Hit <Enter> or <Space> to redraw the screen and continue, without that key
being used otherwise.
-> Hit ":" or any other Normal mode command character to start that command.
-> Hit <C-Y> to copy (yank) a modeless selection to the clipboard register.
-> Press <Enter> or <Space> to redraw the screen and continue, without that
key being used otherwise.
-> Press ':' or any other Normal mode command character to start that command.
-> Press 'k', 'u', 'b' or 'g' to scroll back in the messages. This works the
same way as at the |more-prompt|. Only works when 'compatible' is off and
'more' is on.
-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
-> Use a menu. The characters defined for Cmdline-mode are used.
-> When 'mouse' contains the 'r' flag, clicking the left mouse button works
like pressing <Space>. This makes it impossible to select text though.
@@ -735,19 +761,24 @@ and the screen is about to be redrawn:
pressing <Space>.
{Vi: only ":" commands are interpreted}
If you accidentally hit <Enter> or <Space> and you want to see the displayed
text then use |g<|. This only works when 'more' is set.
To reduce the number of hit-enter prompts:
- Set 'cmdheight' to 2 or higher.
- 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.
*more-prompt* *pager* >
-- More --
-- More -- (RET: line, SPACE: page, d: half page, q: quit)
-- More -- (RET/BS: line, SPACE/b: page, d/u: half page, q: quit)
-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit
This message is given when the screen is filled with messages. It is only
given when the 'more' option is on. It is highlighted with the |hl-MoreMsg|
@@ -755,11 +786,16 @@ group.
Type effect ~
<CR> or <NL> or j or <Down> one more line
d down a page (half a screen)
<Space> or <PageDown> down a screen
G down all the way, until the hit-enter
prompt
<BS> or k or <Up> one line back (*)
<Space> or <PageDown> next page
b or <PageUp> previous page (*)
d down half a page
u up half a page (*)
u up a page (half a screen) (*)
b or <PageUp> back a screen (*)
g back to the start (*)
q, <Esc> or CTRL-C stop the listing
: stop the listing and enter a
command-line
@@ -771,8 +807,8 @@ Type effect ~
Any other key causes the meaning of the keys to be displayed.
(*) backwards scrolling is only supported for these commands: >
:clist
(*) backwards scrolling is {not in Vi}. Only scrolls back to where messages
started to scroll.
(**) Clicking the left mouse button only works:
- For the GUI: in the last line of the screen.
- When 'r' is included in 'mouse' (but then selecting text won't work).
@@ -781,4 +817,8 @@ Any other key causes the meaning of the keys to be displayed.
Note: The typed key is directly obtained from the terminal, it is not mapped
and typeahead is ignored.
The |g<| command can be used to see the last page of previous command output.
This is especially useful if you accidentally typed <Space> at the hit-enter
prompt.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2005 Jul 19
*motion.txt* For Vim version 7.0aa. Last change: 2005 Sep 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -72,13 +72,13 @@ and end position. Generally, motions that move between lines affect lines
characterwise). However, there are some exceptions.
*exclusive* *inclusive*
A character motion is either inclusive or exclusive. When inclusive, the start
and end position of the motion are included in the operation. When exclusive,
the last character towards the end of the buffer is not included. Linewise
motions always include the start and end position.
A character motion is either inclusive or exclusive. When inclusive, the
start and end position of the motion are included in the operation. When
exclusive, the last character towards the end of the buffer is not included.
Linewise motions always include the start and end position.
Which motions are linewise, inclusive or exclusive is mentioned below. There
are however, two general exceptions:
Which motions are linewise, inclusive or exclusive is mentioned with the
command. There are however, two general exceptions:
1. If the motion is exclusive and the end of the motion is in column 1, the
end of the motion is moved to the end of the previous line and the motion
becomes inclusive. Example: "}" moves to the first line after a paragraph,
@@ -247,7 +247,7 @@ f{char} To [count]'th occurrence of {char} to the right. The
*F*
F{char} To the [count]'th occurrence of {char} to the left.
The cursor is placed on {char} |inclusive|.
The cursor is placed on {char} |exclusive|.
{char} can be entered like with the |f| command.
*t*
@@ -259,7 +259,7 @@ t{char} Till before [count]'th occurrence of {char} to the
*T*
T{char} Till after [count]'th occurrence of {char} to the
left. The cursor is placed on the character right of
{char} |inclusive|.
{char} |exclusive|.
{char} can be entered like with the |f| command.
*;*
@@ -642,6 +642,8 @@ i' *v_i'* *i'*
i` *v_i`* *i`*
Like a", a' and a`, but exclude the quotes and
repeating won't extend the Visual selection.
Special case: With a count of 2 the quotes are
included, but no extra white space as with a"/a'/a`.
When used after an operator:
For non-block objects:

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 18
*options.txt* For Vim version 7.0aa. Last change: 2005 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -19,7 +19,7 @@ achieve special effects. These options come in three forms:
string has a string value
==============================================================================
1. Setting options *set-option*
1. Setting options *set-option* *E764*
*:se* *:set*
:se[t] Show all options that differ from their default value.
@@ -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}
@@ -560,12 +558,20 @@ is entered, this is almost like having global options. If 's' and 'S' are not
present, the options are copied from the currently active buffer when the
buffer is created.
Not all options are supported in all versions. To test if option "foo" can be
used with ":set" use "exists('&foo')". This doesn't mean the value is
actually remembered and works. Some options are hidden, which means that you
can set them but the value is not remembered. To test if option "foo" is
really supported use "exists('+foo')".
Hidden options *hidden-options*
Not all options are supported in all versions. This depends on the supported
features and sometimes on the system. A remark about this is in curly braces
below. When an option is not supported it may still be set without getting an
error, this is called a hidden option. You can't get the value of a hidden
option though, it is not stored.
To test if option "foo" can be used with ":set" use something like this: >
if exists('&foo')
This also returns true for a hidden option. To test if option "foo" is really
supported use something like this: >
if exists('+foo')
<
*E355*
A jump table for the options with a short description can be found at |Q_op|.
@@ -657,12 +663,14 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{only available when compiled with the
|+netbeans_intg| or |+sun_workshop| feature}
When on, Vim will change its value for the current working directory
whenever you open a file, switch buffers, delete a buffer or
open/close a window. It will change to the directory containing the
file which was opened or selected. This option is provided for
backward compatibility with the Vim released with Sun ONE Studio 4
Enterprise Edition.
When on, Vim will change the current working directory whenever you
open a file, switch buffers, delete a buffer or open/close a window.
It will change to the directory containing the file which was opened
or selected.
This option is provided for backward compatibility with the Vim
released with Sun ONE Studio 4 Enterprise Edition.
Note: When this option is on some plugins may not work. The directory
browser sets if off.
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
@@ -978,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)
@@ -1013,7 +1024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The evaluation of the expression must not have side effects!
Example: >
function! MyBalloonExpr()
return 'Cursor is at line ' . v:beval_lnum .
return 'Cursor is at line ' . v:beval_lnum .
\', column ' . v:beval_col .
\ ' of file ' . bufname(v:beval_bufnr) .
\ ' on word "' . v:beval_text . '"'
@@ -1026,6 +1037,9 @@ A jump table for the options with a short description can be found at |Q_op|.
Vim does not try to send a message to an external debugger (Netbeans
or Sun Workshop).
To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline")
<
*'binary'* *'bin'* *'nobinary'* *'nobin'*
'binary' 'bin' boolean (default off)
local to buffer
@@ -1061,7 +1075,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'bioskey' 'biosk' boolean (default on)
global
{not in Vi} {only for MS-DOS}
When on the bios is called to obtain a keyboard character. This works
When on the BIOS is called to obtain a keyboard character. This works
better to detect CTRL-C, but only works for the console. When using a
terminal over a serial port reset this option.
Also see |'conskey'|.
@@ -1095,7 +1109,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+linebreak|
feature}
This option lets you choose which characters might cause a line
break if 'linebreak' is on.
break if 'linebreak' is on. Only works for ASCII and also for 8-bit
characters when 'encoding' is an 8-bit encoding.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
@@ -1195,9 +1210,10 @@ A jump table for the options with a short description can be found at |Q_op|.
these words, separated by a comma:
internal Use internal case mapping functions, the current
locale does not change the case mapping. This only
matters when 'encoding' is a Unicode encoding. When
"internal" is omitted, the towupper() and towlower()
system library functions are used when available.
matters when 'encoding' is a Unicode encoding,
"latin1" or "iso-8859-15". When "internal" is
omitted, the towupper() and towlower() system library
functions are used when available.
keepascii For the ASCII characters (0x00 to 0x7f) use the US
case mapping, the current locale is not effective.
This probably only matters for Turkish.
@@ -1579,46 +1595,106 @@ A jump table for the options with a short description can be found at |Q_op|.
'completefunc' 'cfu' string (default: empty)
local to buffer
{not in Vi}
This option specifies a completion function to be used for CTRL-X
CTRL-X. The function will be invoked with four arguments:
a:line the text of the current line
a:base the text with which matches should match
a:col column in a:line where the cursor is, first column is
zero
a:findstart either 1 or 0
When the a:findstart argument is 1, the function must return the
column of where the completion starts. It must be a number between
zero and "a:col". This involves looking at the characters in a:line
before column a:col and include those characters that could be part of
the completed item.
When the a:findstart argument is 0 the function must return a string
with the matching words, separated by newlines. When there are no
matches return an empty string.
{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|
The function will be invoked with two arguments. First the function
is called to find the start of the text to be completed. Secondly the
function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
The function must return the column of where the completion starts.
It must be a number between zero and the cursor column "col('.')".
This involves looking at the characters just before the cursor and
including those characters that could be part of the completed item.
The text between this column and the cursor column will be replaced
with the matches. Return -1 if no completion can be done.
On the second invocation the arguments are:
a:findstart 0
a:base the text with which matches should match, what was
located in the first call (can be empty)
The function must return a List with the matching words. These
matches usually include the "a:base" text. When there are no matches
return an empty List.
When searching for matches takes some time call |complete_add()| to
add each match to the total list. These matches should then not
appear in the returned list! Call |complete_check()| now and then to
allow the user to press a key while still searching for matches. Stop
searching when it returns non-zero.
The function may move the cursor, it is restored afterwards.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
An example that completes the names of the months: >
fun! CompleteMonths(line, base, col, findstart)
fun! CompleteMonths(findstart, base)
if a:findstart
" locate start column of word
let start = a:col
while start > 0 && a:line[start - 1] =~ '\a'
let start = start - 1
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
let res = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
if a:base != ''
let res = substitute(res, '\c\<\(\(' . a:base . '.\{-}\>\)\|.\{-}\>\)', '\2', 'g')
endif
let res = substitute(res, ' \+', "\n", 'g')
let res = []
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call add(res, m)
endif
endfor
return res
endif
endfun
set completefunc=CompleteMonths
< Note that a substitute() function is used to reduce the list of
possible values and remove the ones that don't match the base. The
part before the "\|" matches the base, the part after it is used
when there is no match. The "\2" in the replacement is empty if the
part before the "\|" does not match.
<
The same, but now pretending searching for matches is slow: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call complete_add(m)
endif
sleep 300m " simulate searching for next match
if complete_check()
break
endif
endfor
return []
endif
endfun
set completefunc=CompleteMonths
<
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu")
global
{not in Vi}
Options for Insert mode completion |ins-completion|.
Currently the only supported value is:
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)
@@ -1937,9 +2013,9 @@ A jump table for the options with a short description can be found at |Q_op|.
*cpo-\*
\ Backslash in a [] range in a search pattern is taken
literally, only "\]" is special See |/[]|
'l' included: "/[ \t]" finds <Space>, '\' and 't'
'l' excluded: "/[ \t]" finds <Space> and <Tab>
Also see |cpo-\|.
'\' included: "/[ \-]" finds <Space>, '\' and '-'
'\' excluded: "/[ \-]" finds <Space> and '-'
Also see |cpo-l|.
*cpo-/*
/ When "%" is used as the replacement string in a |:s|
command, use the previous replacement string. |:s%|
@@ -2163,10 +2239,10 @@ A jump table for the options with a short description can be found at |Q_op|.
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
put the swap file relative to where the edited file is. The leading
"." is replaced with the path name of the edited file.
- For Unix and Win32, if a directory ends in two path separators, the
swap file name will be built from the complete path to the file
with all path separators substituted to percent '%' signs. This will
ensure file name uniqueness in the preserve directory.
- For Unix and Win32, if a directory ends in two path separators "//"
or "\\", the swap file name will be built from the complete path to
the file with all path separators substituted to percent '%' signs.
This will ensure file name uniqueness in the preserve directory.
- Spaces after the comma are ignored, other spaces are considered part
of the directory name. To have a space at the start of a directory
name, precede it with a backslash.
@@ -2278,8 +2354,8 @@ A jump table for the options with a short description can be found at |Q_op|.
setting 'encoding' to one of these values instead of utf-8 only has
effect for encoding used for files when 'fileencoding' is empty.
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
not set yet, the default for 'fileencodings' is changed.
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
not set yet, the default for 'fileencodings' is changed.
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
'endofline' 'eol' boolean (default on)
@@ -2852,10 +2928,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.
@@ -3319,7 +3396,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
@@ -3360,6 +3439,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")
@@ -3584,9 +3667,14 @@ A jump table for the options with a short description can be found at |Q_op|.
Pattern to be used to find an include command. It is a search
pattern, just like for the "/" command (See |pattern|). The default
value is for C programs. This option is used for the commands "[i",
"]I", "[d", etc. The 'isfname' option is used to recognize the file
name that comes after the matched pattern. See |option-backslash|
about including spaces and backslashes.
"]I", "[d", etc.
Normally the 'isfname' option is used to recognize the file name that
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'*
'includeexpr' 'inex' string (default "")
@@ -3634,7 +3722,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
@@ -3685,9 +3773,9 @@ A jump table for the options with a short description can be found at |Q_op|.
- Use CTRL-O to execute one Normal mode command |i_CTRL-O|). When
this is a mapping, it is executed as if 'insertmode' was off.
Normal mode remains active until the mapping is finished.
*i_CTRL-L*
- Use CTRL-L to execute a number of Normal mode commands, then use
<Esc> to get back to Insert mode.
<Esc> to get back to Insert mode. Note that CTRL-L moves the cursor
left, like <Esc> does when 'insertmode' isn't set. |i_CTRL-L|
These items change when 'insertmode' is set:
- when starting to edit of a file, Vim goes to Insert mode.
@@ -4237,6 +4325,45 @@ A jump table for the options with a short description can be found at |Q_op|.
generated from a list of items, e.g., the Buffers menu. Changing this
option has no direct effect, the menu must be refreshed first.
*'mkspellmem'* *'msm'*
'mkspellmem' 'msm' string (default "460000,2000,500")
global
{not in Vi}
{not available when compiled without the |+syntax|
feature}
Parameters for |:mkspell|. This tunes when to start compressing the
word tree. Compression can be slow when there are many words, but
it's needed to avoid running out of memory. The amount of memory used
per word depends very much on how similar the words are, that's why
this tuning is complicated.
There are three numbers, separated by commas:
{start},{inc},{added}
For most languages the uncompressed word tree fits in memory. {start}
gives the amount of memory in Kbyte that can be used before any
compression is done. It should be a bit smaller than the amount of
memory that is available to Vim.
When going over the {start} limit the {inc} number specifies the
amount of memory in Kbyte that can be allocated before another
compression is done. A low number means compression is done after
less words are added, which is slow. A high number means more memory
will be allocated.
After doing compression, {added} times 1024 words can be added before
the {inc} limit is ignored and compression is done when any extra
amount of memory is needed. A low number means there is a smaller
chance of hitting the {inc} limit, less memory is used but it's
slower.
The languages for which these numbers are important are Italian and
Hungarian. The default works for when you have about 512 Mbyte. If
you have 1 Gbyte you could use: >
:set mkspellmem=900000,3000,800
< If you have less than 512 Mbyte |:mkspell| may fail for some
languages, no matter what you set 'mkspellmem' to.
*'modeline'* *'ml'* *'nomodeline'* *'noml'*
'modeline' 'ml' boolean (Vim default: on, Vi default: off)
local to buffer
@@ -4500,6 +4627,18 @@ A jump table for the options with a short description can be found at |Q_op|.
The minimum value is 1, the maximum value is 10.
NOTE: 'numberwidth' is reset to 8 when 'compatible' is set.
*'omnifunc'* *'ofu'*
'omnifunc' 'ofu' string (default: empty)
local to buffer
{not in Vi}
{not available when compiled without the +eval
or +insert_expand feature}
This option specifies a function to be used for CTRL-X CTRL-O
completion. |i_CTRL-X_CTRL-O|
For the use of the function see 'completefunc'.
*'osfiletype'* *'oft'* *E366*
'osfiletype' 'oft' string (RISC-OS default: "Text",
others default: "")
@@ -5046,6 +5185,9 @@ A jump table for the options with a short description can be found at |Q_op|.
Minimal number of lines to scroll when the cursor gets off the
screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E,
CTRL-D). Useful if your terminal scrolls very slowly.
When set to a negative number from -1 to -100 this is used as the
percentage of the window height. Thus -50 scrolls half the window
height.
NOTE: This option is set to 1 when 'compatible' is set.
*'scrolloff'* *'so'*
@@ -5543,13 +5685,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
@@ -5649,11 +5791,13 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Pattern to locate the end of a sentence. The following word will be
checked to start with a capital letter. If not then it is highlighted
with SpellCap |hl-SpellCap|.
with SpellCap |hl-SpellCap| (unless the word is also badly spelled).
When this check is not wanted make this option empty.
Only used when 'spell' is set.
Be careful with special characters, see |option-backslash| about
including spaces and backslashes.
To set this option automatically depending on the language, see
|set-spc-auto|.
*'spellfile'* *'spf'*
'spellfile' 'spf' string (default empty)
@@ -5700,6 +5844,7 @@ A jump table for the options with a short description can be found at |Q_op|.
region by listing them: "en_us,en_ca" supports both US and Canadian
English, but not words specific for Australia, New Zealand or Great
Britain.
*E757*
As a special case the name of a .spl file can be given as-is. The
first "_xx" in the name is removed and used as the region name
(_xx is an underscore, two letters and followed by a non-letter).
@@ -5710,6 +5855,11 @@ A jump table for the options with a short description can be found at |Q_op|.
files twice.
How the related spell files are found is explained here: |spell-load|.
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
up to the first comma, dot or underscore. See |set-spc-auto|.
*'spellsuggest'* *'sps'*
'spellsuggest' 'sps' string (default "best")
global
@@ -5735,6 +5885,11 @@ 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?|.
Not used for |spellsuggest()|. The number of
suggestions is never more than the value of 'lines'
minus two.
file:{filename} Read file {filename}, which must have two columns,
separated by a slash. The first column contains the
bad word, the second column the suggested good word.
@@ -6156,6 +6311,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"*", "**" and other wildcards can be used to search for tags files in
a directory tree. See |file-searching|. {not available when compiled
without the |+path_extra| feature}
The |tagfiles()| function can be used to get a list of the file names
actually used.
If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag
files are also supported. They are automatically recognized. The
default value becomes "./tags,./TAGS,tags,TAGS", unless case
@@ -7182,7 +7339,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
'wrapscan' 'ws' boolean (default on) *E384* *E385*
global
Searches wrap around the end of the file.
Searches wrap around the end of the file. Also applies to |]s| and
|[s|, searching for spelling mistakes.
*'write'* *'nowrite'*
'write' boolean (default on)

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2005 May 22
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Sep 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -117,6 +117,14 @@ gD Goto global Declaration. When the cursor is on a
like "gd", except that the search for the keyword
always starts in line 1. {not in Vi}
*1gd*
1gd Like "gd", but ignore matches inside a {} block that
ends before the cursor position. {not in Vi}
*1gD*
1gD Like "gD", but ignore matches inside a {} block that
ends before the cursor position. {not in Vi}
*CTRL-C*
CTRL-C Interrupt current (search) command. Use CTRL-Break on
MS-DOS |dos-CTRL-Break|.
@@ -943,6 +951,10 @@ x A single character, with no special meaning, matches itself
"\_[^ab]" matches the end-of-line and any character but "a" and "b".
This makes it Vi compatible: Without the "\_" or "\n" the collection
does not match an end-of-line.
*E769*
When the ']' is not there Vim will not give an error message but
assume no collection is used. Useful to search for '['. However, you
do get E769 for internal searching.
If the sequence begins with "^", it matches any single character NOT
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.

File diff suppressed because it is too large Load Diff

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

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 May 20
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Sep 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,6 +110,11 @@ 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
errorfile to the current quickfix list. If a quickfix
list is not present, then a new list is created.
*:cb* *:cbuffer* *E681*
:cb[uffer] [bufnr] Read the error list from the current buffer.
When [bufnr] is given it must be the number of a
@@ -118,6 +123,19 @@ 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|
for [!].
Examples: >
:cexpr system('grep -n xyz *')
:cexpr getline(1, '$')
<
*:cl* *:clist*
:cl[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|.
@@ -334,6 +352,8 @@ advantages are:
Examples: >
:vimgrep /an error/ *.c
:vimgrep /\<FileName\>/ *.h include/*
:vimgrep /myfunc/ **/*.c
< For the use of "**" see |starstar-wildcard|.
:vim[grep][!] {pattern} {file} ...
Like above, but instead of enclosing the pattern in a
@@ -611,15 +631,13 @@ Basic items
%% the single '%' character
%s search text (finds a string)
The "%f" conversion depends on the current 'isfname' setting. "~/" is
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. They
should be followed by a character that cannot be in the string. Everything
up to that character is included in the string. But when the next character
is a '%' or a backslash, "%f" will look for any 'isfname' character and "%m"
finds anything. If the "%f" or "%m" is at the end, everything up to the end
of the line is included.
The "%f" and "%m" conversions have to detect the end of the string. This
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.
On MS-DOS, MS-Windows and OS/2 a leading "C:" will be included in "%f", even
when using "%f:". This means that a file name which is a single alphabetical

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 13
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Nov 25
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
@@ -756,6 +757,7 @@ Short explanation of each option: *option-list*
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers
|'menuitems'| |'mis'| maximum number of items in a menu
|'mkspellmem'| |'msm'| memory used before |:mkspell| compresses the tree
|'modeline'| |'ml'| recognize modelines at start or end of file
|'modelines'| |'mls'| number of lines checked for modelines
|'modifiable'| |'ma'| changes to the text are not possible
@@ -771,6 +773,7 @@ Short explanation of each option: *option-list*
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|'number'| |'nu'| print the line number in front of each line
|'numberwidth'| |'nuw'| number of columns used for the line number
|'omnifunc'| |'ofu'| function for filetype-specific completion
|'osfiletype'| |'oft'| operating system-specific filetype information
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|'paste'| allow pasting text
@@ -933,6 +936,11 @@ Short explanation of each option: *option-list*
|:cprevious| :cp display the previous error
|:clist| :cl list all errors
|:cfile| :cf read errors from the file 'errorfile'
|:cgetfile| :cg like :cfile but don't jump to the first error
|:caddfile| :cad add errors from the error file to the current
quickfix list
|:cbuffer| :cb read errors from text in a buffer
|:cexpr| :cex read errors from an expression
|:cquit| :cq quit without writing and return error code (to
the compiler)
|:make| :make [args] start make, read errors, and jump to first

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Jul 05
*spell.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -33,11 +33,17 @@ The words that are not recognized are highlighted with one of these:
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
word. Note: this slows down the appearance of the popup menu.
To search for the next misspelled word:
*]s* *E756*
]s Move to next misspelled word after the cursor.
A count before the command can be used to repeat.
'wrapscan' applies.
*[s*
[s Like "]s" but search backwards, find the misspelled
@@ -54,17 +60,23 @@ To search for the next misspelled word:
[S Like "]S" but search backwards.
To add words to your own word list: *E764*
To add words to your own word list:
*zg*
zg Add word under the cursor as a good word to the first
name in 'spellfile'. In Visual mode the selected
characters are added as a word (including white
space!). If the word is explicitly marked as bad word
in another spell file the result is unpredictable.
A count may precede the command to indicate the entry
in 'spellfile' to be used. A count of two uses the
second entry.
name in 'spellfile'. A count may precede the command
to indicate the entry in 'spellfile' to be used. A
count of two uses the second entry.
In Visual mode the selected characters are added as a
word (including white space!).
When the cursor is on text that is marked as badly
spelled then the marked text is used.
Otherwise the word under the cursor, separated by
non-word characters, is used.
If the word is explicitly marked as bad word in
another spell file the result is unpredictable.
*zG*
zG Like "zg" but add the word to the internal word list
@@ -119,34 +131,46 @@ z? For the word under/after the cursor suggest correctly
e.g., when the word after it is bad.
The results are sorted on similarity to the word
under/after the cursor.
This may take a long time. Hit CTRL-C when you are
This may take a long time. Hit CTRL-C when you get
bored.
This does not work when there is a line break halfway
a bad word (e.g., "the the").
You can enter the number of your choice or press
<Enter> if you don't want to replace. You can also
use the mouse to click on your choice (only works if
the mouse can be used in Normal mode and when there
are no line wraps). Click on the first (header) line
to cancel.
If 'verbose' is non-zero a score will be displayed to
indicate the likeliness to the badly spelled word (the
higher the score the more different).
If the command is used without a count the
alternatives are listed and you can enter the number
of your choice or press <Enter> if you don't want to
replace. You can also use the mouse to click on your
choice (only works if the mouse can be used in Normal
mode and when there are no line wraps). Click on the
first line (the header) to cancel.
If a count is used that suggestion is used, without
prompting. For example, "1z?" always takes the first
suggestion.
If 'verbose' is non-zero a score will be displayed
with the suggestions to indicate the likeliness to the
badly spelled word (the higher the score the more
different).
When a word was replaced the redo command "." will
repeat the word replacement. This works like "ciw",
the good word and <Esc>.
the good word and <Esc>. This does NOT work for Thai
and other languages without spaces between words.
*:spellr* *:spellrepall* *E752* *E753*
: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
CTRL-X s to find suggestions. This works like Insert mode completion. Use
CTRL-N to use the next suggestion, CTRL-P to go back. |i_CTRL-X_s|
The 'spellsuggest' option influences how the list of suggestions is generated
and sorted. See |'spellsuggest'|.
The 'spellcapcheck' option is used to check the first word of a sentence
starts with a capital. This doesn't work for the first word in the file.
When there is a line break right after a sentence the highlighting of the next
line may be postponed. Use |CTRL-L| when needed.
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.
==============================================================================
2. Remarks on spell checking *spell-remarks*
@@ -185,6 +209,31 @@ regions. You can change that by manually editing the 'spellfile'. See
'spellfile' are only used when all entries in "spelllang" specify the same
region (not counting files specified by their .spl name).
*spell-german*
Specific exception: For German these special regions are used:
de all German words accepted
de_de old and new spelling
de_19 old spelling
de_20 new spelling
de_at Austria
de_ch Switzerland
*spell-russian*
Specific exception: For Russian these special regions are used:
ru all Russian words accepted
ru_ru "IE" letter spelling
ru_yo "YO" letter spelling
*spell-yiddish*
Yiddish requires using "utf-8" encoding, because of the special characters
used. If you are using latin1 Vim will use transliterated (romanized) Yiddish
instead. If you want to use transliterated Yiddish with utf-8 use "yi-tr".
In a table:
'encoding' 'spelllang'
utf-8 yi Yiddish
latin1 yi transliterated Yiddish
utf-8 yi-tr transliterated Yiddish
SPELL FILES *spell-load*
@@ -310,6 +359,42 @@ find these functions useful:
spellsuggest() get list of spelling suggestions
soundfold() get the sound-a-like version of a word
SETTING 'spellcapcheck' AUTOMATICALLY *set-spc-auto*
After the 'spelllang' option has been set successfully, Vim will source the
files "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
up to the first comma, dot or underscore. This can be used to set options
specifically for the language, especially 'spellcapcheck'.
The distribution includes a few of these files. Use this command to see what
they do: >
:next $VIMRUNTIME/spell/*.vim
Note that the default scripts don't set 'spellcapcheck' if it was changed from
the default value. This assumes the user prefers another value then.
DOUBLE SCORING *spell-double-scoring*
The 'spellsuggest' option can be used to select "double" scoring. This
mechanism is based on the principle that there are two kinds of spelling
mistakes:
1. You know how to spell the word, but mistype something. This results in a
small editing distance (character swapped/omitted/inserted) and possibly a
word that sounds completely different.
2. You don't know how to spell the word and type something that sounds right.
The edit distance can be big but the word is similar after sound-folding.
Since scores for these two mistakes will be very different we use a list
for each and mix them.
The sound-folding is slow and people that know the language won't make the
second kind of mistakes. Therefore 'spellsuggest' can be set to select the
preferred method for scoring the suggestions.
==============================================================================
3. Generating a spell file *spell-mkspell*
@@ -364,12 +449,15 @@ then Vim will try to guess.
into one en.spl file.
Up to eight regions can be combined. *E754* *755*
The REP and SAL items of the first .aff file where
they appear are used. |spell-affix-REP|
|spell-affix-SAL|
they appear are used. |spell-REP| |spell-SAL|
This command uses a lot of memory, required to find
the optimal word tree (Polish requires a few hundred
Mbyte). The final result will be much smaller.
the optimal word tree (Polish, Italian and Hungarian
require several hundred Mbyte). The final result will
be much smaller, because compression is used. To
avoid running out of memory compression will be done
now and then. This can be tuned with the 'mkspellmem'
option.
After the spell file was written and it was being used
in a buffer it will be reloaded automatically.
@@ -384,6 +472,12 @@ then Vim will try to guess.
and producing an output file in the same directory
that has ".{enc}.spl" appended.
Vim will report the number of duplicate words. This might be a mistake in the
list of words. But sometimes it is used to have different prefixes and
suffixes for the same basic word to avoid them combining (e.g. Czech uses
this). If you want Vim to report all duplicate words set the 'verbose'
option.
Since you might want to change a Myspell word list for use with Vim the
following procedure is recommended:
@@ -407,6 +501,25 @@ When the Myspell files are updated you can merge the differences:
4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
SPELL FILE VERSIONS *E770* *E771* *E772*
Spell checking is a relatively new feature in Vim, thus it's possible that the
.spl file format will be changed to support more languages. Vim will check
the validity of the spell file and report anything wrong.
E771: Old spell file, needs to be updated ~
This spell file is older than your Vim. You need to update the .spl file.
E772: Spell file is for newer version of Vim ~
This means the spell file was made for a later version of Vim. You need to
update Vim.
E770: Unsupported section in spell file ~
This means the spell file was made for a later version of Vim and contains a
section that is required for the spell file to work. In this case it's
probably a good idea to upgrade your Vim.
SPELL FILE DUMP
If for some reason you want to check what words are supported by the currently
@@ -414,7 +527,7 @@ used spelling files, use this command:
*:spelldump* *:spelld*
:spelld[ump] Open a new window and fill it with all currently valid
words.
words. Compound words are not included.
Note: For some languages the result may be enormous,
causing Vim to run out of memory.
@@ -502,15 +615,6 @@ 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 format for the affix and word list files is mostly identical to what
Myspell uses (the spell checker of Mozilla and OpenOffice.org). A description
can be found here:
http://lingucomponent.openoffice.org/affix.readme ~
Note that affixes are case sensitive, this isn't obvious from the description.
Vim supports a few extras. Hopefully Myspell will support these too some day.
See |spell-affix-vim|.
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).
@@ -520,6 +624,19 @@ 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
"src/spell" directory.
The format for the affix and word list files is based on what Myspell uses
(the spell checker of Mozilla and OpenOffice.org). A description can be found
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.
WORD LIST FORMAT *spell-dic-format*
@@ -535,12 +652,17 @@ A very short example, with line numbers:
8 bedel/P
9 kado/1
10 cadeau/2
11 TCP,IP
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. 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|.
When the word only has lower-case letters it will also match with the word
starting with an upper-case letter.
@@ -559,17 +681,17 @@ The word with all upper-case characters will always be OK.
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-affix-KEP|.
only, see below |spell-KEP|.
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.
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.
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".
*spell-affix-vim*
A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
@@ -601,8 +723,8 @@ 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.
*E761* *E762* *spell-affix-FOL*
*spell-affix-LOW* *spell-affix-UPP*
*E761* *E762* *spell-FOL*
*spell-LOW* *spell-UPP*
Three lines in the affix file are needed. Simplistic example:
FOL <20><><EFBFBD> ~
@@ -622,6 +744,10 @@ The "UPP" line specifies the characters with upper-case. That is, a character
is upper-case where it's different from the character at the same position in
"FOL".
An exception is made for the German sharp s <20>. The upper-case version is
"SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized
as a word character, but use the <20> character in all three.
ASCII characters should be omitted, Vim always handles these in the same way.
When the encoding is UTF-8 no word characters need to be specified.
@@ -653,8 +779,31 @@ These characters are defined with MIDWORD in the .aff file:
MIDWORD '- ~
FLAG TYPES *spell-FLAG*
Flags are used to specify the affixes that can be used with a word and for
other properties of the word. Normally single-character flags are used. This
limits the number of possible flags, especially for 8-bit encodings. The FLAG
item can be used if more affixes are to be used. Possible values:
FLAG long use two-character flags
FLAG num use numbers, from 1 up to 65000
FLAG caplong use one-character flags without A-Z and two-character
flags that start with A-Z
With "FLAG num" the numbers in a list of affixes need to be separated with a
comma: "234,2143,1435". This method is inefficient, but useful if the file is
generated with a program.
When using "caplong" the two-character flags all start with a capital: "Aa",
"B1", "BB", etc. This is useful to use one-character flags for the most
common items and two-character flags for uncommon items.
Note: When using utf-8 only characters up to 65000 may be used for flags.
AFFIXES
*spell-affix-PFX* *spell-affix-SFX*
*spell-PFX* *spell-SFX*
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).
@@ -666,6 +815,18 @@ Example:
SFX F 0 in [^i]n # Spion > Spionin ~
SFX F 0 nen in # Bauerin > Bauerinnen ~
Apparently Myspell allows an affix name to appear more than once. Since this
might also be a mistake, Vim checks for an extra "S". The affix files for
Myspell that use this feature apparently have this flag. Example:
SFX a Y 1 S ~
SFX a 0 an . ~
SFX a Y 2 S ~
SFX a 0 en . ~
SFX a 0 on . ~
*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:
@@ -676,7 +837,23 @@ marked as rare words. Example:
However, if the word also appears as a good word in another way it won't be
marked as rare.
*spell-affix-PFXPOSTPONE*
*spell-affix-nocomp*
Another extra item for Vim is the "nocomp" flag. It must come after the other
fields, before a comment. It can be either before or after "rare". When
present then all words that use the affix will not be part of a compound word.
Example:
affix file:
COMPOUNDFLAG c ~
SFX a Y 2 ~
SFX a 0 s . ~
SFX a 0 ize . nocomp ~
dictionary:
word/c ~
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
possible to build the whole word list in memory. This applies to Hebrew (a
list with all words is over a Gbyte). In that case applying prefixes must be
@@ -686,11 +863,29 @@ in the .aff file:
PFXPOSTPONE ~
Only prefixes without a chop string can be postponed, prefixes with a chop
string will still be included in the word list.
string will still be included in the word list. An exception if the chop
string is one character and equal to the last character of the added string,
but in lower case. Thus when the chop string is used to allow the following
word to start with an upper case letter.
KEEP-CASE WORDS
*spell-affix-KEP*
WORDS WITH A SLASH *spell-SLASH*
The slash is used in the .dic file to separate the basic word from the affix
letters that can be used. Unfortunately, this means you cannot use a slash in
a word. Thus "TCP/IP" cannot be a word. To work around that you can define a
replacement character for the slash. Example:
SLASH , ~
Now you can use "TCP,IP" to add the word "TCP/IP".
Of course, the letter used should itself not appear in any word! The letter
must be ASCII, thus a single byte.
KEEP-CASE WORDS *spell-KEP*
In the affix file a KEP line can be used to define the affix name used for
keep-case words. Example:
@@ -699,8 +894,8 @@ keep-case words. Example:
See above for an example |spell-affix-vim|.
RARE WORDS
*spell-affix-RAR*
RARE WORDS *spell-RAR*
In the affix file a RAR line can be used to define the affix name used for
rare words. Example:
@@ -712,8 +907,8 @@ a typing mistake anyway. When the same word is found as good it won't be
highlighted as rare.
BAD WORDS
*spell-affix-BAD*
BAD WORDS *spell-BAD*
In the affix file a BAD line can be used to define the affix name used for
bad words. Example:
@@ -727,8 +922,190 @@ 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.
*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:
REPLACEMENTS *spell-affix-REP*
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*
A compound word is a longer word made by concatenating words that appear in
the .dic file. To specify which words may be concatenated a character is
used. This character is put in the list of affixes after the word. We will
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
over which word comes first. Example:
COMPOUNDFLAG c ~
*spell-COMPOUNDFLAGS*
A more advanced method to specify how compound words can be formed uses
multiple items with multiple flags. This is not compatible with Myspell 3.0.
Let's start with an example:
COMPOUNDFLAGS c+ ~
COMPOUNDFLAGS se ~
The first line defines that words with the "c" flag can be concatenated in any
order. The second line defines compound words that are made of one word with
the "s" flag and one word with the "e" flag. With this dictionary:
bork/c ~
onion/s ~
soup/e ~
You can make these words:
bork
borkbork
borkborkbork
(etc.)
onion
soup
onionsoup
The COMPOUNDFLAGS item may appear multiple times. The argument is made out of
one or more groups, where each group can be:
one flag e.g., c
alternate flags inside [] e.g., [abc]
Optionally this may be followed by:
* the group appears zero or more times, e.g., sm*e
+ the group appears one or more times, e.g., c+
This is similar to the regexp pattern syntax (but not the same!). A few
examples with the sequence of word flags they require:
COMPOUNDFLAGS x+ x xx xxx etc.
COMPOUNDFLAGS yz yz
COMPOUNDFLAGS x+z xz xxz xxxz etc.
COMPOUNDFLAGS yx+ yx yxx yxxx etc.
COMPOUNDFLAGS [abc]z az bz cz
COMPOUNDFLAGS [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
COMPOUNDFLAGS a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
COMPOUNDFLAGS sm*e se sme smme smmme etc.
COMPOUNDFLAGS s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
A specific example: Allow a compound to be made of two words and a dash:
In the .aff file:
COMPOUNDFLAGS sde ~
NEEDAFFIX x ~
COMPOUNDMAX 3 ~
COMPOUNDMIN 1 ~
In the .dic file:
start/s ~
end/e ~
-/xd ~
This allows for the word "start-end", but not "startend".
*spell-COMPOUNDMIN*
The minimal character length of a word used for compounding is specified with
COMPOUNDMIN. Example:
COMPOUNDMIN 5 ~
When omitted there is no minimal length. Obviously you could just leave out
the compound flag from short words instead, this feature is present for
compatibility with Myspell.
*spell-COMPOUNDMAX*
The maximum number of words that can be concatenated into a compound word is
specified with COMPOUNDMAX. Example:
COMPOUNDMAX 3 ~
When omitted there is no maximum. It applies to all compound words.
To set a limit for words with specific flags make sure the items in
COMPOUNDFLAGS where they appear don't allow too many words.
*spell-COMPOUNDSYLMAX*
The maximum number of syllables that a compound word may contain is specified
with COMPOUNDSYLMAX. Example:
COMPOUNDSYLMAX 6 ~
This has no effect if there is no SYLLABLE item. Without COMPOUNDSYLMAX there
is no limit on the number of syllables.
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-SYLLABLE*
The SYLLABLE item defines characters or character sequences that are used to
count the number of syllables in a word. Example:
SYLLABLE a<>e<EFBFBD>i<EFBFBD>o<EFBFBD><6F><EFBFBD>u<EFBFBD><75><EFBFBD>y/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~
Before the first slash is the set of characters that are counted for one
syllable, also when repeated and mixed, until the next character that is not
in this set. After the slash come sequences of characters that are counted
for one syllable. These are preferred over using characters from the set.
With the example "ideeen" has three syllables, counted by "i", "ee" and "e".
Only case-folded letters need to be included.
Above another way to restrict compounding was mentioned above: adding "nocomp"
after an affix causes all words that are made with that affix not be be used
for compounding. |spell-affix-nocomp|
UNLIMITED COMPOUNDING *spell-NOBREAK*
For some languages, such as Thai, there is no space in between words. This
looks like all words are compounded. To specify this use the NOBREAK item in
the affix file, without arguments:
NOBREAK ~
Vim will try to figure out where one word ends and a next starts. When there
are spelling mistakes this may not be quite right.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
NOTE: The following has not been implemented yet, because there are no word
lists that support this.
> *spell-CMP*
> Sometimes it is necessary to change a word when concatenating it to another,
> by removing a few letters, inserting something or both. It can also be useful
> to restrict concatenation to words that match a pattern. For this purpose CMP
> items can be used. They look like this:
> CMP {flag} {flags} {strip} {strip2} {add} {cond} {cond2}
>
> {flag} the flag, as used in COMPOUNDFLAGS for the lead word
> {flags} accepted flags for the following word ('.' to accept
> all)
> {strip} text to remove from the end of the lead word (zero
> for no stripping)
> {strip2} text to remove from the start of the following word
> (zero for no stripping)
> {add} text to insert between the words (zero for no
> addition)
> {cond} condition to match at the end of the lead word
> {cond2} condition to match at the start of the following word
>
> This is the same as what is used for SFX and PFX items, with the extra {flags}
> and {cond2} fields. Example:
> CMP f mrt 0 - . . ~
>
> When used with the food and dish word list above, this means that a dash is
> inserted after each food item. Thus you get "onion-soup" and
> "onion-tomato-salat".
>
> When there are CMP items for a compound flag the concatenation is only done
> when a CMP item matches.
>
> When there are no CMP items for a compound flag, then all words will be
> concatenated, as if there was an item:
> CMP {flag} . 0 0 . .
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
REPLACEMENTS *spell-REP*
In the affix file REP items can be used to define common mistakes. This is
used to make spelling suggestions. The items define the "from" text and the
@@ -740,13 +1117,19 @@ used to make spelling suggestions. The items define the "from" text and the
REP k ch ~
REP ch k ~
The first line specifies the number of REP lines following. Vim ignores it.
The first line specifies the number of REP lines following. Vim ignores the
number, but it must be there.
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
the "file:" item in 'spellsuggest' instead.
You can include a space by using an underscore:
SIMILAR CHARACTERS *spell-affix-MAP*
REP the_the the ~
SIMILAR CHARACTERS *spell-MAP*
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
@@ -756,13 +1139,14 @@ to prefer suggestions with these letters substituted. Example:
MAP e<><65><EFBFBD><EFBFBD> ~
MAP u<><75><EFBFBD><EFBFBD> ~
The first line specifies the number of MAP lines following. Vim ignores it.
The first line specifies the number of MAP lines following. Vim ignores the
number, but the line must be there.
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.
SOUND-A-LIKE *spell-affix-SAL*
SOUND-A-LIKE *spell-SAL*
In the affix file SAL items can be used to define the sounds-a-like mechanism
to be used. The main items define the "from" text and the "to" replacement.
@@ -786,7 +1170,7 @@ There are a few special items:
"1" has the same meaning as "true". Any other value means "false".
SIMPLE SOUNDFOLDING *spell-affix-SOFOFROM* *spell-affix-SOFOTO*
SIMPLE SOUNDFOLDING *spell-SOFOFROM* *spell-SOFOTO*
The SAL mechanism is complex and slow. A simpler mechanism is mapping all
characters to another character, mapping similar sounding characters to the

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: 2005 Oct 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -789,10 +789,11 @@ 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.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jul 18
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Oct 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -399,7 +399,7 @@ Go back to the default to use 'number' by deleting the variable: >
:unlet html_number_lines
Closed folds are put in the HTML as they are displayed. If you don't want
this, use the "zR" command before invoking 2html, or use: >
this, use the |zR| command before invoking 2html, or use: >
:let html_ignore_folding = 1
By default, HTML optimized for old browsers is generated. If you prefer using
@@ -426,16 +426,13 @@ To go back to the automatic mechanism, delete the g:html_use_encoding
variable: >
:unlet html_use_encoding
<
Closed folds are kept as they are displayed. If you don't want closed folds
in the HTML use the |zR| command before converting.
For diff mode a sequence of more than 3 filler lines is displayed as three
lines with the middle line mentioning the total number of inserted lines. If
you prefer to see all the inserted lines use: >
:let html_whole_filler = 1
And to go back to displaying up to three lines again: >
:unlet html_whole_filler
<
*convert-to-XML* *convert-to-XHTML*
An alternative is to have the script generate XHTML (XML compliant HTML). To
do this set the "use_xhtml" variable: >
@@ -457,7 +454,7 @@ Unix shell: >
for f in *.[ch]; do gvim -f +"syn on" +"run! syntax/2html.vim" +"wq" +"q" $f; done
<
ABEL *abel.vim* *abel-syntax*
ABEL *abel.vim* *ft-abel-syntax*
ABEL highlighting provides some user-defined options. To enable them, assign
any value to the respective variable. Example: >
@@ -470,7 +467,7 @@ abel_obsolete_ok obsolete keywords are statements, not errors
abel_cpp_comments_illegal do not interpret '//' as inline comment leader
ADA *ada.vim* *ada-syntax*
ADA *ada.vim* *ft-ada-syntax*
This mode is designed for the 1995 edition of Ada ("Ada95"), which
includes support for objected-programming, protected types, and so on.
@@ -518,7 +515,7 @@ Even on a slow (90Mhz) PC this mode works quickly, but if you find
the performance unacceptable, turn on ada_withuse_ordinary.
ANT *ant.vim* *ant-syntax*
ANT *ant.vim* *ft-ant-syntax*
The ant syntax file provides syntax highlighting for javascript and python
by default. Syntax highlighting for other script languages can be installed
@@ -536,7 +533,7 @@ will install syntax perl highlighting for the following ant code >
See |mysyntaxfile-add| for installing script languages permanently.
APACHE *apache.vim* *apache-syntax*
APACHE *apache.vim* *ft-apache-syntax*
The apache syntax file provides syntax highlighting depending on Apache HTTP
server version, by default for 1.3.x. Set "apache_version" to Apache version
@@ -546,8 +543,8 @@ server version, by default for 1.3.x. Set "apache_version" to Apache version
<
*asm.vim* *asmh8300.vim* *nasm.vim* *masm.vim* *asm68k*
ASSEMBLY *asm-syntax* *asmh8300-syntax* *nasm-syntax* *masm-syntax*
*asm68k-syntax* *fasm.vim*
ASSEMBLY *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax*
*ft-masm-syntax* *ft-asm68k-syntax* *fasm.vim*
Files matching "*.i" could be Progress or Assembly. If the automatic detection
doesn't work for you, or you don't edit Progress at all, use this in your
@@ -601,7 +598,7 @@ nasm_ctx_outside_macro contexts outside macro not as Error
nasm_no_warn potentially risky syntax not as ToDo
ASPPERL and ASPVBS *aspperl-syntax* *aspvbs-syntax*
ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax*
*.asp and *.asa files could be either Perl or Visual Basic script. Since it's
hard to detect this you can set two global variables to tell Vim what you are
@@ -613,7 +610,7 @@ For Visual Basic use: >
:let g:filetype_asp = "aspvbs"
BASIC *basic.vim* *vb.vim* *basic-syntax* *vb-syntax*
BASIC *basic.vim* *vb.vim* *ft-basic-syntax* *ft-vb-syntax*
Both Visual Basic and "normal" basic use the extension ".bas". To detect
which one should be used, Vim checks for the string "VB_Name" in the first
@@ -622,7 +619,7 @@ otherwise "vb". Files with the ".frm" extension will always be seen as Visual
Basic.
C *c.vim* *c-syntax*
C *c.vim* *ft-c-syntax*
A few things in C highlighting are optional. To enable them assign any value
to the respective variable. Example: >
@@ -689,7 +686,7 @@ an the "after" directory in 'runtimepath'. For Unix this would be
syn sync fromstart
set foldmethod=syntax
CH *ch.vim* *ch-syntax*
CH *ch.vim* *ft-ch-syntax*
C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
the C syntax file. See |c.vim| for all the settings that are available for C.
@@ -699,7 +696,7 @@ of C or C++: >
:let ch_syntax_for_h = 1
CHILL *chill.vim* *chill-syntax*
CHILL *chill.vim* *ft-chill-syntax*
Chill syntax highlighting is similar to C. See |c.vim| for all the settings
that are available. Additionally there is:
@@ -709,7 +706,7 @@ chill_comment_string like c_comment_strings
chill_minlines like c_minlines
CHANGELOG *changelog.vim* *changelog-syntax*
CHANGELOG *changelog.vim* *ft-changelog-syntax*
ChangeLog supports highlighting spaces at the start of a line.
If you do not like this, add following line to your .vimrc: >
@@ -725,7 +722,7 @@ Or to avoid the highlighting: >
This works immediately.
COBOL *cobol.vim* *cobol-syntax*
COBOL *cobol.vim* *ft-cobol-syntax*
COBOL highlighting has different needs for legacy code than it does for fresh
development. This is due to differences in what is being done (maintenance
@@ -736,7 +733,7 @@ To disable it again, use this: >
:unlet cobol_legacy_code
COLD FUSION *coldfusion.vim* *coldfusion-syntax*
COLD FUSION *coldfusion.vim* *ft-coldfusion-syntax*
The ColdFusion has its own version of HTML comments. To turn on ColdFusion
comment highlighting, add the following line to your startup file: >
@@ -746,7 +743,7 @@ comment highlighting, add the following line to your startup file: >
The ColdFusion syntax file is based on the HTML syntax file.
CSH *csh.vim* *csh-syntax*
CSH *csh.vim* *ft-csh-syntax*
This covers the shell named "csh". Note that on some systems tcsh is actually
used.
@@ -769,7 +766,7 @@ will be classified as tcsh, UNLESS the "filetype_csh" variable exists. If the
variable.
CYNLIB *cynlib.vim* *cynlib-syntax*
CYNLIB *cynlib.vim* *ft-cynlib-syntax*
Cynlib files are C++ files that use the Cynlib class library to enable
hardware modelling and simulation using C++. Typically Cynlib files have a .cc
@@ -789,7 +786,7 @@ To disable these again, use this: >
:unlet cynlib_cyntax_for_cpp
<
CWEB *cweb.vim* *cweb-syntax*
CWEB *cweb.vim* *ft-cweb-syntax*
Files matching "*.w" could be Progress or cweb. If the automatic detection
doesn't work for you, or you don't edit Progress at all, use this in your
@@ -797,7 +794,7 @@ startup vimrc: >
:let filetype_w = "cweb"
DESKTOP *desktop.vim* *desktop-syntax*
DESKTOP *desktop.vim* *ft-desktop-syntax*
Primary goal of this syntax file is to highlight .desktop and .directory files
according to freedesktop.org standard: http://pdx.freedesktop.org/Standards/
@@ -807,7 +804,7 @@ to standard by placing this in your vimrc file: >
:let enforce_freedesktop_standard = 1
DIRCOLORS *dircolors.vim* *dircolors-syntax*
DIRCOLORS *dircolors.vim* *ft-dircolors-syntax*
The dircolors utility highlighting definition has one option. It exists to
provide compatibility with the Slackware GNU/Linux distributions version of
@@ -818,9 +815,9 @@ line to your startup file: >
let dircolors_is_slackware = 1
DOCBOOK *docbk.vim* *docbk-syntax* *docbook*
DOCBOOK XML *docbkxml.vim* *docbkxml-syntax*
DOCBOOK SGML *docbksgml.vim* *docbksgml-syntax*
DOCBOOK *docbk.vim* *ft-docbk-syntax* *docbook*
DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax*
DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax*
There are two types of DocBook files: SGML and XML. To specify what type you
are using the "b:docbk_type" variable should be set. Vim does this for you
@@ -837,7 +834,7 @@ or: >
:set filetype=docbkxml
DOSBATCH *dosbatch.vim* *dosbatch-syntax*
DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax*
There is one option with highlighting DOS batch files. This covers new
extensions to the Command Interpreter introduced with Windows 2000 and
@@ -860,7 +857,7 @@ If this variable is undefined or zero, btm syntax is selected.
DTD *dtd.vim* *dtd-syntax*
DTD *dtd.vim* *ft-dtd-syntax*
The DTD syntax highlighting is case sensitive by default. To disable
case-sensitive highlighting, add the following line to your startup file: >
@@ -884,7 +881,7 @@ delimiters % and ;. This can be turned off by setting: >
The DTD syntax file is also included by xml.vim to highlight included dtd's.
EIFFEL *eiffel.vim* *eiffel-syntax*
EIFFEL *eiffel.vim* *ft-eiffel-syntax*
While Eiffel is not case-sensitive, its style guidelines are, and the
syntax highlighting file encourages their use. This also allows to
@@ -927,7 +924,7 @@ Finally, some vendors support hexadecimal constants. To handle them, add >
to your startup file.
ERLANG *erlang.vim* *erlang-syntax*
ERLANG *erlang.vim* *ft-erlang-syntax*
The erlang highlighting supports Erlang (ERicsson LANGuage).
Erlang is case sensitive and default extension is ".erl".
@@ -942,7 +939,7 @@ your .vimrc: >
:let erlang_characters = 1
FORM *form.vim* *form-syntax*
FORM *form.vim* *ft-form-syntax*
The coloring scheme for syntax elements in the FORM file uses the default
modes Conditional, Number, Statement, Comment, PreProc, Type, and String,
@@ -976,7 +973,7 @@ gvim display. Here, statements are colored LightYellow instead of Yellow, and
conditionals are LightBlue for better distinction.
FORTRAN *fortran.vim* *fortran-syntax*
FORTRAN *fortran.vim* *ft-fortran-syntax*
Default highlighting and dialect ~
Highlighting appropriate for f95 (Fortran 95) is used by default. This choice
@@ -1117,11 +1114,11 @@ Parenthesis checking does not catch too few closing parentheses. Hollerith
strings are not recognized. Some keywords may be highlighted incorrectly
because Fortran90 has no reserved words.
For further information related to fortran, see |fortran-indent| and
|fortran-plugin|.
For further information related to fortran, see |ft-fortran-indent| and
|ft-fortran-plugin|.
FVWM CONFIGURATION FILES *fvwm.vim* *fvwm-syntax*
FVWM CONFIGURATION FILES *fvwm.vim* *ft-fvwm-syntax*
In order for Vim to recognize Fvwm configuration files that do not match
the patterns *fvwmrc* or *fvwm2rc* , you must put additional patterns
@@ -1145,7 +1142,7 @@ in /usr/X11/lib/X11/, you should add the line >
to your .vimrc file.
GSP *gsp.vim*
GSP *gsp.vim* *ft-gsp-syntax*
The default coloring style for GSP pages is defined by |html.vim|, and
the coloring for java code (within java tags or inline between backticks)
@@ -1168,7 +1165,7 @@ The backticks for inline java are highlighted according to the htmlError
group to make them easier to see.
GROFF *groff.vim* *groff-syntax*
GROFF *groff.vim* *ft-groff-syntax*
The groff syntax file is a wrapper for |nroff.vim|, see the notes
under that heading for examples of use and configuration. The purpose
@@ -1177,7 +1174,7 @@ filetype from a |modeline| or in a personal filetype definitions file
(see |filetype.txt|).
HASKELL *haskell.vim* *lhaskell.vim* *haskell-syntax*
HASKELL *haskell.vim* *lhaskell.vim* *ft-haskell-syntax*
The Haskell syntax files support plain Haskell code as well as literate
Haskell code, the latter in both Bird style and TeX style. The Haskell
@@ -1221,7 +1218,7 @@ set before turning syntax highlighting on for the buffer or
loading a file.
HTML *html.vim* *html-syntax*
HTML *html.vim* *ft-html-syntax*
The coloring scheme for tags in the HTML file works as follows.
@@ -1294,7 +1291,7 @@ Now you just need to make sure that you add all regions that contain
the preprocessor language to the cluster htmlPreproc.
HTML/OS (by Aestiva) *htmlos.vim* *htmlos-syntax*
HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax*
The coloring scheme for HTML/OS works as follows:
@@ -1315,7 +1312,7 @@ Lastly, it should be noted that the opening and closing characters to begin a
block of HTML/OS code can either be << or [[ and >> or ]], respectively.
IA64 *ia64.vim* *intel-itanium* *ia64-syntax*
IA64 *ia64.vim* *intel-itanium* *ft-ia64-syntax*
Highlighting for the Intel Itanium 64 assembly language. See |asm.vim| for
how to recognize this filetype.
@@ -1324,7 +1321,7 @@ To have *.inc files be recognized as IA64, add this to your .vimrc file: >
:let g:filetype_inc = "ia64"
INFORM *inform.vim* *inform-syntax*
INFORM *inform.vim* *ft-inform-syntax*
Inform highlighting includes symbols provided by the Inform Library, as
most programs make extensive use of it. If do not wish Library symbols
@@ -1353,7 +1350,7 @@ startup sequence: >
:let inform_highlight_old=1
JAVA *java.vim* *java-syntax*
JAVA *java.vim* *ft-java-syntax*
The java.vim syntax highlighting file offers several options:
@@ -1446,7 +1443,7 @@ displayed line. The default value is 10. The disadvantage of using a larger
number is that redrawing can become slow.
LACE *lace.vim* *lace-syntax*
LACE *lace.vim* *ft-lace-syntax*
Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the
style guide lines are not. If you prefer case insensitive highlighting, just
@@ -1454,7 +1451,7 @@ define the vim variable 'lace_case_insensitive' in your startup file: >
:let lace_case_insensitive=1
LEX *lex.vim* *lex-syntax*
LEX *lex.vim* *ft-lex-syntax*
Lex uses brute-force synchronizing as the "^%%$" section delimiter
gives no clue as to what section follows. Consequently, the value for >
@@ -1463,7 +1460,26 @@ may be changed by the user if s/he is experiencing synchronization
difficulties (such as may happen with large lex files).
LITE *lite.vim* *lite-syntax*
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.
@@ -1477,7 +1493,7 @@ set "lite_minlines" to the value you desire. Example: >
:let lite_minlines = 200
LPC *lpc.vim* *lpc-syntax*
LPC *lpc.vim* *ft-lpc-syntax*
LPC stands for a simple, memory-efficient language: Lars Pensj| C. The
file name of LPC is usually *.c. Recognizing these files as LPC would bother
@@ -1518,7 +1534,7 @@ uLPC has been developed to Pike, so you should use Pike syntax
instead, and the name of your source file should be *.pike
LUA *lua.vim* *lua-syntax*
LUA *lua.vim* *ft-lua-syntax*
This syntax file may be used for Lua 4.0 and Lua 5.0 (default). If you are
programming in Lua 4.0, use this: >
@@ -1528,7 +1544,7 @@ programming in Lua 4.0, use this: >
If lua_version variable doesn't exist, it is set to 5.
MAIL *mail.vim*
MAIL *mail.vim* *ft-mail.vim*
Vim highlights all the standard elements of an email (headers, signatures,
quoted text and URLs / email addresses). In keeping with standard conventions,
@@ -1546,7 +1562,7 @@ with short headers, you can change this to a smaller value: >
:let mail_minlines = 30
MAKE *make.vim* *make-syntax*
MAKE *make.vim* *ft-make-syntax*
In makefiles, commands are usually highlighted to make it easy for you to spot
errors. However, this may be too much coloring for you. You can turn this
@@ -1555,7 +1571,7 @@ feature off by using: >
:let make_no_commands = 1
MAPLE *maple.vim* *maple-syntax*
MAPLE *maple.vim* *ft-maple-syntax*
Maple V, by Waterloo Maple Inc, supports symbolic algebra. The language
supports many packages of functions which are selectively loaded by the user.
@@ -1580,7 +1596,7 @@ $VIMRUNTIME/syntax/syntax.vim).
mv_finance mv_logic mv_powseries
MATHEMATICA *mma.vim* *mma-syntax* *mathematica-syntax*
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
Empty *.m files will automatically be presumed to be Matlab files unless you
have the following in your .vimrc: >
@@ -1588,7 +1604,7 @@ have the following in your .vimrc: >
let filetype_m = "mma"
MOO *moo.vim* *moo-syntax*
MOO *moo.vim* *ft-moo-syntax*
If you use C-style comments inside expressions and find it mangles your
highlighting, you may want to use extended (slow!) matches for C-style
@@ -1624,7 +1640,7 @@ An example of adding sprintf() to the list of known builtin functions: >
:syn keyword mooKnownBuiltinFunction sprintf contained
MSQL *msql.vim* *msql-syntax*
MSQL *msql.vim* *ft-msql-syntax*
There are two options for the msql syntax highlighting.
@@ -1638,7 +1654,7 @@ set "msql_minlines" to the value you desire. Example: >
:let msql_minlines = 200
NCF *ncf.vim* *ncf-syntax*
NCF *ncf.vim* *ft-ncf-syntax*
There is one option for NCF syntax highlighting.
@@ -1650,7 +1666,7 @@ errors, use this: >
If you don't want to highlight these errors, leave it unset.
NROFF *nroff.vim* *nroff-syntax*
NROFF *nroff.vim* *ft-nroff-syntax*
The nroff syntax file works with AT&T n/troff out of the box. You need to
activate the GNU groff extra features included in the syntax file before you
@@ -1721,7 +1737,7 @@ Finally, there is a |groff.vim| syntax file that can be used for enabling
groff syntax highlighting either on a file basis or globally by default.
OCAML *ocaml.vim* *ocaml-syntax*
OCAML *ocaml.vim* *ft-ocaml-syntax*
The OCaml syntax file handles files having the following prefixes: .ml,
.mli, .mll and .mly. By setting the following variable >
@@ -1737,7 +1753,7 @@ prevents highlighting of "end" as error, which is useful when sources
contain very long structures that Vim does not synchronize anymore.
PAPP *papp.vim* *papp-syntax*
PAPP *papp.vim* *ft-papp-syntax*
The PApp syntax file handles .papp files and, to a lesser extend, .pxml
and .pxsl files which are all a mixture of perl/xml/html/other using xml
@@ -1755,7 +1771,7 @@ The newest version of the papp.vim syntax file can usually be found at
http://papp.plan9.de.
PASCAL *pascal.vim* *pascal-syntax*
PASCAL *pascal.vim* *ft-pascal-syntax*
Files matching "*.p" could be Progress or Pascal. If the automatic detection
doesn't work for you, or you don't edit Progress at all, use this in your
@@ -1809,7 +1825,7 @@ will be highlighted as Error. >
PERL *perl.vim* *perl-syntax*
PERL *perl.vim* *ft-perl-syntax*
There are a number of possible options to the perl syntax highlighting.
@@ -1869,7 +1885,7 @@ If you want to fold blocks in if statements, etc. as well set the following: >
:let perl_fold_blocks = 1
PHP3 and PHP4 *php.vim* *php3.vim* *php-syntax* *php3-syntax*
PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*
[note: previously this was called "php3", but since it now also supports php4
it has been renamed to "php"]
@@ -1922,7 +1938,7 @@ x > 0 to sync at least x lines backwards,
x = 0 to sync from start.
PPWIZARD *ppwiz.vim* *ppwiz-syntax*
PPWIZARD *ppwiz.vim* *ft-ppwiz-syntax*
PPWizard is a preprocessor for HTML and OS/2 INF files
@@ -1944,7 +1960,7 @@ This syntax file has the options:
HTML code; if 0, treat HTML code like ordinary text.
PHTML *phtml.vim* *phtml-syntax*
PHTML *phtml.vim* *ft-phtml-syntax*
There are two options for the phtml syntax highlighting.
@@ -1958,7 +1974,7 @@ set "phtml_minlines" to the value you desire. Example: >
:let phtml_minlines = 200
POSTSCRIPT *postscr.vim* *postscr-syntax*
POSTSCRIPT *postscr.vim* *ft-postscr-syntax*
There are several options when it comes to highlighting PostScript.
@@ -2013,8 +2029,8 @@ postscr_andornot_binary as follows: >
:let postscr_andornot_binary=1
<
*ptcap.vim*
PRINTCAP + TERMCAP *ptcap-syntax* *termcap-syntax* *printcap-syntax*
*ptcap.vim* *ft-printcap-syntax*
PRINTCAP + TERMCAP *ft-ptcap-syntax* *ft-termcap-syntax*
This syntax file applies to the printcap and termcap databases.
@@ -2039,7 +2055,7 @@ internal variable to a larger number: >
(The default is 20 lines.)
PROGRESS *progress.vim* *progress-syntax*
PROGRESS *progress.vim* *ft-progress-syntax*
Files matching "*.w" could be Progress or cweb. If the automatic detection
doesn't work for you, or you don't edit cweb at all, use this in your
@@ -2051,7 +2067,7 @@ Pascal. Use this if you don't use assembly and Pascal: >
:let filetype_p = "progress"
PYTHON *python.vim* *python-syntax*
PYTHON *python.vim* *ft-python-syntax*
There are four options to control Python syntax highlighting.
@@ -2072,7 +2088,7 @@ preceding three options): >
:let python_highlight_all = 1
QUAKE *quake.vim* *quake-syntax*
QUAKE *quake.vim* *ft-quake-syntax*
The Quake syntax definition should work for most any FPS (First Person
Shooter) based on one of the Quake engines. However, the command names vary
@@ -2094,7 +2110,7 @@ Any combination of these three variables is legal, but might highlight more
commands than are actually available to you by the game.
READLINE *readline.vim* *readline-syntax*
READLINE *readline.vim* *ft-readline-syntax*
The readline library is primarily used by the BASH shell, which adds quite a
few commands and options to the ones already available. To highlight these
@@ -2106,7 +2122,7 @@ This will add highlighting for the commands that BASH (version 2.05a and
later, and part earlier) adds.
REXX *rexx.vim* *rexx-syntax*
REXX *rexx.vim* *ft-rexx-syntax*
If you notice highlighting errors while scrolling backwards, which are fixed
when redrawing with CTRL-L, try setting the "rexx_minlines" internal variable
@@ -2117,7 +2133,7 @@ displayed line. The default value is 10. The disadvantage of using a larger
number is that redrawing can become slow.
RUBY *ruby.vim* *ruby-syntax*
RUBY *ruby.vim* *ft-ruby-syntax*
There are a few options to the Ruby syntax highlighting.
@@ -2142,7 +2158,7 @@ This will prevent highlighting of special identifiers like "ConstantName",
"$global_var", "@instance_var", "| iterator |", and ":symbol".
SCHEME *scheme.vim* *scheme-syntax*
SCHEME *scheme.vim* *ft-scheme-syntax*
By default only R5RS keywords are highlighted and properly indented.
@@ -2153,7 +2169,7 @@ Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define
b:is_chicken or g:is_chicken, if you need them.
SDL *sdl.vim* *sdl-syntax*
SDL *sdl.vim* *ft-sdl-syntax*
The SDL highlighting probably misses a few keywords, but SDL has so many
of them it's almost impossibly to cope.
@@ -2173,7 +2189,7 @@ The indentation is probably also incomplete, but right now I am very
satisfied with it for my own projects.
SED *sed.vim* *sed-syntax*
SED *sed.vim* *ft-sed-syntax*
To make tabs stand out from regular blanks (accomplished by using Todo
highlighting on the tabs), define "highlight_sedtabs" by putting >
@@ -2196,7 +2212,7 @@ Bugs:
each plausible pattern delimiter).
SGML *sgml.vim* *sgml-syntax*
SGML *sgml.vim* *ft-sgml-syntax*
The coloring scheme for tags in the SGML file works as follows.
@@ -2237,7 +2253,7 @@ vimrc file: >
(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)
SH *sh.vim* *sh-syntax*
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
This covers the "normal" Unix (Bourne) sh, bash and the Korn shell.
@@ -2288,7 +2304,7 @@ The default is to use the twice sh_minlines. Set it to a smaller number to
speed up displaying. The disadvantage is that highlight errors may appear.
SPEEDUP (AspenTech plant simulator) *spup.vim* *spup-syntax*
SPEEDUP (AspenTech plant simulator) *spup.vim* *ft-spup-syntax*
The Speedup syntax file has some options:
@@ -2320,8 +2336,8 @@ fast enough, you can increase minlines and/or maxlines near the end of
the syntax file.
SQL *sql.vim* *sql-syntax*
*sqlinformix.vim* *sqlinformix-syntax*
SQL *sql.vim* *ft-sql-syntax*
*sqlinformix.vim* *ft-sqlinformix-syntax*
While there is an ANSI standard for SQL, most database engines add their
own custom extensions. Vim currently supports the Oracle and Informix
@@ -2331,7 +2347,7 @@ If you want to use the Informix dialect, put this in your startup vimrc: >
:let g:filetype_sql = "sqlinformix"
TCSH *tcsh.vim* *tcsh-syntax*
TCSH *tcsh.vim* *ft-tcsh-syntax*
This covers the shell named "tcsh". It is a superset of csh. See |csh.vim|
for how the filetype is detected.
@@ -2353,20 +2369,32 @@ displayed line. The default value is 15. The disadvantage of using a larger
number is that redrawing can become slow.
TEX *tex.vim* *tex-syntax*
TEX *tex.vim* *ft-tex-syntax*
*tex-folding*
Want Syntax Folding? ~
As of version 28 of <syntax/tex.vim>, syntax-based folding of parts, chapters,
sections, subsections, etc are supported. Put >
let g:tex_fold_enabled=1
in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
modeline at the end of your LaTeX file: >
% vim: fdm=syntax
<
*tex-runon*
Run-on Comments/Math? ~
The tex highlighting supports TeX, LaTeX, and some AmsTeX. The
highlighting supports three primary zones: normal, texZone, and texMathZone.
Although a considerable effort has been made to have these zones terminate
properly, zones delineated by $..$ and $$..$$ cannot be synchronized as
there's no difference between start and end patterns. Consequently, a
The <syntax/tex.vim> highlighting supports TeX, LaTeX, and some AmsTeX. The
highlighting supports three primary zones/regions: normal, texZone, and
texMathZone. Although considerable effort has been made to have these zones
terminate properly, zones delineated by $..$ and $$..$$ cannot be synchronized
as there's no difference between start and end patterns. Consequently, a
special "TeX comment" has been provided >
%stopzone
which will forcibly terminate the highlighting of either a texZone or a
texMathZone.
*tex-slow*
Slow Syntax Highlighting? ~
If you have a slow computer, you may wish to reduce the values for >
@@ -2376,6 +2404,7 @@ If you have a slow computer, you may wish to reduce the values for >
increase them. This primarily affects synchronizing (i.e. just what group,
if any, is the text at the top of the screen supposed to be in?).
*tex-error*
Excessive Error Highlighting? ~
The <tex.vim> supports lexical error checking of various sorts. Thus,
@@ -2383,28 +2412,24 @@ although the error checking is ofttimes very useful, it can indicate
errors where none actually are. If this proves to be a problem for you,
you may put in your <.vimrc> the following statement: >
let tex_no_error=1
and all error checking by <tex.vim> will be suppressed.
and all error checking by <syntax/tex.vim> will be suppressed.
*tex-math*
Need a new Math Group? ~
If you want to include a new math group in your LaTeX, the following
code shows you an example as to how you might do so: >
call TexNewMathZone(sfx,mathzone,starform)
You'll want to provide the new math group with a unique suffix
(currently, A-L and V-Z are taken by <syntax/tex.vim> itself).
As an example, consider how eqnarray is set up by <syntax/tex.vim>: >
call TexNewMathZone("D","eqnarray",1)
You'll need to change "mathzone" to the name of your new math group,
and then to the call to it in .vim/after/syntax/tex.vim.
The "starform" variable, if true, implies that your new math group
has a starred form (ie. eqnarray*).
syn cluster texMathZones add=texMathZoneLOCAL
syn region texMathZoneLOCAL start="\\begin\s*{\s*LOCALMATH\s*}"
\ end="\\end\s*{\s*LOCALMATH\s*}" keepend
\ contains=@texMathZoneGroup
if !exists("tex_no_math")
syn sync match texSyncMathZoneLOCAL grouphere texMathZoneLOCAL
\ "\\begin\s*{\s*LOCALMATH\*\s*}"
syn sync match texSyncMathZoneLOCAL groupthere NONE
\ "\\end\s*{\s*LOCALMATH\*\s*}"
endif
hi link texMathZoneLOCAL texMath
<
You'll need to change LOCALMATH to the name of your new math group,
and then to put it into .vim/after/syntax/tex.vim.
*tex-style*
Starting a New Style? ~
One may use "\makeatletter" in *.tex files, thereby making the use of "@" in
@@ -2419,7 +2444,7 @@ Putting "let g:tex_stylish=1" into your <.vimrc> will make <syntax/tex.vim>
always accept such use of @.
TF *tf.vim* *tf-syntax*
TF *tf.vim* *ft-tf-syntax*
There is one option for the tf syntax highlighting.
@@ -2429,7 +2454,7 @@ set "tf_minlines" to the value you desire. Example: >
:let tf_minlines = your choice
VIM *vim.vim* *vim-syntax*
VIM *vim.vim* *ft-vim-syntax*
There is a tradeoff between more accurate syntax highlighting versus
screen updating speed. To improve accuracy, you may wish to increase
@@ -2453,7 +2478,7 @@ for external scripting languages (currently perl, python, ruby, and tcl).
loaded.
XF86CONFIG *xf86conf.vim* *xf86conf-syntax*
XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax*
The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both
variants are supported. Automatic detection is used, but is far from perfect.
@@ -2468,7 +2493,7 @@ Note that spaces and underscores in option names are not supported. Use
highlighted.
XML *xml.vim* *xml-syntax*
XML *xml.vim* *ft-xml-syntax*
Xml namespaces are highlighted by default. This can be inhibited by
setting a global variable: >
@@ -2486,7 +2511,7 @@ Note: syntax folding might slow down syntax highlighting significantly,
especially for large files.
X Pixmaps (XPM) *xpm.vim* *xpm-syntax*
X Pixmaps (XPM) *xpm.vim* *ft-xpm-syntax*
xpm.vim creates its syntax items dynamically based upon the contents of the
XPM file. Thus if you make changes e.g. in the color specification strings,
@@ -3556,7 +3581,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]
@@ -3641,6 +3666,16 @@ specified field is used, and settings are merged with previous ones. So, the
result is like this single command has been used: >
:hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold
<
*:highlight-verbose*
When listing a highlight group and 'verbose' is non-zero, the listing will
also tell where it was last set. Example: >
:verbose hi Comment
< Comment xxx term=bold ctermfg=4 guifg=Blue ~
Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~
When ":hi clear" is used then the script where this command is used will be
mentioned for the default values. See |:verbose-cmd| for more information.
*highlight-args* *E416* *E417* *E423*
There are three types of terminals for highlighting:
term a normal terminal (vt100, xterm)
@@ -3910,6 +3945,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*
@@ -3953,7 +3996,7 @@ WarningMsg warning messages
*hl-WildMenu*
WildMenu current match in 'wildmenu' completion
*hl-User1* *hl-User1..9*
*hl-User1* *hl-User1..9* *hl-User9*
The 'statusline' syntax allows the use of 9 different highlights in the
statusline and ruler (via 'rulerformat'). The names are User1 to User9.

File diff suppressed because it is too large Load Diff

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.

37
runtime/doc/tar.txt Normal file
View File

@@ -0,0 +1,37 @@
*tar.txt* Tar File Interface Nov 03, 2005
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: The GPL (gnu public license) applies to *tar-copyright*
tarPlugin.vim, and tar.txt.
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*
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 release) * Michael Toren (see http://michael.toren.net/code/)
==============================================================================
vim:tw=78:ts=8:ft=help

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
*term.txt* For Vim version 7.0aa. Last change: 2005 Aug 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -291,6 +291,7 @@ Added by Vim (there are no standard codes for these):
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
|termcap-cursor-shape|
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
@@ -427,6 +428,7 @@ Example for an xterm, this changes the color of the cursor: >
endif
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
before Vim started will not be restored.
{not available when compiled without the +cursorshape feature}
*termcap-title*
The 't_ts' and 't_fs' options are used to set the window title if the terminal

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 20
*todo.txt* For Vim version 7.0aa. Last change: 2005 Nov 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,56 +30,96 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
About HTML tag pairing: http://www.w3.org/TR/html4/index/elements.html
Using chown() is unsafe. (Jinpeng Wei)
ex_cmds.c: viminfo tempfile: use mch_open(O_EXCL) and fdopen()
fileio.c: use fchown() instead of chown()
vim.h: define O_NOFOLLOW if needed. Not in Vim 6.4?
":e *.foo" completion with file name starting with "+" should be escaped.
Go over all changes between 6.3 and 6.4 and make sure they are included in 7.
VMS patch for term.c also in Vim 6.3 (Zoltan Arpadffy)
'statusline' is drawn over the Omni menu.
Make_cyg.mak files for Vim 6.3 from Tony Mechelynck?
Cygwin and Mac OS/X may preserve case for file names but ignore case
differences. Use Amiga code?
Add extra list of file locations. Can be used with:
:ltag list of matching tags, like :tselect
"make unixall": remove split in floppy-size archives.
:lnext next location
:lprevious :lNext previous location
:lnfile location in next file
:lNfile :lpfile location in previous file
:lrewind :lfirst first location
:llast last location
:ll [N] go to location N (current one if N omitted)
:lwindow open window with locations (separate from quickfix window)
:lopen open window with locations
:lclose close window with locations
:llist list locations
:lfile read locations from file using 'errorformat'
:lgetfile idem, don't jump to first one
:lbuffer idem, from current buffer.
Using pipes for filter commands: provide some way to type a password, keep
stderr in/out open for this?
Win32: Balloon text can't contain line break.
Hints for multiline tooltips from Alexei Alexandrov (2005 Mar 26)
Patch from Sergey Khorev, 2005 Apr 11
Add has("balloon_multiline")
To support mapping <F4> to be used as <F4>{motion}: Add operator that
executes a user defined function. '[ and '] marks are at start and end of
text. ":map <F4> :set opfunc=MyOp<CR>gy".
Win32: Crash when pasting Simplified Chinese in utf-8. (rainux, 2005 June 20)
Patch from Yasuhiro Matsumoto: ":e ++enc=xxx" keeps encoding for conversion
errors and illegal bytes. Make default to replace bad bytes/characters with
'?' and allow for two alternatives:
:e ++enc=xxx ++bad=keep foo.txt
:e ++enc=xxx ++bad=drop foo.txt
:e ++enc=xxx ++bad=? foo.txt
Netrw plugin problems:
- when 'autochdir' is set the current dir is wrong (Salman Halim)
- "cd -" doesn't work. (Suresh Govindachar)
ccomplete:
- When an option is set: In completion mode and the user types (identifier)
characters, advance to the first match instead of removing the popup menu.
If there is no match remove the selection. (Yegappan Lakshmanan)
- Complete the longest common match instead of the first match?
- !_TAG_FILE_FORMAT and it's ilk are listed in the global completions
- When completing something that is a structure, add the "." or "->".
- When a typedef or struct is local to a file only use it in that file?
- Window resize when poup is displayed
- page-up / page-down
spelling:
- When a recognized word ends in a . don't have 'spellcapcheck" match it.
- Use KEEPCASE instead of "KEP". It applies to the word including affixes
Hunspell also uses it.
- Hunspell has NOSUGGEST flag (use for obscene words?)
- Check out Hunspell 1.1.2.
- Look into hungarian dictionary:
http://magyarispell.sourceforge.net/rc3-beta2.zip
- Support breakpoint character <20> 0xb7 and ignore it?
- Dutch word list should be available here: http://www.woordenlijst.org/
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
- Finding suggestions with sound folding is slow. Somehow store the
sound-folded words and link to the words it comes from?
When editing a file "a" that is a symbolic link to "b", while another Vim is
editing "b", there is no warning. Follow symlink to make swap file name?
Patch from Stefano Zacchiroli.
In diff mode deleting lines is very slow. E.g., when diffing two .po files
and then sourcing po/cleaup.vim.
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)
Should we always set LC_CTYPE to "C", so that all library functions work on
bytes? Avoids problems with sprintf() on MS-Windows. (Yongwei)
Problem noticed: tooltips are messed up. Depends on the moment 'encoding' is
changed.
Mac: drop support for OS 9? Most people are now using OS/X and Vim 6.4 can be
used for others.
Include new PHP indent script from John Wellesz?
http://www.vim.org/scripts/download_script.php?src_id=4330
Patch to add a few flags to search(). (Benji Fisher, Nov 22)
autoload:
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.
Win32: Check that installer puts menu items in "all users" dir when possible,
not administrator dir.
Autoload:
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
script names and a help file and produces a script that can be sourced to
install the scripts in the user's directories.
@@ -90,54 +130,96 @@ autoload:
helpfile doc/myscript.txt
For the "helpfile" item ":helptags" is run.
Patch to alternate fold highlighting. (Anthony Iano-Fletcher, 2005 May 12)
More levels?
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
mappings for normal keys can be removed from Select mode.
Awaiting response:
- Win32: tearoff menu window should have a scrollbar when it's taller than
the screen.
mblen(NULL, 0) also in Vim 6.3?
- mblen(NULL, 0) also in Vim 6.3?
PLANNED FOR VERSION 7.0:
- Support using "**" in filename for ":next", ":vimgrep", etc., so that a
directory tree can be searched.
- REFACTORING: The main() function is very long. Move parts to separate
functions, especially loops. Ideas from Walter Briscoe (2003 Apr 3, 2004
Feb 9).
Move the printing stuff to hardcopy.c.
- Improve the interface between the generic GUI code and the system-specific
code. Generic code handles text window with scrollbars, system-specific
code menu, toolbar, etc.
- Store messages to allow SCROLLING BACK for all commands. And other "less"
like commands.
- "INTELLISENSE". First cleanup the Insert-mode completion.
- Omni completion: Understands the programming language and finds matches
that make sense. Esp. members of classes/structs.
It's not much different from other Insert-mode completion, use the same
mechanism. Use CTRL-X CTRL-O and 'omnifunc'. Set 'omnifunc' in the
filetype plugin, define the function in the autoload directory.
Separately develop the completion logic and the UI. When adding UI stuff
make it work for all completion methods.
UI:
- Complete longest common string first, like 'wildmode' "longest:full".
- Add an "auto" mode: after typing a character (or string) completion is
done for the longest common string. plugin defines the possible
characters/strings. (Martin Stubenschrott)
- GUI implementation of the popup menu.
- When using tags, show match in preview window (function prototype,
struct member, etc.).
Or use one window for matches, another for context/info (Doug Kearns,
2005 Sep 13)
- Ideas on: http://www.wholetomato.com/
Completion logic:
Use runtime/autoload/{filetype}complete.vim files.
In function arguments suggest variables of expected type.
Tags file has "signature" field.
List of completions is a Dictionary with items:
complist[0]['text'] = completion text
complist[0]['type'] = type of completion (e.g. function, var, arg)
complist[0]['help'] = help text (e.g. function declaration)
complist[0]['helpfunc'] = function that shows help text
etc.
Can CTRL-] (jump to tag) include the "." and "->" to restrict the
number of possible matches? (Flemming Madsen)
In general: Besides completion, figure out the type of a variable
and use it for information.
Ideas from others:
http://www.vim.org/scripts/script.php?script_id=747
http://sourceforge.net/projects/insenvim
or http://insenvim.sourceforge.net
Java, XML, HTML, C++, JSP, SQL, C#
MS-Windows only, lots of dependencies (e.g. Perl, Internet
explorer), uses .dll shared libraries.
For C++ uses $INCLUDE environment var.
Uses Perl for C++.
Uses ctags to find the info:
ctags -f $allTagsFile --fields=+aiKmnsSz --language-force=C++ --C++-kinds=+cefgmnpsut-dlux -u $files
UI: popup menu with list of alternatives, icon to indicate type
optional popup window with info about selected alternative
Unrelated settings are changed (e.g. 'mousemodel').
www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
http://sourceforge.net/projects/insenvim
of http://insenvim.sourceforge.net
IComplete: http://www.vim.org/scripts/script.php?script_id=1265
and http://stud4.tuwien.ac.at/~e0125672/icomplete/
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
Ivan Villanueva has something for Java.
Ideas from Emads:
http://www.xref-tech.com/xrefactory/more_c_completion.html
Can't call it Intellisense, it is a trademark by Microsoft.
Ideas from the Vim 7 BOF at SANE:
- It's not possible to have one solution for all languages. Design an
interface for completion plugins. The matches can be done in a
Vim-script list.
- For interpreted languages, use the interpreter to obtain information.
Should work for Java (Eclipse does this), Python, Tcl, etc.
Richard Emberson mentioned working on an interface to Java.
- Check Readline for its completion interface.
- Use ctags for other languages. Writing a file could trigger running
ctags, merging the tags of the changed file.
Also see "Visual Assist" http://www.wholetomato.com/products:
- Put the list of choices right under the place where they would be
inserted.
- Pre-expand abbreviations, show which abbrevs would match?
- Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
Emads: http://www.xref-tech.com/xrefactory/more_c_completion.html
Ideas from the Vim 7 BOF at SANE:
- It's not possible to have one solution for all languages. Design an
interface for completion plugins. The matches can be done in a
Vim-script list.
- For interpreted languages, use the interpreter to obtain information.
Should work for Java (Eclipse does this), Python, Tcl, etc.
Richard Emberson mentioned working on an interface to Java.
- Check Readline for its completion interface.
- Use ctags for other languages. Writing a file could trigger running
ctags, merging the tags of the changed file.
"Visual Assist" http://www.wholetomato.com/products:
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
- Pre-expand abbreviations, show which abbrevs would match?
- UNDO TREE: keep all states of the text, don't delete undo info.
When making a change, instead of clearing any future undo (thus redo)
info, make a new branch.
@@ -157,20 +239,29 @@ PLANNED FOR VERSION 7.0:
keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
7 Support WINDOW TABS. Works like several pages, each with their own
split windows. Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
Don't forget to provide an "X" to close a tab.
Also for the console!
split windows.
In Emacs these are called frames. Could also call them "pages".
Use "1gt" - "99gt" to switch to a tab?
Use the name of the first buffer in the tab (ignoring the help window,
unless it's the only one). Add a number for the window count.
First make it work on the console. Use a line of text with highlighting.
Then add GUI Tabs for some systems.
Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
Simple patch for GTK by Luis M (nov 7).
Don't forget to provide an "X" to close a tab.
Implementation: keep the list of windows as-is. When switching to another
tab make the buffers in the current windows hidden, save the window
layout, buildup the other window layout and fill with buffers.
Need to be able to search the windows in inactive tabs, e.g. for the
quickfix window.
Use "1gt" - "99gt" to switch to a tab?
- EMBEDDING: Make it possible to run Vim inside a window of another program.
For Xwindows this can be done with XReparentWindow().
For GTK Neil Bird has a patch to use Vim like a widget.
- 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
@@ -184,6 +275,7 @@ 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)
- 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.
@@ -193,6 +285,8 @@ 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 Searching for a composing character by itself should work. Perhaps "."
with a composing char should work too.
- Add a few more things to 'diffopt': "horizontal", "vertical",
"foldcolumn". (Benji Fisher, 2004 Jun 21)
- FileChangedShellPost autocommand event: after (not) reloading a changed
@@ -228,9 +322,19 @@ PLANNED FOR VERSION 7.0:
Mattias Flodin (2004 Jul 30)
- In a :s command multi-byte characters should also be upper/lower cased
with \u, \U, etc.
8 Add a command to jump to a certain kind of tag. Allow the user to specify
values for the optional fields. E.g., ":tag size type=m".
Also allow specifying the file and command, so that the result of
taglist() can be used.
Adjust src/main.aap for installing manpages like in Makefile.
When editing a file with both utf-8 and latin1 text Vim always falls back to
latin1. Add a command to convert the latin1 characters to utf-8?
:unmix utf-8,latin1 filename
Would only work when 'encoding' is utf-8.
Also: command to search for illegal utf-8 byte sequence?
Also generate the .pdb file that can be used to generate a useful crash report
on MS-Windows. (George Reilly)
@@ -268,9 +372,24 @@ Also place vimtutor.bat in %windir%?
Add gui_mch_browsedir() for Motif, KDE and Mac OS/X.
7 Add a ":cstring" command. Works like ":cfile" but reads from a string
variable. Also accept a list variable? Patch from Yegappan Lakshmanan.
2005 Feb 17 Now it's ":cexpr".
Add extra list of file locations. A bit like the quickfix list, but there is
one per window. Can be used with:
:ltag list of matching tags, like :tselect
Commands to use the location list:
:lnext next location
:lprevious :lNext previous location
:lnfile location in next file
:lNfile :lpfile location in previous file
:lrewind :lfirst first location
:llast last location
:ll [N] go to location N (current one if N omitted)
:lwindow open window with locations (separate from quickfix window)
:lopen open window with locations
:lclose close window with locations
:llist list locations
:lfile read locations from file using 'errorformat'
:lgetfile idem, don't jump to first one
:lbuffer idem, from current buffer.
HTML indenting can be slow, find out why. Any way to do some kind of
profiling for Vim script? At least add a function to get the current time in
@@ -303,7 +422,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
@@ -337,6 +458,7 @@ Awaiting updated patches:
(2003 May 13)
raisewin() raise gvim window (see HierAssist patch for
Tcl implementation ~/vim/HierAssist/ )
7 Make globpath() also work with upwards search. (Brian Medley)
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
- Patch from Herculano de Lima Einloft Neto for better formatting of the
@@ -344,7 +466,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
@@ -456,6 +578,9 @@ GTK+ GUI known bugs:
8 GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj
Machowski) They are displayed as separate characters. Problem in
creating a label?
8 GTK 2: Combining UTF-8 characters are sometimes not drawn properly.
Depends on the font size, "monospace 13" has the problem. Vim seems to do
everything right, must be a GTK bug. Is there a way to work around it?
9 Can't paste a Visual selection from GTK-gvim to vim in xterm or Motif gvim
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.
@@ -535,8 +660,7 @@ Win32 GUI known bugs:
Opposite of 'linespace': 'columnspace'.
7 At the hit-enter prompt scrolling now no longer works. Need to use the
keyboard to get around this. Pretend <CR> was hit when the user tries to
scroll? Need to be able to get out of hit-enter prompt with the mouse
anyway.
scroll?
7 Scrollbar width doesn't change when selecting other windows appearance.
Also background color of Toolbar and rectangle below vert. scrollbar.
7 "!start /min cmd" should run in a minimized window, instead of using
@@ -738,7 +862,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.
@@ -803,6 +936,7 @@ Amiga:
Macintosh:
7 Implement "undercurl".
7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
Berns, 2004 May 9) http://ecki.to/vim/TransBack-2004-05-09.diff
Needs more work. Add when someone really wants it.
@@ -1002,6 +1136,7 @@ Macintosh:
":w!!" for that.
Or ask for permission to overwrite it (if file can be made writable) and
restore file to readonly afterwards.
Overwriting a file for which a swap file exists is similar issue.
7 When compiled with "xterm_clipboard", startup can be slower and might get
error message for invalid $DISPLAY. Try connecting to the X server in the
background (forked), so that Vim starts up quicker? Connect as soon as
@@ -1277,6 +1412,44 @@ User Friendlier:
Spell checking:
9 Work together with OpenOffice.org to update the wordlists. (Adri Verhoef,
Aad Nales) Setup vim-spell maillist?
- 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?
- 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
COMPOUNDMIN and COMPOUNDMAX to a reasonable value.
- PSEUDOROOT == NEEDAFFIX
- COMPOUNDROOT -> COMPOUNDED? For a word that already is a compound word
Or use COMPOUNDED2, COMPOUNDED3, etc.
- CIRCUMFIX: when a word uses a prefix marked with the CIRCUMFIX flag, then
the word must also have a suffix marked with the CIRCUMFIX flag. It's a
bit primitive, since only one flag is used, which doesn't allow matching
specific prefixes with suffixes.
Alternative:
PSFX {flag} {pchop} {padd} {pcond} {schop} {sadd}[/flags] {scond}
We might not need this at all, you can use the NEEDAFFIX flag and the
affix which is required.
- When a suffix has more than one syllable, it may count as a word for
COMPOUNDMAX.
- 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.
- Implement multiple flags for compound words and CMP item?
Await comments from other spell checking authors.
- Also see tklspell: http://tkltrans.sourceforge.net/
8 Charles Campbell asks for method to add "contained" groups to existing
syntax items (to add @Spell).
Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn
@@ -1289,22 +1462,19 @@ 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.
@@ -1406,6 +1576,10 @@ Multi-byte characters:
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
"lang". (Ilya Dogolazky)
- Make 'langmap' accept multi-byte characters.
- Make 'breakat' accept multi-byte characters. Problem: can't use a lookup
table anymore (breakat_flags[]).
Simplistic solution: when 'formatoptions' contains "m" also break a line
at a multi-byte character >= 0x100.
- Do we need the reverse of 'keymap', like 'langmap' but with files and
multi-byte characters? E.g., when using a Russian keyboard.
- Add the possibility to enter mappings which are used whenever normal text
@@ -1478,6 +1652,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:
@@ -1597,7 +1776,6 @@ Built-in script language:
Alternative: Support packages. {package-name}:{function-name}().
Packages are loaded automatically when first used, from
$VIMRUNTIME/packages (or use a search path).
7 Make globpath() also work with "**" and upwards search. (Brian Medley)
7 Add the markclear() function to delete a mark in another buffer. Charles
Campbell (2004 Jan 9)
http://mysite.verizon.net/astronaut/vim/index.html#Patch
@@ -1614,8 +1792,6 @@ Built-in script language:
.vim file. Problem: distribution.
3. Use a cache directory for each user. How to recognize which cached
file belongs to a sourced script?
7 Add "n" flag to search() function, just like searchpair(). (Alexey
Marinichev)
7 Add argument to winwidth() to subtract the space taken by 'foldcolumn',
signs and/or 'number'.
8 Add functions:
@@ -1637,19 +1813,15 @@ Built-in script language:
mapname({idx}, mode) return the name of the idx'th mapping.
Patch by Ilya Sher, 2004 Mar 4.
Return a list instead.
printf(format, arg, ..) How to prevent a crash???
char2hex() convert char string to hex string.
attributes() return file protection flags "drwxrwxrwx"
filecopy(from, to) Copy a file
shorten(fname) shorten a file name, like home_replace()
perl(cmd) call Perl and return string
input(prompt, complete) like input() but do specified completion
inputrl() like input() but right-to-left
virtualmode() add argument to obtain whether "$" was used in
Visual block mode.
tagtype(tag) get type of tag (also checks if it exists)
getacp() Win32: get codepage (Glenn Maynard)
getbufline() get line from any buffer
deletebufline() delete line in any buffer
appendbufline() append line in any buffer
libcall() Allow more than one argument.
@@ -1919,8 +2091,6 @@ Shared libraries:
Tags:
8 Add a command to jump to a certain kind of tag. Allow the user to specify
values for the optional fields. E.g., ":tag size type=m".
8 Add a function that returns the line in the tags file for a matching tag.
Can be used to extract more info (class name, inheritance, etc.) (Rico
Hendriks)
@@ -2027,9 +2197,9 @@ GUI:
7 X11: Support cursorColor resource and "-cr" argument.
8 X11 (and others): CTRL-; is not different from ';'. Set the modifier mask
to include CTRL for keys where CTRL produces the same ASCII code.
7 Add some code to handle proportional fonts? Need to draw each character
separately (like xterm). Also for when a double-width font is not exactly
double-width. (Maeda)
7 Add some code to handle proportional fonts on more systems? Need to draw
each character separately (like xterm). Also for when a double-width font
is not exactly double-width. (Maeda)
8 Should take font from xterm where gvim was started (if no other default).
8 Selecting font names in X11 is difficult, make a script or something to
select one.
@@ -2178,12 +2348,12 @@ Insert mode completion/expansion:
9 ^X^L completion doesn't repeat correctly. It uses the first match with
the last added line, instead of continuing where the last match ended.
(Webb)
8 The code has become too complex. Redesign it, or at least add proper
comments.
8 Add option to set different behavior for Insert mode completion:
- ignore/match case
- different characters than 'iskeyword'
8 Add a command to undo the completion, go back to the original text.
7 Completion of an abbreviation: Can leave letters out, like what Instant
text does: www.textware.com
8 Use the class information in the tags file to do context-sensitive
completion. After "foo." complete all member functions/variables of
"foo". Need to search backwards for the class definition of foo.
@@ -2578,16 +2748,12 @@ More advanced repeating commands:
Mappings and Abbreviations:
8 Let ":verbose map xx" report where the mapping was set, just like with
":verbose set".
8 When "0" is mapped (it is a movement command) this mapping should not be
used after typing another number, e.g. "20l". (Charles Campbell)
Is this possible without disabling the mapping of the following command?
8 Should mapping <C-A> and <C-S-A> both work?
7 ":abbr b byte", append "b " to an existing word still expands to "byte".
This is Vi compatible, but can we avoid it anyway?
8 ":verbose map" could show the script where the mapping was defined.
m_script_ID can be used.
8 To make a mapping work with a prepended "x to select a register, store the
last _typed_ register name and access it with "&.
8 Add ":amap", like ":amenu".
@@ -2599,8 +2765,6 @@ Mappings and Abbreviations:
8 Allow mapping of CTRL-@ (anywhere in the LHS).
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
(?) work.
7 ":verbose map" should display where a mapping was defined, like ":verbose
set".
8 Add a way to save a current mapping and restore it later. Use a function
that returns the mapping command to restore it: mapcmd()? mapcheck() is
not fool proof. How to handle ambiguous mappings?
@@ -2938,8 +3102,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:
@@ -3137,6 +3299,8 @@ Debug mode:
Various improvements:
7 [t to move to previous xml/html tag (like "vatov"), ]t to move to next
("vatv").
7 [< to move to previous xml/html tag, e.g., previous <li>. ]< to move to
next <li>, ]< to next </li>, [< to previous </li>.
8 Add ":rename" command: rename the file of the current buffer and rename
the buffer. Buffer may be modified.
- Perhaps ":cexpr" could read errors from a list?
@@ -3182,7 +3346,6 @@ Various improvements:
9 Support ACLs on more systems.
7 Add ModeMsgVisual, ModeMsgInsert, etc. so that each mode message can be
highlighted differently.
8 Allow using "**" as a wildcard in commands like ":next" and ":args".
7 Add a message area for the user. Set some option to reserve space (above
the command line?). Use an ":echouser" command to display the message
(truncated to fit in the space).
@@ -3206,13 +3369,6 @@ Various improvements:
6 Add ":timer" command, to set a command to be executed at a certain
interval, or once after some time has elapsed. (Aaron)
8 Add ":confirm" handling in open_exfile(), for when file already exists.
8 Use confirm/dialog stuff to ask the user, when a file has changed outside
of Vim, if he wants to reload it. Triggered when focus gained, after
shell command, when entering another buffer, etc..
Also do this when editing a new file, and another application creates
the file before doing ":w" in Vim.
Also check if the file protection has changed. When checking a file into
RCS it is made read-only, when checking out it is made read-write.
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
then ask "write" or "discard" for each changed file. Patch in HierAssist
@@ -3273,7 +3429,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
@@ -3576,6 +3733,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 Feb 24
*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.
@@ -249,10 +264,11 @@ Europe: Use a bank transfer if possible. Your bank should have a form
Credit Card: You can use PayPal to send money with a Credit card. This is
the most widely used Internet based payment system. It's
really simple to use. Use this link to find more info:
https://www.paypal.com/affil/pal=Bram%40moolenaar.net
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 $150 sending a cheque is preferred.
Bram@iccf-holland.org
For amounts above 400 Euro ($500) sending a check is
preferred.
Others: Transfer to one of these accounts if possible:
Postbank, account 4548774
@@ -263,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

@@ -692,6 +692,7 @@ Buffers, windows and the argument list:
winnr() get the window number for the current window
bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
getbufvar() get a variable value from a specific buffer
setbufvar() set a variable in a specific buffer
getwinvar() get a variable value from a specific window

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2005 Jun 22
*various.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -268,6 +268,8 @@ N *+cmdline_info* |'showcmd'| and |'ruler'|
N *+comments* |'comments'| support
N *+cryptv* encryption support |encryption|
B *+cscope* |cscope| support
m *+cursorshape* |termcap-cursor-shape| support
m *+debug* Compiled for debugging.
N *+dialog_gui* Support for |:confirm| with GUI dialog.
N *+dialog_con* Support for |:confirm| with console dialog.
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
@@ -293,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'|
@@ -323,14 +326,17 @@ 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'|
@@ -343,7 +349,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
@@ -485,6 +492,15 @@ N *+X11* Unix only: can restore window title |X11|
For logging verbose messages in a file use the
'verbosefile' option.
*:verbose-cmd*
When 'verbose' is non-zero, listing the value of a Vim option or a key map or
an abbreviation or a user-defined function or a command or a highlight group
or an autocommand will also display where it was last defined. If it was
defined manually then there will be no "Last set" message. When it was
defined while executing a function, user command or autocommand, the script in
which it was defined is reported.
{not available when compiled without the +eval feature}
*K*
K Run a program to lookup the keyword under the
cursor. The name of the program is given with the

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 Jul 20
*version7.txt* For Vim version 7.0aa. Last change: 2005 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -20,13 +20,16 @@ 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|
Internal grep |new-vimgrep|
Scroll back in messages |new-scroll-back|
POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Remote file explorer |new-netrw-explore|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -61,6 +64,9 @@ In a |literal-string| a single quote can be doubled to get one.
":echo 'a''b'" would result in "a b", but now that two quotes stand for one it
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|.
Minor incompatibilities:
@@ -114,6 +120,14 @@ translated to <Home>, both for the keys and for mappings. Also for <xEnd>,
When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc"
file exists.
When making a string upper-case with "vlllU" or similar then the German sharp
s is replaced with "SS". This does not happen with "~" to avoid backwards
compatibility problems and because "SS" can't be changed back to a sharp s.
"gd" previously found the very first occurrence of a variable in a function,
that could be the function argument without type. Now it finds the position
where the type is given.
==============================================================================
NEW FEATURES *new-7*
@@ -167,6 +181,27 @@ highlighting.
Much more info here: |spell|.
Omni completion *new-omni-completion*
-----------------
This could also be called "intellisense", but that is a trademark. It is a
smart kind of completion. The text in front of the cursor is inspected to
figure out what could be following. This considers struct and class members,
unions, etc.
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 supported languages:
C |ft-c-omni|
XHTML |ft-html-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
KDE support *new-KDE*
-----------
@@ -222,6 +257,24 @@ patterns, this also allows grepping in compressed and remote files.
If you want to use the search results in a script you can use the
|getqflist()| function.
To search in files in various directories the "**" pattern can be used. It
expands into an arbitrary depth of directories. "**" can be used in all
places where file names are expanded, thus also with |:next| and |:args|.
Scroll back in messages *new-scroll-back*
-----------------------
When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The
'k', 'u' and 'b' keys can be used to scroll back to previous messages. This
is especially useful for commands such as ":syntax", ":autocommand" and
":highlight". This is implemented in a generic way thus it works for all
commands and highlighting is kept. Only works when the 'more' option is set.
Previously it only partly worked for ":clist".
The |g<| command can be used to see the last page of messages after you have
hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back.
POSIX compatibility *new-posix*
-------------------
@@ -278,13 +331,29 @@ balloon functionality. You can use it to show info for the word under the
mouse pointer.
Remote file explorer *new-netrw-explore*
--------------------
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible.
To avoid duplicating a lot of code, the previous file explorer plugin has been
integrated in the netrw plugin. This means browsing local and remote files
works the same way.
":browse edit" and ":browse split" use the netrw plugin when it's available
and a GUI dialog is not possible.
The netrw plugin is maintained by Charles Campbell.
Various new items *new-items-7*
-----------------
Normal mode commands: ~
a", a' and a` New text objects to select quoted strings. |a'|
i", i' and i' (Taro Muraoka)
i", i' and i` (Taro Muraoka)
CTRL-W <Enter> In the quickfix window: opens a new window to show the
location of the error under the cursor.
@@ -292,11 +361,18 @@ 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.
Insert mode commands: ~
CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but
without moving the cursor.
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'|
'numberwidth' Minimal width of the space used for the 'number'
@@ -346,14 +422,22 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:sort| Sort lines in the buffer without depending on an
external command.
|:caddfile| Add error messages to an existing quickfix list
(Yegappan Lakshmanan).
New functions: ~
|:cexpr| Read error messages from a Vim expression (Yegappan
Lakshmanan).
New and extended functions: ~
|add()| append an item to a List
|append()| append List of lines to the buffer
|browsedir()| dialog to select a directory
|byteidx()| index of a character (Ilya Sher)
|call()| call a function with List as arguments
|complete_add()| add match for 'completefunc'
|complete_check()| check for key pressed, for 'completefunc'
|copy()| make a shallow copy of a List or Dictionary
|count()| count nr of times a value is in a List or Dictionary
|deepcopy()| make a full copy of a List or Dictionary
@@ -367,13 +451,16 @@ New functions: ~
|foldtextresult()| the text displayed for a closed fold at line "lnum"
|function()| make a Funcref out of a function name
|get()| get an item from a List or Dictionary
|getbufline()| get a line or list of lines from a specified buffer
|getbufline()| get a list of lines from a specified buffer
(Yegappan Lakshmanan)
|getcmdtype()| return the current command-line type
(Yegappan Lakshmanan)
|getfontname()| get actual font name being used
|getfperm()| get file permission string (Nikolai Weibull)
|getftype()| get type of file (Nikolai Weibull)
|getline()| with second argument: get List with buffer lines
|has_key()| check whether a key appears in a Dictionary
|inputlist()| select an entry from a list
|insert()| insert an item somewhere in a List
|items()| get List of Dictionary key-value pairs
|join()| join List items into a String
@@ -384,10 +471,12 @@ New functions: ~
|max()| maximum value in a List or Dictionary
|min()| minimum value in a List or Dictionary
|mkdir()| create a directory
|printf()| format text
|readfile()| read a file into a list of lines
|remove()| remove one or more items from a List or Dictionary
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|reverse()| reverse the order of a List
|searchdecl()| search for declaration of variable
|setqflist()| create a quickfix list (Yegappan Lakshmanan)
|sort()| sort a List
|soundfold()| get the sound-a-like equivalent of a word
@@ -481,7 +570,7 @@ 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)
@@ -495,9 +584,6 @@ 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)
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible. (Charles Campbell)
Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
To be used to set the cursor shape to a bar or a block. No default values,
they are not supported by termcap/terminfo.
@@ -509,6 +595,23 @@ when the buffer does not have a name or no specific name. See
For xterm most combinations of modifiers with function keys are recognized.
|xterm-modifier-keys|
When 'verbose' is set the output of ":highlight" will show where a highlight
item was last set.
When 'verbose' is set the output of the ":map", ":abbreviate", ":command",
":function" and ":autocmd" commands will show where it was last defined.
(Yegappan Lakshmanan)
":function /pattern" lists functions matching the pattern.
"1gd" can be used like "gd" but ignores matches in a {} block that ends before
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.
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -516,6 +619,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
@@ -533,7 +639,7 @@ it. (Johannes Zellner)
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)
@@ -614,7 +720,7 @@ invalid characters after the register name. |:redir|
":redir => variable" and ":redir =>> variable" write or append to a variable.
(Yegappan Lakshmanan) |:redir|
":redir @{a-z}>>" appends to register a to z.
":redir @{a-z}>>" appends to register a to z. (Yegappan Lakshmanan)
The 'verbosefile' option can be used to log messages in a file. Verbose
messages are not displayed then. The "-V{filename}" argument can be used to
@@ -653,7 +759,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
@@ -690,10 +796,58 @@ pointer position instead of the text cursor.
The table with encodings has been expanded with many MS-Windows codepages,
such as cp1250 and cp737, so that these can also be used on Unix without
prepending "8bit-".
When an encoding name starts with "microsoft-cp" ignore the "microsoft-" part.
Added the "customlist" completion argument to a user-defined command. The
user-defined completion function should return the completion candidates as a
Vim List and the returned results are not filtered by Vim.
Vim List and the returned results are not filtered by Vim. (Yegappan
Lakshmanan)
Win32: Balloons can have multiple lines if common controls supports it.
(Sergey Khorev)
The 's' flag is added to the search() and searchpair() function to set the
' mark if the cursor is moved. (Yegappan Lakshmanan)
For 'errorformat' it was not possible to have a file name that contains the
character that follows after "%f". For example, in "%f:%l:%m" the file name
could not contain ":". Now include the first ":" where the rest of the
pattern matches. In the example a ":" not followed by a line number is
included in the file name. (suggested by Emanuele Giaquinta)
For command-line completion the matches for various types of arguments are now
sorted: user commands, variables, syntax names, etc.
When no locale is set, thus using the "C" locale, Vim will work with latin1
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)
Also support t_SI and t_EI on Unix with normal features. (Ciaran McCreesh)
When 'foldcolumn' is one then put as much info in it as possible. This allows
closing a fold with the mouse by clicking on the '-'.
input() takes an optional completion argument to specify the type of
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.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -717,6 +871,19 @@ to detect memory leaks. Some memory will always reported as leaked, such as
allocated by X11 library functions and the memory allocated in alloc_cmdbuff()
to store the ":quit" command.
Moved the code for printing to src/hardcopy.c.
Moved some code from main() to separate functions to make it easier to see
what is being done. Use a structure to avoid a lot of arguments to the
functions.
Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c
without copying the code.
Mac: When running "make install" the runtime files are installed as for Unix.
Avoids that too many files are copied. When running "make" a link to the
runtime files is created to avoid a recursive copy that takes much time.
==============================================================================
BUG FIXES *bug-fixes-7*
@@ -773,7 +940,8 @@ When converting a string with a hex or octal number the leading '-' was
ignored. ":echo '-05' + 0" resulted in 5 instead of -5.
Using "@:" to repeat a command line didn't work when it contains control
characters.
characters. Also remove "'<,'>" when in Visual mode to avoid that it appears
twice.
When using file completion for a user command, it would not expand environment
variables like for a regular command with a file argument.
@@ -909,10 +1077,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.
@@ -1190,4 +1354,57 @@ the global value.
Win32: When using the "Edit with Vim" entry the file name was limited to about
200 characters.
When using command line completion for ":e *foo" and the file "+foo" exists
the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e
\+foo".
When the translation of "-- More --" was not 10 characters long the following
message would be in the wrong position.
At the more-prompt the last character in the last line wasn't drawn.
When deleting non-existing text while 'virtualedit' is set the '[ and '] marks
were not set.
Win32: Could not use "**/" in 'path', it had to be "**\".
The search pattern "\n" did not match at the end of the last line.
Searching for a pattern backwards, starting on the NUL at the end of the line
and 'encoding' is "utf-8" would match the pattern just before it incorrectly.
Affected searchpair('/\*', '', '\*/').
For the Find/Replace dialog it was possible that not finding the text resulted
in an error message while redrawing, which cleared the syntax highlighting
while it was being used, resulting in a crash. Now don't clear syntax
highlighting, disable it with b_syn_error.
Win32: Combining UTF-8 characters were drawn on the previous character.
Could be noticed with a Thai font.
Output of ":function" could leave some of the typed text behind. (Yegappan
Lakshmanan)
When the command line history has only a few lines the command line window
would be opened with these lines above the first window line.
When using a command line window for search strings ":qa" would result in
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.
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.
vim:tw=78:ts=8:ft=help:norl:

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

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

@@ -0,0 +1,40 @@
*zip.txt* Zip File Interface Nov 03, 2005
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
Permission is hereby granted to use and distribute this code,
with or without modifications, provided that this copyright
notice is copied with it. Like anything else that's free,
zip.vim 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.
==============================================================================
1. Contents *zip* *zip-contents*
1. Contents..................................................|zip-contents|
2. Usage.....................................................|zip-usage|
3. History...................................................|zip-history|
==============================================================================
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*
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
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,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 13
" Last Change: 2005 Nov 23
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -16,7 +16,7 @@ set cpo&vim
augroup filetypedetect
" Ignored extensions
au BufNewFile,BufRead *.orig,*.bak,*.old,*.new,*.rpmsave,*.rpmnew
au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew
\ exe "doau filetypedetect BufRead " . expand("<afile>:r")
au BufNewFile,BufRead *~
\ let s:name = expand("<afile>") |
@@ -26,7 +26,7 @@ au BufNewFile,BufRead *~
\ endif |
\ unlet s:name |
\ unlet s:short
au BufNewFile,BufRead *.in
au BufNewFile,BufRead ?\+.in
\ if expand("<afile>:t") != "configure.in" |
\ exe "doau filetypedetect BufRead " . expand("<afile>:r") |
\ endif
@@ -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
@@ -629,8 +632,8 @@ au BufNewFile,BufRead *.hex,*.h32 setf hex
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side, .rhtml for Ruby html)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.rhtml,*.stm call s:FThtml()
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml()
" Distinguish between HTML and XHTML
fun! s:FThtml()
@@ -645,6 +648,8 @@ fun! s:FThtml()
setf html
endfun
" HTML with Ruby - eRuby
au BufNewFile,BufRead *.rhtml setf eruby
" HTML with M4
au BufNewFile,BufRead *.html.m4 setf htmlm4
@@ -823,7 +828,7 @@ au BufNewFile,BufRead *.m4
au BufNewFile,BufRead *.mgp setf mgp
" Mail (for Elm, trn, mutt, rn, slrn)
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt-*-\w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
" Mailcap configuration file
au BufNewFile,BufRead .mailcap,mailcap setf mailcap
@@ -953,8 +958,8 @@ au BufRead,BufNewFile *.mu setf mupad
au BufNewFile,BufRead *.mush setf mush
" Mutt setup file
au BufNewFile,BufRead Muttrc setf muttrc
au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc* call s:StarSetf('muttrc')
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
" Nano
au BufNewFile,BufRead /etc/nanorc,.nanorc setf nanorc
@@ -1198,7 +1203,7 @@ function! s:FTprogress_asm()
" This function checks for an assembly comment the first ten lines.
" If not found, assume Progress.
let lnum = 1
while lnum <= 10
while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
call s:FTasm()
@@ -1225,9 +1230,9 @@ function! s:FTprogress_pascal()
" Look for either an opening comment or a program start.
" If not found, assume Progress.
let lnum = 1
while lnum <= 10
while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*\(program\|procedure\|function\|const\|type\|var\)\>'
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
setf pascal
return
@@ -1344,6 +1349,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
@@ -1607,9 +1615,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
@@ -1617,8 +1635,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
@@ -1667,6 +1685,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
@@ -1700,6 +1721,9 @@ au BufNewFile,BufRead /etc/updatedb.conf setf updatedb
" Verilog HDL
au BufNewFile,BufRead *.v setf verilog
" Verilog-AMS HDL
au BufNewFile,BufRead *.va,*.vams setf verilogams
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
@@ -1829,8 +1853,13 @@ au BufNewFile,BufRead *.y call s:FTy()
fun! s:FTy()
let n = 1
while n < 10 && n < line("$")
if getline(n) =~ '^\s*\(#\|class\>\)'
while n < 100 && n < line("$")
let line = getline(n)
if line =~ '^\s*%'
setf yacc
return
endif
if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include'
setf racc
return
endif
@@ -1872,6 +1901,9 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
" Most of these should call s:StarSetf() to avoid names ending in .gz and the
" like are used.
" Asterisk config file
au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
" BIND zone
au BufNewFile,BufRead /var/named/* call s:StarSetf('bindzone')
@@ -1921,7 +1953,7 @@ au BufNewFile,BufRead /etc/modprobe.* call s:StarSetf('modconf')
au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
" Mutt setup file
au BufNewFile,BufRead muttrc*,Muttrc* call s:StarSetf('muttrc')
au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
" Nroff macros
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jun 22
" Last Change: 2005 Sep 01
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -15,12 +15,17 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
let b:undo_ftplugin = "setl fo< com< | if has('vms') | setl isk< | endif"
let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
setlocal ofu=ccomplete#Complete
endif
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Debian Changelog
" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de>
" Last Change: 23 March 2004
" Last Change: 15 August 2005
if exists("g:did_changelog_ftplugin")
finish
@@ -30,7 +30,7 @@ function <SID>Email()
elseif exists("$EMAIL")
return $EMAIL
elseif exists("g:debianemail")
return g:debianfullemail
return g:debianemail
else
return "your@email.address"
endif

15
runtime/ftplugin/diff.vim Normal file
View File

@@ -0,0 +1,15 @@
" Vim filetype plugin file
" Language: Diff
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 27
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl modeline<"
" Don't use modelines in a diff, they apply to the diffed file
setlocal nomodeline

View File

@@ -0,0 +1,73 @@
" Vim filetype plugin
" Language: eRuby
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" ----------------------------------------------------------------------------
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
let s:save_cpo = &cpo
set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "Ruby Files (*.rb)\t*.rb\n" .
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
\ "All Files (*.*)\t*.*\n"
let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
unlet b:did_ftplugin
" Override our defaults if these were set by an included ftplugin.
if exists("b:undo_ftplugin")
let s:undo_ftplugin = b:undo_ftplugin
unlet b:undo_ftplugin
endif
if exists("b:browsefilter")
let s:browsefilter = b:browsefilter
unlet b:browsefilter
endif
if exists("b:match_words")
let s:match_words = b:match_words
unlet b:match_words
endif
runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
let b:did_ftplugin = 1
" Combine the new set of values with those previously included.
if exists("b:undo_ftplugin")
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
endif
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:match_words
endif
" Change the browse dialog on Win32 to show mainly eRuby-related files
if has("gui_win32")
let b:browsefilter="eRuby Files (*.rhtml)\t*.rhtml\n" . s:browsefilter
endif
" Load the combined list of match_words for matchit.vim
if exists("loaded_matchit")
let b:match_words = s:match_words
endif
" TODO: comments=
setlocal commentstring=<%#%s%>
let b:undo_ftplugin = "setl cms< "
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
let &cpo = s:save_cpo
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

View File

@@ -14,6 +14,8 @@ set cpo-=C
setlocal commentstring=<!--%s-->
setlocal omnifunc=htmlcomplete#CompleteTags
" HTML: thanks to Johannes Zellner and Benji Fisher.
if exists("loaded_matchit")
let b:match_ignorecase = 1

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

@@ -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,14 +1,14 @@
" Vim filetype plugin file
" Language: pascal
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Changed: 2003 Sep 29
" Last Changed: 2005 Sep 05
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
if exists("loaded_matchit")
let b:match_words='\<begin\>:\<end\>'
let b:match_words='\<\%(begin\|case\|try\)\>:\<end\>'
endif
" Undo the stuff we changed.

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: php
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Changed: 2004 Jul 08
" Last Changed: 2005 Sep 05
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -41,7 +41,7 @@ endif
setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\?
setlocal iskeyword+=$
if exists("loaded_matchit")
let b:match_words = '\<switch\>:\<endswitch\>,' .
let b:match_words = '<php?:?>,\<switch\>:\<endswitch\>,' .
\ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' .
\ '\<while\>:\<endwhile\>,' .
\ '\<do\>:\<while\>,' .

View File

@@ -1,14 +1,120 @@
" Vim filetype plugin
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair@soyabean.com.au>
" Last Change: 2002/08/12
" URL: www.soyabean.com.au/gavin/vim/index.html
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair at soyabean.com.au>
" 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
" http://bike-nomad.com/vim/ruby.vim.
" ----------------------------------------------------------------------------
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
finish
endif
let b:did_ftplugin = 1
" There are no known setting particularly appropriate for Ruby. Please
" contact the maintainer if you think of some.
let s:cpo_save = &cpo
set cpo&vim
" Matchit support
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
" TODO: improve optional do loops
let b:match_words =
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
\ '\|' .
\ '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' .
\ '\)' .
\ ':' .
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
\ '\|' .
\ '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
\ '\)' .
\ ':' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<end\>'
let b:match_skip =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
\ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Interpolation\\|" .
\ "NoInterpolation\\|Escape\\|Comment\\|Documentation\\)\\>'"
endif
setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
setlocal suffixesadd=.rb
" TODO:
"setlocal define=^\\s*def
setlocal comments=:#
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 "' . s:code . '"')
else
let s:rubypath = system("ruby -e '" . s:code . "'")
endif
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.
let s:rubypath = ".,,"
endif
endif
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"
endif
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< "
\ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
let &cpo = s:cpo_save
unlet s:cpo_save
"
" Instructions for enabling "matchit" support:
"
" 1. Look for the latest "matchit" plugin at
"
" http://www.vim.org/scripts/script.php?script_id=39
"
" It is also packaged with Vim, in the $VIMRUNTIME/macros directory.
"
" 2. Copy "matchit.txt" into a "doc" directory (e.g. $HOME/.vim/doc).
"
" 3. Copy "matchit.vim" into a "plugin" directory (e.g. $HOME/.vim/plugin).
"
" 4. Ensure this file (ftplugin/ruby.vim) is installed.
"
" 5. Ensure you have this line in your $HOME/.vimrc:
" filetype plugin on
"
" 6. Restart Vim and create the matchit documentation:
"
" :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.
"
" 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.
"
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Verilog HDL
" Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw>
" Last Change: Wed Oct 31 16:16:19 CST 2001
" Last Change: Mon Sep 5 11:05:54 CST 2005
" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
" Only do this when not done yet for this buffer
@@ -12,6 +12,10 @@ endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
" Undo the plugin effect
let b:undo_ftplugin = "setlocal fo< com< tw<"
\ . "| unlet b:browsefilter b:match_ignorecase b:match_words"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croqlm1
@@ -20,7 +24,9 @@ setlocal fo-=t fo+=croqlm1
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
" Format comments to be up to 78 characters long
setlocal tw=75
if &textwidth == 0
setlocal tw=78
endif
set cpo-=C

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

14
runtime/indent/eruby.vim Normal file
View File

@@ -0,0 +1,14 @@
" Vim indent file
" 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
" ----------------------------------------------------------------------------
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime! indent/html.vim

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,7 +2,7 @@
" Language: Perl
" Author: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
" URL: http://rgarciasuarez.free.fr/vim/indent/perl.vim
" Last Change: 2005 Jul 15
" Last Change: 2005 Sep 07
" Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints)
@@ -26,7 +26,7 @@ endif
let b:did_indent = 1
" Is syntax highlighting active ?
let b:indent_use_syntax = has("syntax") && &syntax == "perl"
let b:indent_use_syntax = has("syntax")
setlocal indentexpr=GetPerlIndent()
setlocal indentkeys+=0=,0),0=or,0=and

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,14 @@
" Vim indent file
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair@soyabean.com.au>
" Last Change: 2003 May 11
" URL: www.soyabean.com.au/gavin/vim/index.html
" Changes: (since vim 6.1)
" - indentation after a line ending in comma, etc, (even in a comment) was
" broken, now fixed (2002/08/14)
" 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
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -13,55 +16,347 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent()
setlocal nolisp
setlocal nosmartindent
setlocal autoindent
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end
" Only define the function once.
if exists("*GetRubyIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
" Regex of syntax group names that are or delimit string or are comments.
let s:syng_strcom = '\<ruby\%(String\|StringDelimiter\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Escape\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
let s:syng_string =
\ '\<ruby\%(String\|StringDelimiter\|Interpolation\|NoInterpolation\|Escape\)\>'
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\'\<ruby\%(String\|StringDelimiter\|Interpolation\|NoInterpolation\|Escape\|Documentation\)\>'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '".s:syng_strcom."'"
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
\ '\|rescue\)\>' .
\ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
" Regex used for words that, at the start of a line, remove a level of indent.
let s:ruby_deindent_keywords =
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>'
" Regex that defines the start-match for the 'end' keyword.
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\<do\>'
" Regex that defines the middle-match for the 'end' keyword.
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue\>\|when\|elsif\)\>'
" Regex that defines the end-match for the 'end' keyword.
let s:end_end_regex = '\%(^\|[^.:]\)\@<=\<end\>'
" Expression used for searchpair() call for finding match for 'end' keyword.
let s:end_skip_expr = s:skip_expr .
\ ' || (expand("<cword>") == "do"' .
\ ' && getline(".") =~ "^\\s*\\<while\\|until\\|for\\>")'
" Regex that defines continuation lines, not including (, {, or [.
let s:continuation_regex = '\%([\\*+/.,=:-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex2 =
\ '\%([\\*+/.,=:({[-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines blocks.
let s:block_regex =
\ '\%(\<do\>\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$'
" 2. Auxiliary Functions {{{1
" ======================
" Check if the character at lnum:col is inside a string, comment, or is ascii.
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.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_string
endfunction
" Check if the character at lnum:col is inside a string or documentation.
function s:IsInStringOrDocumentation(lnum, col)
return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_stringdoc
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '^=begin$'
if in_block
let in_block = 0
else
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)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum)
" Start on the line we're at and use its indent.
let msl = a:lnum
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
let col = match(line, s:continuation_regex2) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
let msl = lnum
else
break
endif
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while pos != -1
if !s:IsInStringOrComment(a:lnum, pos + 1)
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), a:regex) + 1
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
endfunction
function s:MatchLast(lnum, regex)
let line = getline(a:lnum)
let col = match(line, '.*\zs' . a:regex)
while col != -1 && s:IsInStringOrComment(a:lnum, col)
let line = strpart(line, 0, col)
let col = match(line, '.*' . a:regex)
endwhile
return col + 1
endfunction
" 3. GetRubyIndent Function {{{1
" =========================
function GetRubyIndent()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(v:lnum, col)
call cursor(v:lnum, col)
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
let ind = line[col-1]==')' ? virtcol('.')-1 : indent(s:GetMSL(line('.')))
endif
return ind
endif
" If we have a =begin or =end set indent to first column.
if match(line, '^\s*\%(=begin\|=end\)$') != -1
return 0
endif
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
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
let line = getline('.')
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
else
let ind = indent('.')
endif
endif
return ind
endif
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(v:lnum - 1)
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" If the line trailed with [*+,.(] - but not in a comment - trust the user
if getline(lnum) =~ '\(\[^#\].*\)?\(\*\|\.\|+\|,\|(\)\(\s*#.*\)\=$'
return -1
endif
" Add a 'shiftwidth' after lines beginning with:
" module, class, dev, if, for, while, until, else, elsif, case, when, {
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
let flag = 0
if getline(lnum) =~ '^\s*\(module\>\|class\>\|def\>\|if\>\|for\>\|while\>\|until\>\|else\>\|elsif\>\|case\>\|when\>\|unless\|begin\|ensure\>\|rescue\>\)'
\ || getline(lnum) =~ '{\s*$'
\ || getline(lnum) =~ '\({\|\<do\>\).*|.*|\s*$'
\ || getline(lnum) =~ '\<do\>\(\s*#.*\)\=$'
let ind = ind + &sw
let flag = 1
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum)) + &sw
endif
" Subtract a 'shiftwidth' after lines ending with
" "end" when they begin with while, if, for, until
if flag == 1 && getline(lnum) =~ '\<end\>\(\s*#.*\)\=$'
let ind = ind - &sw
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
return virtcol('.')
elseif counts[1] == '1' || counts[2] == '1'
return ind + &sw
else
call cursor(v:lnum, vcol)
end
endif
" Subtract a 'shiftwidth' on end, else and, elsif, when and }
if getline(v:lnum) =~ '^\s*\(end\>\|else\>\|elsif\>\|when\>\|ensure\>\|rescue\>\|}\)'
let ind = ind - &sw
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
let col = s:Match(lnum, '\%(^\|[^.]\)\<end\>\s*\%(#.*\)\=$')
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
end
return ind
endif
end
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
" let ind = indent(lnum) + &sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
if s:Match(lnum, s:end_end_regex)
let ind = indent('.')
endif
return ind
endif
" 3.4. Work on the MSL line. {{{2
" --------------------------
" Set up variables to use and search for MSL to the previous line.
let p_lnum = lnum
let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum
if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
" Set up more variables, now that we know we wasn't continuation bound.
let line = getline(lnum)
let msl_ind = indent(lnum)
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords)
let ind = msl_ind + &sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw
endif
return ind
endif
" If the previous line ended with [*+/.-=], indent one extra level.
if s:Match(lnum, s:continuation_regex)
if lnum == p_lnum
let ind = msl_ind + &sw
else
let ind = msl_ind
endif
endif
" }}}2
return ind
endfunction
" vim:sw=2
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save

215
runtime/indent/sml.vim Normal file
View File

@@ -0,0 +1,215 @@
" Vim indent file
" Language: SML
" Maintainer: Saikat Guha <sg266@cornell.edu>
" Hubert Chao <hc85@cornell.edu>
" Original OCaml Version:
" Jean-Francois Yuen <jfyuen@ifrance.com>
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at>
" OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
" Last Change: 2003 Jan 04 - Adapted to SML
" 2002 Nov 06 - Some fixes (JY)
" 2002 Oct 28 - Fixed bug with indentation of ']' (MM)
" 2002 Oct 22 - Major rewrite (JY)
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal expandtab
setlocal indentexpr=GetSMLIndent()
setlocal indentkeys+=0=and,0=else,0=end,0=handle,0=if,0=in,0=let,0=then,0=val,0=fun,0=\|,0=*),0)
setlocal nolisp
setlocal nosmartindent
setlocal textwidth=80
setlocal shiftwidth=2
" Comment formatting
if (has("comments"))
set comments=sr:(*,mb:*,ex:*)
set fo=cqort
endif
" Only define the function once.
"if exists("*GetSMLIndent")
"finish
"endif
" Define some patterns:
let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\)\s*$'
let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>'
let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$'
let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>'
let s:module = '\<\%(let\|sig\|struct\)\>'
let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$'
let s:type = '^\s*\%(let\|type\)\>.*='
let s:val = '^\s*\(val\|external\)\>.*:'
" 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
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
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"'))
let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
if lno == -1
return indent(lno)
else
return col(".") - 1
endif
endfunction
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"'))
let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
let moduleLine = getline(lno)
if lno == -1 || moduleLine =~ '^\s*\(fun\|structure\|signature\)\>'
return indent(lno)
else
return col(".") - 1
endif
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*let\\>.*=\\s*$\\|" . s:beflet'))
"endfunction
function! GetSMLIndent()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
let ind = indent(lnum)
let lline = getline(lnum)
" Return double 'shiftwidth' after lines matching:
if lline =~ '^\s*|.*=>\s*$'
return ind + &sw + &sw
elseif lline =~ '^\s*val\>.*=\s*$'
return ind + &sw
endif
let line = getline(v:lnum)
" Indent lines starting with 'end' to matching module
if line =~ '^\s*end\>'
return s:FindLet(s:module, '', '\<end\>')
" Match 'else' with 'if'
elseif line =~ '^\s*else\>'
if lline !~ '^\s*\(if\|else\|then\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
else return ind
endif
" Match 'then' with 'if'
elseif line =~ '^\s*then\>'
if lline !~ '^\s*\(if\|else\|then\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
else return ind
endif
" Indent if current line begins with ']'
elseif line =~ '^\s*\]'
return s:FindPair('\[','','\]')
" Indent current line starting with 'in' to last matching 'let'
elseif line =~ '^\s*in\>'
let ind = s:FindLet('\<let\>','','\<in\>')
" Indent from last matching module if line matches:
elseif line =~ '^\s*\(fun\|val\|open\|structure\|and\|datatype\|type\|exception\)\>'
cursor(lnum,1)
let lastModule = indent(searchpair(s:module, '', '\<end\>', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
if lastModule == -1
return 0
else
return lastModule + &sw
endif
" Indent lines starting with '|' from matching 'case', 'handle'
elseif line =~ '^\s*|'
" cursor(lnum,1)
let lastSwitch = search('\<\(case\|handle\|fun\|datatype\)\>','bW')
let switchLine = getline(lastSwitch)
let switchLineIndent = indent(lastSwitch)
if lline =~ '^\s*|'
return ind
endif
if switchLine =~ '\<case\>'
return col(".") + 2
elseif switchLine =~ '\<handle\>'
return switchLineIndent + &sw
elseif switchLine =~ '\<datatype\>'
call search('=')
return col(".") - 1
else
return switchLineIndent + 2
endif
" Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else',
" 'in'
elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$'
let ind = ind + &sw
" Indent if last line ends with 'of', align from 'case'
elseif lline =~ '\<\(of\)\s*$'
call search('\<case\>',"bW")
let ind = col(".")+4
" Indent if current line starts with 'of'
elseif line =~ '^\s*of\>'
call search('\<case\>',"bW")
let ind = col(".")+1
" Indent if last line starts with 'fun', 'case', 'fn'
elseif lline =~ '^\s*\(fun\|fn\|case\)\>'
let ind = ind + &sw
endif
" Don't indent 'let' if last line started with 'fun', 'fn'
if line =~ '^\s*let\>'
if lline =~ '^\s*\(fun\|fn\)'
let ind = ind - &sw
endif
endif
return ind
endfunction
" vim:sw=2

View File

@@ -0,0 +1,572 @@
" Keymap file for the editing Tamil language files in TSCII encoding.
"
" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
" Last updated: August 4, 2005
"
" You will need a fixed width TSCII font to use this encoding. The
" Avarangal TSCII fixed width font (TSC_AvarangalFxd) is used to test
" this keymap.
"
" Visit http://www.tscii.org for more information about the TSCII
" encoding.
"
let b:keymap_name = "tamil_tscii"
loadkeymap
" Uyir (Vowels) letters
a <char-171>
aa <char-172>
A <char-172>
i <char-173>
ii <char-174>
I <char-174>
u <char-175>
uu <char-176>
U <char-176>
e <char-177>
ee <char-178>
E <char-178>
ai <char-179>
o <char-180>
oo <char-181>
O <char-181>
au <char-182>
q <char-183>
" mey (Consonants) letters
k <char-236>
ka <char-184>
kaa <char-184><char-161>
kA <char-184><char-161>
ki <char-184><char-162>
kii <char-184><char-163>
kI <char-184><char-163>
ku <char-204>
kuu <char-220>
kU <char-220>
ke <char-166><char-184>
kee <char-167><char-184>
kE <char-167><char-184>
kai <char-168><char-184>
ko <char-166><char-184><char-161>
koo <char-167><char-184><char-161>
kO <char-167><char-184><char-161>
kau <char-166><char-184><char-199>
g <char-236>
ga <char-184>
gaa <char-184><char-161>
gA <char-184><char-161>
gi <char-184><char-162>
gii <char-184><char-163>
gI <char-184><char-163>
gu <char-204>
guu <char-220>
gU <char-220>
ge <char-166><char-184>
gee <char-167><char-184>
gE <char-167><char-184>
gai <char-168><char-184>
go <char-166><char-184><char-161>
goo <char-167><char-184><char-161>
gO <char-167><char-184><char-161>
gau <char-166><char-184><char-199>
ng <char-237>
nga <char-185>
ngaa <char-185><char-161>
ngA <char-185><char-161>
ngi <char-185><char-162>
ngii <char-185><char-163>
ngI <char-185><char-163>
ngu <char-153>
nguu <char-155>
ngU <char-155>
nge <char-166><char-185>
ngee <char-167><char-185>
ngE <char-167><char-185>
ngai <char-168><char-185>
ngo <char-166><char-185><char-161>
ngoo <char-167><char-185><char-161>
ngO <char-167><char-185><char-161>
ngau <char-166><char-185><char-199>
ch <char-238>
cha <char-186>
chaa <char-186><char-161>
chA <char-186><char-161>
chi <char-186><char-162>
chii <char-186><char-163>
chI <char-186><char-163>
chu <char-204>
chuu <char-221>
chU <char-221>
che <char-166><char-186>
chee <char-167><char-186>
chE <char-167><char-186>
chai <char-168><char-186>
cho <char-166><char-186><char-161>
choo <char-167><char-186><char-161>
chO <char-167><char-186><char-161>
chau <char-166><char-186><char-199>
s <char-238>
sa <char-186>
saa <char-186><char-161>
sA <char-186><char-161>
si <char-186><char-162>
sii <char-186><char-163>
sI <char-186><char-163>
su <char-204>
suu <char-221>
sU <char-221>
se <char-166><char-186>
see <char-167><char-186>
sE <char-167><char-186>
sai <char-168><char-186>
so <char-166><char-186><char-161>
soo <char-167><char-186><char-161>
sO <char-167><char-186><char-161>
sau <char-166><char-186><char-199>
nj <char-239>
nja <char-187>
njaa <char-187><char-161>
njA <char-187><char-161>
nji <char-187><char-162>
njii <char-187><char-163>
njI <char-187><char-163>
nju <char-154>
njuu <char-156>
njU <char-156>
nje <char-166><char-187>
njee <char-167><char-187>
njE <char-167><char-187>
njai <char-168><char-187>
njo <char-166><char-187><char-161>
njoo <char-167><char-187><char-161>
njO <char-167><char-187><char-161>
njau <char-166><char-187><char-199>
t <char-240>
ta <char-188>
taa <char-188><char-161>
tA <char-188><char-161>
ti <char-202>
tii <char-203>
tI <char-203>
tu <char-206>
tuu <char-222>
tU <char-222>
te <char-166><char-188>
tee <char-167><char-188>
tE <char-167><char-188>
tai <char-168><char-188>
to <char-166><char-188><char-161>
too <char-167><char-188><char-161>
tO <char-167><char-188><char-161>
tau <char-166><char-188><char-199>
d <char-240>
da <char-188>
daa <char-188><char-161>
dA <char-188><char-161>
di <char-202>
dii <char-203>
dI <char-203>
du <char-206>
duu <char-222>
dU <char-222>
de <char-166><char-188>
dee <char-167><char-188>
dE <char-167><char-188>
dai <char-168><char-188>
do <char-166><char-188><char-161>
doo <char-167><char-188><char-161>
dO <char-167><char-188><char-161>
dau <char-166><char-188><char-199>
N <char-241>
Na <char-189>
Naa <char-189><char-161>
NA <char-189><char-161>
Ni <char-189><char-162>
Nii <char-189><char-163>
NI <char-189><char-163>
Nu <char-207>
Nuu <char-223>
NU <char-223>
Ne <char-166><char-189>
Nee <char-167><char-189>
NE <char-167><char-189>
Nai <char-168><char-189>
No <char-166><char-189><char-161>
Noo <char-167><char-189><char-161>
NO <char-167><char-189><char-161>
Nau <char-166><char-189><char-199>
th <char-242>
tha <char-190>
thaa <char-190><char-161>
thA <char-190><char-161>
thi <char-190><char-162>
thii <char-190><char-163>
thI <char-190><char-163>
thu <char-208>
thuu <char-224>
thU <char-224>
the <char-166><char-190>
thee <char-167><char-190>
thE <char-167><char-190>
thai <char-168><char-190>
tho <char-166><char-190><char-161>
thoo <char-167><char-190><char-161>
thO <char-167><char-190><char-161>
thau <char-166><char-190><char-199>
w <char-243>
wa <char-191>
waa <char-191><char-161>
wA <char-191><char-161>
wi <char-191><char-162>
wii <char-191><char-163>
wI <char-191><char-163>
wu <char-209>
wuu <char-225>
wU <char-225>
we <char-166><char-191>
wee <char-167><char-191>
wE <char-167><char-191>
wai <char-168><char-191>
wo <char-166><char-191><char-161>
woo <char-167><char-191><char-161>
wO <char-167><char-191><char-161>
wau <char-166><char-191><char-199>
n- <char-243>
n-a <char-191>
n-aa <char-191><char-161>
n-A <char-191><char-161>
n-i <char-191><char-162>
n-ii <char-191><char-163>
n-I <char-191><char-163>
n-u <char-209>
n-uu <char-225>
n-U <char-225>
n-e <char-166><char-191>
n-ee <char-167><char-191>
n-E <char-167><char-191>
n-ai <char-168><char-191>
n-o <char-166><char-191><char-161>
n-oo <char-167><char-191><char-161>
n-O <char-167><char-191><char-161>
n-au <char-166><char-191><char-199>
p <char-244>
pa <char-192>
paa <char-192><char-161>
pA <char-192><char-161>
pi <char-192><char-162>
pii <char-192><char-163>
pI <char-192><char-163>
pu <char-210>
puu <char-226>
pU <char-226>
pe <char-166><char-192>
pee <char-167><char-192>
pE <char-167><char-192>
pai <char-168><char-192>
po <char-166><char-192><char-161>
poo <char-167><char-192><char-161>
pO <char-167><char-192><char-161>
pau <char-166><char-192><char-199>
b <char-244>
ba <char-192>
baa <char-192><char-161>
bA <char-192><char-161>
bi <char-192><char-162>
bii <char-192><char-163>
bI <char-192><char-163>
bu <char-210>
buu <char-226>
bU <char-226>
be <char-166><char-192>
bee <char-167><char-192>
bE <char-167><char-192>
bai <char-168><char-192>
bo <char-166><char-192><char-161>
boo <char-167><char-192><char-161>
bO <char-167><char-192><char-161>
bau <char-166><char-192><char-199>
m <char-245>
ma <char-193>
maa <char-193><char-161>
mA <char-193><char-161>
mi <char-193><char-162>
mii <char-193><char-163>
mI <char-193><char-163>
mu <char-211>
muu <char-227>
mU <char-227>
me <char-166><char-193>
mee <char-167><char-193>
mE <char-167><char-193>
mai <char-168><char-193>
mo <char-166><char-193><char-161>
moo <char-167><char-193><char-161>
mO <char-167><char-193><char-161>
mau <char-166><char-193><char-199>
y <char-246>
ya <char-194>
yaa <char-194><char-161>
yA <char-194><char-161>
yi <char-194><char-162>
yii <char-194><char-163>
yI <char-194><char-163>
yu <char-212>
yuu <char-228>
yU <char-228>
ye <char-166><char-194>
yee <char-167><char-194>
yE <char-167><char-194>
yai <char-168><char-194>
yo <char-166><char-194><char-161>
yoo <char-167><char-194><char-161>
yO <char-167><char-194><char-161>
yau <char-166><char-194><char-199>
r <char-247>
ra <char-195>
raa <char-195><char-161>
rA <char-195><char-161>
ri <char-195><char-162>
rii <char-195><char-163>
rI <char-195><char-163>
ru <char-213>
ruu <char-229>
rU <char-229>
re <char-166><char-195>
ree <char-167><char-195>
rE <char-167><char-195>
rai <char-168><char-195>
ro <char-166><char-195><char-161>
roo <char-167><char-195><char-161>
rO <char-167><char-195><char-161>
rau <char-166><char-195><char-199>
l <char-248>
la <char-196>
laa <char-196><char-161>
lA <char-196><char-161>
li <char-196><char-162>
lii <char-196><char-163>
lI <char-196><char-163>
lu <char-214>
luu <char-230>
lU <char-230>
le <char-166><char-196>
lee <char-167><char-196>
lE <char-167><char-196>
lai <char-168><char-196>
lo <char-166><char-196><char-161>
loo <char-167><char-196><char-161>
lO <char-167><char-196><char-161>
lau <char-166><char-196><char-199>
v <char-249>
va <char-197>
vaa <char-197><char-161>
vA <char-197><char-161>
vi <char-197><char-162>
vii <char-197><char-163>
vI <char-197><char-163>
vu <char-215>
vuu <char-231>
vU <char-231>
ve <char-166><char-197>
vee <char-167><char-197>
vE <char-167><char-197>
vai <char-168><char-197>
vo <char-166><char-197><char-161>
voo <char-167><char-197><char-161>
vO <char-167><char-197><char-161>
vau <char-166><char-197><char-199>
z <char-250>
za <char-198>
zaa <char-198><char-161>
zA <char-198><char-161>
zi <char-198><char-162>
zii <char-198><char-163>
zI <char-198><char-163>
zu <char-216>
zuu <char-232>
zU <char-232>
ze <char-166><char-198>
zee <char-167><char-198>
zE <char-167><char-198>
zai <char-168><char-198>
zo <char-166><char-198><char-161>
zoo <char-167><char-198><char-161>
zO <char-167><char-198><char-161>
zau <char-166><char-198><char-199>
L <char-251>
La <char-199>
Laa <char-199><char-161>
LA <char-199><char-161>
Li <char-199><char-162>
Lii <char-199><char-163>
LI <char-199><char-163>
Lu <char-217>
Luu <char-233>
LU <char-233>
Le <char-166><char-199>
Lee <char-167><char-199>
LE <char-167><char-199>
Lai <char-168><char-199>
Lo <char-166><char-199><char-161>
Loo <char-167><char-199><char-161>
LO <char-167><char-199><char-161>
Lau <char-166><char-199><char-199>
R <char-252>
Ra <char-200>
Raa <char-200><char-161>
RA <char-200><char-161>
Ri <char-200><char-162>
Rii <char-200><char-163>
RI <char-200><char-163>
Ru <char-218>
Ruu <char-234>
RU <char-234>
Re <char-166><char-200>
Ree <char-167><char-200>
RE <char-167><char-200>
Rai <char-168><char-200>
Ro <char-166><char-200><char-161>
Roo <char-167><char-200><char-161>
RO <char-167><char-200><char-161>
Rau <char-166><char-200><char-199>
n <char-253>
na <char-201>
naa <char-201><char-161>
nA <char-201><char-161>
ni <char-201><char-162>
nii <char-201><char-163>
nI <char-201><char-163>
nu <char-219>
nuu <char-235>
nU <char-235>
ne <char-166><char-201>
nee <char-167><char-201>
nE <char-167><char-201>
nai <char-168><char-201>
no <char-166><char-201><char-161>
noo <char-167><char-201><char-161>
nO <char-167><char-201><char-161>
nau <char-166><char-201><char-199>
" Grantha letters
j <char-136>
ja <char-131>
jaa <char-131><char-161>
jA <char-131><char-161>
ji <char-131><char-162>
jii <char-131><char-163>
jI <char-131><char-163>
ju <char-131><char-164>
juu <char-131><char-164>
jU <char-131><char-165>
je <char-166><char-131>
jee <char-167><char-131>
jE <char-167><char-131>
jai <char-168><char-131>
jo <char-166><char-131><char-161>
joo <char-167><char-131><char-161>
jO <char-167><char-131><char-161>
jau <char-166><char-131><char-199>
sh <char-137>
sha <char-132>
shaa <char-132><char-161>
shA <char-132><char-161>
shi <char-132><char-162>
shii <char-132><char-163>
shI <char-132><char-163>
shu <char-131><char-164>
shuu <char-131><char-164>
shU <char-131><char-165>
she <char-166><char-132>
shee <char-167><char-132>
shE <char-167><char-132>
shai <char-168><char-132>
sho <char-166><char-132><char-161>
shoo <char-167><char-132><char-161>
shO <char-167><char-132><char-161>
shau <char-166><char-132><char-199>
S <char-138>
Sa <char-133>
Saa <char-133><char-161>
SA <char-133><char-161>
Si <char-133><char-162>
Sii <char-133><char-163>
SI <char-133><char-163>
Su <char-133><char-164>
Suu <char-133><char-165>
SU <char-133><char-165>
Se <char-166><char-133>
See <char-167><char-133>
SE <char-167><char-133>
Sai <char-168><char-133>
So <char-166><char-133><char-161>
Soo <char-167><char-133><char-161>
SO <char-167><char-133><char-161>
Sau <char-166><char-133><char-199>
h <char-139>
ha <char-134>
haa <char-134><char-161>
hA <char-134><char-161>
hi <char-134><char-162>
hii <char-134><char-163>
hI <char-134><char-163>
hu <char-134><char-164>
huu <char-134><char-165>
hU <char-134><char-165>
he <char-166><char-134>
hee <char-167><char-134>
hE <char-167><char-134>
hai <char-168><char-134>
ho <char-166><char-134><char-161>
hoo <char-167><char-134><char-161>
hO <char-167><char-134><char-161>
hau <char-166><char-134><char-199>
x <char-140>
xa <char-135>
xaa <char-135><char-161>
xA <char-135><char-161>
xi <char-135><char-162>
xii <char-135><char-163>
xI <char-135><char-163>
xu <char-135><char-164>
xuu <char-135><char-165>
xU <char-135><char-165>
xe <char-166><char-135>
xee <char-167><char-135>
xE <char-167><char-135>
xai <char-168><char-135>
xo <char-166><char-135><char-161>
xoo <char-167><char-135><char-161>
xO <char-167><char-135><char-161>
xau <char-166><char-135><char-199>
sri <char-130>

View File

@@ -1,7 +1,7 @@
" Menu Translations: Italian / Italiano
" Maintainer: Antonio Colombo <azc10@yahoo.com>
" Vlad Sandrini <sator72@libero.it>
" Last Change: 2005 Mar 16
" Last Change: 2005 Aug 13
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -159,6 +159,26 @@ menut &Jump\ to\ this\ tag<Tab>g^] &Vai\ a\ questa\ Tag<Tab>g^]
menut Jump\ &back<Tab>^T Torna\ &indietro<Tab>^T
menut Build\ &Tags\ File Costruisci\ File\ &Tags\
" Menu ortografia / Spelling
menut &Spelling &Ortografia
menut &Spell\ Check\ On Attiva\ &Controllo\ ortografico
menut Spell\ Check\ &Off &Disattiva\ controllo\ ortografico
menut To\ &Next\ error<Tab>]s Errore\ &Seguente<tab>]s
menut To\ &Previous\ error<Tab>[s Errore\ &Precedente<tab>[s
menut Suggest\ &Corrections<Tab>z? &Suggerimenti<Tab>z?
menut &Repeat\ correction<Tab>:spellrepall &Ripeti\ correzione<Tab>:spellrepall
menut Set\ language\ to\ "en" Imposta\ lingua\ a\ "en"
menut Set\ language\ to\ "en_au" Imposta\ lingua\ a\ "en_au"
menut Set\ language\ to\ "en_ca" Imposta\ lingua\ a\ "en_ca"
menut Set\ language\ to\ "en_gb" Imposta\ lingua\ a\ "en_gb"
menut Set\ language\ to\ "en_nz" Imposta\ lingua\ a\ "en_nz"
menut Set\ language\ to\ "en_us" Imposta\ lingua\ a\ "en_us"
menut Set\ language\ to\ "it" Imposta\ lingua\ a\ "it"
menut Set\ language\ to\ "it_it" Imposta\ lingua\ a\ "it_it"
menut Set\ language\ to\ "it_ch" Imposta\ lingua\ a\ "it_ch"
menut &Find\ More\ Languages &Trova\ altre\ lingue
" Menu piegature / Fold
if has("folding")
menut &Folding &Piegature
@@ -212,7 +232,7 @@ menut &Close<Tab>:cclose &Chiudi<Tab>:cclose
menut &Convert\ to\ HEX<Tab>:%!xxd &Converti\ a\ Esadecimale<Tab>:%!xxd
menut Conve&rt\ back<Tab>:%!xxd\ -r Conve&rti\ da\ Esadecimale<Tab>:%!xxd\ -r
menut &Set\ Compiler Impo&sta\ Compilatore
menut &SeT\ Compiler Impo&sta\ Compilatore
" Buffers / Buffer
menut &Buffers &Buffer

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

@@ -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 Jul 08
" 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.
@@ -198,10 +198,10 @@ an 20.405 &Edit.-SEP2- <Nop>
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
vunmenu &Edit.&Find\.\.\.
vnoremenu &Edit.&Find\.\.\. y:promptfind <C-R>"<CR>
vnoremenu <silent> &Edit.&Find\.\.\. y:call <SID>FixFText()<CR>:promptfind <C-R>"<CR>
an 20.420 &Edit.Find\ and\ Rep&lace\.\.\. :promptrepl<CR>
vunmenu &Edit.Find\ and\ Rep&lace\.\.\.
vnoremenu &Edit.Find\ and\ Rep&lace\.\.\. y:promptrepl <C-R>"<CR>
vnoremenu <silent> &Edit.Find\ and\ Rep&lace\.\.\. y:call <SID>FixFText()<CR>:promptrepl <C-R>"<CR>
else
an 20.410 &Edit.&Find<Tab>/ /
an 20.420 &Edit.Find\ and\ Rep&lace<Tab>:%s :%s/
@@ -212,6 +212,11 @@ endif
an 20.425 &Edit.-SEP3- <Nop>
an 20.430 &Edit.Settings\ &Window :options<CR>
fun! s:FixFText()
" Fix text in nameless register to be used with :promptfind.
let @" = substitute(@", "[\r\n]", '\\n', 'g')
endfun
" Edit/Global Settings
an 20.440.100 &Edit.&Global\ Settings.Toggle\ Pattern\ &Highlight<Tab>:set\ hls! :set hls! hls?<CR>
an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignore-case<Tab>:set\ ic! :set ic! ic?<CR>
@@ -424,22 +429,30 @@ if has("spell")
an 40.335.260 &Tools.&Spelling.Set\ language\ to\ "en_us" :set spl=en_us spell<CR>
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
func! s:SpellLang()
silent! aun &Tools.&Spelling.&Find\ More\ Languages
for cmd in s:undo_spellang
exe "silent! " . cmd
endfor
let s:undo_spellang = []
if &enc == "iso-8859-15"
let enc = "latin1"
else
let enc = &enc
endif
let found = 0
let s = globpath(&rtp, "spell/*." . enc . ".spl")
if s != ""
let n = 300
for f in split(s, "\n")
let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "")
if nm != "en"
exe 'an 40.335.' . n . ' &Tools.&Spelling.Set\ language\ to\ "' . nm . '" :set spl=' . nm . ' spell<CR>'
if nm != "en" && nm !~ '/'
let found += 1
let menuname = '&Tools.&Spelling.Set\ language\ to\ "' . nm . '"'
exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell<CR>'
let s:undo_spellang += ['aun ' . menuname]
endif
let n += 10
endfor
@@ -451,6 +464,10 @@ if has("spell")
else
echomsg "Found " . found . " more spell files"
endif
" Need to redo this when 'encoding' is changed.
augroup spellmenu
au! EncodingChanged * call <SID>SpellLang()
augroup END
endfun
endif
@@ -873,6 +890,64 @@ noremenu <script> <silent> 1.100 PopUp.Select\ &All :<C-U>call <SID>SelectAll()
inoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-O>:call <SID>SelectAll()<CR>
cnoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-U>call <SID>SelectAll()<CR>
if has("spell")
" Spell suggestions in the popup menu. Note that this will slow down the
" appearance of the menu!
func! <SID>SpellPopup()
if exists("s:changeitem") && s:changeitem != ''
call <SID>SpellDel()
endif
if !&spell || &spelllang == ''
return
endif
let curcol = col('.')
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
endif
if w != ''
let s:suglist = spellsuggest(w, 10)
if len(s:suglist) <= 0
call cursor(0, curcol) " put the cursor back where it was
else
let s:changeitem = 'change\ "' . escape(w, ' .'). '"\ to'
let s:fromword = w
let pri = 1
for sug in s:suglist
exe 'amenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .')
\ . ' :call <SID>SpellReplace(' . pri . ')<CR>'
let pri += 1
endfor
let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list'
exe 'amenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'
let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"'
exe 'amenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'
amenu 1.8 PopUp.-SpellSep- :
endif
endif
endfunc
func! <SID>SpellReplace(n)
let l = getline('.')
call setline('.', strpart(l, 0, col('.') - 1) . s:suglist[a:n - 1]
\ . strpart(l, col('.') + len(s:fromword) - 1))
endfunc
func! <SID>SpellDel()
exe "aunmenu PopUp." . s:changeitem
exe "aunmenu PopUp." . s:additem
exe "aunmenu PopUp." . s:ignoreitem
aunmenu PopUp.-SpellSep-
let s:changeitem = ''
endfun
au! MenuPopup * call <SID>SpellPopup()
endif
" The GUI toolbar (for MS-Windows and GTK)
if has("toolbar")

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 11
" Last Change: 2005 Oct 02
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -403,6 +403,8 @@ if has("syntax")
call <SID>OptionL("spc")
call append("$", "spellsuggest\tmethods used to suggest corrections")
call <SID>OptionG("sps", &sps)
call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing")
call <SID>OptionG("msm", &msm)
endif
@@ -696,12 +698,17 @@ call append("$", "formatlistpat\tpattern to recognize a numbered list")
call append("$", "\t(local to buffer)")
call <SID>OptionL("flp")
if has("insert_expand")
call append("$", "complete\tspecifies how Insert mode completion works")
call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
call append("$", "\t(local to buffer)")
call <SID>OptionL("cpt")
call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
call <SID>OptionG("cot", &cot)
call append("$", "completefunc\tuser defined function for Insert mode completion")
call append("$", "\t(local to buffer)")
call <SID>OptionL("cfu")
call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion")
call append("$", "\t(local to buffer)")
call <SID>OptionL("ofu")
call append("$", "dictionary\tlist of dictionary files for keyword completion")
call append("$", "\t(global or local to buffer)")
call <SID>OptionG("dict", &dict)

View File

@@ -1,6 +1,6 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 May 18
" Last Change: 2005 Jul 26
" Exit quickly when:
" - this plugin was already loaded
@@ -15,188 +15,22 @@ augroup gzip
" Remove all gzip autocommands
au!
" Enable editing of gzipped files
" set binary mode before reading the file
" use "gzip -d", gunzip isn't always available
" Enable editing of gzipped files.
" The functions are defined in autoload/gzip.vim.
"
" Set binary mode before reading the file.
" Use "gzip -d", gunzip isn't always available.
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin
autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -dn")
autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d")
autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress")
autocmd BufWritePost,FileWritePost *.gz call s:write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2")
autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f")
autocmd FileAppendPre *.gz call s:appre("gzip -dn")
autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d")
autocmd FileAppendPre *.Z call s:appre("uncompress")
autocmd FileAppendPost *.gz call s:write("gzip")
autocmd FileAppendPost *.bz2 call s:write("bzip2")
autocmd FileAppendPost *.Z call s:write("compress -f")
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
autocmd FileAppendPost *.gz call gzip#write("gzip")
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
autocmd FileAppendPost *.Z call gzip#write("compress -f")
augroup END
" Function to check that executing "cmd [-f]" works.
" The result is cached in s:have_"cmd" for speed.
fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
let e = executable(name)
if e < 0
let r = system(name . " --version")
let e = (r !~ "not found" && r != "")
endif
exe "let s:have_" . name . "=" . e
endif
exe "return s:have_" . name
endfun
" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
" the flags in the compressed file.
" The only compression methods that can be detected are max speed (-1) and max
" compression (-9).
fun s:set_compression(line)
" get the Compression Method
let l:cm = char2nr(a:line[2])
" if it's 8 (DEFLATE), we can check for the compression level
if l:cm == 8
" get the eXtra FLags
let l:xfl = char2nr(a:line[8])
" max compression
if l:xfl == 2
let b:gzip_comp_arg = "-9"
" min compression
elseif l:xfl == 4
let b:gzip_comp_arg = "-1"
endif
endif
endfun
" After reading compressed file: Uncompress text in buffer with "cmd"
fun s:read(cmd)
" don't do anything if the cmd is not supported
if !s:check(a:cmd)
return
endif
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(getline(1))
endif
" make 'patchmode' empty, we don't want a copy of the written file
let pm_save = &pm
set pm=
" remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
let cpo_save = &cpo
set cpo-=a cpo-=A
" set 'modifiable'
let ma_save = &ma
setlocal ma
" when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("<afile>:e")
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "silent '[,']w " . tmpe
" uncompress the temp file: call system("gzip -dn tmp.gz")
call system(a:cmd . " " . tmpe)
if !filereadable(tmp)
" uncompress didn't work! Keep the compressed file then.
echoerr "Error: Could not read uncompressed file"
return
endif
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
setlocal nobin
if exists(":lockmarks")
execute "silent lockmarks " . l . "r " . tmp
else
execute "silent " . l . "r " . tmp
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
let &pm = pm_save
let &cpo = cpo_save
let &l:ma = ma_save
" When uncompressed the whole buffer, do autocommands
if empty
if &verbose >= 8
execute "doau BufReadPost " . expand("%:r")
else
execute "silent! doau BufReadPost " . expand("%:r")
endif
endif
endfun
" After writing compressed file: Compress written file with "cmd"
fun s:write(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
" Rename the file before compressing it.
let nm = resolve(expand("<afile>"))
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
else
call system(a:cmd . " " . nmt)
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun s:appre(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
let nm = expand("<afile>")
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(readfile(nm, "b", 1)[0])
endif
" Rename to a weird name to avoid the risk of overwriting another file
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
let nmte = nmt . "." . expand("<afile>:e")
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
call system(a:cmd . " -c " . nmte . " > " . nmt)
call rename(nmte, nm . &patchmode)
else
call system(a:cmd . " " . nmte)
endif
call rename(nmt, nm)
endif
endif
endfun
" find a file name for the file to be compressed. Use "name" without an
" extension if possible. Otherwise use a weird name to avoid overwriting an
" existing file.
fun s:tempname(name)
let fn = fnamemodify(a:name, ":r")
if !filereadable(fn) && !isdirectory(fn)
return fn
endif
return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
endfun
" vim: set sw=2 :

View File

@@ -0,0 +1,150 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN PORTION
" Date: Oct 27, 2005
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" 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,
" netrw.vim, netrwPlugin.vim, and netrwSettings.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.
"
" But be doers of the Word, and not only hearers, deluding your own selves {{{1
" (James 1:22 RSV)
" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("g:loaded_netrw")
finish
endif
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Public Interface: {{{1
" Local Browsing: {{{2
augroup FileExplorer
au!
au BufEnter * call s:LocalBrowse(expand("<amatch>"))
augroup END
" Network Browsing Reading Writing: {{{2
augroup Network
au!
if has("win32") || has("win95") || has("win64") || has("win16")
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
else
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
endif
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>")
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>")
augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
com! -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<f-args>)<bar>call netrw#NetRestorePosn()
com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2
com! -nargs=? -bar -bang -count=0 Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
com! -nargs=? -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
com! -nargs=? -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
" Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
" ---------------------------------------------------------------------
" LocalBrowse: {{{2
fun! s:LocalBrowse(dirname)
" unfortunate interaction -- debugging calls can't be used here;
" the BufEnter event causes triggering when attempts to write to
" the DBG buffer are made.
if isdirectory(a:dirname)
call netrw#DirBrowse(a:dirname)
endif
" not a directory, ignore it
endfun
" ---------------------------------------------------------------------
" NetrwStatusLine: {{{1
fun! NetrwStatusLine()
" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr(".")." Xline#".w:netrw_explore_line." line#".line(".")
if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr(".") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
let &stl= s:netrw_explore_stl
if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
return ""
else
return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
endif
endfun
" ------------------------------------------------------------------------
" NetUserPass: set username and password for subsequent ftp transfer {{{1
" Usage: :call NetUserPass() -- will prompt for userid and password
" :call NetUserPass("uid") -- will prompt for password
" :call NetUserPass("uid","password") -- sets global userid and password
fun! NetUserPass(...)
" get/set userid
if a:0 == 0
" call Dfunc("NetUserPass(a:0<".a:0.">)")
if !exists("g:netrw_uid") || g:netrw_uid == ""
" via prompt
let g:netrw_uid= input('Enter username: ')
endif
else " from command line
" call Dfunc("NetUserPass(a:1<".a:1.">) {")
let g:netrw_uid= a:1
endif
" get password
if a:0 <= 1 " via prompt
" call Decho("a:0=".a:0." case <=1:")
let g:netrw_passwd= inputsecret("Enter Password: ")
else " from command line
" call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
let g:netrw_passwd=a:2
endif
" call Dret("NetUserPass")
endfun
" ------------------------------------------------------------------------
" NetReadFixup: this sort of function is typically written by the user {{{1
" to handle extra junk that their system's ftp dumps
" into the transfer. This function is provided as an
" example and as a fix for a Windows 95 problem: in my
" experience, win95's ftp always dumped four blank lines
" at the end of the transfer.
if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
fun! NetReadFixup(method, line1, line2)
" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
if method == 3 " ftp (no <.netrc>)
let fourblanklines= line2 - 3
silent fourblanklines.",".line2."g/^\s*/d"
endif
" call Dret("NetReadFixup")
endfun
endif
" ------------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

View File

@@ -1,185 +0,0 @@
" vim:set ts=4 sw=4 ai nobackup:
" tar.vim -- a vim plugin for browsing tarfiles
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
"
" Updates are available from <http://michael.toren.net/code/>. If you
" find this script useful, or have suggestions for improvements, please
" let me know.
"
" Usage:
" Once this script is installed, attempting to edit a tarfile will present
" the user with a list of files contained in the tar archive. By moving the
" cursor over a filename and pressing ENTER, the contents of a file can be
" viewed in read-only mode, in a new window. Unfortunately, write support
" for tarfile components is not currently possible.
"
" Requirements:
" GNU tar, or a tar implementation that supports the "P" (don't strip
" out leading /'s from filenames), and "O" (extract files to standard
" output) options. Additionally, gzip is required for handling *.tar.Z,
" *.tar.gz, and *.tgz compressed tarfiles, and bzip2 is required for
" handling *.tar.bz2 compressed tarfiles. A unix-like operating system
" is probably also required.
"
" Installation:
" Place this file, tar.vim, in your $HOME/.vim/plugin directory, and
" either restart vim, or execute ":source $HOME/.vim/plugin/tar.vim"
"
" Todo:
" - Handle zipfiles?
" - Implement write support, somehow.
"
" License:
" This program is free software; you can redistribute it and/or modify it
" under the terms of the GNU General Public License, version 2, as published
" by the Free Software Foundation.
"
" 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.
"
" A copy of the GNU GPL is available as /usr/doc/copyright/GPL on Debian
" systems, or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html
" You can also obtain it by writing to the Free Software Foundation, Inc.,
" 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
"
" Changelog:
" Tue Dec 31 13:38:08 EST 2002 First release to beta testers
" Sat Jan 4 14:06:19 EST 2003 Version 1.00 released
let s:version = "1.00"
if has("autocmd")
augroup tar
au!
au BufReadCmd tarfile:* call s:TarRead(expand("<afile>"), 1)
au BufReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 1)
au FileReadCmd tarfile:* call s:TarRead(expand("<afile>"), 0)
au FileReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 0)
au BufWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
au BufWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
au FileWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
au FileWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
au BufReadCmd *.tar call s:TarBrowse(expand("<afile>"))
au BufReadCmd *.tar.gz call s:TarBrowse(expand("<afile>"))
au BufReadCmd *.tar.bz2 call s:TarBrowse(expand("<afile>"))
au BufReadCmd *.tar.Z call s:TarBrowse(expand("<afile>"))
au BufReadCmd *.tgz call s:TarBrowse(expand("<afile>"))
augroup END
endif
function! s:TarWrite(argument)
echo "ERROR: Sorry, no write support for tarfiles yet"
endfunction
function! s:TarRead(argument, cleanup)
let l:argument = a:argument
let l:argument = substitute(l:argument, '^tarfile:', '', '')
let l:argument = substitute(l:argument, '^\~', $HOME, '')
let l:tarfile = l:argument
while 1
if (l:tarfile == "" || l:tarfile == "/")
echo "ERROR: Could not find a readable tarfile in path:" l:argument
return
endif
if filereadable(l:tarfile) " found it!
break
endif
let l:tarfile = fnamemodify(l:tarfile, ":h")
endwhile
let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
if (l:toextract == "")
return
endif
let l:cat = s:TarCatCommand(l:tarfile)
execute "r !" . l:cat . " < '" . l:tarfile . "'"
\ " | tar OPxf - '" . l:toextract . "'"
if (a:cleanup)
0d "blank line
execute "doautocmd BufReadPost " . expand("%")
setlocal readonly
silent preserve
endif
endfunction
function! s:TarBrowse(tarfile)
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal filetype=
setlocal nobuflisted
setlocal buftype=nofile
setlocal wrap
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: File not readable:" l:tarfile
return
endif
call s:Say("\" tar.vim version " . s:version)
call s:Say("\" Browsing tarfile " . l:tarfile)
call s:Say("\" Hit ENTER to view contents in new window")
call s:Say("")
silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
0d "blank line
/^$/1
setlocal readonly
setlocal nomodifiable
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
endfunction
function! 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
endfunction
" kludge to deal with compressed archives
function! s:TarCatCommand(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
return l:cat
endfunction
function! s:Say(string)
let @" = a:string
$ put
endfunction

View File

@@ -0,0 +1,33 @@
" tarPlugin.vim -- a Vim plugin for browsing tarfiles
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
" Distributed under the GNU General Public License.
"
" 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 only sets the autocommands. The functions are in autoload/tar.vim.
augroup tar
au!
au BufReadCmd tarfile:* call tar#Read(expand("<amatch>"), 1)
au FileReadCmd tarfile:* call tar#Read(expand("<amatch>"), 0)
au BufWriteCmd tarfile:* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile:* call tar#Write(expand("<amatch>"))
if has("unix")
au BufReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 1)
au FileReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 0)
au BufWriteCmd tarfile:*/* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile:*/* call tar#Write(expand("<amatch>"))
endif
au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
augroup END
" vim: ts=8

View File

@@ -0,0 +1,44 @@
" zipPlugin.vim: Handles browsing zipfiles
" PLUGIN PORTION
" Date: Sep 14, 2005
" 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
" 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,
" zipPlugin.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.
" ---------------------------------------------------------------------
" Initialization: {{{1
let s:keepcpo= &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Public Interface: {{{1
augroup zip
au!
au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1)
au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0)
au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
if has("unix")
au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1)
au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0)
au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
endif
au BufReadCmd *.zip call zip#Browse(expand("<amatch>"))
augroup END
" ------------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2005 May 20
" Last change: 2005 Oct 12
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -138,6 +138,10 @@ if s:line1 =~ "^#!"
elseif s:name =~ 'scheme'
set ft=scheme
" CFEngine scripts
elseif s:name =~ 'cfengine'
set ft=cfengine
endif
unlet s:name
@@ -182,6 +186,7 @@ else
" - "Index: <filename>" in the first line (CVS file)
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
set ft=diff

View File

@@ -11,6 +11,9 @@ Copyright notices for specific languages are in README_??.txt. Note that the
files for different regions are merged, both to save space and to make it
possible to highlight words for another region different from bad words.
Most of the soundslike mappings come from Aspell ??_phonet.dat files:
ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
GENERATING .SPL FILES
@@ -69,7 +72,7 @@ This procedure should work well:
change too much, the OpenOffice people are not stupid. However, you may
want to remove obvious mistakes. And remove single-letter words that
aren't really words, they mess up the suggestions (English has this
problem).
problem). You can use the "fixdup" Vim script to find duplicate words.
3. Make the diff file. "aap diff" will do this for you. If a diff would be
too big you might consider writing a Vim script to do systematic changes.

914
runtime/spell/README_en.txt Normal file
View File

@@ -0,0 +1,914 @@
en_US
20040623 release.
--
This dictionary is based on a subset of the original
English wordlist created by Kevin Atkinson for Pspell
and Aspell and thus is covered by his original
LGPL license. The affix file is a heavily modified
version of the original english.aff file which was
released as part of Geoff Kuenning's Ispell and as
such is covered by his BSD license.
Thanks to both authors for there wonderful work.
===================================================
en_AU:
This dictionary was based on the en_GB Myspell dictionary
which in turn was initially based on a subset of the
original English wordlist created by Kevin Atkinson for
Pspell and Aspell and thus is covered by his original
LGPL licence.
The credit for this en_AU dictionary goes to:
Kelvin Eldridge (maintainer)
Jean Hollis Weber
David Wilson
- Words incorrect in Australian English removed
- a list from the previously removed words with corrected spelling was added
- a list of major rivers was added
- a list of place names was added
- a list of Australian mammals was added
- a list of Aboriginal/Koori words commonly used was added
A total of 119,267 words are now recognized
by the dictionary.
Of course, special thanks go to the editors of the
en_GB dictionary (David Bartlett, Brian Kelk and
Andrew Brown) which provided the starting point
for this dictionary.
The affix file is currently a duplicate of the en_AU.aff
created completely from scratch by David Bartlett and
Andrew Brown, based on the published
rules for MySpell and is also provided under the LGPL.
If you find omissions or bugs or have new words to
add to the dictionary, please contact the en_AU
maintainer at:
"Kelvin" <audictionary@onlineconnections.com.au>
===================================================
en_CA:
The dictionary file was created using the "final" English and Canadian SCOWL (Spell Checker Oriented Word Lists) wordlists available at Kevin's Word Lists Page (http://wordlist.sourceforge.net). Lists with the suffixes 10, 20, 35, 50, 65 and 65 were used. Lists with the suffixes 70, 80 and 95 were excluded. Copyright information for SCOWL and the wordlists used in creating it is reproduced below.
The affix file is identical to the MySpell English (United States) affix file. It is a heavily modified version of the original english.aff file which was released as part of Geoff Kuenning's Ispell and as such is covered by his BSD license.
---
COPYRIGHT, SOURCES, and CREDITS from SCOWL readme file:
The collective work is Copyright 2000 by Kevin Atkinson as well as any
of the copyrights mentioned below:
Copyright 2000 by Kevin Atkinson
Permission to use, copy, modify, distribute and sell these word
lists, the associated scripts, the output created from the scripts,
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appears in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation. Kevin Atkinson makes no representations
about the suitability of this array for any purpose. It is provided
"as is" without express or implied warranty.
Alan Beale <biljir@pobox.com> also deserves special credit as he has,
in addition to providing the 12Dicts package and being a major
contributor to the ENABLE word list, given me an incredible amount of
feedback and created a number of special lists (those found in the
Supplement) in order to help improve the overall quality of SCOWL.
The 10 level includes the 1000 most common English words (according to
the Moby (TM) Words II [MWords] package), a subset of the 1000 most
common words on the Internet (again, according to Moby Words II), and
frequently class 16 from Brian Kelk's "UK English Wordlist
with Frequency Classification".
The MWords package was explicitly placed in the public domain:
The Moby lexicon project is complete and has
been place into the public domain. Use, sell,
rework, excerpt and use in any way on any platform.
Placing this material on internal or public servers is
also encouraged. The compiler is not aware of any
export restrictions so freely distribute world-wide.
You can verify the public domain status by contacting
Grady Ward
3449 Martha Ct.
Arcata, CA 95521-4884
grady@netcom.com
grady@northcoast.com
The "UK English Wordlist With Frequency Classification" is also in the
Public Domain:
Date: Sat, 08 Jul 2000 20:27:21 +0100
From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
> I was wondering what the copyright status of your "UK English
> Wordlist With Frequency Classification" word list as it seems to
> be lacking any copyright notice.
There were many many sources in total, but any text marked
"copyright" was avoided. Locally-written documentation was one
source. An earlier version of the list resided in a filespace called
PUBLIC on the University mainframe, because it was considered public
domain.
Date: Tue, 11 Jul 2000 19:31:34 +0100
> So are you saying your word list is also in the public domain?
That is the intention.
The 20 level includes frequency classes 7-15 from Brian's word list.
The 35 level includes frequency classes 2-6 and words appearing in at
least 11 of 12 dictionaries as indicated in the 12Dicts package. All
words from the 12Dicts package have had likely inflections added via
my inflection database.
The 12Dicts package and Supplement is in the Public Domain.
The WordNet database, which was used in the creation of the
Inflections database, is under the following copyright:
This software and database is being provided to you, the LICENSEE,
by Princeton University under the following license. By obtaining,
using and/or copying this software and database, you agree that you
have read, understood, and will comply with these terms and
conditions.:
Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the
disclaimer, and that the same appear on ALL copies of the software,
database and documentation, including modifications that you make
for internal use or for distribution.
WordNet 1.6 Copyright 1997 by Princeton University. All rights
reserved.
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database. Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.
The 50 level includes Brian's frequency class 1, words words appearing
in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
package, and uppercase words in at least 4 of the previous 12
dictionaries. A decent number of proper names is also included: The
top 1000 male, female, and Last names from the 1990 Census report; a
list of names sent to me by Alan Beale; and a few names that I added
myself. Finally a small list of abbreviations not commonly found in
other word lists is included.
The name files form the Census report is a government document which I
don't think can be copyrighted.
The name list from Alan Beale is also derived from the linux words
list, which is derived from the DEC list. He also added a bunch of
miscellaneous names to the list, which he released to the Public Domain.
The DEC Word list doesn't have a formal name. It is labeled as "FILE:
english.words; VERSION: DEC-SRC-92-04-05" and was put together by Jorge
Stolfi <stolfi@src.dec.com> DEC Systems Research Center. The DEC Word
list has the following copyright statement:
(NON-)COPYRIGHT STATUS
To the best of my knowledge, all the files I used to build these
wordlists were available for public distribution and use, at least
for non-commercial purposes. I have confirmed this assumption with
the authors of the lists, whenever they were known.
Therefore, it is safe to assume that the wordlists in this package
can also be freely copied, distributed, modified, and used for
personal, educational, and research purposes. (Use of these files in
commercial products may require written permission from DEC and/or
the authors of the original lists.)
Whenever you distribute any of these wordlists, please distribute
also the accompanying README file. If you distribute a modified
copy of one of these wordlists, please include the original README
file with a note explaining your modifications. Your users will
surely appreciate that.
(NO-)WARRANTY DISCLAIMER
These files, like the original wordlists on which they are based,
are still very incomplete, uneven, and inconsitent, and probably
contain many errors. They are offered "as is" without any warranty
of correctness or fitness for any particular purpose. Neither I nor
my employer can be held responsible for any losses or damages that
may result from their use.
However since this Word List is used in the linux.words package which
the author claims is free of any copyright I assume it is OK to use
for most purposes. If you want to use this in a commercial project
and this concerns you the information from the DEC word list can
easily be removed without much sacrifice in quality as only the name
lists were used.
The file special-jargon.50 uses common.lst and word.lst from the
"Unofficial Jargon File Word Lists" which is derived from "The Jargon
File". All of which is in the Public Domain. This file also contain
a few extra UNIX terms which are found in the file "unix-terms" in the
special/ directory.
The 60 level includes Brian's frequency class 0 and all words
appearing in at least 2 of the 12 dictionaries as indicated by the
12Dicts package. A large number of names are also included: The 4,946
female names and 3,897 male names from the MWords package and the
files "computer.names", "misc.names", and "org.names" from the DEC
package.
The 65 level includes words found in the Ispell "medium" word list.
The Ispell word lists are under the same copyright of Ispell itself
which is:
Copyright 1993, Geoff Kuenning, Granada Hills, CA
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All modifications to the source code must be clearly marked as
such. Binary redistributions based on modified source code
must be clearly marked as modified versions in the documentation
and/or other materials provided with the distribution.
4. All advertising materials mentioning features or use of this software
must display the following acknowledgment:
This product includes software developed by Geoff Kuenning and
other unpaid contributors.
5. The name of Geoff Kuenning may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEOFF
KUENNING OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The 70 level includes the 74,550 common dictionary words and the 21,986 names
list from the MWords package. The common dictionary words, like those
from the 12Dicts package, have had all likely inflections added.
The 80 level includes the ENABLE word list, all the lists in the
ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
Dictionary" (UKACD), the list of signature words in from YAWL package,
and the 10,196 places list from the MWords package.
The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
is in the Public Domain:
The ENABLE master word list, WORD.LST, is herewith formally released
into the Public Domain. Anyone is free to use it or distribute it in
any manner they see fit. No fee or registration is required for its
use nor are "contributions" solicited (if you feel you absolutely
must contribute something for your own peace of mind, the authors of
the ENABLE list ask that you make a donation on their behalf to your
favorite charity). This word list is our gift to the Scrabble
community, as an alternate to "official" word lists. Game designers
may feel free to incorporate the WORD.LST into their games. Please
mention the source and credit us as originators of the list. Note
that if you, as a game designer, use the WORD.LST in your product,
you may still copyright and protect your product, but you may *not*
legally copyright or in any way restrict redistribution of the
WORD.LST portion of your product. This *may* under law restrict your
rights to restrict your users' rights, but that is only fair.
UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
following copyright:
Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
The following restriction is placed on the use of this publication:
if The UK Advanced Cryptics Dictionary is used in a software package
or redistributed in any form, the copyright notice must be
prominently displayed and the text of this document must be included
verbatim.
There are no other restrictions: I would like to see the list
distributed as widely as possible.
The 95 level includes the 354,984 single words and 256,772 compound
words from the MWords package, ABLE.LST from the ENABLE Supplement,
and some additional words found in my part-of-speech database that
were not found anywhere else.
Accent information was taken from UKACD.
My VARCON package was used to create the American, British, and
Canadian word list.
Since the original word lists used used in the
VARCON package came from the Ispell distribution they are under the
Ispell copyright.
The variant word lists were created from a list of variants found in
the 12dicts supplement package as well as a list of variants I created
myself.
===================================================
en_GB:
This dictionary was initially based on a subset of the
original English wordlist created by Kevin Atkinson for
Pspell and Aspell and thus is covered by his original
LGPL licence.
It has been extensively updated by David Bartlett, Brian Kelk
and Andrew Brown:
- numerous Americanism have been removed
- numerous American spellings have been corrected
- missing words have been added
- many errors have been corrected
- compound hyphenated words have been added where appropriate
Valuable inputs to this process were received from many other
people - far too numerous to name. Serious thanks to you all
for your greatly appreciated help.
This word list is intended to be a good representation of
current modern British English and thus it should be a good
basis for Commonwealth English in most countries of the world
outside North America.
The affix file has been created completely from scratch
by David Bartlett and Andrew Brown, based on the published
rules for MySpell and is also provided under the LGPL.
In creating the affix rules an attempt has been made to
reproduce the most general rules for English word
formation, rather than merely use it as a means to
compress the size of the dictionary. It is hoped that this
will facilitate future localisation to other variants of
English.
Please let David Bartlett <dwb@openoffice.org> know of any
errors that you find.
The current release is R 1.18, 11/04/05
===================================================
en_NZ:
I. Copyright
II. Copying (Licence)
----------------------------
I. Copyright
NZ English Dictionary v0.9 beta - Build 06SEP03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NB This is an initial version, please check:
http://lingucomponent.openoffice.org/download_dictionary.html
or
http://www.girlza.com/dictionary/download.html
for a final version, after a little while (no hurry).
This dictionary is based on the en_GB Myspell dictionary
which in turn was initially based on a subset of the
original English wordlist created by Kevin Atkinson for
Pspell and Aspell and thus is covered by his original
LGPL licence.
Introduction
~~~~~~~~~~~~
en_NZ.dic has been altered to include New Zealand places,
including major cities and towns, and major suburbs. It
also contains NZ words, organisations and expressions.
en_NZ.aff has had a few REPlace strings added, but is
basically unchanged.
Acknowledgements
~~~~~~~~~~~~~~~~
Thanks must go to the original creators of the British
dictionary, David Bartlett, Brian Kelk and Andrew Brown.
I wouldn't have started this without seeing the Australian
dictionary, thanks Kelvin Eldridge, Jean Hollis Weber and
David Wilson.
And thank you to all who've contributed to OpenOffice.org.
License
~~~~~~~
This dictionary is covered by the GNU Lesser General Public
License, viewable at http://www.gnu.org/copyleft/lesser.html
Issues
~~~~~~
Many of the proper nouns already in the dictionary do not have
an affix for 's.
All my new words start after the z's of the original dictionary.
Contact
~~~~~~~
Contact Tristan Burtenshaw (hooty@slingshot.co.nz) with any words,
places or other suggestions for the dictionary.
II. Copying
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,36 @@
*** af_ZA.orig.aff Sun Aug 14 17:37:01 2005
--- af_ZA.aff Sun Aug 14 17:38:11 2005
***************
*** 23,24 ****
--- 23,34 ----
+ FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
+ LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
+ UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
+
+ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<59><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޿
+ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
+
+ MIDWORD '-
+ SLASH ,
+
MAP 3
*** af_ZA.orig.dic Sun Aug 14 17:37:01 2005
--- af_ZA.dic Sun Aug 14 17:38:54 2005
***************
*** 1861,1864 ****
T-skyf
! TCP/IP
! TCP/IP-bondel
TLA
--- 1861,1864 ----
T-skyf
! TCP,IP
! TCP,IP-bondel
TLA
***************
*** 124109,124111 ****
vrywilliglik
- vt
vuile/R
--- 124109,124110 ----

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