mirror of
https://github.com/zoriya/vim.git
synced 2025-12-06 07:16:15 +00:00
Compare commits
493 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21b17e7741 | ||
|
|
f33943efe7 | ||
|
|
ce3be4756a | ||
|
|
ef6fc09758 | ||
|
|
dbe3175049 | ||
|
|
332fa0c55a | ||
|
|
a6c2c91d32 | ||
|
|
c4cd38f369 | ||
|
|
c724791b14 | ||
|
|
0e25314f20 | ||
|
|
e77c760819 | ||
|
|
1f14d57a48 | ||
|
|
56cefaf15a | ||
|
|
81993f4744 | ||
|
|
426e5c9521 | ||
|
|
82ad324c8f | ||
|
|
9d188ab087 | ||
|
|
bd7cc03e57 | ||
|
|
d2b6601bf8 | ||
|
|
7b88a0e324 | ||
|
|
76929293e0 | ||
|
|
6203ff97b7 | ||
|
|
51b5ab9729 | ||
|
|
afbdeb852f | ||
|
|
5eaf8729e7 | ||
|
|
589e43a19e | ||
|
|
8af1fbf979 | ||
|
|
b52e532abe | ||
|
|
33f54431b6 | ||
|
|
c048f672ee | ||
|
|
690ffc0384 | ||
|
|
383c6f5579 | ||
|
|
066b62206f | ||
|
|
12ddc3e02c | ||
|
|
ce51ebcdf0 | ||
|
|
6c9176db47 | ||
|
|
525ad4d05f | ||
|
|
b238909e06 | ||
|
|
5f91c0ca81 | ||
|
|
aacbb0039c | ||
|
|
6784078701 | ||
|
|
a045324992 | ||
|
|
913626cedb | ||
|
|
21af89e2e8 | ||
|
|
30405d35ef | ||
|
|
a0174af16f | ||
|
|
2c994e8516 | ||
|
|
ad8958b188 | ||
|
|
d42107724b | ||
|
|
f13be0df61 | ||
|
|
3a169c3c22 | ||
|
|
3d66014eea | ||
|
|
9b5d4ddd8a | ||
|
|
78d4abaa93 | ||
|
|
ee3f7a51c8 | ||
|
|
4f246a9a2a | ||
|
|
f5dcf7c3b5 | ||
|
|
6c964835b1 | ||
|
|
a713933cd1 | ||
|
|
11717bb0a1 | ||
|
|
49feabd5d6 | ||
|
|
c3b730796c | ||
|
|
e6f565a7be | ||
|
|
ea40888076 | ||
|
|
e9c3bcda1d | ||
|
|
0a30746d70 | ||
|
|
c2a27c3dc3 | ||
|
|
8f5c578a5e | ||
|
|
9273c73e36 | ||
|
|
ed53fb9a48 | ||
|
|
e0ca7b2b04 | ||
|
|
9f10875ed0 | ||
|
|
f9ffd188e5 | ||
|
|
85a3e5c7c6 | ||
|
|
f998c04691 | ||
|
|
81870894a7 | ||
|
|
07d0677855 | ||
|
|
33741a0f37 | ||
|
|
6f1924547b | ||
|
|
a443af88a4 | ||
|
|
e40e57c514 | ||
|
|
cdfd3e424a | ||
|
|
9b25ffbb2b | ||
|
|
e74455a447 | ||
|
|
9642664800 | ||
|
|
b52e260d23 | ||
|
|
711d5b5c94 | ||
|
|
60a44dcb28 | ||
|
|
d4b96bc637 | ||
|
|
c188b88040 | ||
|
|
2dd8b521bb | ||
|
|
f13249a717 | ||
|
|
fa6d5afd84 | ||
|
|
aa8494a13e | ||
|
|
af92ee8e89 | ||
|
|
51f78b2a4c | ||
|
|
9b9422097c | ||
|
|
f22129b5c5 | ||
|
|
d4cacdf91e | ||
|
|
e65f732db3 | ||
|
|
893de92ede | ||
|
|
fecb660578 | ||
|
|
41a0903523 | ||
|
|
61bfb9febe | ||
|
|
ecf4de5d69 | ||
|
|
d089d9b33a | ||
|
|
78ab331e0d | ||
|
|
51b8436f09 | ||
|
|
9f0545d6de | ||
|
|
dfc7aa2ccd | ||
|
|
5461cfe289 | ||
|
|
9d2c8c1a66 | ||
|
|
719939c888 | ||
|
|
b8dc4d4cdf | ||
|
|
7b18862920 | ||
|
|
1193636b45 | ||
|
|
ad6c2274e8 | ||
|
|
b91d177ecc | ||
|
|
b4066a10e0 | ||
|
|
ce85c5619e | ||
|
|
1042fa3857 | ||
|
|
3b9b13e564 | ||
|
|
073545473f | ||
|
|
5365c4d590 | ||
|
|
53241daeba | ||
|
|
5c2e0f27c5 | ||
|
|
037cc64f8f | ||
|
|
61abfd1171 | ||
|
|
a84b10685c | ||
|
|
700d1d7036 | ||
|
|
9539934ee2 | ||
|
|
02b063139b | ||
|
|
7fd1602e56 | ||
|
|
33e1a80f84 | ||
|
|
177d8c60ee | ||
|
|
c27c8d5c59 | ||
|
|
9c8791fde0 | ||
|
|
102e3a6164 | ||
|
|
367329ba08 | ||
|
|
ec8317364b | ||
|
|
78e1762c48 | ||
|
|
1a3d086c84 | ||
|
|
7d61a92145 | ||
|
|
14d0e7976d | ||
|
|
d2ac984a1e | ||
|
|
3a36cf7bca | ||
|
|
eb1b679067 | ||
|
|
dd87969c8b | ||
|
|
fa2e044471 | ||
|
|
6529c101c3 | ||
|
|
7baa45dbbf | ||
|
|
deefb63bfb | ||
|
|
70c2a63474 | ||
|
|
349955a205 | ||
|
|
b0db569905 | ||
|
|
3185918f8c | ||
|
|
92c5aba92a | ||
|
|
4d64b7891b | ||
|
|
9c03978012 | ||
|
|
4d2fffc833 | ||
|
|
2b80e65818 | ||
|
|
d2c765e688 | ||
|
|
67f7131efa | ||
|
|
a2993e1340 | ||
|
|
83eb885d54 | ||
|
|
8c69d536ad | ||
|
|
708f62c380 | ||
|
|
52d36c8bb7 | ||
|
|
cc00b955cd | ||
|
|
a245a5bb06 | ||
|
|
48cc5fe8b6 | ||
|
|
225d32b910 | ||
|
|
abc9773580 | ||
|
|
c2f5abcf15 | ||
|
|
1b0b07f29e | ||
|
|
452a81b413 | ||
|
|
a064ac8501 | ||
|
|
57b7fe808f | ||
|
|
0963cd95f5 | ||
|
|
3dcfbf7c4d | ||
|
|
e7c5686944 | ||
|
|
179af2c90b | ||
|
|
ef04586d9f | ||
|
|
150cc27040 | ||
|
|
9225efbc96 | ||
|
|
943fae459d | ||
|
|
0cbac5bf6a | ||
|
|
7662423e10 | ||
|
|
2240aeb4cb | ||
|
|
bf96fb4234 | ||
|
|
6ee10162b2 | ||
|
|
f621048b53 | ||
|
|
5002c296f0 | ||
|
|
3afaae44a9 | ||
|
|
4f68858766 | ||
|
|
fe40d1a0b0 | ||
|
|
5fdec47ab0 | ||
|
|
9cffde9627 | ||
|
|
5f2c5dbd86 | ||
|
|
477933cdc3 | ||
|
|
1315349f0e | ||
|
|
7bb755519e | ||
|
|
1256e720f5 | ||
|
|
fe1c56d6ae | ||
|
|
78f6f7eb95 | ||
|
|
7a42fa3cb7 | ||
|
|
aec1179e5e | ||
|
|
9a149791fc | ||
|
|
bf44417987 | ||
|
|
e2a49d8e5e | ||
|
|
6a51606966 | ||
|
|
3ebc1e5112 | ||
|
|
e649ef0fdd | ||
|
|
5386a123f5 | ||
|
|
7f51474324 | ||
|
|
f15f943e0c | ||
|
|
3011815c8a | ||
|
|
786b1dc2a4 | ||
|
|
96bb621f25 | ||
|
|
1ad2f13b37 | ||
|
|
dc3213d855 | ||
|
|
4b80a5179a | ||
|
|
884aa898d4 | ||
|
|
d827ada01c | ||
|
|
e02d7b2a21 | ||
|
|
512e6b838a | ||
|
|
1864a4e0fd | ||
|
|
b1269f1184 | ||
|
|
2d8ab99d10 | ||
|
|
1042527371 | ||
|
|
a2dd900999 | ||
|
|
29c34723d5 | ||
|
|
049377ee0f | ||
|
|
6446f25b44 | ||
|
|
4b4dc64876 | ||
|
|
994cd1237f | ||
|
|
b2a460d564 | ||
|
|
1b826e540c | ||
|
|
d38c6c9aae | ||
|
|
54143f4031 | ||
|
|
dd2a0d8ad1 | ||
|
|
784287abf4 | ||
|
|
1887debd2c | ||
|
|
f5fcea70bd | ||
|
|
69c2f17e98 | ||
|
|
00333faa4d | ||
|
|
4e32e4bc5e | ||
|
|
0168560264 | ||
|
|
d46bbc7203 | ||
|
|
d427d1e381 | ||
|
|
9048f94031 | ||
|
|
ebcbd022e6 | ||
|
|
e24138beaf | ||
|
|
e0d7b3c052 | ||
|
|
52cda2b83e | ||
|
|
29055eedf4 | ||
|
|
f17897d288 | ||
|
|
c1c566fb6c | ||
|
|
381ffaefa2 | ||
|
|
666771a83c | ||
|
|
8c406603ae | ||
|
|
33fa75c86e | ||
|
|
8b57e2efc0 | ||
|
|
5f29c338d7 | ||
|
|
9fe9d16c38 | ||
|
|
5c3e56a2f7 | ||
|
|
03d42258db | ||
|
|
8f6d679581 | ||
|
|
f313d68274 | ||
|
|
376b899ac0 | ||
|
|
833dc52378 | ||
|
|
9e368dba9d | ||
|
|
5a91e34372 | ||
|
|
a9d52b81cd | ||
|
|
032b3cf620 | ||
|
|
341621425b | ||
|
|
b5ba002aab | ||
|
|
895f2609de | ||
|
|
cb635362cc | ||
|
|
b4b6a567a3 | ||
|
|
5cdd0df5a9 | ||
|
|
fe265ff56f | ||
|
|
060f1f08b3 | ||
|
|
bae0c16cc4 | ||
|
|
45667517ba | ||
|
|
49325942f5 | ||
|
|
5f52cff1b3 | ||
|
|
25394022f2 | ||
|
|
3ad16f3fe6 | ||
|
|
b8017e7a03 | ||
|
|
cf0dfa2f18 | ||
|
|
e590119ea7 | ||
|
|
34e0bfaa80 | ||
|
|
b15c833222 | ||
|
|
10c56952d8 | ||
|
|
335437bb24 | ||
|
|
79166c430b | ||
|
|
ccc18222dd | ||
|
|
2c7a763832 | ||
|
|
720c710091 | ||
|
|
25bc63d168 | ||
|
|
035db9f0e1 | ||
|
|
7aa9f6a03a | ||
|
|
2b64440353 | ||
|
|
933eb39d67 | ||
|
|
a38edcde16 | ||
|
|
29466f2b4f | ||
|
|
3d27a45f9a | ||
|
|
044b68f42a | ||
|
|
7263a77b99 | ||
|
|
2bb8df23dc | ||
|
|
ff1d0d4cf5 | ||
|
|
4868726a3f | ||
|
|
82038d7312 | ||
|
|
e34bd1f502 | ||
|
|
ad5fd673c7 | ||
|
|
e531ce2c84 | ||
|
|
0c4b5bd38f | ||
|
|
80ec845282 | ||
|
|
8acbe168a8 | ||
|
|
c1762ccb6f | ||
|
|
f1dc4965b5 | ||
|
|
f711faf099 | ||
|
|
b6799acd2d | ||
|
|
143c38cd31 | ||
|
|
706cdebcf8 | ||
|
|
a022bb3567 | ||
|
|
2d0ed69d58 | ||
|
|
89cf6cf04c | ||
|
|
edfe968e1a | ||
|
|
ad44decbac | ||
|
|
fee049ad25 | ||
|
|
8da4467eb3 | ||
|
|
7b85141b84 | ||
|
|
b317167494 | ||
|
|
1f8ae7a083 | ||
|
|
b57bf7277b | ||
|
|
7ec09eeb83 | ||
|
|
15aa18172b | ||
|
|
24652c0005 | ||
|
|
d955be3f20 | ||
|
|
6b803a739f | ||
|
|
17e79197d5 | ||
|
|
8cfdc0df95 | ||
|
|
da65f156f3 | ||
|
|
8d1ab51e8f | ||
|
|
6519ac87d8 | ||
|
|
d55de224a0 | ||
|
|
ef2f6569ce | ||
|
|
c3739303b0 | ||
|
|
d7afed3753 | ||
|
|
9fc8c24ef8 | ||
|
|
024678745b | ||
|
|
ff4a37e325 | ||
|
|
ea430ea7d5 | ||
|
|
e9400a45da | ||
|
|
24b231793e | ||
|
|
9e1d2839c6 | ||
|
|
a9af0e6a0a | ||
|
|
1f5c517296 | ||
|
|
36f5ac0859 | ||
|
|
623fe606ae | ||
|
|
7bff313a94 | ||
|
|
7528dd68a7 | ||
|
|
b5dd424dc3 | ||
|
|
8bc7847e20 | ||
|
|
82de0d760b | ||
|
|
5c5b0941ca | ||
|
|
c980de3382 | ||
|
|
4e86cbab27 | ||
|
|
044defef06 | ||
|
|
be860d34dd | ||
|
|
7b98ce07ce | ||
|
|
83e138c606 | ||
|
|
c81e5e79a0 | ||
|
|
9aae141a6b | ||
|
|
756ec0f3c9 | ||
|
|
313b7237ad | ||
|
|
9964e468c0 | ||
|
|
d5ab34bd5e | ||
|
|
0630b8d96d | ||
|
|
dd2a3cda55 | ||
|
|
3ed4447ed7 | ||
|
|
aea02fa475 | ||
|
|
4142324d25 | ||
|
|
ee79cbc7af | ||
|
|
eeefcc7723 | ||
|
|
0ddf0a7df0 | ||
|
|
8243a7928b | ||
|
|
914572aba4 | ||
|
|
d9fe7c4bb8 | ||
|
|
3d43a6658c | ||
|
|
bbe8c3f735 | ||
|
|
79ee315b72 | ||
|
|
1c53628518 | ||
|
|
d267b9c167 | ||
|
|
4076b79afd | ||
|
|
a24424370c | ||
|
|
053b9fa9c2 | ||
|
|
97006f1ce8 | ||
|
|
87c1996491 | ||
|
|
63b9254b8e | ||
|
|
7cc36e9402 | ||
|
|
39353fdbec | ||
|
|
5b6b1cae34 | ||
|
|
4940e3f2c3 | ||
|
|
867a4b7630 | ||
|
|
49104e4038 | ||
|
|
c432b50937 | ||
|
|
d326ce83d5 | ||
|
|
48c2c9a19a | ||
|
|
552f8a1140 | ||
|
|
6417da604d | ||
|
|
c8da3119cf | ||
|
|
9248e6e12e | ||
|
|
6cbce9d0db | ||
|
|
454ec05a47 | ||
|
|
38323e4f4a | ||
|
|
81b85876ad | ||
|
|
733f0a286e | ||
|
|
33c4fb68bf | ||
|
|
f2a4e33ffb | ||
|
|
7f6ca07606 | ||
|
|
311d982b6f | ||
|
|
602eb74de6 | ||
|
|
fa3491a0e0 | ||
|
|
09a16b5f09 | ||
|
|
77f66d6c8d | ||
|
|
85c79d30ff | ||
|
|
0396ab0156 | ||
|
|
373154b00c | ||
|
|
ad40f02cd9 | ||
|
|
b01a8b749b | ||
|
|
47b8b15b5f | ||
|
|
48b66fb5a7 | ||
|
|
86ea76404e | ||
|
|
0739a1e671 | ||
|
|
8c471fa0b3 | ||
|
|
8dd1aa58ad | ||
|
|
fb7c90c0fa | ||
|
|
56da797e6d | ||
|
|
84c4d79ad4 | ||
|
|
863b53b72e | ||
|
|
89ed3dfd87 | ||
|
|
9460b9d215 | ||
|
|
d675e2c513 | ||
|
|
df88dda91c | ||
|
|
201863f75d | ||
|
|
cf8e7d14aa | ||
|
|
9c4b4ab3a6 | ||
|
|
61b974b9ee | ||
|
|
3b1b6c6259 | ||
|
|
f278987c97 | ||
|
|
4632d298ad | ||
|
|
3d20ca1ad1 | ||
|
|
85f868c3ae | ||
|
|
b0c9a85bc8 | ||
|
|
9334c3447a | ||
|
|
b42dc236e9 | ||
|
|
508b9e895d | ||
|
|
93db975fa4 | ||
|
|
9a51c6e35d | ||
|
|
c65c491295 | ||
|
|
84212825ed | ||
|
|
908d53a230 | ||
|
|
d333d1e086 | ||
|
|
3f2d9814e5 | ||
|
|
6ae133b915 | ||
|
|
e9da72e482 | ||
|
|
5a6404cff4 | ||
|
|
219b87038a | ||
|
|
74c596b5a8 | ||
|
|
0cae847008 | ||
|
|
8b610cfc7c | ||
|
|
d13506289a | ||
|
|
09ef47a32a | ||
|
|
2647063968 | ||
|
|
a2a31754a4 | ||
|
|
cba2ae53a6 | ||
|
|
38c0a6e6fa | ||
|
|
2d8b2d8df9 | ||
|
|
640009dca3 | ||
|
|
5fc1a8b5d7 | ||
|
|
a350f4a54f | ||
|
|
1769d5a8c9 | ||
|
|
8b402a0a87 | ||
|
|
bc444827c2 | ||
|
|
adcb9497e8 | ||
|
|
b90daee952 | ||
|
|
e163f1cb99 | ||
|
|
685295c3c4 | ||
|
|
b47a240593 | ||
|
|
df40adfcf4 |
8
Contents
8
Contents
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
|
||||
messages, shows current file name in window title, on-line
|
||||
help, rectangular cut/paste, etc., etc., etc...
|
||||
|
||||
Version 7.0. Also runs under UNIX, MSDOS and other systems.
|
||||
vim70rt.tgz contains the documentation and syntax files.
|
||||
vim70bin.tgz contains the binaries.
|
||||
vim70src.tgz contains the sources.
|
||||
Version 7.1. Also runs under UNIX, MSDOS and other systems.
|
||||
vim71rt.tgz contains the documentation and syntax files.
|
||||
vim71bin.tgz contains the binaries.
|
||||
vim71src.tgz contains the sources.
|
||||
Author: Bram Moolenaar et al.
|
||||
|
||||
|
||||
|
||||
9
Filelist
9
Filelist
@@ -568,7 +568,8 @@ RT_AMI = \
|
||||
libs/arp.library \
|
||||
runtime/doc.info \
|
||||
runtime/doc/*.info \
|
||||
runtime/icons \
|
||||
runtime/icons/README.txt \
|
||||
runtime/icons/*.info \
|
||||
runtime/icons.info \
|
||||
runtime/macros.info \
|
||||
runtime/macros/*.info \
|
||||
@@ -644,7 +645,8 @@ EXTRA = \
|
||||
$(SRC_EXTRA) \
|
||||
README_extra.txt \
|
||||
src/VisVim/VisVim.dll \
|
||||
farsi \
|
||||
farsi/README.txt \
|
||||
farsi/fonts/*/far-* \
|
||||
runtime/vimlogo.xpm \
|
||||
src/swis.s \
|
||||
src/tee/Makefile* \
|
||||
@@ -669,12 +671,15 @@ LANG_GEN = \
|
||||
runtime/tutor/README.*.txt \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.cs.* \
|
||||
runtime/tutor/tutor.gr.* \
|
||||
runtime/tutor/tutor.hu.* \
|
||||
runtime/tutor/tutor.ja.* \
|
||||
runtime/tutor/tutor.ko.* \
|
||||
runtime/tutor/tutor.pl.* \
|
||||
runtime/tutor/tutor.ru.* \
|
||||
runtime/tutor/tutor.sk.* \
|
||||
runtime/tutor/tutor.tr.* \
|
||||
runtime/tutor/tutor.zh.* \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
|
||||
28
Makefile
28
Makefile
@@ -27,7 +27,7 @@ first:
|
||||
|
||||
# Some make programs use the last target for the $@ default; put the other
|
||||
# targets separately to always let $@ expand to "first" by default.
|
||||
all install uninstall tools config configure proto depend lint tags types test testclean clean distclean:
|
||||
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
@@ -69,7 +69,7 @@ all install uninstall tools config configure proto depend lint tags types test t
|
||||
# Before creating an archive first delete all backup files, *.orig, etc.
|
||||
|
||||
MAJOR = 7
|
||||
MINOR = 0
|
||||
MINOR = 1
|
||||
|
||||
# Uncomment this line if the Win32s version is to be included.
|
||||
DOSBIN_S = dosbin_s
|
||||
@@ -81,28 +81,29 @@ DOSBIN_S = dosbin_s
|
||||
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
|
||||
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
|
||||
# - Correct included_patches[] in src/version.c.
|
||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge"
|
||||
# features. Exclude workshop and SNiFF.
|
||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
|
||||
# work), Cscope and "huge" features. Exclude workshop and SNiFF.
|
||||
# - With these features: "make proto" (requires cproto and Motif installed;
|
||||
# ignore warnings for missing include files, fix problems for syntax errors).
|
||||
# - With these features: "make depend" (works best with gcc).
|
||||
# - "make lint" and check the output (ignore GTK warnings).
|
||||
# - Enable the efence library in "src/Makefile" and run "make test". May
|
||||
# require disabling Python to avoid trouble with threads.
|
||||
# require disabling Python and Ruby to avoid trouble with threads.
|
||||
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
|
||||
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
|
||||
# - Do "make menu" to update the runtime/synmenu.vim file.
|
||||
# - Add remarks for changes to runtime/doc/version7.txt.
|
||||
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
|
||||
# ADDITIONS".
|
||||
# - In runtime/doc run "make" and "make html" to check for errors.
|
||||
# - Check if src/Makefile and src/feature.h don't contain any personal
|
||||
# preferences or the GTK, Perl, etc. mentioned above.
|
||||
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
|
||||
# ADDITIONS".
|
||||
# - Check file protections to be "644" for text and "755" for executables (run
|
||||
# the "check" script).
|
||||
# - Check compiling on Amiga, MS-DOS and MS-Windows.
|
||||
# - Delete all *~, *.sw?, *.orig, *.rej files
|
||||
# - "make unixall", "make extra", "make lang", "make html"
|
||||
# - Make diff files against the previous release: "makediff7 7.1 7.2"
|
||||
#
|
||||
# Amiga:
|
||||
# - "make amisrc", move the archive to the Amiga and compile:
|
||||
@@ -128,25 +129,26 @@ DOSBIN_S = dosbin_s
|
||||
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
||||
# "uninstald32.exe".
|
||||
# Win32 console version:
|
||||
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
|
||||
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
|
||||
# paths when necessary).
|
||||
# - "nmake -f Make_mvc.mak"
|
||||
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
|
||||
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
|
||||
# - Rename ObjC/vim.pdb to vimw32.pdb.
|
||||
# - Rename vim.pdb to vimw32.pdb.
|
||||
# - When building the Win32s version later, delete vimrun.exe, install.exe and
|
||||
# uninstal.exe. Otherwise rename executables to installw32.exe and
|
||||
# uninstalw32.exe.
|
||||
# Win32 GUI version:
|
||||
# - "nmake -f Make_mvc.mak GUI=yes.
|
||||
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
|
||||
# - Move ObjG/gvim.pdb to here.
|
||||
# - Delete vimrun.exe, install.exe and uninstall.exe.
|
||||
# - Move gvim.pdb to here.
|
||||
# - Delete vimrun.exe, install.exe and uninstal.exe.
|
||||
# - Copy "GvimExt/gvimext.dll" to here.
|
||||
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
|
||||
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
|
||||
# - Rename "gvim.exe" to "gvim_ole.exe".
|
||||
# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
|
||||
# - Delete install.exe and uninstall.exe.
|
||||
# - Rename gvim.pdb to "gvim_ole.pdb".
|
||||
# - Delete install.exe and uninstal.exe.
|
||||
# - If building the Win32s version delete vimrun.exe.
|
||||
# Win32s GUI version:
|
||||
# - Set environment for Visual C++ 4.1 (requires a new console window)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
WHAT IS VIM
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ami.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_ami.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Amiga systems.
|
||||
See README.txt for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amibin.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_amibin.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amisrc.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_amisrc.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_bindos.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_bindos.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_dos.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_dos.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_extra.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_extra.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
The extra archive of Vim is to be used in combination with the source archive
|
||||
(vim-7.0-src.tar.gz). The extra archive is useless without it.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_lang.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_lang.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file contains files for non-English languages:
|
||||
- Translated messages.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_mac.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_mac.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Macintosh systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ole.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_ole.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This archive contains gvim.exe with OLE interface and VisVim.
|
||||
This version of gvim.exe can also load a number of interface dynamically (you
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
README_os2.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_os2.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on OS/2 systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
|
||||
NOTE: You will need two archives:
|
||||
vim70rt.zip contains the runtime files (same as for the PC version)
|
||||
vim70os2.zip contains the OS/2 executables
|
||||
vim71rt.zip contains the runtime files (same as for the PC version)
|
||||
vim71os2.zip contains the OS/2 executables
|
||||
|
||||
1. Go to the directory where you want to put the Vim files. Examples:
|
||||
cd C:\
|
||||
cd D:\editors
|
||||
|
||||
2. Unpack the zip archives. This will create a new directory "vim/vim70",
|
||||
2. Unpack the zip archives. This will create a new directory "vim/vim71",
|
||||
in which all the distributed Vim files are placed. Since the directory
|
||||
name includes the version number, it is unlikely that you overwrite
|
||||
existing files.
|
||||
Examples:
|
||||
pkunzip -d vim70os2.zip
|
||||
unzip vim70os2.zip
|
||||
pkunzip -d vim71os2.zip
|
||||
unzip vim71os2.zip
|
||||
|
||||
After you unpacked the files, you can still move the whole directory tree
|
||||
to another location.
|
||||
|
||||
3. Add the directory where vim.exe is to your path. The simplest is to add a
|
||||
line to your autoexec.bat. Examples:
|
||||
set path=%path%;C:\vim\vim70
|
||||
set path=%path%;D:\editors\vim\vim70
|
||||
set path=%path%;C:\vim\vim71
|
||||
set path=%path%;D:\editors\vim\vim71
|
||||
|
||||
That's it!
|
||||
|
||||
@@ -41,10 +41,10 @@ Extra remarks:
|
||||
C:\vim\_viminfo Dynamic info for 'viminfo'.
|
||||
C:\vim\... Other files you made.
|
||||
Distributed files:
|
||||
C:\vim\vim70\vim.exe The Vim version 7.0 executable.
|
||||
C:\vim\vim70\doc\*.txt The version 7.0 documentation files.
|
||||
C:\vim\vim70\bugreport.vim A Vim version 7.0 script.
|
||||
C:\vim\vim70\... Other version 7.0 distributed files.
|
||||
C:\vim\vim71\vim.exe The Vim version 7.1 executable.
|
||||
C:\vim\vim71\doc\*.txt The version 7.1 documentation files.
|
||||
C:\vim\vim71\bugreport.vim A Vim version 7.1 script.
|
||||
C:\vim\vim71\... Other version 7.1 distributed files.
|
||||
In this case the $VIM environment variable would be set like this:
|
||||
set VIM=C:\vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_os_390.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_os_390.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
Welcome to the OS/390 Unix port of VIM.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_src.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_src.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
The source archive contains the files needed to compile Vim on Unix systems.
|
||||
It is packed for Unix systems (NL line separator). It is also used for other
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_srcdos.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_srcdos.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_unix.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_unix.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Unix systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_vms.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_vms.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on VMS systems.
|
||||
See "README.txt" in the runtime archive for information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_w32s.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README_w32s.txt for version 7.1 of Vim: Vi IMproved.
|
||||
|
||||
This archive contains the gvim.exe that was specifically compiled for use in
|
||||
the Win32s subsystem in MS-Windows 3.1 and 3.11.
|
||||
|
||||
2
farsi/README.txt
Normal file
2
farsi/README.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
For information about installation of Farsi fonts and Vim usage in Farsi mode,
|
||||
refer to the Farsi help file by typing ":help farsi" in Vim.
|
||||
BIN
farsi/fonts/DOS/far-a01.com
Executable file
BIN
farsi/fonts/DOS/far-a01.com
Executable file
Binary file not shown.
BIN
farsi/fonts/SunOs/far-a01.fb
Normal file
BIN
farsi/fonts/SunOs/far-a01.fb
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.f16
Normal file
BIN
farsi/fonts/UNIXs/far-a01.f16
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.pcf.Z
Normal file
BIN
farsi/fonts/UNIXs/far-a01.pcf.Z
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.pcf.gz
Normal file
BIN
farsi/fonts/UNIXs/far-a01.pcf.gz
Normal file
Binary file not shown.
BIN
farsi/fonts/WINDOWS/far-a01.fon
Normal file
BIN
farsi/fonts/WINDOWS/far-a01.fon
Normal file
Binary file not shown.
@@ -22,7 +22,7 @@
|
||||
!define HAVE_NLS
|
||||
|
||||
!define VER_MAJOR 7
|
||||
!define VER_MINOR 0
|
||||
!define VER_MINOR 1
|
||||
|
||||
# ----------- No configurable settings below this line -----------
|
||||
|
||||
|
||||
595
runtime/autoload/ada.vim
Normal file
595
runtime/autoload/ada.vim
Normal file
@@ -0,0 +1,595 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Perform Ada specific completion & tagging.
|
||||
" Language: Ada (2005)
|
||||
" $Id$
|
||||
" Maintainer: Martin Krischik
|
||||
" Neil Bird <neil@fnxweb.com>
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 26.05.2006 MK ' should not be in iskeyword.
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 02.10.2006 MK Better folding.
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: ft-ada-functions
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
" Section: Constants {{{1
|
||||
"
|
||||
let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*'
|
||||
let g:ada#WordRegex = '\a\w*'
|
||||
let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
|
||||
let g:ada#Keywords = []
|
||||
|
||||
" Section: g:ada#Keywords {{{1
|
||||
"
|
||||
" Section: add Ada keywords {{{2
|
||||
"
|
||||
for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'keyword',
|
||||
\ 'info': 'Ada keyword.',
|
||||
\ 'kind': 'k',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: GNAT Project Files {{{3
|
||||
"
|
||||
if exists ('g:ada_with_gnat_project_files')
|
||||
for Item in ['project']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'keyword',
|
||||
\ 'info': 'GNAT projectfile keyword.',
|
||||
\ 'kind': 'k',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add standart exception {{{2
|
||||
"
|
||||
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'exception',
|
||||
\ 'info': 'Ada standart exception.',
|
||||
\ 'kind': 'x',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT exception {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Assert_Failure']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'exception',
|
||||
\ 'info': 'GNAT exception.',
|
||||
\ 'kind': 'x',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada buildin types {{{2
|
||||
"
|
||||
for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'type',
|
||||
\ 'info': 'Ada buildin type.',
|
||||
\ 'kind': 't',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT buildin types {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'type',
|
||||
\ 'info': 'GNAT buildin type.',
|
||||
\ 'kind': 't',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada Attributes {{{2
|
||||
"
|
||||
for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'attribute',
|
||||
\ 'info': 'Ada attribute.',
|
||||
\ 'kind': 'a',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT Attributes {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'attribute',
|
||||
\ 'info': 'GNAT attribute.',
|
||||
\ 'kind': 'a',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada Pragmas {{{2
|
||||
"
|
||||
for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'pragma',
|
||||
\ 'info': 'Ada pragma.',
|
||||
\ 'kind': 'p',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT Pragmas {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'pragma',
|
||||
\ 'info': 'GNAT pragma.',
|
||||
\ 'kind': 'p',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
" 1}}}
|
||||
|
||||
" Section: g:ada#Ctags_Kinds {{{1
|
||||
"
|
||||
let g:ada#Ctags_Kinds = {
|
||||
\ 'P': ["packspec", "package specifications"],
|
||||
\ 'p': ["package", "packages"],
|
||||
\ 'T': ["typespec", "type specifications"],
|
||||
\ 't': ["type", "types"],
|
||||
\ 'U': ["subspec", "subtype specifications"],
|
||||
\ 'u': ["subtype", "subtypes"],
|
||||
\ 'c': ["component", "record type components"],
|
||||
\ 'l': ["literal", "enum type literals"],
|
||||
\ 'V': ["varspec", "variable specifications"],
|
||||
\ 'v': ["variable", "variables"],
|
||||
\ 'f': ["formal", "generic formal parameters"],
|
||||
\ 'n': ["constant", "constants"],
|
||||
\ 'x': ["exception", "user defined exceptions"],
|
||||
\ 'R': ["subprogspec", "subprogram specifications"],
|
||||
\ 'r': ["subprogram", "subprograms"],
|
||||
\ 'K': ["taskspec", "task specifications"],
|
||||
\ 'k': ["task", "tasks"],
|
||||
\ 'O': ["protectspec", "protected data specifications"],
|
||||
\ 'o': ["protected", "protected data"],
|
||||
\ 'E': ["entryspec", "task/protected data entry specifications"],
|
||||
\ 'e': ["entry", "task/protected data entries"],
|
||||
\ 'b': ["label", "labels"],
|
||||
\ 'i': ["identifier", "loop/declare identifiers"],
|
||||
\ 'a': ["autovar", "automatic variables"],
|
||||
\ 'y': ["annon", "loops and blocks with no identifier"]}
|
||||
|
||||
" Section: ada#Word (...) {{{1
|
||||
"
|
||||
" Extract current Ada word across multiple lines
|
||||
" AdaWord ([line, column])\
|
||||
"
|
||||
function ada#Word (...)
|
||||
if a:0 > 1
|
||||
let l:Line_Nr = a:1
|
||||
let l:Column_Nr = a:2 - 1
|
||||
else
|
||||
let l:Line_Nr = line('.')
|
||||
let l:Column_Nr = col('.') - 1
|
||||
endif
|
||||
|
||||
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
|
||||
|
||||
" Cope with tag searching for items in comments; if we are, don't loop
|
||||
" backards looking for previous lines
|
||||
if l:Column_Nr > strlen(l:Line)
|
||||
" We were in a comment
|
||||
let l:Line = getline(l:Line_Nr)
|
||||
let l:Search_Prev_Lines = 0
|
||||
else
|
||||
let l:Search_Prev_Lines = 1
|
||||
endif
|
||||
|
||||
" Go backwards until we find a match (Ada ID) that *doesn't* include our
|
||||
" location - i.e., the previous ID. This is because the current 'correct'
|
||||
" match will toggle matching/not matching as we traverse characters
|
||||
" backwards. Thus, we have to find the previous unrelated match, exclude
|
||||
" it, then use the next full match (ours).
|
||||
" Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)]
|
||||
" ... but start, here, one after the required char.
|
||||
let l:New_Column = l:Column_Nr + 1
|
||||
while 1
|
||||
let l:New_Column = l:New_Column - 1
|
||||
if l:New_Column < 0
|
||||
" Have to include previous l:Line from file
|
||||
let l:Line_Nr = l:Line_Nr - 1
|
||||
if l:Line_Nr < 1 || !l:Search_Prev_Lines
|
||||
" Start of file or matching in a comment
|
||||
let l:Line_Nr = 1
|
||||
let l:New_Column = 0
|
||||
let l:Our_Match = match (l:Line, g:ada#WordRegex )
|
||||
break
|
||||
endif
|
||||
" Get previous l:Line, and prepend it to our search string
|
||||
let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
|
||||
let l:New_Column = strlen (l:New_Line) - 1
|
||||
let l:Column_Nr = l:Column_Nr + l:New_Column
|
||||
let l:Line = l:New_Line . l:Line
|
||||
endif
|
||||
" Check to see if this is a match excluding 'us'
|
||||
let l:Match_End = l:New_Column +
|
||||
\ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1
|
||||
if l:Match_End >= l:New_Column &&
|
||||
\ l:Match_End < l:Column_Nr
|
||||
" Yes
|
||||
let l:Our_Match = l:Match_End+1 +
|
||||
\ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex )
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Got anything?
|
||||
if l:Our_Match < 0
|
||||
return ''
|
||||
else
|
||||
let l:Line = strpart (l:Line, l:Our_Match)
|
||||
endif
|
||||
|
||||
" Now simply add further lines until the match gets no bigger
|
||||
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
|
||||
let l:Last_Line = line ('$')
|
||||
let l:Line_Nr = line ('.') + 1
|
||||
while l:Line_Nr <= l:Last_Line
|
||||
let l:Last_Match = l:Match_String
|
||||
let l:Line = l:Line .
|
||||
\ substitute (getline (l:Line_Nr), g:ada#Comment, '', '')
|
||||
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
|
||||
if l:Match_String == l:Last_Match
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Strip whitespace & return
|
||||
return substitute (l:Match_String, '\s\+', '', 'g')
|
||||
endfunction ada#Word
|
||||
|
||||
" Section: ada#List_Tag (...) {{{1
|
||||
"
|
||||
" List tags in quickfix window
|
||||
"
|
||||
function ada#List_Tag (...)
|
||||
if a:0 > 1
|
||||
let l:Tag_Word = ada#Word (a:1, a:2)
|
||||
elseif a:0 > 0
|
||||
let l:Tag_Word = a:1
|
||||
else
|
||||
let l:Tag_Word = ada#Word ()
|
||||
endif
|
||||
|
||||
echo "Searching for" l:Tag_Word
|
||||
|
||||
let l:Pattern = '^' . l:Tag_Word . '$'
|
||||
let l:Tag_List = taglist (l:Pattern)
|
||||
let l:Error_List = []
|
||||
"
|
||||
" add symbols
|
||||
"
|
||||
for Tag_Item in l:Tag_List
|
||||
if l:Tag_Item['kind'] == ''
|
||||
let l:Tag_Item['kind'] = 's'
|
||||
endif
|
||||
|
||||
let l:Error_List += [
|
||||
\ l:Tag_Item['filename'] . '|' .
|
||||
\ l:Tag_Item['cmd'] . '|' .
|
||||
\ l:Tag_Item['kind'] . "\t" .
|
||||
\ l:Tag_Item['name'] ]
|
||||
endfor
|
||||
set errorformat=%f\|%l\|%m
|
||||
cexpr l:Error_List
|
||||
cwindow
|
||||
endfunction ada#List_Tag
|
||||
|
||||
" Section: ada#Jump_Tag (Word, Mode) {{{1
|
||||
"
|
||||
" Word tag - include '.' and if Ada make uppercase
|
||||
"
|
||||
function ada#Jump_Tag (Word, Mode)
|
||||
if a:Word == ''
|
||||
" Get current word
|
||||
let l:Word = ada#Word()
|
||||
if l:Word == ''
|
||||
throw "NOT_FOUND: no identifier found."
|
||||
endif
|
||||
else
|
||||
let l:Word = a:Word
|
||||
endif
|
||||
|
||||
echo "Searching for " . l:Word
|
||||
|
||||
try
|
||||
execute a:Mode l:Word
|
||||
catch /.*:E426:.*/
|
||||
let ignorecase = &ignorecase
|
||||
set ignorecase
|
||||
execute a:Mode l:Word
|
||||
let &ignorecase = ignorecase
|
||||
endtry
|
||||
|
||||
return
|
||||
endfunction ada#Jump_Tag
|
||||
|
||||
" Section: ada#Insert_Backspace () {{{1
|
||||
"
|
||||
" Backspace at end of line after auto-inserted commentstring '-- ' wipes it
|
||||
"
|
||||
function ada#Insert_Backspace ()
|
||||
let l:Line = getline ('.')
|
||||
if col ('.') > strlen (l:Line) &&
|
||||
\ match (l:Line, '-- $') != -1 &&
|
||||
\ match (&comments,'--') != -1
|
||||
return "\<bs>\<bs>\<bs>"
|
||||
else
|
||||
return "\<bs>"
|
||||
endif
|
||||
|
||||
return
|
||||
endfunction ada#InsertBackspace
|
||||
|
||||
" Section: Insert Completions {{{1
|
||||
"
|
||||
" Section: ada#User_Complete(findstart, base) {{{2
|
||||
"
|
||||
" This function is used for the 'complete' option.
|
||||
"
|
||||
function! ada#User_Complete(findstart, base)
|
||||
if a:findstart == 1
|
||||
"
|
||||
" locate the start of the word
|
||||
"
|
||||
let line = getline ('.')
|
||||
let start = col ('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\i\|'''
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
"
|
||||
" look up matches
|
||||
"
|
||||
let l:Pattern = '^' . a:base . '.*$'
|
||||
"
|
||||
" add keywords
|
||||
"
|
||||
for Tag_Item in g:ada#Keywords
|
||||
if l:Tag_Item['word'] =~? l:Pattern
|
||||
if complete_add (l:Tag_Item) == 0
|
||||
return []
|
||||
endif
|
||||
if complete_check ()
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfunction ada#User_Complete
|
||||
|
||||
" Section: ada#Completion (cmd) {{{2
|
||||
"
|
||||
" Word completion (^N/^R/^X^]) - force '.' inclusion
|
||||
function ada#Completion (cmd)
|
||||
set iskeyword+=46
|
||||
return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>"
|
||||
endfunction ada#Completion
|
||||
|
||||
" Section: ada#Completion_End () {{{2
|
||||
"
|
||||
function ada#Completion_End ()
|
||||
set iskeyword-=46
|
||||
return ''
|
||||
endfunction ada#Completion_End
|
||||
|
||||
" Section: ada#Create_Tags {{{1
|
||||
"
|
||||
function ada#Create_Tags (option)
|
||||
if a:option == 'file'
|
||||
let l:Filename = fnamemodify (bufname ('%'), ':p')
|
||||
elseif a:option == 'dir'
|
||||
let l:Filename =
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.ada " .
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.adb " .
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.ads"
|
||||
else
|
||||
let l:Filename = a:option
|
||||
endif
|
||||
execute '!ctags --excmd=number ' . l:Filename
|
||||
endfunction ada#Create_Tags
|
||||
|
||||
function ada#Switch_Session (New_Session) "{{{1
|
||||
if a:New_Session != v:this_session
|
||||
"
|
||||
" We actualy got a new session - otherwise there
|
||||
" is nothing to do.
|
||||
"
|
||||
if strlen (v:this_session) > 0
|
||||
execute 'mksession! ' . v:this_session
|
||||
endif
|
||||
|
||||
let v:this_session = a:New_Session
|
||||
|
||||
if filereadable (v:this_session)
|
||||
execute 'source ' . v:this_session
|
||||
endif
|
||||
|
||||
augroup ada_session
|
||||
autocmd!
|
||||
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
|
||||
augroup END
|
||||
endif
|
||||
|
||||
return
|
||||
endfunction ada#Switch_Session "}}}1
|
||||
|
||||
" Section: GNAT Pretty Printer folding {{{1
|
||||
"
|
||||
if exists('g:ada_folding') && g:ada_folding[0] == 'g'
|
||||
"
|
||||
" Lines consisting only of ')' ';' are due to a gnat pretty bug and
|
||||
" have the same level as the line above (can't happen in the first
|
||||
" line).
|
||||
"
|
||||
let s:Fold_Collate = '^\([;)]*$\|'
|
||||
|
||||
"
|
||||
" some lone statements are folded with the line above
|
||||
"
|
||||
if stridx (g:ada_folding, 'i') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<is\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'b') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<begin\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'p') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<private\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'x') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<exception\>$\|'
|
||||
endif
|
||||
|
||||
" We also handle empty lines and
|
||||
" comments here.
|
||||
let s:Fold_Collate .= '--\)'
|
||||
|
||||
function ada#Pretty_Print_Folding (Line) " {{{2
|
||||
let l:Text = getline (a:Line)
|
||||
|
||||
if l:Text =~ s:Fold_Collate
|
||||
"
|
||||
" fold with line above
|
||||
"
|
||||
let l:Level = "="
|
||||
elseif l:Text =~ '^\s\+('
|
||||
"
|
||||
" gnat outdents a line which stards with a ( by one characters so
|
||||
" that parameters which follow are aligned.
|
||||
"
|
||||
let l:Level = (indent (a:Line) + 1) / &shiftwidth
|
||||
else
|
||||
let l:Level = indent (a:Line) / &shiftwidth
|
||||
endif
|
||||
|
||||
return l:Level
|
||||
endfunction ada#Pretty_Print_Folding " }}}2
|
||||
endif
|
||||
|
||||
" Section: Options and Menus {{{1
|
||||
"
|
||||
" Section: ada#Switch_Syntax_Options {{{2
|
||||
"
|
||||
function ada#Switch_Syntax_Option (option)
|
||||
syntax off
|
||||
if exists ('g:ada_' . a:option)
|
||||
unlet g:ada_{a:option}
|
||||
echo a:option . 'now off'
|
||||
else
|
||||
let g:ada_{a:option}=1
|
||||
echo a:option . 'now on'
|
||||
endif
|
||||
syntax on
|
||||
endfunction ada#Switch_Syntax_Option
|
||||
|
||||
" Section: ada#Map_Menu {{{2
|
||||
"
|
||||
function ada#Map_Menu (Text, Keys, Command)
|
||||
if a:Keys[0] == ':'
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . a:Keys .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "command -buffer " .
|
||||
\ a:Keys[1:] .
|
||||
\" :" . a:Command . "<CR>"
|
||||
elseif a:Keys[0] == '<'
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . a:Keys .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "nnoremap <buffer> " .
|
||||
\ a:Keys .
|
||||
\" :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "inoremap <buffer> " .
|
||||
\ a:Keys .
|
||||
\" <C-O>:" . a:Command . "<CR>"
|
||||
else
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "nnoremap <buffer>" .
|
||||
\ escape(g:mapleader . "a" . a:Keys , '\') .
|
||||
\" :" . a:Command
|
||||
execute
|
||||
\ "inoremap <buffer>" .
|
||||
\ escape(g:mapleader . "a" . a:Keys , '\') .
|
||||
\" <C-O>:" . a:Command
|
||||
endif
|
||||
return
|
||||
endfunction
|
||||
|
||||
" Section: ada#Map_Popup {{{2
|
||||
"
|
||||
function ada#Map_Popup (Text, Keys, Command)
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "PopUp." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
|
||||
call ada#Map_Menu (a:Text, a:Keys, a:Command)
|
||||
return
|
||||
endfunction ada#Map_Popup
|
||||
|
||||
" }}}1
|
||||
|
||||
lockvar g:ada#WordRegex
|
||||
lockvar g:ada#DotWordRegex
|
||||
lockvar g:ada#Comment
|
||||
lockvar! g:ada#Keywords
|
||||
lockvar! g:ada#Ctags_Kinds
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
109
runtime/autoload/adacomplete.vim
Normal file
109
runtime/autoload/adacomplete.vim
Normal file
@@ -0,0 +1,109 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada omnicompletion file
|
||||
" Language: Ada (2005)
|
||||
" $Id$
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 26.05.2006 MK improved search for begin of word.
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: ft-ada-omni
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
" Section: adacomplete#Complete () {{{1
|
||||
"
|
||||
" This function is used for the 'omnifunc' option.
|
||||
"
|
||||
function! adacomplete#Complete (findstart, base)
|
||||
if a:findstart == 1
|
||||
return ada#User_Complete (a:findstart, a:base)
|
||||
else
|
||||
"
|
||||
" look up matches
|
||||
"
|
||||
if exists ("g:ada_omni_with_keywords")
|
||||
call ada#User_Complete (a:findstart, a:base)
|
||||
endif
|
||||
"
|
||||
" search tag file for matches
|
||||
"
|
||||
let l:Pattern = '^' . a:base . '.*$'
|
||||
let l:Tag_List = taglist (l:Pattern)
|
||||
"
|
||||
" add symbols
|
||||
"
|
||||
for Tag_Item in l:Tag_List
|
||||
if l:Tag_Item['kind'] == ''
|
||||
"
|
||||
" Tag created by gnat xref
|
||||
"
|
||||
let l:Match_Item = {
|
||||
\ 'word': l:Tag_Item['name'],
|
||||
\ 'menu': l:Tag_Item['filename'],
|
||||
\ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
|
||||
\ 'kind': 's',
|
||||
\ 'icase': 1}
|
||||
else
|
||||
"
|
||||
" Tag created by ctags
|
||||
"
|
||||
let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n"
|
||||
let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n"
|
||||
let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n"
|
||||
|
||||
if has_key( l:Tag_Item, 'package')
|
||||
let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n"
|
||||
let l:Menu = l:Tag_Item['package']
|
||||
elseif has_key( l:Tag_Item, 'separate')
|
||||
let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n"
|
||||
let l:Menu = l:Tag_Item['separate']
|
||||
elseif has_key( l:Tag_Item, 'packspec')
|
||||
let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n"
|
||||
let l:Menu = l:Tag_Item['packspec']
|
||||
elseif has_key( l:Tag_Item, 'type')
|
||||
let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n"
|
||||
let l:Menu = l:Tag_Item['type']
|
||||
else
|
||||
let l:Menu = l:Tag_Item['filename']
|
||||
endif
|
||||
|
||||
let l:Match_Item = {
|
||||
\ 'word': l:Tag_Item['name'],
|
||||
\ 'menu': l:Menu,
|
||||
\ 'info': l:Info,
|
||||
\ 'kind': l:Tag_Item['kind'],
|
||||
\ 'icase': 1}
|
||||
endif
|
||||
if complete_add (l:Match_Item) == 0
|
||||
return []
|
||||
endif
|
||||
if complete_check ()
|
||||
return []
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfunction adacomplete#Complete
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,430 +1,429 @@
|
||||
" Vim completion script
|
||||
" Language: CSS 2.1
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2007 May 5
|
||||
|
||||
let s: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")
|
||||
|
||||
function! csscomplete#CompleteCSS(findstart, base)
|
||||
|
||||
if a:findstart
|
||||
" We need whole line to proper checking
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let compl_begin = col('.') - 2
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||
while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
|
||||
let start -= 1
|
||||
endwhile
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
let b:compl_context = line[0:compl_begin]
|
||||
return start
|
||||
endif
|
||||
|
||||
" 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 know 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
|
||||
" 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 line = a:base
|
||||
endif
|
||||
|
||||
let res = []
|
||||
let res2 = []
|
||||
let borders = {}
|
||||
let res = []
|
||||
let res2 = []
|
||||
let borders = {}
|
||||
|
||||
" We need the last occurrence of char so reverse line
|
||||
let revline = join(reverse(split(line, '.\zs')), '')
|
||||
" Check last occurrence of sequence
|
||||
|
||||
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, '!')
|
||||
let openbrace = strridx(line, '{')
|
||||
let closebrace = strridx(line, '}')
|
||||
let colon = strridx(line, ':')
|
||||
let semicolon = strridx(line, ';')
|
||||
let opencomm = strridx(line, '/*')
|
||||
let closecomm = strridx(line, '*/')
|
||||
let style = strridx(line, 'style\s*=')
|
||||
let atrule = strridx(line, '@')
|
||||
let exclam = strridx(line, '!')
|
||||
|
||||
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 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
|
||||
if len(borders) == 0 || borders[max(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-]*$')
|
||||
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
|
||||
for m in s:values
|
||||
if m =~? '^'.entered_property
|
||||
call add(res, m . ':')
|
||||
elseif m =~? entered_property
|
||||
call add(res2, m . ':')
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
return res + res2
|
||||
|
||||
elseif borders[min(keys(borders))] == 'colon'
|
||||
" Get name of property
|
||||
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
|
||||
elseif borders[max(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"]
|
||||
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
|
||||
" 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"]
|
||||
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 stridx(',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.',') > -1
|
||||
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[max(keys(borders))] == 'closebrace'
|
||||
|
||||
return []
|
||||
|
||||
elseif borders[max(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[max(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 entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
|
||||
|
||||
elseif atrulename == 'import'
|
||||
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
|
||||
return []
|
||||
let values = ['"', 'url(']
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
return []
|
||||
|
||||
endif
|
||||
|
||||
" Complete values
|
||||
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_value
|
||||
if m =~? '^'.entered_atruleafter
|
||||
call add(res, m)
|
||||
elseif m =~? entered_value
|
||||
elseif m =~? entered_atruleafter
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
|
||||
elseif borders[min(keys(borders))] == 'closebrace'
|
||||
endif
|
||||
|
||||
return []
|
||||
let values = ["charset", "page", "media", "import", "font-face"]
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
let values = ["charset", "page", "media", "import", "font-face"]
|
||||
return res + res2
|
||||
|
||||
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
|
||||
endif
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_atrule
|
||||
call add(res, m .' ')
|
||||
elseif m =~? entered_atrule
|
||||
call add(res2, m .' ')
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
|
||||
return res + res2
|
||||
|
||||
endif
|
||||
|
||||
return []
|
||||
|
||||
endif
|
||||
endfunction
|
||||
|
||||
75
runtime/autoload/decada.vim
Normal file
75
runtime/autoload/decada.vim
Normal file
@@ -0,0 +1,75 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/Dec Ada compiler file
|
||||
" Language: Ada (Dec Ada)
|
||||
" $Id$
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
|
||||
" History: 21.07.2006 MK New Dec Ada
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: compiler-decada
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
function decada#Unit_Name () dict " {{{1
|
||||
" Convert filename into acs unit:
|
||||
" 1: remove the file extenstion.
|
||||
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
|
||||
" 3: remove a trailing '_' (wich denotes a specification)
|
||||
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
|
||||
endfunction decada#Unit_Name " }}}1
|
||||
|
||||
function decada#Make () dict " {{{1
|
||||
let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
|
||||
let &errorformat = g:self.Error_Format
|
||||
let &makeprg = l:make_prg
|
||||
wall
|
||||
make
|
||||
copen
|
||||
set wrap
|
||||
wincmd W
|
||||
endfunction decada#Build " }}}1
|
||||
|
||||
function decada#Set_Session (...) dict " {{{1
|
||||
if a:0 > 0
|
||||
call ada#Switch_Session (a:1)
|
||||
elseif argc() == 0 && strlen (v:servername) > 0
|
||||
call ada#Switch_Session (
|
||||
\ expand('~')[0:-2] . ".vimfiles.session]" .
|
||||
\ v:servername . ".vim")
|
||||
endif
|
||||
return
|
||||
endfunction decada#Set_Session " }}}1
|
||||
|
||||
function decada#New () " }}}1
|
||||
let Retval = {
|
||||
\ 'Make' : function ('decada#Make'),
|
||||
\ 'Unit_Name' : function ('decada#Unit_Name'),
|
||||
\ 'Set_Session' : function ('decada#Set_Session'),
|
||||
\ 'Project_Dir' : '',
|
||||
\ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
|
||||
\ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
|
||||
\ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
|
||||
|
||||
return Retval
|
||||
endfunction decada#New " }}}1
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,40 +1,56 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Feb 15, 2006
|
||||
" Version: 20
|
||||
" getscript.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 11, 2007
|
||||
" Version: 27
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
" Usage: :help glvs
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: GetLatestVimScripts.vim
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" if you're sourcing this file, surely you can't be
|
||||
" expecting vim to be in its vi-compatible mode
|
||||
if &cp
|
||||
if &verbose
|
||||
echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
endif
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
endif
|
||||
let s:keepfo = &fo
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
|
||||
if exists("loaded_GetLatestVimScripts")
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_GetLatestVimScripts= "v20"
|
||||
let g:loaded_getscript= "v27"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Variables: {{{1
|
||||
" allow user to change the command for obtaining scripts (does fetch work?)
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
if executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
elseif executable("curl")
|
||||
let g:GetLatestVimScripts_wget= "curl"
|
||||
else
|
||||
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
|
||||
let g:GetLatestVimScripts_options = ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" options that wget and curl require:
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
if g:GetLatestVimScripts_wget == "wget"
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
elseif g:GetLatestVimScripts_wget == "curl"
|
||||
let g:GetLatestVimScripts_options= "-s -O"
|
||||
else
|
||||
let g:GetLatestVimScripts_options= ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" by default, allow autoinstall lines to work
|
||||
if !exists("g:GetLatestVimScripts_allowautoinstall")
|
||||
let g:GetLatestVimScripts_allowautoinstall= 1
|
||||
endif
|
||||
@@ -43,7 +59,8 @@ endif
|
||||
"let g:GetLatestVimScripts_wget = "echo"
|
||||
"let g:GetLatestVimScripts_options = "options"
|
||||
|
||||
" check if s:autoinstall is possible
|
||||
" ---------------------------------------------------------------------
|
||||
" Check If AutoInstall Capable: {{{1
|
||||
let s:autoinstall= ""
|
||||
if g:GetLatestVimScripts_allowautoinstall
|
||||
|
||||
@@ -66,21 +83,22 @@ if g:GetLatestVimScripts_allowautoinstall
|
||||
let s:autoinstall= $HOME."/".s:dotvim
|
||||
endif
|
||||
" call Decho("s:autoinstall<".s:autoinstall.">")
|
||||
else
|
||||
"else "Decho
|
||||
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=0 GetLatestVimScripts call <SID>GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call <SID>GetLatestVimScripts()
|
||||
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
|
||||
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
|
||||
" on the current line, interpreting two numbers and text as
|
||||
" ScriptID, SourceID, and Filename.
|
||||
" It downloads any scripts that have newer versions from vim.sf.net.
|
||||
fun! <SID>GetOneScript(...)
|
||||
fun! s:GetOneScript(...)
|
||||
" call Dfunc("GetOneScript()")
|
||||
|
||||
" set options to allow progress to be shown on screen
|
||||
@@ -96,33 +114,43 @@ fun! <SID>GetOneScript(...)
|
||||
if a:0 >= 3
|
||||
let scriptid = a:1
|
||||
let srcid = a:2
|
||||
let cmmnt = a:3
|
||||
let fname = a:3
|
||||
let cmmnt = ""
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("cmmnt <".cmmnt.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
else
|
||||
let curline = getline(".")
|
||||
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)$'
|
||||
if curline =~ '^\s*#'
|
||||
" call Dret("GetOneScript : skipping a pure comment line")
|
||||
return
|
||||
endif
|
||||
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
|
||||
try
|
||||
let scriptid = substitute(curline,parsepat,'\1','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let scriptid= 0
|
||||
let scriptid= 0
|
||||
endtry
|
||||
try
|
||||
let srcid = substitute(curline,parsepat,'\2','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let srcid= 0
|
||||
let srcid= 0
|
||||
endtry
|
||||
try
|
||||
let cmmnt = substitute(curline,parsepat,'\3','e')
|
||||
let fname= substitute(curline,parsepat,'\3','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let cmmnt= ""
|
||||
let fname= ""
|
||||
endtry
|
||||
try
|
||||
let cmmnt= substitute(curline,parsepat,'\4','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let cmmnt= ""
|
||||
endtry
|
||||
" call Decho("curline <".curline.">")
|
||||
" call Decho("parsepat<".parsepat.">")
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("cmmnt <".cmmnt.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
endif
|
||||
|
||||
if scriptid == 0 || srcid == 0
|
||||
@@ -133,15 +161,15 @@ fun! <SID>GetOneScript(...)
|
||||
endif
|
||||
|
||||
let doautoinstall= 0
|
||||
if cmmnt =~ ":AutoInstall:"
|
||||
" call Decho("cmmnt<".cmmnt."> has :AutoInstall:...")
|
||||
let aicmmnt= substitute(cmmnt,'\s\+:AutoInstall:\s\+',' ','')
|
||||
if fname =~ ":AutoInstall:"
|
||||
" call Decho("fname<".fname."> has :AutoInstall:...")
|
||||
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
|
||||
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
|
||||
if s:autoinstall != ""
|
||||
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
|
||||
endif
|
||||
else
|
||||
let aicmmnt= cmmnt
|
||||
let aicmmnt= fname
|
||||
endif
|
||||
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
|
||||
|
||||
@@ -155,7 +183,7 @@ fun! <SID>GetOneScript(...)
|
||||
let tmpfile = tempname()
|
||||
let v:errmsg = ""
|
||||
|
||||
" make three tries at downloading the description
|
||||
" make up to three tries at downloading the description
|
||||
let itry= 1
|
||||
while itry <= 3
|
||||
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
|
||||
@@ -182,19 +210,19 @@ fun! <SID>GetOneScript(...)
|
||||
endwhile
|
||||
" call Decho(" --- end downloading tries while loop --- itry=".itry)
|
||||
|
||||
" testing: did finding /Click on the package.../ fail?
|
||||
" testing: did finding "Click on the package..." fail?
|
||||
if findpkg == 0 || itry >= 4
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /Click on the package/ failed")
|
||||
return
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /Click on the package/ failed")
|
||||
return
|
||||
endif
|
||||
" call Decho('found "Click on the package to download"')
|
||||
|
||||
@@ -216,74 +244,101 @@ fun! <SID>GetOneScript(...)
|
||||
|
||||
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
|
||||
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
|
||||
let fname = substitute(getline("."),srcidpat,'\2','')
|
||||
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> fname<".fname.">")
|
||||
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
|
||||
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
|
||||
" convert the strings-of-numbers into numbers
|
||||
let srcid = srcid + 0
|
||||
let latestsrcid = latestsrcid + 0
|
||||
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." fname<".fname.">")
|
||||
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
|
||||
|
||||
" has the plugin's most-recent srcid increased, which indicates
|
||||
" that it has been updated
|
||||
if latestsrcid > srcid
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
|
||||
|
||||
let s:downloads= s:downloads + 1
|
||||
if fname == bufname("%")
|
||||
if sname == bufname("%")
|
||||
" GetLatestVimScript has to be careful about downloading itself
|
||||
let fname= "NEW_".fname
|
||||
let sname= "NEW_".sname
|
||||
endif
|
||||
|
||||
" the plugin has been updated since we last obtained it, so download a new copy
|
||||
" call Decho("...downloading new <".fname.">")
|
||||
echomsg "...downloading new <".fname.">"
|
||||
" call Decho("...downloading new <".sname.">")
|
||||
echomsg "...downloading new <".sname.">"
|
||||
if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
|
||||
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
|
||||
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
|
||||
else
|
||||
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
|
||||
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
|
||||
endif
|
||||
|
||||
" AutoInstall: only if doautoinstall is so indicating
|
||||
if doautoinstall
|
||||
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname))
|
||||
if filereadable(fname)
|
||||
" call Decho("move <".fname."> to ".s:autoinstall)
|
||||
" call Decho("DISABLED for testing")
|
||||
exe "silent !"g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall
|
||||
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||
exe "cd ".s:autoinstall
|
||||
if fname =~ '\.bz2$'
|
||||
" call Decho("attempt to bunzip2 ".fname)
|
||||
exe "silent !bunzip2 ".fname
|
||||
let fname= substitute(fname,'\.bz2$','','')
|
||||
elseif fname =~ '\.gz$'
|
||||
" call Decho("attempt to gunzip ".fname)
|
||||
exe "silent !gunzip ".fname
|
||||
let fname= substitute(fname,'\.gz$','','')
|
||||
endif
|
||||
if fname =~ '\.zip$'
|
||||
" call Decho("attempt to unzip ".fname)
|
||||
exe "silent !unzip -o".fname
|
||||
elseif fname =~ '\.tar$'
|
||||
" call Decho("attempt to untar ".fname)
|
||||
exe "silent !tar -oxvf ".fname
|
||||
endif
|
||||
if fname =~ '.vim$'
|
||||
" call Decho("attempt to simply move ".fname." to plugin")
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin"
|
||||
endif
|
||||
exe "helptags ../".s:dotvim."/doc"
|
||||
exe "cd ".curdir
|
||||
endif
|
||||
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
||||
if filereadable(sname)
|
||||
" call Decho("move <".sname."> to ".s:autoinstall)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
|
||||
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||
" call Decho("exe cd ".s:autoinstall)
|
||||
exe "cd ".s:autoinstall
|
||||
|
||||
" decompress
|
||||
if sname =~ '\.bz2$'
|
||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||
exe "silent !bunzip2 ".sname
|
||||
let sname= substitute(sname,'\.bz2$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after bunzip2")
|
||||
elseif sname =~ '\.gz$'
|
||||
" call Decho("decompress: attempt to gunzip ".sname)
|
||||
exe "silent !gunzip ".sname
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
endif
|
||||
|
||||
" distribute archive(.zip, .tar, .vba) contents
|
||||
if sname =~ '\.zip$'
|
||||
" call Decho("dearchive: attempt to unzip ".sname)
|
||||
exe "silent !unzip -o ".sname
|
||||
elseif sname =~ '\.tar$'
|
||||
" call Decho("dearchive: attempt to untar ".sname)
|
||||
exe "silent !tar -xvf ".sname
|
||||
elseif sname =~ '\.vba$'
|
||||
" call Decho("dearchive: attempt to handle a vimball: ".sname)
|
||||
silent 1split
|
||||
exe "silent e ".sname
|
||||
silent so %
|
||||
silent q
|
||||
endif
|
||||
|
||||
if sname =~ '.vim$'
|
||||
" call Decho("dearchive: attempt to simply move ".sname." to plugin")
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
|
||||
endif
|
||||
|
||||
" helptags step
|
||||
let docdir= substitute(&rtp,',.*','','e')."/doc"
|
||||
" call Decho("helptags: docdir<".docdir.">")
|
||||
exe "helptags ".docdir
|
||||
exe "cd ".curdir
|
||||
endif
|
||||
if fname !~ ':AutoInstall:'
|
||||
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
|
||||
else
|
||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||
endif
|
||||
else
|
||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||
endif
|
||||
|
||||
" update the data in the <GetLatestVimScripts.dat> file
|
||||
let modline=scriptid." ".latestsrcid." ".cmmnt
|
||||
call setline(line("."),modline)
|
||||
" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)")
|
||||
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
|
||||
" else " Decho
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
|
||||
endif
|
||||
|
||||
" restore options
|
||||
@@ -296,10 +351,9 @@ endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
||||
" scripts based on the list in
|
||||
"
|
||||
" scripts based on the list in
|
||||
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
fun! <SID>GetLatestVimScripts()
|
||||
fun! getscript#GetLatestVimScripts()
|
||||
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
|
||||
|
||||
" insure that wget is executable
|
||||
@@ -309,30 +363,28 @@ fun! <SID>GetLatestVimScripts()
|
||||
return
|
||||
endif
|
||||
|
||||
" Find the .../GetLatest sudirectory under the runtimepath
|
||||
let rtplist= &rtp
|
||||
while rtplist != ""
|
||||
let datadir= substitute(rtplist,',.*$','','e')."/GetLatest"
|
||||
if isdirectory(datadir)
|
||||
" call Decho("found directory<".datadir.">")
|
||||
" Find the .../GetLatest subdirectory under the runtimepath
|
||||
for datadir in split(&rtp,',') + ['']
|
||||
if isdirectory(datadir."/GetLatest")
|
||||
" call Decho("found directory<".datadir.">")
|
||||
let datadir= datadir . "/GetLatest"
|
||||
break
|
||||
endif
|
||||
unlet datadir
|
||||
if rtplist =~ ','
|
||||
let rtplist= substitute(rtplist,'^.\{-},','','e')
|
||||
else
|
||||
let rtplist= ""
|
||||
if filereadable(datadir."GetLatestVimScripts.dat")
|
||||
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
endfor
|
||||
|
||||
" Sanity checks: readability and writability
|
||||
if !exists("datadir")
|
||||
echoerr "Unable to find a GetLatest subdirectory on your runtimepath"
|
||||
if datadir == ""
|
||||
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
|
||||
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
||||
return
|
||||
endif
|
||||
|
||||
if filewritable(datadir) != 2
|
||||
echoerr "Your ".datadir." isn't writable"
|
||||
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
||||
return
|
||||
endif
|
||||
@@ -368,63 +420,84 @@ fun! <SID>GetLatestVimScripts()
|
||||
" call Decho(" ")
|
||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||
let lastline = line("$")
|
||||
let plugins = globpath(&rtp,"plugin/*.vim")
|
||||
" call Decho("lastline#".lastline)
|
||||
let plugins = split(globpath(&rtp,"plugin/*.vim"))
|
||||
let foundscript = 0
|
||||
let firstdir= ""
|
||||
|
||||
" call Decho("plugins<".plugins."> lastline#".lastline)
|
||||
while plugins != ""
|
||||
let plugin = substitute(plugins,'\n.*$','','e')
|
||||
let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : ""
|
||||
for plugin in plugins
|
||||
|
||||
" don't process plugins in system directories
|
||||
if firstdir == ""
|
||||
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
|
||||
" call Decho("firstdir<".firstdir.">")
|
||||
else
|
||||
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
|
||||
" call Decho("curdir<".curdir.">")
|
||||
if curdir != firstdir
|
||||
break
|
||||
endif
|
||||
endif
|
||||
|
||||
" read plugin in
|
||||
$
|
||||
" call Decho(" ")
|
||||
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
||||
exe "silent r ".plugin
|
||||
|
||||
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
|
||||
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
||||
let llp1 = lastline+1
|
||||
" call Decho("..newscript<".newscript.">")
|
||||
|
||||
if newscript !~ '^"'
|
||||
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
|
||||
let curline = line(".")
|
||||
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
|
||||
exe llp1
|
||||
let srchline = search('\<'.noai_script.'\>','bW')
|
||||
" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline)
|
||||
" don't process ""GetLatestVimScripts lines
|
||||
if newscript !~ '^"'
|
||||
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
|
||||
let curline = line(".")
|
||||
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
|
||||
exe llp1
|
||||
let srchline = search('\<'.noai_script.'\>','bW')
|
||||
" call Decho("..noai_script<".noai_script."> srch=".srchline."curline#".line(".")." lastline#".lastline)
|
||||
|
||||
if srchline == 0
|
||||
" found a new script to permanently include in the datafile
|
||||
let keep_rega = @a
|
||||
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
||||
exe lastline."put a"
|
||||
echomsg "Appending <".@a."> to ".datafile." for ".newscript
|
||||
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
|
||||
let @a = keep_rega
|
||||
let lastline = llp1
|
||||
let curline = curline + 1
|
||||
let foundscript = foundscript + 1
|
||||
" else " Decho
|
||||
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
||||
endif
|
||||
|
||||
let curline = curline + 1
|
||||
exe curline
|
||||
endif
|
||||
if srchline == 0
|
||||
" found a new script to permanently include in the datafile
|
||||
let keep_rega = @a
|
||||
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
||||
exe lastline."put a"
|
||||
echomsg "Appending <".@a."> to ".datafile." for ".newscript
|
||||
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
|
||||
let @a = keep_rega
|
||||
let lastline = llp1
|
||||
let curline = curline + 1
|
||||
let foundscript = foundscript + 1
|
||||
" else " Decho
|
||||
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
||||
endif
|
||||
|
||||
let curline = curline + 1
|
||||
exe curline
|
||||
endif
|
||||
endwhile
|
||||
|
||||
let llp1= lastline + 1
|
||||
" call Decho(".deleting lines: ".llp1.",$d")
|
||||
exe "silent! ".llp1.",$d"
|
||||
endwhile
|
||||
endfor
|
||||
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
|
||||
" call Decho(" ")
|
||||
|
||||
if foundscript == 0
|
||||
set nomod
|
||||
endif
|
||||
|
||||
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
||||
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
|
||||
set lz
|
||||
" call Decho(" --- end of dependency checking loop --- ")
|
||||
" call Decho("call GetOneScript on lines at end of datafile<".datafile.">")
|
||||
1
|
||||
/^-----/,$g/^\s*\d/call <SID>GetOneScript()
|
||||
" /^-----/,$g/^\s*\d/call Decho(getline("."))
|
||||
1
|
||||
/^-----/,$g/^\s*\d/call s:GetOneScript()
|
||||
" call Decho("--- end out-of-date checking --- ")
|
||||
|
||||
" Final report (an echomsg)
|
||||
try
|
||||
@@ -434,6 +507,7 @@ fun! <SID>GetLatestVimScripts()
|
||||
return
|
||||
endtry
|
||||
exe "norm! kz\<CR>"
|
||||
redraw!
|
||||
let s:msg = ""
|
||||
if s:downloads == 1
|
||||
let s:msg = "Downloaded one updated script to <".datadir.">"
|
||||
@@ -450,10 +524,9 @@ fun! <SID>GetLatestVimScripts()
|
||||
echomsg s:msg
|
||||
" save the file
|
||||
if &mod
|
||||
wq
|
||||
else
|
||||
q
|
||||
silent! w!
|
||||
endif
|
||||
q
|
||||
|
||||
" restore events and current directory
|
||||
exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
|
||||
@@ -464,7 +537,6 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
" Restore Options: {{{1
|
||||
let &fo = s:keepfo
|
||||
let &cpo= s:keepcpo
|
||||
|
||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
||||
139
runtime/autoload/gnat.vim
Normal file
139
runtime/autoload/gnat.vim
Normal file
@@ -0,0 +1,139 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/GNAT compiler file
|
||||
" Language: Ada (GNAT)
|
||||
" $Id$
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 05.08.2006 MK Add session support
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: compiler-gnat
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
function gnat#Make () dict " {{{1
|
||||
let &l:makeprg = self.Get_Command('Make')
|
||||
let &l:errorformat = self.Error_Format
|
||||
wall
|
||||
make
|
||||
copen
|
||||
set wrap
|
||||
wincmd W
|
||||
endfunction gnat#Make " }}}1
|
||||
|
||||
function gnat#Pretty () dict " {{{1
|
||||
execute "!" . self.Get_Command('Pretty')
|
||||
endfunction gnat#Make " }}}1
|
||||
|
||||
function gnat#Find () dict " {{{1
|
||||
execute "!" . self.Get_Command('Find')
|
||||
endfunction gnat#Find " }}}1
|
||||
|
||||
function gnat#Tags () dict " {{{1
|
||||
execute "!" . self.Get_Command('Tags')
|
||||
edit tags
|
||||
call gnat#Insert_Tags_Header ()
|
||||
update
|
||||
quit
|
||||
endfunction gnat#Tags " }}}1
|
||||
|
||||
function gnat#Set_Project_File (...) dict " {{{1
|
||||
if a:0 > 0
|
||||
let self.Project_File = a:1
|
||||
|
||||
if ! filereadable (self.Project_File)
|
||||
let self.Project_File = findfile (
|
||||
\ fnamemodify (self.Project_File, ':r'),
|
||||
\ $ADA_PROJECT_PATH,
|
||||
\ 1)
|
||||
endif
|
||||
elseif strlen (self.Project_File) > 0
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File)
|
||||
elseif expand ("%:e") == 'gpr'
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e"))
|
||||
else
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr')
|
||||
endif
|
||||
|
||||
if strlen (v:this_session) > 0
|
||||
execute 'mksession! ' . v:this_session
|
||||
endif
|
||||
|
||||
if strlen (self.Project_File) > 0
|
||||
call ada#Switch_Session (
|
||||
\ expand('~') . "/vimfiles/session/" .
|
||||
\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
||||
else
|
||||
call ada#Switch_Session ('')
|
||||
endif
|
||||
|
||||
return
|
||||
endfunction gnat#Set_Project_File " }}}1
|
||||
|
||||
function gnat#Get_Command (Command) dict " {{{1
|
||||
let l:Command = eval ('self.' . a:Command . '_Command')
|
||||
return eval (l:Command)
|
||||
endfunction gnat#Get_Command " }}}1
|
||||
|
||||
function gnat#Set_Session (...) dict " {{{1
|
||||
if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr'
|
||||
call self.Set_Project_File (argv(0))
|
||||
elseif strlen (v:servername) > 0
|
||||
call self.Set_Project_File (v:servername . '.gpr')
|
||||
endif
|
||||
endfunction gnat#Set_Session " }}}1
|
||||
|
||||
function gnat#New () " {{{1
|
||||
let l:Retval = {
|
||||
\ 'Make' : function ('gnat#Make'),
|
||||
\ 'Pretty' : function ('gnat#Pretty'),
|
||||
\ 'Find' : function ('gnat#Find'),
|
||||
\ 'Tags' : function ('gnat#Tags'),
|
||||
\ 'Set_Project_File' : function ('gnat#Set_Project_File'),
|
||||
\ 'Set_Session' : function ('gnat#Set_Session'),
|
||||
\ 'Get_Command' : function ('gnat#Get_Command'),
|
||||
\ 'Project_File' : '',
|
||||
\ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "',
|
||||
\ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "',
|
||||
\ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "',
|
||||
\ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"',
|
||||
\ 'Error_Format' : '%f:%l:%c: %trror: %m,' .
|
||||
\ '%f:%l:%c: %tarning: %m,' .
|
||||
\ '%f:%l:%c: (%ttyle) %m'}
|
||||
|
||||
return l:Retval
|
||||
endfunction gnat#New " }}}1
|
||||
|
||||
function gnat#Insert_Tags_Header () " {{{1
|
||||
1insert
|
||||
!_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/
|
||||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
||||
!_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/
|
||||
!_TAG_PROGRAM_NAME gnatxref //
|
||||
!_TAG_PROGRAM_URL http://www.adacore.com /official site/
|
||||
!_TAG_PROGRAM_VERSION 5.05w //
|
||||
.
|
||||
return
|
||||
endfunction gnat#Insert_Tags_Header " }}}1
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Oct 03
|
||||
" Last Change: 2007 May 10
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -63,6 +63,12 @@ fun gzip#read(cmd)
|
||||
" set 'modifiable'
|
||||
let ma_save = &ma
|
||||
setlocal ma
|
||||
" Reset 'foldenable', otherwise line numbers get adjusted.
|
||||
if has("folding")
|
||||
let fen_save = &fen
|
||||
setlocal nofen
|
||||
endif
|
||||
|
||||
" when filtering the whole buffer, it will become empty
|
||||
let empty = line("'[") == 1 && line("']") == line("$")
|
||||
let tmp = tempname()
|
||||
@@ -74,42 +80,50 @@ fun gzip#read(cmd)
|
||||
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 _
|
||||
let ok = 0
|
||||
else
|
||||
'[,']d _
|
||||
endif
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
let ok = 1
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
'[,']d _
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
endif
|
||||
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
|
||||
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
|
||||
" Restore saved option values.
|
||||
let &pm = pm_save
|
||||
let &cpo = cpo_save
|
||||
let &l:ma = ma_save
|
||||
if has("folding")
|
||||
let &l:fen = fen_save
|
||||
endif
|
||||
|
||||
" When uncompressed the whole buffer, do autocommands
|
||||
if empty
|
||||
if ok && empty
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . expand("%:r")
|
||||
else
|
||||
@@ -177,7 +191,7 @@ endfun
|
||||
|
||||
fun s:escape(name)
|
||||
" shellescape() was added by patch 7.0.111
|
||||
if v:version > 700 || (v:version == 700 && has('patch111'))
|
||||
if exists("*shellescape")
|
||||
return shellescape(a:name)
|
||||
endif
|
||||
return "'" . a:name . "'"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: HTML and XHTML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2006 Oct 19
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
@@ -84,7 +84,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$' || i == curline
|
||||
@@ -448,6 +448,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let attrname = matchstr(attr, '.*\ze\s*=')
|
||||
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
|
||||
let values = []
|
||||
" Load data {{{
|
||||
if !exists("b:html_doctype")
|
||||
call htmlcomplete#CheckDoctype()
|
||||
endif
|
||||
if !exists("b:html_omni")
|
||||
"runtime! autoload/xml/xhtml10s.vim
|
||||
call htmlcomplete#LoadData()
|
||||
endif
|
||||
" }}}
|
||||
if attrname == 'href'
|
||||
" Now we are looking for local anchors defined by name or id
|
||||
if entered_value =~ '^#'
|
||||
@@ -604,21 +613,20 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if exists("uppercase_tag") && uppercase_tag == 1
|
||||
let context = tolower(context)
|
||||
endif
|
||||
" Handle XML keywords: DOCTYPE and CDATA.
|
||||
" Handle XML keywords: DOCTYPE
|
||||
if opentag == ''
|
||||
let tags += [
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">',
|
||||
\ '!CDATA'
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
|
||||
\ ]
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
" netrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 01, 2006
|
||||
" Version: 8
|
||||
" Date: May 30, 2006
|
||||
" Version: 9
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -22,16 +22,41 @@ if exists("g:loaded_netrwFileHandlers") || &cp
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
let g:loaded_netrwFileHandlers= "v8"
|
||||
let g:loaded_netrwFileHandlers= "v9"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#Invoke: {{{1
|
||||
fun! netrwFileHandlers#Invoke(exten,fname)
|
||||
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
|
||||
let fname= a:fname
|
||||
" list of supported special characters. Consider rcs,v --- that can be
|
||||
" supported with a NFH_rcsCOMMAv() handler
|
||||
if a:fname =~ '[@:,$!=\-+%?;~]'
|
||||
let specials= {
|
||||
\ '@' : 'AT',
|
||||
\ ':' : 'COLON',
|
||||
\ ',' : 'COMMA',
|
||||
\ '$' : 'DOLLAR',
|
||||
\ '!' : 'EXCLAMATION',
|
||||
\ '=' : 'EQUAL',
|
||||
\ '-' : 'MINUS',
|
||||
\ '+' : 'PLUS',
|
||||
\ '%' : 'PERCENT',
|
||||
\ '?' : 'QUESTION',
|
||||
\ ';' : 'SEMICOLON',
|
||||
\ '~' : 'TILDE'}
|
||||
let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
|
||||
" call Decho('fname<'.fname.'> done with dictionary')
|
||||
endif
|
||||
|
||||
if a:exten != "" && exists("*s:NFH_".a:exten)
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.a:fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
|
||||
if a:exten != "" && exists("*NFH_".a:exten)
|
||||
" support user NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= NFH_".a:exten.'("'.fname.'")'
|
||||
elseif a:exten != "" && exists("*s:NFH_".a:exten)
|
||||
" use builtin-NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
|
||||
@@ -48,10 +73,10 @@ fun! s:NFH_html(pagefile)
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla \"".page.'"'
|
||||
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
exe "!netscape ".g:netrw_shq..page.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_html 0")
|
||||
return 0
|
||||
@@ -71,10 +96,10 @@ fun! s:NFH_htm(pagefile)
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla \"".page.'"'
|
||||
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
exe "!netscape ".g:netrw_shq.page.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_htm 0")
|
||||
return 0
|
||||
@@ -90,10 +115,10 @@ fun! s:NFH_jpg(jpgfile)
|
||||
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:jpgfile
|
||||
exe "silent! !gimp -s ".g:netrw_shq.a:jpgfile.g:netrw_shq
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:jpgfile.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_jpg 0")
|
||||
return 0
|
||||
@@ -109,9 +134,9 @@ fun! s:NFH_gif(giffile)
|
||||
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:giffile
|
||||
exe "silent! !gimp -s ".g:netrw_shq.a:giffile.g:netrw_shq
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:giffile.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_gif 0")
|
||||
return 0
|
||||
@@ -127,9 +152,9 @@ fun! s:NFH_png(pngfile)
|
||||
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pngfile
|
||||
exe "silent! !gimp -s ".g:netrw_shq.a:pngfile.g:netrw_shq
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pngfile.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_png 0")
|
||||
return 0
|
||||
@@ -145,9 +170,9 @@ fun! s:NFH_pnm(pnmfile)
|
||||
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pnmfile
|
||||
exe "silent! !gimp -s ".g:netrw_shq.a:pnmfile.g:netrw_shq
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pnmfile.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_pnm 0")
|
||||
return 0
|
||||
@@ -165,7 +190,7 @@ fun! s:NFH_bmp(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.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:bmpfile.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_bmp 0")
|
||||
return 0
|
||||
@@ -180,7 +205,9 @@ endfun
|
||||
fun! s:NFH_pdf(pdf)
|
||||
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
||||
if executable("gs")
|
||||
exe 'silent! !gs "'.a:pdf.'"'
|
||||
exe 'silent! !gs '.g:netrw_shq.a:pdf.g:netrw_shq
|
||||
elseif executable("pdftotext")
|
||||
exe 'silent! pdftotext -nopgbrk '.g:netrw_shq.a:pdf.g:netrw_shq
|
||||
else
|
||||
" call Dret("s:NFH_pdf 0")
|
||||
return 0
|
||||
@@ -196,7 +223,7 @@ fun! s:NFH_doc(doc)
|
||||
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:doc.'"'
|
||||
exe 'silent! !oowriter '.g:netrw_shq.a:doc.g:netrw_shq
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_doc 0")
|
||||
@@ -213,7 +240,7 @@ fun! s:NFH_sxw(sxw)
|
||||
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:sxw.'"'
|
||||
exe 'silent! !oowriter '.g:netrw_shq.a:sxw.g:netrw_shq
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_sxw 0")
|
||||
@@ -230,7 +257,7 @@ fun! s:NFH_xls(xls)
|
||||
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
||||
|
||||
if executable("oocalc")
|
||||
exe 'silent! !oocalc "'.a:xls.'"'
|
||||
exe 'silent! !oocalc '.g:netrw_shq.a:xls.g:netrw_shq
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_xls 0")
|
||||
@@ -247,15 +274,15 @@ fun! s:NFH_ps(ps)
|
||||
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
||||
if executable("gs")
|
||||
" call Decho("exe silent! !gs ".a:ps)
|
||||
exe "silent! !gs ".a:ps
|
||||
exe "silent! !gs ".g:netrw_shq.a:ps.g:netrw_shq
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
" call Decho("exe silent! !ghostscript ".a:ps)
|
||||
exe "silent! !ghostscript ".a:ps
|
||||
exe "silent! !ghostscript ".g:netrw_shq.a:ps.g:netrw_shq
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
" call Decho("exe silent! !gswin32 \"".a:ps.'"')
|
||||
exe "silent! !gswin32 \"".a:ps.'"'
|
||||
" call Decho("exe silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq)
|
||||
exe "silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_ps 0")
|
||||
@@ -271,16 +298,16 @@ endfun
|
||||
fun! s:NFH_eps(eps)
|
||||
" call Dfunc("s:NFH_eps()")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".a:eps
|
||||
exe "silent! !gs ".g:netrw_shq.a:eps.g:netrw_shq
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".a:eps
|
||||
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".a:eps
|
||||
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
exe "silent! !gswin32 \"".a:eps.'"'
|
||||
exe "silent! !gswin32 ".g:netrw_shq.a:eps.g:netrw_shq
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_eps 0")
|
||||
@@ -325,4 +352,4 @@ endfun
|
||||
let &cpo= s:keepcpo
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: ts=4 fdm=marker
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Mar 22, 2006
|
||||
" Date: Mar 26, 2007
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 6
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
" Version: 9
|
||||
" Copyright: Copyright (C) 1999-2007 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,
|
||||
@@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v6"
|
||||
let g:loaded_netrwSettings = "v9"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwSettings: {{{1
|
||||
@@ -39,8 +39,8 @@ fun! netrwSettings#NetrwSettings()
|
||||
|
||||
" 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
|
||||
if !exists("g:netrw_liststyle")
|
||||
let g:netrw_liststyle= 0
|
||||
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
|
||||
endif
|
||||
if !exists("g:netrw_silent")
|
||||
@@ -81,9 +81,15 @@ fun! netrwSettings#NetrwSettings()
|
||||
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_sshport = '.g:netrw_sshport
|
||||
let shqline= line("$")
|
||||
put = 'let g:netrw_shq...'
|
||||
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 Messages'
|
||||
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
|
||||
|
||||
put = ''
|
||||
put ='+ Netrw Browser Control'
|
||||
@@ -99,14 +105,17 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
|
||||
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
||||
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
||||
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
|
||||
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_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_liststyle = '.g:netrw_liststyle
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
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
|
||||
@@ -117,11 +126,14 @@ fun! netrwSettings#NetrwSettings()
|
||||
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_scpport = '.g:netrw_scpport
|
||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
|
||||
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
|
||||
put = 'let g:netrw_winsize = '.g:netrw_winsize
|
||||
|
||||
put =''
|
||||
put ='+ For help, place cursor on line and press ?'
|
||||
put ='+ For help, place cursor on line and press <F1>'
|
||||
|
||||
1d
|
||||
silent %s/^+/"/e
|
||||
@@ -130,9 +142,18 @@ fun! netrwSettings#NetrwSettings()
|
||||
silent %s/= $/= ''/e
|
||||
1
|
||||
|
||||
" Put in shq setting.
|
||||
" (deferred so as to avoid the quote manipulation just preceding)
|
||||
if g:netrw_shq == "'"
|
||||
call setline(shqline,'let g:netrw_shq = "'.g:netrw_shq.'"')
|
||||
else
|
||||
call setline(shqline,"let g:netrw_shq = '".g:netrw_shq."'")
|
||||
endif
|
||||
|
||||
set nomod
|
||||
|
||||
map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
|
||||
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
|
||||
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
|
||||
let tmpfile= tempname()
|
||||
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
|
||||
endfun
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: PHP
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2006 May 9
|
||||
"
|
||||
" TODO:
|
||||
" - Class aware completion:
|
||||
@@ -74,7 +74,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'class\s\+')
|
||||
let int_classes = {}
|
||||
@@ -85,33 +85,43 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Prepare list of functions from tags file
|
||||
" Prepare list of classes from tags file
|
||||
let ext_classes = {}
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" [:space:] thing: we don't have to be so strict when
|
||||
" dealing with tags files - entries there were already
|
||||
" checked by ctags.
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_classes[item] = ''
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" [:space:] thing: we don't have to be so strict when
|
||||
" dealing with tags files - entries there were already
|
||||
" checked by ctags.
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_classes[item] = ''
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" Prepare list of built in classes from g:php_builtin_functions
|
||||
if !exists("g:php_omni_bi_classes")
|
||||
let g:php_omni_bi_classes = {}
|
||||
for i in keys(g:php_builtin_object_functions)
|
||||
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
|
||||
endfor
|
||||
endif
|
||||
|
||||
call extend(int_classes, ext_classes)
|
||||
let classes = sort(keys(int_classes))
|
||||
let classes += sort(keys(ext_classes))
|
||||
let classes += sort(keys(g:php_omni_bi_classes))
|
||||
|
||||
for m in sort(keys(int_classes))
|
||||
for m in classes
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
let int_list = res
|
||||
|
||||
let final_menu = []
|
||||
for i in int_list
|
||||
for i in res
|
||||
let final_menu += [{'word':i, 'kind':'c'}]
|
||||
endfor
|
||||
|
||||
@@ -138,6 +148,19 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let classlocation = ''
|
||||
endif
|
||||
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT'
|
||||
|
||||
for object in keys(g:php_builtin_object_functions)
|
||||
if object =~ '^'.classname
|
||||
let res += [{'word':substitute(object, '.*::', '', ''),
|
||||
\ 'info': g:php_builtin_object_functions[object]}]
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
@@ -154,7 +177,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
" Functions declared with public keyword or without any
|
||||
" keyword are public
|
||||
let functions = filter(deepcopy(sccontent),
|
||||
\ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"')
|
||||
\ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"')
|
||||
let jfuncs = join(functions, ' ')
|
||||
let sfuncs = split(jfuncs, 'function\s\+')
|
||||
let c_functions = {}
|
||||
@@ -185,7 +208,6 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let all_values = {}
|
||||
call extend(all_values, c_functions)
|
||||
call extend(all_values, c_variables)
|
||||
call extend(all_values, g:php_builtin_object_functions)
|
||||
|
||||
for m in sort(keys(all_values))
|
||||
if m =~ '^'.a:base && m !~ '::'
|
||||
@@ -244,23 +266,25 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
|
||||
" ctags has good support for PHP, use tags file for external
|
||||
" variables
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_vars = {}
|
||||
if fnames != ''
|
||||
let sbase = substitute(a:base, '^\$', '', '')
|
||||
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
" Add -> if it is possible object declaration
|
||||
let classname = ''
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let classname = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[adddollar.item] = classname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
" Add -> if it is possible object declaration
|
||||
let classname = ''
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let classname = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[adddollar.item] = classname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" Now we have all variables in int_vars dictionary
|
||||
@@ -270,7 +294,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'function\s\+')
|
||||
let int_functions = {}
|
||||
@@ -287,14 +311,16 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
let all_values = {}
|
||||
@@ -375,23 +401,25 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
call extend(int_vars,g:php_builtin_vars)
|
||||
|
||||
" ctags has support for PHP, use tags file for external variables
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_vars = {}
|
||||
if fnames != ''
|
||||
let sbase = substitute(a:base, '^\$', '', '')
|
||||
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let m_menu = ''
|
||||
" Add -> if it is possible object declaration
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let m_menu = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[item] = m_menu
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let m_menu = ''
|
||||
" Add -> if it is possible object declaration
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let m_menu = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[item] = m_menu
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
call extend(int_vars, ext_vars)
|
||||
@@ -433,7 +461,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'function\s\+')
|
||||
let int_functions = {}
|
||||
@@ -450,14 +478,16 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" All functions
|
||||
@@ -480,15 +510,17 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
endfor
|
||||
|
||||
" Prepare list of constants from tags file
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_constants = {}
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_constants[item] = ''
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_constants[item] = ''
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" All constants
|
||||
@@ -558,7 +590,7 @@ function! phpcomplete#GetClassName(scontext) " {{{
|
||||
endwhile
|
||||
|
||||
" OK, first way failed, now check tags file(s)
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
if len(qflist) == 0
|
||||
@@ -573,6 +605,17 @@ function! phpcomplete#GetClassName(scontext) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
function! phpcomplete#GetClassLocation(classname) " {{{
|
||||
" Check classname may be name of built in object
|
||||
if !exists("g:php_omni_bi_classes")
|
||||
let g:php_omni_bi_classes = {}
|
||||
for i in keys(g:php_builtin_object_functions)
|
||||
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
|
||||
endfor
|
||||
endif
|
||||
if has_key(g:php_omni_bi_classes, a:classname)
|
||||
return 'VIMPHP_BUILTINOBJECT'
|
||||
endif
|
||||
|
||||
" Get class location
|
||||
for fname in tagfiles()
|
||||
let fhead = fnamemodify(fname, ":h")
|
||||
@@ -583,8 +626,12 @@ function! phpcomplete#GetClassLocation(classname) " {{{
|
||||
let fname = escape(fname, " \\")
|
||||
exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname
|
||||
let qflist = getqflist()
|
||||
" As in GetClassName we can manage only one element
|
||||
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
|
||||
" As in GetClassName we can manage only one element if it exists
|
||||
if len(qflist) > 0
|
||||
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
" And only one class location
|
||||
if classlocation != ''
|
||||
let classlocation = fhead.classlocation
|
||||
@@ -614,6 +661,7 @@ function! phpcomplete#GetClassContents(file, name) " {{{
|
||||
else
|
||||
let extends_class = ''
|
||||
endif
|
||||
call search('{')
|
||||
normal! %
|
||||
let classc = getline(cfline, ".")
|
||||
let classcontent = join(classc, "\n")
|
||||
|
||||
@@ -1,16 +1,34 @@
|
||||
"pythoncomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.5
|
||||
" Last Updated: 19 April 2006
|
||||
"
|
||||
" Yeah, I skipped a version number - 0.4 was never public.
|
||||
" It was a bugfix version on top of 0.3. This is a complete
|
||||
" rewrite.
|
||||
" Version: 0.7
|
||||
" Last Updated: 19 Oct 2006
|
||||
"
|
||||
" Changes
|
||||
" TODO:
|
||||
" User defined docstrings aren't handled right...
|
||||
" 'info' item output can use some formatting work
|
||||
" Add an "unsafe eval" mode, to allow for return type evaluation
|
||||
" Complete basic syntax along with import statements
|
||||
" i.e. "import url<c-x,c-o>"
|
||||
" Continue parsing on invalid line??
|
||||
"
|
||||
" v 0.7
|
||||
" * Fixed function list sorting (_ and __ at the bottom)
|
||||
" * Removed newline removal from docs. It appears vim handles these better in
|
||||
" recent patches
|
||||
"
|
||||
" v 0.6:
|
||||
" * Fixed argument completion
|
||||
" * Removed the 'kind' completions, as they are better indicated
|
||||
" with real syntax
|
||||
" * Added tuple assignment parsing (whoops, that was forgotten)
|
||||
" * Fixed import handling when flattening scope
|
||||
"
|
||||
" v 0.5:
|
||||
" Yeah, I skipped a version number - 0.4 was never public.
|
||||
" It was a bugfix version on top of 0.3. This is a complete
|
||||
" rewrite.
|
||||
"
|
||||
|
||||
if !has('python')
|
||||
echo "Error: Required vim compiled with +python"
|
||||
@@ -28,7 +46,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
if c =~ '\w'
|
||||
continue
|
||||
elseif ! c =~ '\.'
|
||||
idx = -1
|
||||
let idx = -1
|
||||
break
|
||||
else
|
||||
break
|
||||
@@ -45,7 +63,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
while idx > 0
|
||||
let idx -= 1
|
||||
let c = line[idx]
|
||||
if c =~ '\w' || c =~ '\.'
|
||||
if c =~ '\w' || c =~ '\.' || c == '('
|
||||
let cword = c . cword
|
||||
continue
|
||||
elseif strlen(cword) > 0 || idx == 0
|
||||
@@ -73,7 +91,24 @@ def vimcomplete(context,match):
|
||||
try:
|
||||
import vim
|
||||
def complsort(x,y):
|
||||
return x['abbr'] > y['abbr']
|
||||
try:
|
||||
xa = x['abbr']
|
||||
ya = y['abbr']
|
||||
if xa[0] == '_':
|
||||
if xa[1] == '_' and ya[0:2] == '__':
|
||||
return xa > ya
|
||||
elif ya[0:2] == '__':
|
||||
return -1
|
||||
elif y[0] == '_':
|
||||
return xa > ya
|
||||
else:
|
||||
return 1
|
||||
elif ya[0] == '_':
|
||||
return -1
|
||||
else:
|
||||
return xa > ya
|
||||
except:
|
||||
return 0
|
||||
cmpl = Completer()
|
||||
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
|
||||
all = cmpl.get_completions(context,match)
|
||||
@@ -86,7 +121,7 @@ def vimcomplete(context,match):
|
||||
dictstr += '"icase":0},'
|
||||
if dictstr[-1] == ',': dictstr = dictstr[:-1]
|
||||
dictstr += ']'
|
||||
dbg("dict: %s" % dictstr)
|
||||
#dbg("dict: %s" % dictstr)
|
||||
vim.command("silent let g:pythoncomplete_completions = %s" % dictstr)
|
||||
#dbg("Completion dict:\n%s" % all)
|
||||
except vim.error:
|
||||
@@ -108,11 +143,7 @@ class Completer(object):
|
||||
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
|
||||
|
||||
def _cleanstr(self,doc):
|
||||
return doc.replace('"',' ')\
|
||||
.replace("'",' ')\
|
||||
.replace('\n',' ')\
|
||||
.replace('\r',' ')\
|
||||
.replace('
|
||||
return doc.replace('"',' ').replace("'",' ')
|
||||
|
||||
def get_arguments(self,func_obj):
|
||||
def _ctor(obj):
|
||||
@@ -128,23 +159,23 @@ class Completer(object):
|
||||
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
|
||||
else: arg_offset = 0
|
||||
|
||||
|
||||
arg_text=''
|
||||
if type(func_obj) in [types.FunctionType, types.LambdaType]:
|
||||
try:
|
||||
cd = func_obj.func_code
|
||||
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||
defaults = func_obj.func_defaults or []
|
||||
defaults = func_obj.func_defaults or ''
|
||||
defaults = map(lambda name: "=%s" % name, defaults)
|
||||
defaults = [""] * (len(real_args)-len(defaults)) + defaults
|
||||
items = map(lambda a,d: a+d, real_args, defaults)
|
||||
if func_obj.func_code.co_flags & 0x4:
|
||||
items.append("...")
|
||||
if func_obj.func_code.co_flags & 0x8:
|
||||
items.append("***")
|
||||
items.append("***")
|
||||
arg_text = (','.join(items)) + ')'
|
||||
|
||||
except:
|
||||
except:
|
||||
dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
|
||||
pass
|
||||
if len(arg_text) == 0:
|
||||
# The doc string sometimes contains the function signature
|
||||
@@ -160,6 +191,7 @@ class Completer(object):
|
||||
ridx = sigline.find(')')
|
||||
if lidx > 0 and ridx > 0:
|
||||
arg_text = sigline[lidx+1:ridx] + ')'
|
||||
if len(arg_text) == 0: arg_text = ')'
|
||||
return arg_text
|
||||
|
||||
def get_completions(self,context,match):
|
||||
@@ -172,12 +204,11 @@ class Completer(object):
|
||||
all = {}
|
||||
ridx = stmt.rfind('.')
|
||||
if len(stmt) > 0 and stmt[-1] == '(':
|
||||
if len(stmt) > 0 and stmt[-1] == '(':
|
||||
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
||||
doc = result.__doc__
|
||||
if doc == None: doc = ''
|
||||
if doc == None: doc = ''
|
||||
args = self.get_arguments(res)
|
||||
args = self.get_arguments(result)
|
||||
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
|
||||
elif ridx == -1:
|
||||
match = stmt
|
||||
all = self.compldict
|
||||
@@ -206,22 +237,18 @@ class Completer(object):
|
||||
if doc == None or doc == '': doc = maindoc
|
||||
|
||||
wrd = m[len(match):]
|
||||
wrd = m[len(match):]
|
||||
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
|
||||
if "function" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
elif "method" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
elif "module" in typestr:
|
||||
c['word'] += '.'
|
||||
c['word'] += '.'
|
||||
elif "class" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '('
|
||||
c['abbr'] += '('
|
||||
completions.append(c)
|
||||
except:
|
||||
i = sys.exc_info()
|
||||
@@ -277,10 +304,13 @@ class Scope(object):
|
||||
# we need to start with this, to fix up broken completions
|
||||
# hopefully this name is unique enough...
|
||||
str = '"""'+self.docstr+'"""\n'
|
||||
for l in self.locals:
|
||||
if l.startswith('import'): str += l+'\n'
|
||||
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
|
||||
for sub in self.subscopes:
|
||||
str += sub.get_code()
|
||||
str += sub.get_code()
|
||||
for l in self.locals:
|
||||
if not l.startswith('import'): str += l+'\n'
|
||||
|
||||
return str
|
||||
|
||||
@@ -420,6 +450,8 @@ class PyParser:
|
||||
tokentype, token, indent = self.next()
|
||||
if tokentype == tokenize.STRING or token == 'str':
|
||||
return '""'
|
||||
elif token == '(' or token == 'tuple':
|
||||
return '()'
|
||||
elif token == '[' or token == 'list':
|
||||
return '[]'
|
||||
elif token == '{' or token == 'dict':
|
||||
@@ -494,9 +526,9 @@ class PyParser:
|
||||
freshscope=True
|
||||
while True:
|
||||
tokentype, token, indent = self.next()
|
||||
tokentype, token, indent = self.next()
|
||||
#dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
|
||||
|
||||
|
||||
if tokentype == DEDENT or token == "pass":
|
||||
self.scope = self.scope.pop(indent)
|
||||
elif token == 'def':
|
||||
func = self._parsefunction(indent)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Aug 29
|
||||
" Last Change: 2007 May 08
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
|
||||
@@ -58,19 +58,40 @@ function! spellfile#LoadFile(lang)
|
||||
let fname = a:lang . '.' . enc . '.spl'
|
||||
|
||||
" Split the window, read the file into a new buffer.
|
||||
" Remember the buffer number, we check it below.
|
||||
new
|
||||
let newbufnr = winbufnr(0)
|
||||
setlocal bin
|
||||
echo 'Downloading ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMspell'
|
||||
" Didn't work, perhaps there is an ASCII one.
|
||||
g/^/d
|
||||
" Careful: Nread() may have opened a new window for the error message,
|
||||
" we need to go back to our own buffer and window.
|
||||
if newbufnr != winbufnr(0)
|
||||
let winnr = bufwinnr(newbufnr)
|
||||
if winnr == -1
|
||||
" Our buffer has vanished!? Open a new window.
|
||||
echomsg "download buffer disappeared, opening a new one"
|
||||
new
|
||||
setlocal bin
|
||||
else
|
||||
exe winnr . "wincmd w"
|
||||
endif
|
||||
endif
|
||||
if newbufnr == winbufnr(0)
|
||||
" We are back the old buffer, remove any (half-finished) download.
|
||||
g/^/d
|
||||
else
|
||||
let newbufnr = winbufnr(0)
|
||||
endif
|
||||
|
||||
let fname = a:lang . '.ascii.spl'
|
||||
echo 'Could not find it, trying ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMspell'
|
||||
echo 'Sorry, downloading failed'
|
||||
bwipe!
|
||||
exe newbufnr . "bwipe!"
|
||||
return
|
||||
endif
|
||||
endif
|
||||
@@ -96,22 +117,40 @@ function! spellfile#LoadFile(lang)
|
||||
let fname = substitute(fname, '\.spl$', '.sug', '')
|
||||
echo 'Downloading ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMsug'
|
||||
echo 'Sorry, downloading failed'
|
||||
else
|
||||
if getline(2) =~ 'VIMsug'
|
||||
1d
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
set nomod
|
||||
else
|
||||
echo 'Sorry, downloading failed'
|
||||
" Go back to our own buffer/window, Nread() may have taken us to
|
||||
" another window.
|
||||
if newbufnr != winbufnr(0)
|
||||
let winnr = bufwinnr(newbufnr)
|
||||
if winnr != -1
|
||||
exe winnr . "wincmd w"
|
||||
endif
|
||||
endif
|
||||
if newbufnr == winbufnr(0)
|
||||
set nomod
|
||||
endif
|
||||
endif
|
||||
set nomod
|
||||
endif
|
||||
endif
|
||||
|
||||
bwipe
|
||||
" Wipe out the buffer we used.
|
||||
exe newbufnr . "bwipe"
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Read "fname" from the server.
|
||||
function! spellfile#Nread(fname)
|
||||
" We do our own error handling, don't want a window for it.
|
||||
if exists("g:netrw_use_errorwindow")
|
||||
let save_ew = g:netrw_use_errorwindow
|
||||
endif
|
||||
let g:netrw_use_errorwindow=0
|
||||
|
||||
if g:spellfile_URL =~ '^ftp://'
|
||||
" for an ftp server use a default login and password to avoid a prompt
|
||||
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
|
||||
@@ -120,4 +159,10 @@ function! spellfile#Nread(fname)
|
||||
else
|
||||
exe 'Nread ' g:spellfile_URL . '/' . a:fname
|
||||
endif
|
||||
|
||||
if exists("save_ew")
|
||||
let g:netrw_use_errorwindow = save_ew
|
||||
else
|
||||
unlet g:netrw_use_errorwindow
|
||||
endif
|
||||
endfunc
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim OMNI completion script for SQL
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 4.0
|
||||
" Last Change: Wed Apr 26 2006 3:00:06 PM
|
||||
" Version: 5.0
|
||||
" Last Change: Mon Jun 05 2006 3:30:04 PM
|
||||
" Usage: For detailed help
|
||||
" ":help sql.txt"
|
||||
" or ":help ft-sql-omni"
|
||||
@@ -22,7 +22,7 @@ endif
|
||||
if exists('g:loaded_sql_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_sql_completion = 40
|
||||
let g:loaded_sql_completion = 50
|
||||
|
||||
" Maintains filename of dictionary
|
||||
let s:sql_file_table = ""
|
||||
@@ -113,7 +113,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" If lastword has already been set for column completion
|
||||
" break from the loop, since we do not also want to pickup
|
||||
" a table name if it was also supplied.
|
||||
if lastword != -1 && compl_type == 'column'
|
||||
if lastword != -1 && compl_type == 'column'
|
||||
break
|
||||
endif
|
||||
" If column completion was specified stop at the "." if
|
||||
@@ -176,11 +176,19 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
return []
|
||||
endif
|
||||
|
||||
if s:sql_file_{compl_type} == ""
|
||||
let compl_type = substitute(compl_type, '\w\+', '\u&', '')
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
|
||||
" Allow the user to override the dbext plugin to specify whether
|
||||
" the owner/creator should be included in the list
|
||||
let saved_dbext_show_owner = 1
|
||||
if exists('g:dbext_default_dict_show_owner')
|
||||
let saved_dbext_show_owner = g:dbext_default_dict_show_owner
|
||||
endif
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
|
||||
let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
|
||||
|
||||
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
|
||||
if s:sql_file_{compl_type} == ""
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||
endif
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||
if s:sql_file_{compl_type} != ""
|
||||
if filereadable(s:sql_file_{compl_type})
|
||||
let compl_list = readfile(s:sql_file_{compl_type})
|
||||
@@ -194,7 +202,9 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" endif
|
||||
endif
|
||||
endif
|
||||
elseif compl_type == 'column'
|
||||
|
||||
let g:dbext_default_dict_show_owner = saved_dbext_show_owner
|
||||
elseif compl_type =~? 'column'
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
if s:SQLCCheck4dbext() == -1
|
||||
@@ -209,33 +219,88 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
let base = s:save_prev_table
|
||||
endif
|
||||
|
||||
if base != ""
|
||||
let compl_list = s:SQLCGetColumns(base, '')
|
||||
let owner = ''
|
||||
let column = ''
|
||||
|
||||
if base =~ '\.'
|
||||
" Check if the owner/creator has been specified
|
||||
let owner = matchstr( base, '^\zs.*\ze\..*\..*' )
|
||||
let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
|
||||
let column = matchstr( base, '.*\.\zs.*' )
|
||||
|
||||
" It is pretty well impossible to determine if the user
|
||||
" has entered:
|
||||
" owner.table
|
||||
" table.column_prefix
|
||||
" So there are a couple of things we can do to mitigate
|
||||
" this issue.
|
||||
" 1. Check if the dbext plugin has the option turned
|
||||
" on to even allow owners
|
||||
" 2. Based on 1, if the user is showing a table list
|
||||
" and the DrillIntoTable (using <C-Right>) then
|
||||
" this will be owner.table. In this case, we can
|
||||
" check to see the table.column exists in the
|
||||
" cached table list. If it does, then we have
|
||||
" determined the user has actually chosen
|
||||
" owner.table, not table.column_prefix.
|
||||
let found = -1
|
||||
if g:omni_sql_include_owner == 1 && owner == ''
|
||||
if filereadable(s:sql_file_table)
|
||||
let tbl_list = readfile(s:sql_file_table)
|
||||
let found = index( tbl_list, ((table != '')?(table.'.'):'').column)
|
||||
endif
|
||||
endif
|
||||
" If the table.column was found in the table list, we can safely assume
|
||||
" the owner was not provided and shift the items appropriately.
|
||||
" OR
|
||||
" If the user has indicated not to use table owners at all and
|
||||
" the base ends in a '.' we know they are not providing a column
|
||||
" name, so we can shift the items appropriately.
|
||||
if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
|
||||
let owner = table
|
||||
let table = column
|
||||
let column = ''
|
||||
endif
|
||||
else
|
||||
let table = base
|
||||
endif
|
||||
|
||||
" Get anything after the . and consider this the table name
|
||||
" If an owner has been specified, then we must consider the
|
||||
" base to be a partial column name
|
||||
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
|
||||
|
||||
if table != ""
|
||||
let s:save_prev_table = base
|
||||
let base = ''
|
||||
endif
|
||||
elseif compl_type == 'column_csv'
|
||||
let list_type = ''
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
if s:SQLCCheck4dbext() == -1
|
||||
return []
|
||||
endif
|
||||
if compl_type == 'column_csv'
|
||||
" Return one array element, with a comma separated
|
||||
" list of values instead of multiple array entries
|
||||
" for each column in the table.
|
||||
let list_type = 'csv'
|
||||
endif
|
||||
|
||||
if base == ""
|
||||
" The last time we displayed a column list we stored
|
||||
" the table name. If the user selects a column list
|
||||
" without a table name of alias present, assume they want
|
||||
" the previous column list displayed.
|
||||
let base = s:save_prev_table
|
||||
endif
|
||||
let compl_list = s:SQLCGetColumns(table, list_type)
|
||||
if column != ''
|
||||
" If no column prefix has been provided and the table
|
||||
" name was provided, append it to each of the items
|
||||
" returned.
|
||||
let compl_list = map(compl_list, "table.'.'.v:val")
|
||||
if owner != ''
|
||||
" If an owner has been provided append it to each of the
|
||||
" items returned.
|
||||
let compl_list = map(compl_list, "owner.'.'.v:val")
|
||||
endif
|
||||
else
|
||||
let base = ''
|
||||
endif
|
||||
|
||||
if base != ""
|
||||
let compl_list = s:SQLCGetColumns(base, 'csv')
|
||||
let s:save_prev_table = base
|
||||
" Join the column array into 1 single element array
|
||||
" but make the columns column separated
|
||||
let compl_list = [join(compl_list, ', ')]
|
||||
let base = ''
|
||||
if compl_type == 'column_csv'
|
||||
" Join the column array into 1 single element array
|
||||
" but make the columns column separated
|
||||
let compl_list = [join(compl_list, ', ')]
|
||||
endif
|
||||
endif
|
||||
elseif compl_type == 'resetCache'
|
||||
" Reset all cached items
|
||||
@@ -256,7 +321,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
if base != ''
|
||||
" Filter the list based on the first few characters the user
|
||||
" entered
|
||||
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "^'.base.'"'
|
||||
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
|
||||
let compl_list = filter(deepcopy(compl_list), expr)
|
||||
endif
|
||||
|
||||
@@ -274,6 +339,8 @@ function! sqlcomplete#PreCacheSyntax(...)
|
||||
else
|
||||
let syn_group_arr = g:omni_sql_precache_syntax_groups
|
||||
endif
|
||||
" For each group specified in the list, precache all
|
||||
" the sytnax items.
|
||||
if !empty(syn_group_arr)
|
||||
for group_name in syn_group_arr
|
||||
call s:SQLCGetSyntaxList(group_name)
|
||||
@@ -444,9 +511,23 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
|
||||
return cols
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetObjectOwner(object)
|
||||
" The owner regex matches a word at the start of the string which is
|
||||
" followed by a dot, but doesn't include the dot in the result.
|
||||
" ^ - from beginning of line
|
||||
" "\? - ignore any quotes
|
||||
" \zs - start the match now
|
||||
" \w\+ - get owner name
|
||||
" \ze - end the match
|
||||
" "\? - ignore any quotes
|
||||
" \. - must by followed by a .
|
||||
let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
|
||||
return owner
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetColumns(table_name, list_type)
|
||||
let table_name = matchstr(a:table_name, '^\w\+')
|
||||
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_.]\+')
|
||||
" Check if the table name was provided as part of the column name
|
||||
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
|
||||
let table_cols = []
|
||||
let table_alias = ''
|
||||
let move_to_top = 1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 2.0
|
||||
" Last Change: Fri May 05 2006 10:34:57 PM
|
||||
" Version: 3.0
|
||||
" Last Change: Wed Nov 08 2006 10:46:46 AM
|
||||
" Usage: For detailed help, ":help ft-syntax-omni"
|
||||
|
||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||
@@ -19,13 +19,31 @@ endif
|
||||
if exists('g:loaded_syntax_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntax_completion = 20
|
||||
let g:loaded_syntax_completion = 30
|
||||
|
||||
" Set ignorecase to the ftplugin standard
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_ignorecase')
|
||||
let g:omni_syntax_ignorecase = &ignorecase
|
||||
endif
|
||||
|
||||
" Indicates whether we should use the iskeyword option to determine
|
||||
" how to split words.
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_use_iskeyword')
|
||||
let g:omni_syntax_use_iskeyword = 1
|
||||
endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length.
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_minimum_length')
|
||||
let g:omni_syntax_minimum_length = 0
|
||||
endif
|
||||
|
||||
" This script will build a completion list based on the syntax
|
||||
" elements defined by the files in $VIMRUNTIME/syntax.
|
||||
let s:syn_remove_words = 'match,matchgroup=,contains,'.
|
||||
@@ -38,21 +56,28 @@ let s:prepended = ''
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_ignorecase')
|
||||
if exists('g:omni_syntax_ignorecase')
|
||||
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
|
||||
else
|
||||
let b:omni_syntax_ignorecase = &ignorecase
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:findstart
|
||||
" Locate the start of the item, including "."
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let lastword = -1
|
||||
while start > 0
|
||||
if line[start - 1] =~ '\w'
|
||||
" if line[start - 1] =~ '\S'
|
||||
" let start -= 1
|
||||
" elseif line[start - 1] =~ '\.'
|
||||
if line[start - 1] =~ '\k'
|
||||
let start -= 1
|
||||
elseif line[start - 1] =~ '\.'
|
||||
" The user must be specifying a column name
|
||||
if lastword == -1
|
||||
let lastword = start
|
||||
endif
|
||||
let start -= 1
|
||||
let b:sql_compl_type = 'column'
|
||||
let lastword = a:findstart
|
||||
else
|
||||
break
|
||||
endif
|
||||
@@ -64,11 +89,12 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
let s:prepended = ''
|
||||
return start
|
||||
endif
|
||||
let s:prepended = strpart(line, start, lastword - start)
|
||||
return lastword
|
||||
let s:prepended = strpart(line, start, (col('.') - 1) - start)
|
||||
return start
|
||||
endif
|
||||
|
||||
let base = s:prepended . a:base
|
||||
" let base = s:prepended . a:base
|
||||
let base = s:prepended
|
||||
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
|
||||
@@ -82,11 +108,16 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
" Return list of matches.
|
||||
|
||||
if base =~ '\w'
|
||||
let compstr = join(compl_list, ' ')
|
||||
let expr = (g:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
let compstr = substitute(compstr, expr, '', 'g')
|
||||
let compl_list = split(compstr, '\s\+')
|
||||
if base != ''
|
||||
" let compstr = join(compl_list, ' ')
|
||||
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
" let compstr = substitute(compstr, expr, '', 'g')
|
||||
" let compl_list = split(compstr, '\s\+')
|
||||
|
||||
" Filter the list based on the first few characters the user
|
||||
" entered
|
||||
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
|
||||
let compl_list = filter(deepcopy(compl_list), expr)
|
||||
endif
|
||||
|
||||
return compl_list
|
||||
@@ -100,6 +131,26 @@ function! OmniSyntaxList()
|
||||
" let use_dictionary = a:1
|
||||
" endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_use_iskeyword')
|
||||
if exists('g:omni_syntax_use_iskeyword')
|
||||
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
|
||||
else
|
||||
let b:omni_syntax_use_iskeyword = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_minimum_length')
|
||||
if exists('g:omni_syntax_minimum_length')
|
||||
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
|
||||
else
|
||||
let b:omni_syntax_minimum_length = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
let saveL = @l
|
||||
|
||||
" Loop through all the syntax groupnames, and build a
|
||||
@@ -294,14 +345,32 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
\ , "", 'g'
|
||||
\ )
|
||||
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
if b:omni_syntax_use_iskeyword == 0
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
else
|
||||
let accept_chars = ','.&iskeyword.','
|
||||
" Remove all character ranges
|
||||
let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
|
||||
" Remove all numeric specifications
|
||||
let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
|
||||
" Remove all commas
|
||||
let accept_chars = substitute(accept_chars, ',', '', 'g')
|
||||
" Escape special regex characters
|
||||
let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
|
||||
" Remove all characters that are not acceptable
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' )
|
||||
endif
|
||||
|
||||
if b:omni_syntax_minimum_length > 0
|
||||
" If the user specified a minimum length, enforce it
|
||||
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
|
||||
endif
|
||||
else
|
||||
let syn_list = ''
|
||||
endif
|
||||
|
||||
return syn_list
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: May 02, 2006
|
||||
" Version: 9
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Date: Sep 29, 2006
|
||||
" Version: 11
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
" Contains many ideas from Michael Toren's <tar.vim>
|
||||
@@ -18,13 +18,13 @@
|
||||
" of this software.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" Load Once: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if exists("g:loaded_tar")
|
||||
if &cp || exists("g:loaded_tar") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v9"
|
||||
let g:loaded_tar= "v11"
|
||||
"call Decho("loading autoload/tar.vim")
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -41,6 +41,13 @@ endif
|
||||
if !exists("g:tar_writeoptions")
|
||||
let g:tar_writeoptions= "uf"
|
||||
endif
|
||||
if !exists("g:tar_shq")
|
||||
if has("unix")
|
||||
let g:tar_shq= "'"
|
||||
else
|
||||
let g:tar_shq= '"'
|
||||
endif
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -55,8 +62,9 @@ fun! tar#Browse(tarfile)
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse")
|
||||
return
|
||||
@@ -65,8 +73,9 @@ fun! tar#Browse(tarfile)
|
||||
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
|
||||
if a:tarfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
|
||||
@@ -99,30 +108,26 @@ fun! tar#Browse(tarfile)
|
||||
endif
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
|
||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
|
||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'")
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'"
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
silent %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".a:tarfile
|
||||
let &ei= eikeep
|
||||
1d
|
||||
return
|
||||
endif
|
||||
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~? '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
silent %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
@@ -190,14 +195,14 @@ fun! tar#Read(fname,mode)
|
||||
" call Decho("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."'"
|
||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
|
||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'")
|
||||
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
|
||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
|
||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
||||
else
|
||||
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." '".tarfile."' '".fname."'"
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
|
||||
endif
|
||||
let w:tarfile= a:fname
|
||||
exe "file tarfile:".fname
|
||||
@@ -219,15 +224,17 @@ fun! tar#Write(fname)
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
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 inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
@@ -246,8 +253,9 @@ fun! tar#Write(fname)
|
||||
try
|
||||
exe "cd ".escape(tmpdir,' \')
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
@@ -282,8 +290,9 @@ fun! tar#Write(fname)
|
||||
endif
|
||||
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
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()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
else
|
||||
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
@@ -309,16 +318,18 @@ fun! tar#Write(fname)
|
||||
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
|
||||
call system("tar --delete -f '".tarfile."' '".fname."'")
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
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()
|
||||
" 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
|
||||
redraw!
|
||||
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()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
elseif exists("compress")
|
||||
" call Decho("call system(".compress.")")
|
||||
call system(compress)
|
||||
@@ -376,4 +387,4 @@ endfun
|
||||
" Modelines And Restoration: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim:ts=8 fdm=marker
|
||||
" vim:ts=8 fdm=marker
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" vimball : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 01, 2006
|
||||
" Version: 13
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 07, 2007
|
||||
" Version: 22
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
@@ -11,18 +11,26 @@
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
if &cp || exists("g:loaded_vimball") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
let g:loaded_vimball = "v13"
|
||||
let g:loaded_vimball = "v22"
|
||||
set cpo&vim
|
||||
|
||||
" =====================================================================
|
||||
" Constants: {{{1
|
||||
if !exists("s:USAGE")
|
||||
let s:USAGE = 0
|
||||
let s:WARNING = 1
|
||||
let s:ERROR = 2
|
||||
endif
|
||||
|
||||
" =====================================================================
|
||||
" Functions: {{{1
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" Vimball Format:
|
||||
" path
|
||||
" filesize
|
||||
@@ -30,11 +38,24 @@ set cpo&vim
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
|
||||
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
|
||||
if a:1 =~ '.vim' || a:1 =~ '.txt'
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
|
||||
else
|
||||
let vbname= a:1
|
||||
endif
|
||||
if vbname !~ '\.vba$'
|
||||
let vbname= vbname.'.vba'
|
||||
endif
|
||||
" call Decho("vbname<".vbname.">")
|
||||
if a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes")
|
||||
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
|
||||
return
|
||||
endif
|
||||
if !a:writelevel && filereadable(vbname)
|
||||
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
|
||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
|
||||
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
|
||||
return
|
||||
endif
|
||||
@@ -42,17 +63,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" user option bypass
|
||||
call s:SaveSettings()
|
||||
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) | break | endif
|
||||
endfor
|
||||
if home == ""
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
if a:0 >= 2
|
||||
" allow user to specify where to get the files
|
||||
let home= expand(a:2)
|
||||
else
|
||||
" use first existing directory from rtp
|
||||
let home= s:VimballHome()
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','ge')
|
||||
endif
|
||||
" call Decho("home<".home.">")
|
||||
|
||||
" save current directory
|
||||
let curdir = getcwd()
|
||||
@@ -68,7 +85,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" call Decho("svfile<".svfile.">")
|
||||
|
||||
if !filereadable(svfile)
|
||||
echohl Error | echo "unable to read file<".svfile.">" | echohl None
|
||||
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
||||
call s:ChgDir(curdir)
|
||||
call s:RestoreSettings()
|
||||
" call Dret("MkVimball")
|
||||
@@ -89,9 +106,9 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
|
||||
call setline(2,'UseVimball')
|
||||
call setline(3,'finish')
|
||||
let lastline= 4
|
||||
let lastline= line("$") + 1
|
||||
endif
|
||||
call setline(lastline ,svfile)
|
||||
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
|
||||
call setline(lastline+1,0)
|
||||
|
||||
" write the file from the tab
|
||||
@@ -134,13 +151,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Vimball: {{{2
|
||||
fun! vimball#Vimball(really)
|
||||
" call Dfunc("Vimball(really=".a:really.")")
|
||||
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
||||
fun! vimball#Vimball(really,...)
|
||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||
|
||||
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
|
||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||
" call Dret("Vimball")
|
||||
" call Dret("vimball#Vimball")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -149,26 +166,27 @@ fun! vimball#Vimball(really)
|
||||
let curtabnr = tabpagenr()
|
||||
|
||||
" set up vimball tab
|
||||
" call Decho("setting up vimball tab")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
let didhelp= ""
|
||||
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) | break | endif
|
||||
endfor
|
||||
if home == ""
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','ge')
|
||||
if a:0 > 0
|
||||
let home= expand(a:1)
|
||||
else
|
||||
let home= s:VimballHome()
|
||||
endif
|
||||
" call Decho("home<".home.">")
|
||||
|
||||
" save current directory
|
||||
" save current directory and remove older same-named vimball, if any
|
||||
let curdir = getcwd()
|
||||
" call Decho("home<".home.">")
|
||||
" call Decho("curdir<".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
call vimball#RmVimball()
|
||||
|
||||
let linenr = 4
|
||||
let filecnt = 0
|
||||
@@ -186,9 +204,12 @@ fun! vimball#Vimball(really)
|
||||
exe "tabn ".curtabnr
|
||||
" call Decho("linenr=".linenr." line$=".line("$"))
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = getline(linenr)
|
||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||
let fname = substitute(fname,'\\','/','g')
|
||||
let fsize = getline(linenr+1)
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
||||
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
else
|
||||
@@ -197,16 +218,30 @@ fun! vimball#Vimball(really)
|
||||
" call Decho("using L#".linenr.": will extract file<".fname.">")
|
||||
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
||||
|
||||
" Allow AsNeeded/ directory to take place of plugin/ directory
|
||||
" when AsNeeded/filename is filereadable
|
||||
if fname =~ '\<plugin/'
|
||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||
if filereadable(anfname)
|
||||
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
||||
let fname= anfname
|
||||
endif
|
||||
endif
|
||||
|
||||
" make directories if they don't exist yet
|
||||
" call Decho("making directories if they don't exist yet")
|
||||
if a:really
|
||||
let fnamebuf= fname
|
||||
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
|
||||
let fnamebuf= substitute(fname,'\\','/','g')
|
||||
let dirpath = substitute(home,'\\','/','g')
|
||||
while fnamebuf =~ '/'
|
||||
let dirname = home."/".substitute(fnamebuf,'/.*$','','e')
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
|
||||
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
|
||||
let dirpath = dirname
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
|
||||
" call Decho("dirname<".dirname.">")
|
||||
if !isdirectory(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
" call Decho("making <".dirname.">")
|
||||
call mkdir(dirname)
|
||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||
endif
|
||||
endwhile
|
||||
endif
|
||||
@@ -233,6 +268,7 @@ fun! vimball#Vimball(really)
|
||||
" call Decho("exe w! ".fnamepath)
|
||||
exe "silent w! ".fnamepath
|
||||
echo "wrote ".fnamepath
|
||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||
endif
|
||||
|
||||
" return to tab with vimball
|
||||
@@ -242,7 +278,7 @@ fun! vimball#Vimball(really)
|
||||
" set up help if its a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
endif
|
||||
|
||||
@@ -255,7 +291,7 @@ fun! vimball#Vimball(really)
|
||||
" set up help
|
||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||
if didhelp != ""
|
||||
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','ge'),' ')
|
||||
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
|
||||
" call Decho("exe helptags ".htpath)
|
||||
exe "helptags ".htpath
|
||||
echo "did helptags"
|
||||
@@ -267,6 +303,9 @@ fun! vimball#Vimball(really)
|
||||
let filecnt= filecnt + 1
|
||||
endwhile
|
||||
|
||||
" record actions in <.VimballRecord>
|
||||
call s:RecordInFile(home)
|
||||
|
||||
" restore events, delete tab and buffer
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal nomod bh=wipe
|
||||
@@ -275,7 +314,76 @@ fun! vimball#Vimball(really)
|
||||
call s:RestoreSettings()
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("Vimball")
|
||||
" call Dret("vimball#Vimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#RmVimball: remove any files, remove any directories made by any {{{2
|
||||
" previous vimball extraction based on a file of the current
|
||||
" name.
|
||||
" Usage: RmVimball (assume current file is a vimball; remove)
|
||||
" RmVimball vimballname
|
||||
fun! vimball#RmVimball(...)
|
||||
" call Dfunc("vimball#RmVimball() a:0=".a:0)
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
||||
return
|
||||
endif
|
||||
let eikeep= &ei
|
||||
set ei=all
|
||||
" call Decho("turned off all events")
|
||||
|
||||
if a:0 == 0
|
||||
let curfile= '^'.expand("%:tr")
|
||||
else
|
||||
if a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
||||
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
|
||||
return
|
||||
endif
|
||||
let curfile= a:1
|
||||
endif
|
||||
if curfile !~ '.vba$'
|
||||
let curfile= curfile.".vba: "
|
||||
else
|
||||
let curfile= curfile.": "
|
||||
endif
|
||||
if a:0 >= 2
|
||||
let home= expand(a:2)
|
||||
else
|
||||
let home= s:VimballHome()
|
||||
endif
|
||||
let curdir = getcwd()
|
||||
" call Decho("home <".home.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
" call Decho("curdir <".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
if filereadable(".VimballRecord")
|
||||
" call Decho(".VimballRecord is readable")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
keepalt keepjumps 1split
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
if search(curfile,'cw')
|
||||
let exestring= substitute(getline("."),curfile,'','')
|
||||
" call Decho("exe ".exestring)
|
||||
silent! keepalt keepjumps exe exestring
|
||||
silent! keepalt keepjumps d
|
||||
else
|
||||
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
||||
endif
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
let @/= keepsrch
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" restoring events
|
||||
" call Decho("restoring events")
|
||||
let &ei= eikeep
|
||||
|
||||
" call Dret("vimball#RmVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -288,24 +396,59 @@ fun! vimball#Decompress(fname)
|
||||
exe "!gunzip ".a:fname
|
||||
let fname= substitute(a:fname,'\.gz$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("Source this file to extract it! (:so %)")
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
|
||||
exe "!bunzip2 ".a:fname
|
||||
let fname= substitute(a:fname,'\.bz2$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("Source this file to extract it! (:so %)")
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
elseif expand("%") =~ '.*\.zip' && executable("unzip")
|
||||
exe "!unzip ".a:fname
|
||||
let fname= substitute(a:fname,'\.zip$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("Source this file to extract it! (:so %)")
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
endif
|
||||
set noma bt=nofile fmr=[[[,]]] fdm=marker
|
||||
|
||||
" call Dret("Decompress")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ChgDir: change directory (in spite of Windoze) {{{2
|
||||
" vimball#ShowMesg: {{{2
|
||||
fun! vimball#ShowMesg(level,msg)
|
||||
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
|
||||
let rulerkeep = &ruler
|
||||
let showcmdkeep = &showcmd
|
||||
set noruler noshowcmd
|
||||
redraw!
|
||||
|
||||
if &fo =~ '[ta]'
|
||||
echomsg "***vimball*** " a:msg
|
||||
else
|
||||
if a:level == s:WARNING || a:level == s:USAGE
|
||||
echohl WarningMsg
|
||||
elseif a:level == s:ERROR
|
||||
echohl Error
|
||||
endif
|
||||
echomsg "***vimball*** " a:msg
|
||||
echohl None
|
||||
endif
|
||||
|
||||
if a:level != s:USAGE
|
||||
call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
|
||||
let &ruler = rulerkeep
|
||||
let &showcmd = showcmdkeep
|
||||
|
||||
" call Dret("vimball#ShowMesg")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
||||
fun! s:ChgDir(newdir)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
@@ -317,11 +460,11 @@ fun! s:ChgDir(newdir)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Path: {{{2
|
||||
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
|
||||
fun! s:Path(cmd,quote)
|
||||
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let cmdpath= a:quote.substitute(a:cmd,'/','\\','ge').a:quote
|
||||
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
|
||||
else
|
||||
let cmdpath= a:quote.a:cmd.a:quote
|
||||
endif
|
||||
@@ -333,16 +476,98 @@ fun! s:Path(cmd,quote)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#ShowMesg: {{{2
|
||||
fun! vimball#ShowMesg(msg)
|
||||
" call Dfunc("vimball#ShowMesg(msg<".a:msg.">)")
|
||||
let ich= 1
|
||||
echohl WarningMsg | echo a:msg | echohl None
|
||||
while ich < &ch
|
||||
echo " "
|
||||
let ich= ich + 1
|
||||
endwhile
|
||||
" call Dret("vimball#ShowMesg")
|
||||
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
|
||||
fun! s:RecordInVar(home,cmd)
|
||||
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
|
||||
if a:cmd =~ '^rmdir'
|
||||
" if !exists("s:recorddir")
|
||||
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" else
|
||||
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" endif
|
||||
" call Decho("recorddir=".s:recorddir)
|
||||
elseif !exists("s:recordfile")
|
||||
let s:recordfile= a:cmd
|
||||
" call Decho("recordfile=".s:recordfile)
|
||||
else
|
||||
let s:recordfile= s:recordfile."|".a:cmd
|
||||
" call Decho("recordfile=".s:recordfile)
|
||||
endif
|
||||
" call Dret("RecordInVar")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RecordInFile: {{{2
|
||||
fun! s:RecordInFile(home)
|
||||
" call Dfunc("RecordInFile()")
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("RecordInFile : (g:vimball_norecord)")
|
||||
return
|
||||
endif
|
||||
|
||||
if exists("s:recordfile") || exists("s:recorddir")
|
||||
let curdir= getcwd()
|
||||
call s:ChgDir(a:home)
|
||||
keepalt keepjumps 1split
|
||||
let cmd= expand("%:tr").": "
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||
elseif exists("s:recorddir")
|
||||
let cmd= cmd.s:recorddir
|
||||
elseif exists("s:recordfile")
|
||||
let cmd= cmd.s:recordfile
|
||||
else
|
||||
" call Dret("RecordInFile")
|
||||
return
|
||||
endif
|
||||
keepalt keepjumps put=cmd
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
call s:ChgDir(curdir)
|
||||
if exists("s:recorddir") |unlet s:recorddir |endif
|
||||
if exists("s:recordfile")|unlet s:recordfile|endif
|
||||
else
|
||||
" call Decho("s:record[file|dir] doesn't exist")
|
||||
endif
|
||||
|
||||
" call Dret("RecordInFile")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Rmdir: {{{2
|
||||
"fun! s:Rmdir(dirname)
|
||||
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
|
||||
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
" call system("del ".a:dirname)
|
||||
" else
|
||||
" call system("rmdir ".a:dirname)
|
||||
" endif
|
||||
"" call Dret("s:Rmdir")
|
||||
"endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
|
||||
fun! s:VimballHome()
|
||||
" call Dfunc("VimballHome()")
|
||||
if exists("g:vimball_home")
|
||||
let home= g:vimball_home
|
||||
else
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) && filewritable(home) | break | endif
|
||||
endfor
|
||||
if home == ""
|
||||
" just pick the first directory
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','g')
|
||||
endif
|
||||
endif
|
||||
" call Dret("VimballHome <".home.">")
|
||||
return home
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -358,12 +583,14 @@ fun! s:SaveSettings()
|
||||
let s:fenkeep = &fen
|
||||
let s:hidkeep = &hidden
|
||||
let s:ickeep = &ic
|
||||
let s:lzkeep = &lz
|
||||
let s:pmkeep = &pm
|
||||
let s:repkeep = &report
|
||||
let s:vekeep = &ve
|
||||
if exists("&acd")
|
||||
set ei=all ve=all noacd nofen noic report=999 nohid
|
||||
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
|
||||
else
|
||||
set ei=all ve=all nofen noic report=999 nohid
|
||||
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
|
||||
endif
|
||||
" call Dret("SaveSettings")
|
||||
endfun
|
||||
@@ -376,28 +603,28 @@ fun! s:RestoreSettings()
|
||||
if exists("&acd")
|
||||
let &acd = s:acdkeep
|
||||
endif
|
||||
let &ei = s:eikeep
|
||||
let &fen = s:fenkeep
|
||||
let &hidden = s:hidkeep
|
||||
let &ic = s:ickeep
|
||||
let &lz = s:lzkeep
|
||||
let &pm = s:pmkeep
|
||||
let &report = s:repkeep
|
||||
let &ve = s:vekeep
|
||||
let &ei = s:eikeep
|
||||
if s:makeep[0] != 0
|
||||
" restore mark a
|
||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||
call setpos("'a",s:makeep)
|
||||
endif
|
||||
if exists("&acd")
|
||||
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
|
||||
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
||||
else
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
||||
endif
|
||||
set bt=nofile noma
|
||||
" call Dret("RestoreSettings")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
|
||||
130
runtime/autoload/xml/xsd.vim
Normal file
130
runtime/autoload/xml/xsd.vim
Normal file
@@ -0,0 +1,130 @@
|
||||
" Author: Thomas Barthel
|
||||
" Last change: 2007 May 8
|
||||
let g:xmldata_xsd = {
|
||||
\ 'schema': [
|
||||
\ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'],
|
||||
\ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }],
|
||||
\ 'redefine' : [
|
||||
\ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'],
|
||||
\ {'schemaLocation' : [], 'id' : []} ],
|
||||
\ 'include' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'id' : []} ],
|
||||
\ 'import' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ],
|
||||
\ 'complexType' : [
|
||||
\ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ],
|
||||
\ 'complexContent' : [
|
||||
\ ['annotation', 'restriction', 'extension'],
|
||||
\ {'mixed' : [], 'id' : [] } ],
|
||||
\ 'simpleType' : [
|
||||
\ ['annotation', 'restriction', 'list', 'union'],
|
||||
\ {'name' : [], 'final' : [], 'id' : []} ],
|
||||
\ 'simpleContent' : [
|
||||
\ ['annotation', 'restriction', 'extension'],
|
||||
\ {'id' : []} ],
|
||||
\ 'element' : [
|
||||
\ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
|
||||
\ 'attribute' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
|
||||
\ 'group' : [
|
||||
\ ['annotation', 'all', 'choice', 'sequence'],
|
||||
\ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'choice' : [
|
||||
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'sequence' : [
|
||||
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'all' : [
|
||||
\ ['annotation', 'element'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'any' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'unique' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'id' : []} ],
|
||||
\ 'key' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'id' : []} ],
|
||||
\ 'keyref' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'refer' : [], 'id' : []} ],
|
||||
\ 'selector' : [
|
||||
\ ['annotation'],
|
||||
\ {'xpath' : [], 'id' : []} ],
|
||||
\ 'field' : [
|
||||
\ ['annotation'],
|
||||
\ {'xpath' : [], 'id' : []} ],
|
||||
\ 'restriction' : [
|
||||
\ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'],
|
||||
\ {'base' : [], 'id' : []} ],
|
||||
\ 'minExclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxExclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'minInclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxInclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'totalDigits' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'fractionDigits' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'length' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'minLength' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxLength' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'enumeration' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : []}],
|
||||
\ 'whiteSpace' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'pattern' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : []}],
|
||||
\ 'extension' : [
|
||||
\ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'base' : [], 'id' : []} ],
|
||||
\ 'attributeGroup' : [
|
||||
\ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : []} ],
|
||||
\ 'anyAttribute' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'processContents' : [], 'id' : []} ],
|
||||
\ 'list' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'itemType' : [], 'id' : []} ],
|
||||
\ 'union' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'id' : [], 'memberTypes' : []} ],
|
||||
\ 'notation' : [
|
||||
\ ['annotation'],
|
||||
\ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ],
|
||||
\ 'annotation' : [
|
||||
\ ['appinfo', 'documentation'],
|
||||
\ {} ],
|
||||
\ 'appinfo' : [
|
||||
\ [],
|
||||
\ {'source' : [], 'id' : []} ],
|
||||
\ 'documentation' : [
|
||||
\ [],
|
||||
\ {'source' : [], 'id' : [], 'xml' : []} ]
|
||||
\ }
|
||||
@@ -1,7 +1,9 @@
|
||||
" Author: Mikolaj Machowski, Thomas Bartel
|
||||
" Last change: 2007 May 8
|
||||
let g:xmldata_xsl = {
|
||||
\ 'apply-imports' : [[], {}],
|
||||
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
|
||||
\ 'attribute' : [[], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
|
||||
\ 'call-template' : [['with-param'], {'name' : []}],
|
||||
\ 'choose' : [['when', 'otherwise'], {}],
|
||||
@@ -9,10 +11,10 @@ let g:xmldata_xsl = {
|
||||
\ 'copy' : [[], {'use-attribute-sets' : []}],
|
||||
\ 'copy-of' : [[], {'select' : []}],
|
||||
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
|
||||
\ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'fallback' : [[], {}],
|
||||
\ 'for-each' : [['sort'], {'select' : []}],
|
||||
\ 'if' : [[], {'test' : []}],
|
||||
\ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
|
||||
\ 'import' : [[], {'href' : []}],
|
||||
\ 'include' : [[], {'href' : []}],
|
||||
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
|
||||
@@ -21,17 +23,16 @@ let g:xmldata_xsl = {
|
||||
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
|
||||
\ 'otherwise' : [[], {}],
|
||||
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
|
||||
\ 'param' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'preserve-space' : [[], {'elements' : []}],
|
||||
\ 'processing-instruction' : [[], {'name' : []}],
|
||||
\ 'processing-instructionruction' : [[], {'name' : []}],
|
||||
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
|
||||
\ 'strip-space' : [[], {'elements' : []}],
|
||||
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
|
||||
\ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
|
||||
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'variable' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'when' : [[], {'test' : []}],
|
||||
\ 'with-param' : [[], {'name' : [], 'select' : []}]}
|
||||
|
||||
\ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
" Vim completion script
|
||||
" Language: XML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2006 Jul 18
|
||||
" Version: 1.8
|
||||
"
|
||||
" Changelog:
|
||||
" 1.8 - 2006 Jul 18
|
||||
" - allow for closing of xml tags even when data file isn't available
|
||||
|
||||
" This function will create Dictionary with users namespace strings and values
|
||||
" canonical (system) names of data files. Names should be lowercase,
|
||||
@@ -80,7 +85,7 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$' || i == curline
|
||||
@@ -106,10 +111,6 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
return start
|
||||
|
||||
else
|
||||
" There is no connection 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 = []
|
||||
@@ -119,6 +120,17 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
endif
|
||||
let context = matchstr(b:compl_context, '^<\zs.*')
|
||||
unlet! b:compl_context
|
||||
" There is no connection of namespace and data file.
|
||||
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
|
||||
" There is still possibility we may do something - eg. 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.">"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
|
||||
" Make entities completion
|
||||
if exists("b:entitiescompl")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: May 01, 2006
|
||||
" Version: 9
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Date: May 08, 2007
|
||||
" Version: 14
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" 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
|
||||
@@ -15,15 +15,34 @@
|
||||
" of this software.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" Load Once: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if exists("g:loaded_zip")
|
||||
if &cp || exists("g:loaded_zip") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_zip = "v9"
|
||||
let g:loaded_zip = "v14"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
let s:NOTE = 0
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Values: {{{1
|
||||
if !exists("g:zip_shq")
|
||||
if has("unix")
|
||||
let g:zip_shq= "'"
|
||||
else
|
||||
let g:zip_shq= '"'
|
||||
endif
|
||||
endif
|
||||
if !exists("g:zip_zipcmd")
|
||||
let g:zip_zipcmd= "zip"
|
||||
endif
|
||||
if !exists("g:zip_unzipcmd")
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -37,9 +56,10 @@ fun! zip#Browse(zipfile)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable("unzip")
|
||||
if !executable(g:zip_unzipcmd)
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
@@ -47,8 +67,9 @@ fun! zip#Browse(zipfile)
|
||||
if !filereadable(a:zipfile)
|
||||
if a:zipfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
|
||||
@@ -58,7 +79,7 @@ fun! zip#Browse(zipfile)
|
||||
if &ma != 1
|
||||
set ma
|
||||
endif
|
||||
let w:zipfile= a:zipfile
|
||||
let b:zipfile= a:zipfile
|
||||
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
@@ -75,11 +96,12 @@ fun! zip#Browse(zipfile)
|
||||
0d
|
||||
$
|
||||
|
||||
" call Decho("exe silent r! unzip -l '".a:zipfile."'")
|
||||
exe "silent r! unzip -l '".a:zipfile."'"
|
||||
" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
|
||||
exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
silent %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
@@ -109,7 +131,7 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
" ZipBrowseSelect: {{{2
|
||||
fun! s:ZipBrowseSelect()
|
||||
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
|
||||
" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
@@ -121,8 +143,9 @@ fun! s:ZipBrowseSelect()
|
||||
return
|
||||
endif
|
||||
if fname =~ '/$'
|
||||
redraw!
|
||||
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 inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("ZipBrowseSelect")
|
||||
return
|
||||
@@ -131,7 +154,7 @@ fun! s:ZipBrowseSelect()
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
" get zipfile to the new-window
|
||||
let zipfile= substitute(w:zipfile,'.zip$','','e')
|
||||
let zipfile = b:zipfile
|
||||
let curfile= expand("%")
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
@@ -160,12 +183,13 @@ fun! zip#Read(fname,mode)
|
||||
else
|
||||
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
" call Decho("exe r! unzip -p '".zipfile."' '".fname."'")
|
||||
exe "silent r! unzip -p '".zipfile."' '".fname."'"
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
||||
exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
@@ -183,16 +207,18 @@ fun! zip#Write(fname)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable("zip")
|
||||
if !executable(g:zip_zipcmd)
|
||||
redraw!
|
||||
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 inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
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 inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
@@ -208,15 +234,11 @@ fun! zip#Write(fname)
|
||||
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()
|
||||
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endtry
|
||||
endif
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
" place temporary files under .../_ZIPVIM_/
|
||||
@@ -255,21 +277,26 @@ fun! zip#Write(fname)
|
||||
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
|
||||
endif
|
||||
|
||||
" call Decho("zip -u '".zipfile.".zip' '".fname."'")
|
||||
call system("zip -u '".zipfile.".zip' '".fname."'")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
|
||||
" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
||||
call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
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()
|
||||
" 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.">")
|
||||
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
|
||||
1split|enew
|
||||
let binkeep= &binary
|
||||
let eikeep = &ei
|
||||
set binary ei=all
|
||||
exe "e! ".zipfile.".zip"
|
||||
exe "e! ".zipfile
|
||||
call netrw#NetWrite(netzipfile)
|
||||
let &ei = eikeep
|
||||
let &binary = binkeep
|
||||
@@ -280,25 +307,61 @@ fun! zip#Write(fname)
|
||||
" cleanup and restore current directory
|
||||
cd ..
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
exe "cd ".escape(curdir,' \')
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
call s:Rmdir(tmpdir)
|
||||
setlocal nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" QuoteFileDir: {{{2
|
||||
fun! s:QuoteFileDir(fname)
|
||||
" call Dfunc("QuoteFileDir(fname<".a:fname.">)")
|
||||
" call Dret("QuoteFileDir")
|
||||
return g:zip_shq.a:fname.g:zip_shq
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ChgDir: {{{2
|
||||
fun! s:ChgDir(newdir,errlvl,errmsg)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
|
||||
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
let newdir= escape(a:newdir,' ')
|
||||
else
|
||||
let newdir= escape(a:newdir,'\ ')
|
||||
endif
|
||||
|
||||
try
|
||||
exe "cd ".newdir
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
if a:errlvl == s:NOTE
|
||||
echo "***note*** ".a:errmsg
|
||||
elseif a:errlvl == s:WARNING
|
||||
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
|
||||
elseif a:errlvl == s:ERROR
|
||||
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
|
||||
endif
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call Dret("ChgDir 1")
|
||||
return 1
|
||||
endtry
|
||||
|
||||
" call Dret("ChgDir 0")
|
||||
return 0
|
||||
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
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
call system("rmdir /S/Q ".s:QuoteFileDir(a:fname))
|
||||
else
|
||||
call system("/bin/rm -rf ".s:QuoteFileDir(a:fname))
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
endfun
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
" vim: tw=0 ts=4 sw=4
|
||||
" Vim color file
|
||||
" Maintainer: Steven Vertigan <steven@vertigan.wattle.id.au>
|
||||
" Last Change: 2003 May 11
|
||||
" Revision #4: Support for new "Underline" group. Removed superfluous html
|
||||
" formatting.
|
||||
" Last Change: 2006 Sep 23
|
||||
" Revision #5: Switch main text from white to yellow for easier contrast,
|
||||
" fixed some problems with terminal backgrounds.
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
@@ -12,66 +12,44 @@ if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = "blue"
|
||||
hi Normal guifg=white guibg=darkBlue
|
||||
hi Normal ctermfg=white ctermbg=darkBlue
|
||||
hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue
|
||||
hi NonText guifg=magenta ctermfg=lightMagenta
|
||||
hi comment guifg=gray gui=bold
|
||||
hi comment ctermfg=gray
|
||||
hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold
|
||||
hi constant guifg=cyan ctermfg=cyan
|
||||
hi identifier guifg=gray ctermfg=gray
|
||||
hi statement guifg=yellow gui=none ctermfg=yellow
|
||||
hi identifier guifg=gray ctermfg=red
|
||||
hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none
|
||||
hi preproc guifg=green ctermfg=green
|
||||
hi type guifg=orange ctermfg=darkYellow
|
||||
hi special guifg=magenta ctermfg=lightMagenta
|
||||
hi Underlined guifg=cyan ctermfg=cyan
|
||||
hi Underlined gui=underline cterm=underline
|
||||
hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue
|
||||
hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue
|
||||
hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline
|
||||
hi label guifg=yellow ctermfg=yellow
|
||||
hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue
|
||||
|
||||
hi ErrorMsg guifg=orange guibg=darkBlue
|
||||
hi ErrorMsg ctermfg=lightRed
|
||||
hi WarningMsg guifg=cyan guibg=darkBlue gui=bold
|
||||
hi WarningMsg ctermfg=cyan
|
||||
hi ModeMsg guifg=yellow gui=NONE
|
||||
hi ModeMsg ctermfg=yellow
|
||||
hi MoreMsg guifg=yellow gui=NONE
|
||||
hi MoreMsg ctermfg=yellow
|
||||
hi Error guifg=red guibg=darkBlue gui=underline
|
||||
hi Error ctermfg=red
|
||||
hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed
|
||||
hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold
|
||||
hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow
|
||||
hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow
|
||||
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red
|
||||
|
||||
hi Todo guifg=black guibg=orange
|
||||
hi Todo ctermfg=black ctermbg=darkYellow
|
||||
hi Cursor guifg=black guibg=white
|
||||
hi Cursor ctermfg=black ctermbg=white
|
||||
hi Search guifg=black guibg=orange
|
||||
hi Search ctermfg=black ctermbg=darkYellow
|
||||
hi IncSearch guifg=black guibg=yellow
|
||||
hi IncSearch ctermfg=black ctermbg=darkYellow
|
||||
hi LineNr guifg=pink ctermfg=lightMagenta
|
||||
hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
|
||||
hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white
|
||||
hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
|
||||
hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow
|
||||
hi LineNr guifg=cyan ctermfg=cyan
|
||||
hi title guifg=white gui=bold cterm=bold
|
||||
|
||||
hi StatusLineNC gui=NONE guifg=black guibg=blue
|
||||
hi StatusLineNC ctermfg=black ctermbg=blue
|
||||
hi StatusLine gui=bold guifg=cyan guibg=blue
|
||||
hi StatusLine ctermfg=cyan ctermbg=blue
|
||||
hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue
|
||||
hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue
|
||||
hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue
|
||||
|
||||
hi label guifg=yellow ctermfg=yellow
|
||||
hi operator guifg=orange gui=bold ctermfg=darkYellow
|
||||
hi clear Visual
|
||||
hi Visual term=reverse
|
||||
hi Visual ctermfg=black ctermbg=darkCyan
|
||||
hi Visual guifg=black guibg=darkCyan
|
||||
hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan
|
||||
|
||||
hi DiffChange guibg=darkGreen guifg=black
|
||||
hi DiffChange ctermbg=darkGreen ctermfg=black
|
||||
hi DiffText guibg=olivedrab guifg=black
|
||||
hi DiffText ctermbg=lightGreen ctermfg=black
|
||||
hi DiffAdd guibg=slateblue guifg=black
|
||||
hi DiffAdd ctermbg=blue ctermfg=black
|
||||
hi DiffDelete guibg=coral guifg=black
|
||||
hi DiffDelete ctermbg=cyan ctermfg=black
|
||||
hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black
|
||||
hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black
|
||||
hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black
|
||||
hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black
|
||||
|
||||
hi Folded guibg=orange guifg=black
|
||||
hi Folded ctermbg=yellow ctermfg=black
|
||||
hi FoldColumn guibg=gray30 guifg=black
|
||||
hi FoldColumn ctermbg=gray ctermfg=black
|
||||
hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black
|
||||
hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black
|
||||
hi cIf0 guifg=gray ctermfg=gray
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" vim: tw=0 ts=4 sw=4
|
||||
" Vim color file
|
||||
" Maintainer: Ron Aaron <ron@ronware.org>
|
||||
" Last Change: 2006 Mar 26
|
||||
" Last Change: 2006 Dec 10
|
||||
|
||||
hi clear
|
||||
set background=dark
|
||||
@@ -13,11 +13,11 @@ let g:colors_name = "koehler"
|
||||
hi Normal guifg=white guibg=black
|
||||
hi Scrollbar guifg=darkcyan guibg=cyan
|
||||
hi Menu guifg=black guibg=cyan
|
||||
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=Blue
|
||||
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=Blue
|
||||
hi Directory term=bold cterm=bold ctermfg=brown guifg=Blue
|
||||
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=blue guifg=White guibg=Red
|
||||
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
|
||||
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=#cc0000
|
||||
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=#cc0000
|
||||
hi Directory term=bold cterm=bold ctermfg=brown guifg=#cc8000
|
||||
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=red guifg=White guibg=Red
|
||||
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
|
||||
hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen
|
||||
hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue
|
||||
hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow
|
||||
@@ -26,20 +26,20 @@ hi StatusLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gu
|
||||
hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
|
||||
hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta
|
||||
hi Visual term=reverse cterm=reverse gui=reverse
|
||||
hi WarningMsg term=standout cterm=bold ctermfg=darkblue guifg=Red
|
||||
hi WarningMsg term=standout cterm=bold ctermfg=darkred guifg=Red
|
||||
hi Cursor guifg=bg guibg=Green
|
||||
hi Comment term=bold cterm=bold ctermfg=cyan guifg=#80a0ff
|
||||
hi Constant term=underline cterm=bold ctermfg=magenta guifg=#ffa0a0
|
||||
hi Special term=bold cterm=bold ctermfg=red guifg=Orange
|
||||
hi Identifier term=underline ctermfg=brown guifg=#40ffff
|
||||
hi Statement term=bold cterm=bold ctermfg=yellow gui=bold guifg=#ffff60
|
||||
hi PreProc term=underline ctermfg=darkblue guifg=#ff80ff
|
||||
hi PreProc term=underline ctermfg=darkmagenta guifg=#ff80ff
|
||||
hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
|
||||
hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
|
||||
hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
|
||||
hi CursorLine term=underline guibg=#555555
|
||||
hi CursorColumn term=underline guibg=#555555
|
||||
hi MatchParen term=reverse guibg=Blue
|
||||
hi CursorLine term=underline guibg=#555555 cterm=underline
|
||||
hi CursorColumn term=underline guibg=#555555 cterm=underline
|
||||
hi MatchParen term=reverse ctermfg=blue guibg=Blue
|
||||
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
|
||||
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
|
||||
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim color file
|
||||
" Maintainer: Thorsten Maerz <info@netztorte.de>
|
||||
" Last Change: 2001 Jul 23
|
||||
" Last Change: 2006 Dec 07
|
||||
" grey on black
|
||||
" optimized for TFT panels
|
||||
|
||||
@@ -18,7 +18,7 @@ let g:colors_name = "torte"
|
||||
" GUI
|
||||
highlight Normal guifg=Grey80 guibg=Black
|
||||
highlight Search guifg=Black guibg=Red gui=bold
|
||||
highlight Visual guifg=Grey25 gui=bold
|
||||
highlight Visual guifg=#404040 gui=bold
|
||||
highlight Cursor guifg=Black guibg=Green gui=bold
|
||||
highlight Special guifg=Orange
|
||||
highlight Comment guifg=#80a0ff
|
||||
@@ -42,7 +42,7 @@ if has("unix")
|
||||
if v:version<600
|
||||
highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE
|
||||
highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold
|
||||
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold
|
||||
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold
|
||||
highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE
|
||||
highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE
|
||||
endif
|
||||
|
||||
54
runtime/compiler/decada.vim
Normal file
54
runtime/compiler/decada.vim
Normal file
@@ -0,0 +1,54 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/Dec Ada compiler file
|
||||
" Language: Ada (Dec Ada)
|
||||
" $Id$
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
|
||||
" History: 21.07.2006 MK New Dec Ada
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" Help Page: compiler-decada
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if (exists("current_compiler") &&
|
||||
\ current_compiler == "decada") ||
|
||||
\ version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
let current_compiler = "decada"
|
||||
|
||||
if !exists("g:decada")
|
||||
let g:decada = decada#New ()
|
||||
endif
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
"
|
||||
" plugin loaded by other means then the "compiler" command
|
||||
"
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
call g:decada.Set_Session ()
|
||||
|
||||
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
|
||||
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
|
||||
|
||||
call ada#Map_Menu (
|
||||
\'Dec Ada.Build',
|
||||
\'<F7>',
|
||||
\'call decada.Make ()')
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Latest Revision: 2006-12-20
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -20,7 +20,13 @@ setlocal errorformat=
|
||||
\\"%f\"\\,\ line\ %l%*\\D%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
|
||||
|
||||
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
||||
let &errorformat .= ',%-G%.%#'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
71
runtime/compiler/gnat.vim
Normal file
71
runtime/compiler/gnat.vim
Normal file
@@ -0,0 +1,71 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/GNAT compiler file
|
||||
" Language: Ada (GNAT)
|
||||
" $Id$
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" Help Page: compiler-gnat
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if (exists("current_compiler") &&
|
||||
\ current_compiler == "gnat") ||
|
||||
\ version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
let current_compiler = "gnat"
|
||||
|
||||
if !exists("g:gnat")
|
||||
let g:gnat = gnat#New ()
|
||||
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Build',
|
||||
\ '<F7>',
|
||||
\ 'call gnat.Make ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Pretty Print',
|
||||
\ ':GnatPretty',
|
||||
\ 'call gnat.Pretty ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Tags',
|
||||
\ ':GnatTags',
|
||||
\ 'call gnat.Tags ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Find',
|
||||
\ ':GnatFind',
|
||||
\ 'call gnat.Find ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Set Projectfile\.\.\.',
|
||||
\ ':SetProject',
|
||||
\ 'call gnat.Set_Project_File ()')
|
||||
endif
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
"
|
||||
" plugin loaded by other means then the "compiler" command
|
||||
"
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
call g:gnat.Set_Session ()
|
||||
|
||||
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
|
||||
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
24
runtime/compiler/mcs.vim
Normal file
24
runtime/compiler/mcs.vim
Normal file
@@ -0,0 +1,24 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Mono C# Compiler
|
||||
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
|
||||
" Latest Revision: 2006-06-18
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mcs"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
\%E%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%W%f(%l\\,%c):\ warning\ CS%n:%m,
|
||||
\%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%DMaking\ %*\\a\ in\ %f,
|
||||
\%G-%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -14,6 +14,7 @@ VIMEXE = vim
|
||||
include ../../src/auto/config.mk
|
||||
|
||||
DOCS = \
|
||||
ada.txt \
|
||||
arabic.txt \
|
||||
autocmd.txt \
|
||||
change.txt \
|
||||
@@ -28,7 +29,6 @@ DOCS = \
|
||||
farsi.txt \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
getscript.txt \
|
||||
gui.txt \
|
||||
gui_w16.txt \
|
||||
gui_w32.txt \
|
||||
@@ -70,6 +70,7 @@ DOCS = \
|
||||
os_vms.txt \
|
||||
os_win32.txt \
|
||||
pattern.txt \
|
||||
pi_getscript.txt \
|
||||
pi_gzip.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
@@ -144,6 +145,7 @@ DOCS = \
|
||||
workshop.txt
|
||||
|
||||
HTMLS = \
|
||||
ada.html \
|
||||
arabic.html \
|
||||
autocmd.html \
|
||||
change.html \
|
||||
@@ -158,7 +160,6 @@ HTMLS = \
|
||||
farsi.html \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
getscript.html \
|
||||
gui.html \
|
||||
gui_w16.html \
|
||||
gui_w32.html \
|
||||
@@ -200,6 +201,7 @@ HTMLS = \
|
||||
os_vms.html \
|
||||
os_win32.html \
|
||||
pattern.html \
|
||||
pi_getscript.html \
|
||||
pi_gzip.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
@@ -224,8 +226,8 @@ HTMLS = \
|
||||
sql.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tagsrch.html \
|
||||
tags.html \
|
||||
tagsrch.html \
|
||||
term.html \
|
||||
tips.html \
|
||||
todo.html \
|
||||
@@ -299,7 +301,7 @@ all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
|
||||
# Use Vim to generate the tags file. Can only be used when Vim has been
|
||||
# compiled and installed. Supports multiple languages.
|
||||
vimtags: $(DOCS)
|
||||
$(VIMEXE) -u NONE -esX -c "helptags ." -c quit
|
||||
$(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit
|
||||
|
||||
# Use "doctags" to generate the tags file. Only works for English!
|
||||
tags: doctags $(DOCS)
|
||||
|
||||
515
runtime/doc/ada.txt
Normal file
515
runtime/doc/ada.txt
Normal file
@@ -0,0 +1,515 @@
|
||||
*ada.txt* For Vim version 7.1. Last change: 2007 May 08
|
||||
|
||||
|
||||
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
||||
|
||||
ADA *ada.vim*
|
||||
|
||||
1. Syntax Highlighting |ft-ada-syntax|
|
||||
2. Plug-in |ft-ada-plugin|
|
||||
3. Omni Completion |ft-ada-omni|
|
||||
3.1 Omni Completion with "gnat xref" |gnat-xref|
|
||||
3.2 Omni Completion with "ctags" |ada-ctags|
|
||||
4. Compiler Support |ada-compiler|
|
||||
4.1 GNAT |compiler-gnat|
|
||||
4.1 Dec Ada |compiler-decada|
|
||||
5. References |ada-reference|
|
||||
5.1 Options |ft-ada-options|
|
||||
5.2 Functions |ft-ada-functions|
|
||||
5.3 Commands |ft-ada-commands|
|
||||
5.4 Variables |ft-ada-variables|
|
||||
5.5 Constants |ft-ada-constants|
|
||||
8. Extra Plug-ins |ada-extra-plugins|
|
||||
|
||||
==============================================================================
|
||||
1. Syntax Highlighting ~
|
||||
*ft-ada-syntax*
|
||||
|
||||
This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes
|
||||
support for objected-programming, protected types, and so on. It handles code
|
||||
written for the original Ada language ("Ada83", "Ada87", "Ada95") as well,
|
||||
though code which uses Ada 2005-only keywords will be wrongly colored (such
|
||||
code should be fixed anyway). For more information about Ada, see
|
||||
http://www.adapower.com.
|
||||
|
||||
The Ada mode handles a number of situations cleanly.
|
||||
|
||||
For example, it knows that the "-" in "-5" is a number, but the same character
|
||||
in "A-5" is an operator. Normally, a "with" or "use" clause referencing
|
||||
another compilation unit is coloured the same way as C's "#include" is coloured.
|
||||
If you have "Conditional" or "Repeat" groups coloured differently, then "end
|
||||
if" and "end loop" will be coloured as part of those respective groups.
|
||||
|
||||
You can set these to different colours using vim's "highlight" command (e.g.,
|
||||
to change how loops are displayed, enter the command ":hi Repeat" followed by
|
||||
the colour specification; on simple terminals the colour specification
|
||||
ctermfg=White often shows well).
|
||||
|
||||
There are several options you can select in this Ada mode. See|ft-ada-options|
|
||||
for a complete list.
|
||||
|
||||
To enable them, assign a value to the option. For example, to turn one on:
|
||||
>
|
||||
> let g:ada_standard_types = 1
|
||||
>
|
||||
To disable them use ":unlet". Example:
|
||||
>
|
||||
> unlet g:ada_standard_types
|
||||
|
||||
You can just use ":" and type these into the command line to set these
|
||||
temporarily before loading an Ada file. You can make these option settings
|
||||
permanent by adding the "let" command(s), without a colon, to your "~/.vimrc"
|
||||
file.
|
||||
|
||||
Even on a slow (90Mhz) PC this mode works quickly, but if you find the
|
||||
performance unacceptable, turn on |g:ada_withuse_ordinary|.
|
||||
|
||||
Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is
|
||||
set.
|
||||
|
||||
==============================================================================
|
||||
2. File type Plug-in ~
|
||||
*ft-ada-indent* *ft-ada-plugin*
|
||||
|
||||
The Ada plug-in provides support for:
|
||||
|
||||
- auto indenting (|indent.txt|)
|
||||
- insert completion (|i_CTRL-N|)
|
||||
- user completion (|i_CTRL-X_CTRL-U|)
|
||||
- tag searches (|tagsrch.txt|)
|
||||
- Quick Fix (|quickfix.txt|)
|
||||
- backspace handling (|'backspace'|)
|
||||
- comment handling (|'comments'|, |'commentstring'|)
|
||||
|
||||
The plug-in only activates the features of the Ada mode whenever an Ada
|
||||
files is opened and add adds Ada related entries to the main and pop-up menu.
|
||||
|
||||
==============================================================================
|
||||
3. Omni Completion ~
|
||||
*ft-ada-omni*
|
||||
|
||||
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
|
||||
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The
|
||||
complete function will automatically detect which tool was used to create the
|
||||
tags file.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.1 Omni Completion with "gnat xref" ~
|
||||
*gnat-xref*
|
||||
|
||||
GNAT XREF uses the compiler internal informations (ali-files) to produce the
|
||||
tags file. This has the advantage to be 100% correct and the option of deep
|
||||
nested analysis. However the code must compile, the generator is quite
|
||||
slow and the created tags file contains only the basic Ctags informations for
|
||||
each entry - not enough for some of the more advanced Vim code browser
|
||||
plug-ins.
|
||||
|
||||
NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
|
||||
output - If nothing is printed then usually the parameters are wrong.
|
||||
Here some important tips:
|
||||
|
||||
1) You need to compile your code first and use the "-aO" option to point to
|
||||
your .ali files.
|
||||
2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v
|
||||
-aI../Include adacl.ads" instead.
|
||||
3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and
|
||||
then "gnat xref -v *.ad?"
|
||||
4) Project manager support is completely broken - don't even try "gnat xref
|
||||
-Padacl.gpr".
|
||||
5) VIM is faster when the tags file is sorted - use "sort --unique
|
||||
--ignore-case --output=tags tags" .
|
||||
6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark
|
||||
the file assorted.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.2 Omni Completion with "ctags"~
|
||||
*ada-ctags*
|
||||
|
||||
Exuberant Ctags uses its own multi-language code parser. The parser is quite
|
||||
fast, produces a lot of extra informations (hence the name "Exuberant Ctags")
|
||||
and can run on files which currently do not compile.
|
||||
|
||||
There are also lots of other Vim-tools which use exuberant Ctags.
|
||||
|
||||
You will need to install a version of the Exuberant Ctags which has Ada
|
||||
support patched in. Such a version is available from the GNU Ada Project
|
||||
(http://gnuada.sourceforge.net).
|
||||
|
||||
The Ada parser for Exuberant Ctags is fairly new - don't expect complete
|
||||
support yet.
|
||||
|
||||
==============================================================================
|
||||
4. Compiler Support ~
|
||||
*ada-compiler*
|
||||
|
||||
The Ada mode supports more then one Ada compiler and will automatically load the
|
||||
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
|
||||
provided compiler plug-ins are split into the actual compiler plug-in and a
|
||||
collection of support functions and variables. This allows the easy
|
||||
development of specialized compiler plug-ins fine tuned to your development
|
||||
environment.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.1 GNAT ~
|
||||
*compiler-gnat*
|
||||
|
||||
GNAT is the only free (beer and speech) Ada compiler available. There are
|
||||
several version available which differentiate in the licence terms used.
|
||||
|
||||
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
|
||||
immediately shows the result. You can set the project file to be used by
|
||||
setting:
|
||||
>
|
||||
> call g:gnat.Set_Project_File ('my_project.gpr')
|
||||
|
||||
Setting a project file will also create a Vim session (|views-sessions|) so -
|
||||
like with the GPS - opened files, window positions etc. will remembered
|
||||
separately for all projects.
|
||||
|
||||
*gnat_members*
|
||||
GNAT OBJECT ~
|
||||
|
||||
*g:gnat.Make()*
|
||||
g:gnat.Make()
|
||||
Calls|g:gnat.Make_Command|and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:gnat.Pretty()*
|
||||
g:gnat.Pretty()
|
||||
Calls|g:gnat.Pretty_Command|
|
||||
|
||||
*g:gnat.Find()*
|
||||
g:gnat.Find()
|
||||
Calls|g:gnat.Find_Command|
|
||||
|
||||
*g:gnat.Tags()*
|
||||
g:gnat.Tags()
|
||||
Calls|g:gnat.Tags_Command|
|
||||
|
||||
*g:gnat.Set_Project_File()*
|
||||
g:gnat.Set_Project_File([{file}])
|
||||
Set gnat project file and load associated session. An open
|
||||
project will be closed and the session written. If called
|
||||
without file name the file selector opens for selection of a
|
||||
project file. If called with an empty string then the project
|
||||
and associated session are closed.
|
||||
|
||||
*g:gnat.Project_File*
|
||||
g:gnat.Project_File string
|
||||
Current project file.
|
||||
|
||||
*g:gnat.Make_Command*
|
||||
g:gnat.Make_Command string
|
||||
External command used for|g:gnat.Make()| (|'makeprg'|).
|
||||
|
||||
*g:gnat.Pretty_Program*
|
||||
g:gnat.Pretty_Program string
|
||||
External command used for|g:gnat.Pretty()|
|
||||
|
||||
*g:gnat.Find_Program*
|
||||
g:gnat.Find_Program string
|
||||
External command used for|g:gnat.Find()|
|
||||
|
||||
*g:gnat.Tags_Command*
|
||||
g:gnat.Tags_Command string
|
||||
External command used for|g:gnat.Tags()|
|
||||
|
||||
*g:gnat.Error_Format*
|
||||
g:gnat.Error_Format string
|
||||
Error format (|'errorformat'|)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.2 Dec Ada ~
|
||||
*compiler-hpada* *compiler-decada*
|
||||
*compiler-vaxada* *compiler-compaqada*
|
||||
|
||||
Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada
|
||||
and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
|
||||
compile the current unit.
|
||||
|
||||
The Dec Ada compiler expects the package name and not the file name to be
|
||||
passed a parameter. The compiler plug-in supports the usual file name
|
||||
convention to convert the file into a unit name. For separates both '-' and
|
||||
'__' are allowed.
|
||||
|
||||
*decada_members*
|
||||
DEC ADA OBJECT ~
|
||||
|
||||
*g:decada.Make()*
|
||||
g:decada.Make() function
|
||||
Calls|g:decada.Make_Command|and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:decada.Unit_Name()*
|
||||
g:decada.Unit_Name() function
|
||||
Get the Unit name for the current file.
|
||||
|
||||
*g:decada.Make_Command*
|
||||
g:decada.Make_Command string
|
||||
External command used for|g:decadat.Make()| (|'makeprg'|).
|
||||
|
||||
*g:decada.Error_Format*
|
||||
g:decada.Error_Format| string
|
||||
Error format (|'errorformat'|).
|
||||
|
||||
==============================================================================
|
||||
5. References ~
|
||||
*ada-reference*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.1 Options ~
|
||||
*ft-ada-options*
|
||||
|
||||
*g:ada_standard_types*
|
||||
g:ada_standard_types bool (true when exists)
|
||||
Highlight types in package Standard (e.g., "Float")
|
||||
|
||||
*g:ada_space_errors*
|
||||
*g:ada_no_trail_space_error*
|
||||
*g:ada_no_tab_space_error*
|
||||
*g:ada_all_tab_usage*
|
||||
g:ada_space_errors bool (true when exists)
|
||||
Highlight extraneous errors in spaces ...
|
||||
g:ada_no_trail_space_error
|
||||
- but ignore trailing spaces at the end of a line
|
||||
g:ada_no_tab_space_error
|
||||
- but ignore tabs after spaces
|
||||
g:ada_all_tab_usage
|
||||
- highlight all tab use
|
||||
|
||||
*g:ada_line_errors*
|
||||
g:ada_line_errors bool (true when exists)
|
||||
Highlight lines which are to long. Note: This highlighting
|
||||
option is quite CPU intensive.
|
||||
|
||||
*g:ada_rainbow_color*
|
||||
g:ada_rainbow_color bool (true when exists)
|
||||
Use rainbow colours for '(' and ')'. You need the
|
||||
rainbow_parenthesis for this to work
|
||||
|
||||
*g:ada_folding*
|
||||
g:ada_folding set ('sigpft')
|
||||
Use folding for Ada sources.
|
||||
's': activate syntax folding on load
|
||||
'p': fold packages
|
||||
'f': fold functions and procedures
|
||||
't': fold types
|
||||
'c': fold conditionals
|
||||
'g': activate gnat pretty print folding on load
|
||||
'i': lone 'is' folded with line above
|
||||
'b': lone 'begin' folded with line above
|
||||
'p': lone 'private' folded with line above
|
||||
'x': lone 'exception' folded with line above
|
||||
'i': activate indent folding on load
|
||||
|
||||
Note: Syntax folding is in an early (unusable) stage and
|
||||
indent or gnat pretty folding is suggested.
|
||||
|
||||
For gnat pretty folding to work the following settings are
|
||||
suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5
|
||||
|
||||
For indent folding to work the following settings are
|
||||
suggested: shiftwidth=3 softtabstop=3
|
||||
|
||||
*g:ada_abbrev*
|
||||
g:ada_abbrev bool (true when exists)
|
||||
Add some abbreviations. This feature more or less superseded
|
||||
by the various completion methods.
|
||||
|
||||
*g:ada_withuse_ordinary*
|
||||
g:ada_withuse_ordinary bool (true when exists)
|
||||
Show "with" and "use" as ordinary keywords (when used to
|
||||
reference other compilation units they're normally highlighted
|
||||
specially).
|
||||
|
||||
*g:ada_begin_preproc*
|
||||
g:ada_begin_preproc bool (true when exists)
|
||||
Show all begin-like keywords using the colouring of C
|
||||
preprocessor commands.
|
||||
|
||||
*g:ada_omni_with_keywords*
|
||||
g:ada_omni_with_keywords
|
||||
Add Keywords, Pragmas, Attributes to omni-completions
|
||||
(|compl-omni|). Note: You can always complete then with user
|
||||
completion (|i_CTRL-X_CTRL-U|).
|
||||
|
||||
*g:ada_extended_tagging*
|
||||
g:ada_extended_tagging enum ('jump', 'list')
|
||||
use extended tagging, two options are available
|
||||
'jump': use tjump to jump.
|
||||
'list': add tags quick fix list.
|
||||
Normal tagging does not support function or operator
|
||||
overloading as these features are not available in C and
|
||||
tagging was originally developed for C.
|
||||
|
||||
*g:ada_extended_completion*
|
||||
g:ada_extended_completion
|
||||
Uses extended completion for <C-N> and <C-R> completions
|
||||
(|i_CTRL-N|). In this mode the '.' is used as part of the
|
||||
identifier so that 'Object.Method' or 'Package.Procedure' are
|
||||
completed together.
|
||||
|
||||
*g:ada_gnat_extensions*
|
||||
g:ada_gnat_extensions bool (true when exists)
|
||||
Support GNAT extensions.
|
||||
|
||||
*g:ada_with_gnat_project_files*
|
||||
g:ada_with_gnat_project_files bool (true when exists)
|
||||
Add gnat project file keywords and Attributes.
|
||||
|
||||
*g:ada_default_compiler*
|
||||
g:ada_default_compiler string
|
||||
set default compiler. Currently supported is 'gnat' and
|
||||
'decada'.
|
||||
|
||||
An "exists" type is a boolean is considered true when the variable is defined
|
||||
and false when the variable is undefined. The value which the variable is
|
||||
set makes no difference.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.3 Commands ~
|
||||
*ft-ada-commands*
|
||||
|
||||
:AdaRainbow *:AdaRainbow*
|
||||
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
|
||||
'(' and ')'
|
||||
|
||||
:AdaLines *:AdaLines*
|
||||
Toggles line error (|g:ada_line_errors|) display
|
||||
|
||||
:AdaSpaces *:AdaSpaces*
|
||||
Toggles space error (|g:ada_space_errors|) display.
|
||||
|
||||
:AdaTagDir *:AdaTagDir*
|
||||
Creates tags file for the directory of the current file.
|
||||
|
||||
:AdaTagFile *:AdaTagFile*
|
||||
Creates tags file for the current file.
|
||||
|
||||
:AdaTypes *:AdaTypes*
|
||||
Toggles standard types (|g:ada_standard_types|) colour.
|
||||
|
||||
:GnatFind *:GnatFind*
|
||||
Calls |g:gnat.Find()|
|
||||
|
||||
:GnatPretty *:GnatPretty*
|
||||
Calls |g:gnat.Pretty()|
|
||||
|
||||
:GnatTags *:GnatTags*
|
||||
Calls |g:gnat.Tags()|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.3 Variables ~
|
||||
*ft-ada-variables*
|
||||
|
||||
*g:gnat*
|
||||
g:gnat object
|
||||
Control object which manages GNAT compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
|
||||
for details.
|
||||
|
||||
*g:decada*
|
||||
g:decada object
|
||||
Control object which manages Dec Ada compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'decada'. See
|
||||
|decada_members|for details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.4 Constants ~
|
||||
*ft-ada-constants*
|
||||
|
||||
All constants are locked. See |:lockvar| for details.
|
||||
|
||||
*g:ada#WordRegex*
|
||||
g:ada#WordRegex string
|
||||
Regular expression to search for Ada words
|
||||
|
||||
*g:ada#DotWordRegex*
|
||||
g:ada#DotWordRegex string
|
||||
Regular expression to search for Ada words separated by dots.
|
||||
|
||||
*g:ada#Comment*
|
||||
g:ada#Comment string
|
||||
Regular expression to search for Ada comments
|
||||
|
||||
*g:ada#Keywords*
|
||||
g:ada#Keywords list of dictionaries
|
||||
List of keywords, attributes etc. pp. in the format used by
|
||||
omni completion. See |complete-items| for details.
|
||||
|
||||
*g:ada#Ctags_Kinds*
|
||||
g:ada#Ctags_Kinds dictionary of lists
|
||||
Dictionary of the various kinds of items which the Ada support
|
||||
for Ctags generates.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.2 Functions ~
|
||||
*ft-ada-functions*
|
||||
|
||||
ada#Word([{line}, {col}]) *ada#Word()*
|
||||
Return full name of Ada entity under the cursor (or at given
|
||||
line/column), stripping white space/newlines as necessary.
|
||||
|
||||
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
|
||||
List all occurrences of the Ada entity under the cursor (or at
|
||||
given line/column) inside the quick-fix window
|
||||
|
||||
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
|
||||
List all occurrences of the Ada entity under the cursor (or at
|
||||
given line/column) in the tag jump list. Mode can either be
|
||||
'tjump' or 'stjump'.
|
||||
|
||||
ada#Create_Tags ({option}) *ada#Create_Tags()*
|
||||
Creates tag file using Ctags. The option can either be 'file'
|
||||
for the current file, 'dir' for the directory of the current
|
||||
file or a file name.
|
||||
|
||||
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
|
||||
Adds the tag file header (!_TAG_) informations to the current
|
||||
file which are missing from the GNAT XREF output.
|
||||
|
||||
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
|
||||
Toggles highlighting options on or off. Used for the Ada menu.
|
||||
|
||||
*gnat#New()*
|
||||
gnat#New ()
|
||||
Create a new gnat object. See |g:gnat| for details.
|
||||
|
||||
|
||||
==============================================================================
|
||||
8. Extra Plugins ~
|
||||
*ada-extra-plugins*
|
||||
|
||||
You can optionally install the following extra plug-in. They work well with Ada
|
||||
and enhance the ability of the Ada mode.:
|
||||
|
||||
backup.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1537
|
||||
Keeps as many backups as you like so you don't have to.
|
||||
|
||||
rainbow_parenthsis.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1561
|
||||
Very helpful since Ada uses only '(' and ')'.
|
||||
|
||||
nerd_comments.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1218
|
||||
Excellent commenting and uncommenting support for almost any
|
||||
programming language.
|
||||
|
||||
matchit.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=39
|
||||
'%' jumping for any language. The normal '%' jump only works for '{}'
|
||||
style languages. The Ada mode will set the needed search patters.
|
||||
|
||||
taglist.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=273
|
||||
Source code explorer sidebar. There is a patch for Ada available.
|
||||
|
||||
The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim
|
||||
contains all of the above.
|
||||
|
||||
==============================================================================
|
||||
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
|
||||
vim: filetype=help encoding=latin1
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*arabic.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.0. Last change: 2006 May 06
|
||||
*autocmd.txt* For Vim version 7.1. Last change: 2007 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -263,7 +263,7 @@ Name triggered by ~
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|TermResponse| after the termainal response to |t_RV| is received
|
||||
|TermResponse| after the terminal response to |t_RV| is received
|
||||
|
||||
|VimLeavePre| before exiting Vim, before writing the viminfo file
|
||||
|VimLeave| before exiting Vim, after writing the viminfo file
|
||||
@@ -279,6 +279,7 @@ Name triggered by ~
|
||||
|FuncUndefined| a user function is used but it isn't defined
|
||||
|SpellFileMissing| a spell file is used but it can't be found
|
||||
|SourcePre| before sourcing a Vim script
|
||||
|SourceCmd| before sourcing a Vim script |Cmd-event|
|
||||
|
||||
|VimResized| after the Vim window size changed
|
||||
|FocusGained| Vim got input focus
|
||||
@@ -460,6 +461,9 @@ CursorHold When the user doesn't press a key for the time
|
||||
make some coffee. :) See |CursorHold-example|
|
||||
for previewing tags.
|
||||
This event is only triggered in Normal mode.
|
||||
It is not triggered when waiting for a command
|
||||
argument to be typed, or a movement after an
|
||||
operator.
|
||||
While recording the CursorHold event is not
|
||||
triggered. |q|
|
||||
Note: Interactive commands cannot be used for
|
||||
@@ -527,8 +531,6 @@ FileChangedShell When Vim notices that the modification time of
|
||||
and the buffer was not changed. If a
|
||||
FileChangedShell autocommand is present the
|
||||
warning message and prompt is not given.
|
||||
This is useful for reloading related buffers
|
||||
which are affected by a single command.
|
||||
The |v:fcs_reason| variable is set to indicate
|
||||
what happened and |v:fcs_choice| can be used
|
||||
to tell Vim what to do next.
|
||||
@@ -560,7 +562,8 @@ FileReadPost After reading a file with a ":read" command.
|
||||
*FileReadPre*
|
||||
FileReadPre Before reading a file with a ":read" command.
|
||||
*FileType*
|
||||
FileType When the 'filetype' option has been set.
|
||||
FileType When the 'filetype' option has been set. The
|
||||
pattern is matched against the filetype.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'filetype'.
|
||||
@@ -616,8 +619,9 @@ FocusLost When Vim lost input focus. Only for the GUI
|
||||
*FuncUndefined*
|
||||
FuncUndefined When a user function is used but it isn't
|
||||
defined. Useful for defining a function only
|
||||
when it's used. Both <amatch> and <afile> are
|
||||
set to the name of the function.
|
||||
when it's used. The pattern is matched
|
||||
against the function name. Both <amatch> and
|
||||
<afile> are set to the name of the function.
|
||||
See |autoload-functions|.
|
||||
*GUIEnter*
|
||||
GUIEnter After starting the GUI successfully, and after
|
||||
@@ -625,6 +629,12 @@ GUIEnter After starting the GUI successfully, and after
|
||||
VimEnter when using gvim. Can be used to
|
||||
position the window from a .gvimrc file: >
|
||||
:autocmd GUIEnter * winpos 100 50
|
||||
< *GUIFailed*
|
||||
GUIFailed After starting the GUI failed. Vim may
|
||||
continue to run in the terminal, if possible
|
||||
(only on Unix and alikes, when connecting the
|
||||
X server fails). You may want to quit Vim: >
|
||||
:autocmd GUIFailed * qall
|
||||
< *InsertChange*
|
||||
InsertChange When typing <Insert> while in Insert or
|
||||
Replace mode. The |v:insertmode| variable
|
||||
@@ -632,8 +642,8 @@ InsertChange When typing <Insert> while in Insert or
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertEnter*
|
||||
InsertEnter When starting Insert mode. Also for Replace
|
||||
mode and Virtual Replace mode. The
|
||||
InsertEnter Just before starting Insert mode. Also for
|
||||
Replace mode and Virtual Replace mode. The
|
||||
|v:insertmode| variable indicates the mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
@@ -656,7 +666,7 @@ MenuPopup Just before showing the popup menu (under the
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|
||||
|:vimgrepadd|, |:vimgrepadd|). The pattern is
|
||||
|:vimgrepadd|, |:lvimgrepadd|). The pattern is
|
||||
matched against the command being run. When
|
||||
|:grep| is used but 'grepprg' is set to
|
||||
"internal" it still matches "grep".
|
||||
@@ -670,7 +680,8 @@ QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
location.
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
server was received |server2client()|.
|
||||
server was received |server2client()|. The
|
||||
pattern is matched against the {serverid}.
|
||||
<amatch> is equal to the {serverid} from which
|
||||
the reply was sent, and <afile> is the actual
|
||||
reply string.
|
||||
@@ -690,10 +701,17 @@ ShellFilterPost After executing a shell command with
|
||||
Can be used to check for any changed files.
|
||||
*SourcePre*
|
||||
SourcePre Before sourcing a Vim script. |:source|
|
||||
<afile> is the name of the file being sourced.
|
||||
*SourceCmd*
|
||||
SourceCmd When sourcing a Vim script. |:source|
|
||||
<afile> is the name of the file being sourced.
|
||||
The autocommand must source this file.
|
||||
|Cmd-event|
|
||||
*SpellFileMissing*
|
||||
SpellFileMissing When trying to load a spell checking file and
|
||||
it can't be found. <amatch> is the language,
|
||||
'encoding' also matters. See
|
||||
it can't be found. The pattern is matched
|
||||
against the language. <amatch> is the
|
||||
language, 'encoding' also matters. See
|
||||
|spell-SpellFileMissing|.
|
||||
*StdinReadPost*
|
||||
StdinReadPost After reading from the stdin into the buffer,
|
||||
@@ -727,7 +745,8 @@ SwapExists Detected an existing swap file when starting
|
||||
Note: Do not try to change the buffer, the
|
||||
results are unpredictable.
|
||||
*Syntax*
|
||||
Syntax When the 'syntax' option has been set.
|
||||
Syntax When the 'syntax' option has been set. The
|
||||
pattern is matched against the syntax name.
|
||||
<afile> can be used for the name of the file
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'syntax'.
|
||||
@@ -1219,8 +1238,8 @@ highlighting when starting Vim.
|
||||
|
||||
*Cmd-event*
|
||||
When using one of the "*Cmd" events, the matching autocommands are expected to
|
||||
do the file reading or writing. This can be used when working with a special
|
||||
kind of file, for example on a remote system.
|
||||
do the file reading, writing or sourcing. This can be used when working with
|
||||
a special kind of file, for example on a remote system.
|
||||
CAREFUL: If you use these events in a wrong way, it may have the effect of
|
||||
making it impossible to read or write the matching files! Make sure you test
|
||||
your autocommands properly. Best is to use a pattern that will never match a
|
||||
@@ -1233,9 +1252,10 @@ possible with a BufReadCmd, use the |:preserve| command to make sure the
|
||||
original file isn't needed for recovery. You might want to do this only when
|
||||
you expect the file to be modified.
|
||||
|
||||
The |v:cmdarg| variable holds the "++enc=" and "++ff=" argument that are
|
||||
effective. These should be used for the command that reads/writes the file.
|
||||
The |v:cmdbang| variable is one when "!" was used, zero otherwise.
|
||||
For file read and write commands the |v:cmdarg| variable holds the "++enc="
|
||||
and "++ff=" argument that are effective. These should be used for the command
|
||||
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
|
||||
used, zero otherwise.
|
||||
|
||||
See the $VIMRUNTIME/plugin/netrw.vim for examples.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.0. Last change: 2006 May 05
|
||||
*change.txt* For Vim version 7.1. Last change: 2007 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -640,7 +640,7 @@ The flags that you can use for the substitute commands:
|
||||
|
||||
[#] Like [p] and prepend the line number.
|
||||
|
||||
[l] Like [l] but print the text like |:list|.
|
||||
[l] Like [p] but print the text like |:list|.
|
||||
|
||||
[r] Only useful in combination with ":&" or ":s" without arguments. ":&r"
|
||||
works the same way as ":~": When the search pattern is empty, use the
|
||||
@@ -670,14 +670,20 @@ pattern from the last substitute or ":global" command. With the [r] flag, the
|
||||
command uses the pattern from the last substitute, ":global", or search
|
||||
command.
|
||||
|
||||
If the {string} is omitted the substitute is done as if it's empty. Thus the
|
||||
matched pattern is deleted. The separator after {pattern} can also be left
|
||||
out then. Example: >
|
||||
:%s/TESTING
|
||||
This deletes "TESTING" from all lines, but only one per line.
|
||||
|
||||
For compatibility with Vi these two exceptions are allowed:
|
||||
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
|
||||
"\&{string}&" does the same as "//{string}/".
|
||||
*E146*
|
||||
Instead of the '/' which surrounds the pattern and replacement string, you
|
||||
can use any other character, but not an alphanumeric character, '\', '"' or
|
||||
'|'. This is useful if you want to include a '/' in the search pattern or
|
||||
replacement string. Example: >
|
||||
can use any other single-byte character, but not an alphanumeric character,
|
||||
'\', '"' or '|'. This is useful if you want to include a '/' in the search
|
||||
pattern or replacement string. Example: >
|
||||
:s+/+//+
|
||||
|
||||
For the definition of a pattern, see |pattern|.
|
||||
@@ -1075,7 +1081,7 @@ and ":put" commands and with CTRL-R. {not in Vi}
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
feature}
|
||||
|
||||
6. Expression register "= *quote_=* *quote=*
|
||||
6. Expression register "= *quote_=* *quote=* *@=*
|
||||
This is not really a register that stores text, but is a way to use an
|
||||
expression in commands which use a register. The expression register is
|
||||
read-only; you cannot put text into it. After the '=', the cursor moves to
|
||||
@@ -1365,7 +1371,7 @@ readability.
|
||||
|
||||
letter meaning when present in 'formatoptions' ~
|
||||
|
||||
t Auto-wrap text using textwidth (does not apply to comments)
|
||||
t Auto-wrap text using textwidth
|
||||
c Auto-wrap comments using textwidth, inserting the current comment
|
||||
leader automatically.
|
||||
r Automatically insert the current comment leader after hitting
|
||||
@@ -1565,6 +1571,10 @@ found here: |sort()|.
|
||||
in their original order, right before the sorted
|
||||
lines.
|
||||
|
||||
If {pattern} is empty (e.g. // is specified), the
|
||||
last search pattern is used. This allows trying out
|
||||
a pattern first.
|
||||
|
||||
Note that using ":sort" with ":global" doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*cmdline.txt* For Vim version 7.1. Last change: 2008 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -301,6 +301,10 @@ CTRL-^ Toggle the use of language |:lmap| mappings and/or Input
|
||||
for the next command or Search pattern.
|
||||
{not in Vi}
|
||||
|
||||
*c_CTRL-]*
|
||||
CTRL-] Trigger abbreviation, without inserting a character. {not in
|
||||
Vi}
|
||||
|
||||
For Emacs-style editing on the command-line see |emacs-keys|.
|
||||
|
||||
The <Up> and <Down> keys take the current command-line as a search string.
|
||||
@@ -312,7 +316,7 @@ The same could be done by typing <S-Up> a number of times until the desired
|
||||
command-line is shown. (Note: the shifted arrow keys do not work on all
|
||||
terminals)
|
||||
|
||||
*his* *:history*
|
||||
*:his* *:history*
|
||||
:his[tory] Print the history of last entered commands.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
@@ -443,6 +447,11 @@ extensions matching the 'suffixes' option.
|
||||
|
||||
To completely ignore files with some extension use 'wildignore'.
|
||||
|
||||
To match only files that end at the end of the typed text append a "$". For
|
||||
example, to match only files that end in ".c": >
|
||||
:e *.c$
|
||||
This will not match a file ending in ".cpp". Without the "$" it does match.
|
||||
|
||||
The old value of an option can be obtained by hitting 'wildchar' just after
|
||||
the '='. For example, typing 'wildchar' after ":set dir=" will insert the
|
||||
current value of 'dir'. This overrules file name completion for the options
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.0. Last change: 2006 May 01
|
||||
*debug.txt* For Vim version 7.1. Last change: 2006 May 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debugger.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*debugger.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 7.0. Last change: 2006 Mar 09
|
||||
*develop.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -187,7 +187,7 @@ strcpy() STRCPY() Includes cast to (char *), for char_u * args
|
||||
strchr() vim_strchr() Accepts special characters
|
||||
strrchr() vim_strrchr() Accepts special characters
|
||||
isspace() vim_isspace() Can handle characters > 128
|
||||
iswhite() vim_iswhite() Only TRUE for Tab and space
|
||||
iswhite() vim_iswhite() Only TRUE for tab and space
|
||||
memcpy() mch_memmove() Handles overlapped copies
|
||||
bcopy() mch_memmove() Handles overlapped copies
|
||||
memset() vim_memset() Uniform for all systems
|
||||
@@ -224,7 +224,7 @@ __.* POSIX, system
|
||||
_[A-Z].* POSIX, system
|
||||
E[A-Z0-9]* POSIX, errno.h
|
||||
|
||||
*_t POSIX, for typedefs. Use *_T instead.
|
||||
.*_t POSIX, for typedefs. Use .*_T instead.
|
||||
|
||||
wait don't use as argument to a function, conflicts with types.h
|
||||
index shadows global declaration
|
||||
@@ -437,7 +437,7 @@ the best method is. Alternatives:
|
||||
seconds for English, which can be acceptable for interactive use. But for
|
||||
some languages it takes more than ten seconds (e.g., German, Catalan),
|
||||
which is unacceptable slow. For batch processing (automatic corrections)
|
||||
it's to slow for all languages.
|
||||
it's too slow for all languages.
|
||||
2. Use a trie for the soundfolded words, so that searching can be done just
|
||||
like how it works without soundfolding. This requires remembering a list
|
||||
of good words for each soundfolded word. This makes finding matches very
|
||||
@@ -471,7 +471,7 @@ initialized from words listed in COMMON items in the affix file, so that it
|
||||
also works when starting a new file.
|
||||
|
||||
This isn't ideal, because the longer Vim is running the higher the counts
|
||||
become. But in practice it is a noticable improvement over not using the word
|
||||
become. But in practice it is a noticeable improvement over not using the word
|
||||
count.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.0. Last change: 2006 Apr 14
|
||||
*diff.txt* For Vim version 7.1. Last change: 2006 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -155,13 +155,16 @@ All the buffers edited in a window where the 'diff' option is set will join in
|
||||
the diff. This is also possible for hidden buffers. They must have been
|
||||
edited in a window first for this to be possible.
|
||||
|
||||
*:DiffOrig* *diff-original-file*
|
||||
Since 'diff' is a window-local option, it's possible to view the same buffer
|
||||
in diff mode in one window and "normal" in another window. It is also
|
||||
possible to view the changes you have made to a buffer, but since Vim doesn't
|
||||
allow having two buffers for the same file, you need to make a copy of the
|
||||
original file and diff with that. For example: >
|
||||
:!cp % tempfile
|
||||
:diffsplit tempfile
|
||||
possible to view the changes you have made to a buffer since the file was
|
||||
loaded. Since Vim doesn't allow having two buffers for the same file, you
|
||||
need another buffer. This command is useful: >
|
||||
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
|
||||
between the current buffer and the file it was loaded from.
|
||||
|
||||
A buffer that is unloaded cannot be used for the diff. But it does work for
|
||||
hidden buffers. You can use ":hide" to close a window without unloading the
|
||||
@@ -239,7 +242,7 @@ that the buffers will be equal within the specified range.
|
||||
mode.
|
||||
See below for [range].
|
||||
|
||||
*:diffpu* *:diffput*
|
||||
*:diffpu* *:diffput* *E793*
|
||||
:[range]diffpu[t] [bufspec]
|
||||
Modify another buffer to undo difference with the current
|
||||
buffer. Just like ":diffget" but the other buffer is modified
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*digraph.txt* For Vim version 7.0. Last change: 2006 Apr 25
|
||||
*digraph.txt* For Vim version 7.1. Last change: 2006 Jul 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -107,13 +107,12 @@ If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
|
||||
this, you will have to type <BS> e again. To avoid this don't set the
|
||||
'digraph' option and use CTRL-K to enter digraphs.
|
||||
|
||||
You may have problems using Vim with characters which have an ASCII value
|
||||
above 128. For example: You insert ue (u-umlaut) and the editor echoes \334
|
||||
in Insert mode. After leaving the Insert mode everything is fine. Note that
|
||||
fmt removes all characters with ASCII codes above 128 from the text being
|
||||
formatted. On some Unix systems this means you have to define the
|
||||
environment-variable LC_CTYPE. If you are using csh, then put the following
|
||||
line in your .cshrc: >
|
||||
You may have problems using Vim with characters which have a value above 128.
|
||||
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
|
||||
mode. After leaving the Insert mode everything is fine. Note that fmt
|
||||
removes all characters with a value above 128 from the text being formatted.
|
||||
On some Unix systems this means you have to define the environment-variable
|
||||
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
|
||||
setenv LC_CTYPE iso_8859_1
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*editing.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -372,7 +372,7 @@ Example: The command ":e Long File Name " will edit the file "Long File
|
||||
Name". When using a command that accepts more than one file name (like ":next
|
||||
file1 file2") embedded spaces must be escaped with a backslash.
|
||||
|
||||
*wildcard*
|
||||
*wildcard* *wildcards*
|
||||
Wildcards in {file} are expanded. Which wildcards are supported depends on
|
||||
the system. These are the common ones:
|
||||
? matches one character
|
||||
@@ -749,7 +749,7 @@ Thus you can use the command "vim *.c" to edit all the C files. From within
|
||||
Vim the command ":n *.c" does the same.
|
||||
|
||||
White space is used to separate file names. Put a backslash before a space or
|
||||
Tab to include it in a file name. E.g., to edit the single file "foo bar": >
|
||||
tab to include it in a file name. E.g., to edit the single file "foo bar": >
|
||||
:next foo\ bar
|
||||
|
||||
On Unix and a few other systems you can also use backticks, for example: >
|
||||
@@ -849,7 +849,7 @@ Note: When the 'write' option is off, you are not able to write any file.
|
||||
|
||||
*:w* *:write*
|
||||
*E502* *E503* *E504* *E505*
|
||||
*E512* *E514* *E667*
|
||||
*E512* *E514* *E667* *E796*
|
||||
:w[rite] Write the whole buffer to the current file. This is
|
||||
the normal way to save changes to a file. It fails
|
||||
when the 'readonly' option is set or when there is
|
||||
@@ -1150,8 +1150,8 @@ If you want to always use ":confirm", set the 'confirm' option.
|
||||
*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
|
||||
:bro[wse] {command} Open a file selection dialog for an argument to
|
||||
{command}. At present this works for |:e|, |:w|,
|
||||
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc| and
|
||||
|:mksession|.
|
||||
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|,
|
||||
|:mksession|, |:split|, |:vsplit|, and |:tabe|.
|
||||
{only in Win32, Athena, Motif, GTK and Mac GUI}
|
||||
When ":browse" is not possible you get an error
|
||||
message. If the |+browse| feature is missing or the
|
||||
@@ -1469,7 +1469,9 @@ problem goes away the next day.
|
||||
{not available when compiled without the |+path_extra| feature}
|
||||
|
||||
The file searching is currently used for the 'path', 'cdpath' and 'tags'
|
||||
options. There are three different types of searching:
|
||||
options, for |finddir()| and |findfile()|.
|
||||
|
||||
There are three different types of searching:
|
||||
|
||||
1) Downward search: *starstar*
|
||||
Downward search uses the wildcards '*', '**' and possibly others
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*farsi.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*farsi.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.0. Last change: 2006 Apr 28
|
||||
*filetype.txt* For Vim version 7.1. Last change: 2007 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -43,6 +43,8 @@ Detail: The ":filetype on" command will load one of these files:
|
||||
BufNewFile and BufRead events. If the file type is not found by the
|
||||
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
|
||||
contents of the file.
|
||||
When the GUI is running or will start soon, the menu.vim script is
|
||||
also sourced. See |'go-M'| about avoiding that.
|
||||
|
||||
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
|
||||
@@ -304,24 +306,28 @@ all loaded. For example, if this command: >
|
||||
|
||||
set runtimepath
|
||||
|
||||
produces this output: >
|
||||
produces this output:
|
||||
|
||||
runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60
|
||||
runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 ~
|
||||
|
||||
then Vim will load all plugins in these directories: >
|
||||
then Vim will load all plugins in these directories and below:
|
||||
|
||||
/etc/vim/plugin/
|
||||
~/.vim/plugin/
|
||||
/usr/local/share/vim/vim60/plugin/
|
||||
/etc/vim/plugin/ ~
|
||||
~/.vim/plugin/ ~
|
||||
/usr/local/share/vim/vim60/plugin/ ~
|
||||
|
||||
Note that the last one is the value of $VIMRUNTIME which has been expanded.
|
||||
|
||||
What if it looks like your plugin is not being loaded? You can find out what
|
||||
happens when Vim starts up by using the |-V| argument: >
|
||||
vim -V1
|
||||
|
||||
vim -V2
|
||||
|
||||
You will see a lot of messages, in between them is a remark about loading the
|
||||
plugins. It starts with: >
|
||||
Searching for "plugin/*.vim" in
|
||||
plugins. It starts with:
|
||||
|
||||
Searching for "plugin/**/*.vim" in ~
|
||||
|
||||
There you can see where Vim looks for your plugin scripts.
|
||||
|
||||
==============================================================================
|
||||
@@ -417,7 +423,8 @@ Global mappings:
|
||||
same as the local <Leader>o described above.
|
||||
|
||||
Variables:
|
||||
g:changelog_timeformat The date (and time) format used in ChangeLog entries.
|
||||
g:changelog_timeformat Deprecated; use g:changelog_dateformat instead.
|
||||
g:changelog_dateformat The date (and time) format used in ChangeLog entries.
|
||||
The format accepted is the same as for the
|
||||
|strftime()| function.
|
||||
The default is "%Y-%m-%d" which is the standard format
|
||||
@@ -467,6 +474,14 @@ g:changelog_date_entry_search
|
||||
|2003-01-14 Full Name <user@host>
|
||||
< and some similar formats.
|
||||
|
||||
g:changelog_date_end_entry_search
|
||||
The search pattern to use when searching for the end
|
||||
of a date-entry.
|
||||
The same tokens that can be used for
|
||||
g:changelog_new_date_format can be used here as well.
|
||||
The default is '^\s*$' which finds lines that contain
|
||||
only whitespace or are completely empty.
|
||||
|
||||
The Changelog entries are inserted where they add the least amount of text.
|
||||
After figuring out the current date and user, the file is searched for an
|
||||
entry beginning with the current date and user and if found adds another item
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 7.0. Last change: 2006 Mar 29
|
||||
*fold.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -73,7 +73,7 @@ EXPR *fold-expr*
|
||||
The folds are automatically defined by their foldlevel, like with the "indent"
|
||||
method. The value of the 'foldexpr' option is evaluated to get the foldlevel
|
||||
of a line. Examples:
|
||||
This will create a fold for all consecutive lines that start with a Tab: >
|
||||
This will create a fold for all consecutive lines that start with a tab: >
|
||||
:set foldexpr=getline(v:lnum)[0]==\"\\t\"
|
||||
This will call a function to compute the fold level: >
|
||||
:set foldexpr=MyFoldLevel(v:lnum)
|
||||
|
||||
@@ -1,303 +0,0 @@
|
||||
*getscript.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
|
||||
Get the Latest VimScripts
|
||||
|
||||
Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
|
||||
(remove NOSPAM from the email address)
|
||||
*GetLatestVimScripts-copyright*
|
||||
Copyright: (c) 2004-2005 by Charles E. Campbell, Jr.
|
||||
The VIM LICENSE applies to GetLatestVimScripts.vim and
|
||||
GetLatestVimScripts.txt (see |copyright|) except use
|
||||
"GetLatestVimScripts" instead of "Vim".
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
|
||||
==============================================================================
|
||||
1. Contents *glvs-contents*
|
||||
|
||||
1. Contents.......................................: |glvs-contents|
|
||||
2. GetLatestVimScripts Usage......................: |glvs|
|
||||
3. GetLatestVimScripts Data File..................: |glvs-data|
|
||||
4. GetLatestVimScripts Plugins....................: |glvs-plugins|
|
||||
5. GetLatestVimScripts AutoInstall................: |glvs-autoinstall|
|
||||
6. GetLatestVimScripts Algorithm..................: |glvs-alg|
|
||||
7. GetLatestVimScripts History....................: |glvs-hist|
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs*
|
||||
|
||||
While in vim, type
|
||||
>
|
||||
:GetLatestVimScripts
|
||||
<
|
||||
Unless its been defined elsewhere,
|
||||
>
|
||||
:GLVS
|
||||
<
|
||||
will also work.
|
||||
|
||||
The script will attempt to update and, if so directed, automatically
|
||||
install scripts from http://vim.sourceforge.net/. To do so it will
|
||||
peruse a file, [.vim|vimfiles]/GetLatest/GetLatestVimScripts.dat
|
||||
(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
|
||||
directory (see |glvs-plugins|).
|
||||
|
||||
Scripts which have been downloaded will appear in the .../GetLatest
|
||||
subdirectory.
|
||||
|
||||
The <GetLatestVimScripts.dat> file will be automatically be updated to
|
||||
reflect the latest version of script(s) so downloaded.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. GetLatestVimScripts Data File *getlatestvimscripts-data* *glvs-data*
|
||||
|
||||
The Data file has a header which should appear as:
|
||||
>
|
||||
ScriptID SourceID Filename
|
||||
--------------------------
|
||||
<
|
||||
Below that are three columns; the first two are numeric followed by a
|
||||
text column.
|
||||
|
||||
The first number on each line gives the script's ScriptID. When
|
||||
you're about to use a web browser to look at scripts on
|
||||
http://vim.sf.net/, just before you click on the script's link, you'll
|
||||
see a line resembling
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
|
||||
download the associated page.
|
||||
|
||||
The second number on each line gives the script's SourceID. The
|
||||
SourceID records the count of uploaded scripts as determined by
|
||||
vim.sf.net; hence it serves to indicate "when" a script was uploaded.
|
||||
Setting the SourceID to 1 insures that GetLatestVimScripts will assume
|
||||
that the script it has is out-of-date.
|
||||
|
||||
The SourceID is extracted by GetLatestVimScripts from the script's
|
||||
page on vim.sf.net; whenever its greater than the one stored in the
|
||||
GetLatestVimScripts.dat file, the script will be downloaded.
|
||||
|
||||
If your script's author has included a special comment line in his/her
|
||||
plugin, the plugin itself will be used by GetLatestVimScripts to build
|
||||
your <GetLatestVimScripts.dat> file, including any dependencies on
|
||||
other scripts it may have.
|
||||
|
||||
If your comment field begins with :AutoInstall:, GetLatestVimScripts
|
||||
will attempt to automatically install the script. Thus,
|
||||
GetLatestVimScripts thus provides a comprehensive ability to keep your
|
||||
plugins up-to-date!
|
||||
|
||||
==============================================================================
|
||||
4. GetLatestVimScripts Plugins *getlatestvimscripts-plugins* *glvs-plugins*
|
||||
|
||||
|
||||
If a plugin author includes the following comment anywhere in their
|
||||
plugin, GetLatestVimScripts will find it and use it to build user's
|
||||
GetLatestVimScripts.dat files:
|
||||
>
|
||||
src_id
|
||||
v
|
||||
" GetLatestVimScripts: ### ### yourscriptname
|
||||
^
|
||||
scriptid
|
||||
<
|
||||
As an author, you should include such a line in to refer to your own
|
||||
script plus any additional lines describing any plugin dependencies it
|
||||
may have. Same format, of course!
|
||||
|
||||
If your command is auto-installable (see |glvs-autoinstall|), and most
|
||||
scripts are, then you may include :AutoInstall: at the start of
|
||||
"yourscriptname".
|
||||
|
||||
GetLatestVimScript commands for those scripts are then appended, if
|
||||
not already present, to the user's GetLatest/GetLatestVimScripts.dat
|
||||
file. Its a relatively painless way to automate the acquisition of
|
||||
any scripts your plugins depend upon.
|
||||
|
||||
Now, as an author, you probably don't want GetLatestVimScripts to
|
||||
download your own scripts for you yourself, thereby overwriting your
|
||||
not-yet-released hard work. GetLatestVimScripts provides a solution
|
||||
for this: put
|
||||
>
|
||||
0 0 yourscriptname
|
||||
<
|
||||
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will
|
||||
skip examining the "yourscriptname" scripts for those
|
||||
GetLatestVimScript comment lines. As a result, those lines won't be
|
||||
inadvertently installed into your <GetLatestVimScripts.dat> file and
|
||||
subsequently used to download your own scripts. This is especially
|
||||
important to do if you've included the :AutoInstall: option.
|
||||
|
||||
Be certain to use the same "yourscriptname" in the "0 0
|
||||
yourscriptname" line as you've used in your GetLatestVimScript
|
||||
comment!
|
||||
|
||||
|
||||
==============================================================================
|
||||
5. GetLatestVimScripts AutoInstall *getlatestvimscripts-autoinstall*
|
||||
*glvs-autoinstall*
|
||||
|
||||
GetLatestVimScripts now supports "AutoInstall". Not all scripts are
|
||||
supportive of auto-install, as they may have special things you need
|
||||
to do to install them (please refer to the script's "install"
|
||||
directions). On the other hand, most scripts will be
|
||||
auto-installable.
|
||||
|
||||
To let GetLatestVimScripts do an autoinstall, the data file's comment
|
||||
field should begin with (surrounding blanks are ignored):
|
||||
|
||||
:AutoInstall:
|
||||
|
||||
Both colons are needed, and it should begin the comment
|
||||
(yourscriptname) field.
|
||||
|
||||
One may prevent any autoinstalling by putting the following line
|
||||
in your <.vimrc>:
|
||||
>
|
||||
let g:GetLatestVimScripts_allowautoinstall= 0
|
||||
<
|
||||
|
||||
With :AutoInstall: enabled, as it is by default, files which end with
|
||||
|
||||
---.tar.bz2 : decompressed and untarred in [.vim|vimfiles] directory
|
||||
---.tar.gz : decompressed and untarred in [.vim|vimfiles] directory
|
||||
---.vim.bz2 : decompressed and moved to the .vim/plugin directory
|
||||
---.vim.gz : decompressed and moved to the .vim/plugin directory
|
||||
---.zip : unzipped in [.vim|vimfiles] directory
|
||||
---.vim : moved to [.vim|vimfiles]/plugin directory
|
||||
|
||||
and which merely need to have their components placed by the
|
||||
untar/gunzip or move-to-plugin-directory process should be
|
||||
auto-installable.
|
||||
|
||||
When is a script not auto-installable? Let me give an example:
|
||||
>
|
||||
[.vim|vimfiles]/after/syntax/blockhl.vim
|
||||
<
|
||||
The <blockhl.vim> script provides block highlighting for C/C++
|
||||
programs; it is available at:
|
||||
>
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=104
|
||||
<
|
||||
Currently, vim's after/syntax only supports by-filetype scripts (in
|
||||
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install
|
||||
would possibly overwrite the current user's after/syntax/c.vim file.
|
||||
|
||||
In my own case, I use <aftersyntax.vim> (renamed to
|
||||
after/syntax/c.vim) to allow a after/syntax/c/ directory:
|
||||
>
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=1023
|
||||
<
|
||||
The script allows multiple syntax files to exist separately in the
|
||||
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and
|
||||
build an appropriate tarball for auto-install because of the potential
|
||||
for the after/syntax/c.vim contained in it to overwrite a user's
|
||||
c.vim.
|
||||
|
||||
|
||||
==============================================================================
|
||||
6. GetLatestVimScripts Algorithm *getlatestvimscripts-algorithm*
|
||||
*glvs-alg*
|
||||
|
||||
The Vim sourceforge page dynamically creates a page by keying off of
|
||||
the so-called script-id. Within the webpage of
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
is a line specifying the latest source-id (src_id). The source
|
||||
identifier numbers are always increasing, hence if the src_id is
|
||||
greater than the one recorded for the script in GetLatestVimScripts
|
||||
then its time to download a newer copy of that script.
|
||||
|
||||
GetLatestVimScripts will then download the script and update its
|
||||
internal database of script ids, source ids, and scriptnames.
|
||||
|
||||
The AutoInstall process will:
|
||||
|
||||
Move the file from GetLatest/ to the following directory
|
||||
Unix : $HOME/.vim
|
||||
Windows: $HOME\vimfiles
|
||||
|
||||
if the downloaded file ends with ".bz2"
|
||||
bunzip2 it
|
||||
else if the downloaded file ends with ".gz"
|
||||
gunzip it
|
||||
if the resulting file ends with ".zip"
|
||||
unzip it
|
||||
else if the resulting file ends with ".tar"
|
||||
tar -oxvf it
|
||||
else if the resulting file ends with ".vim"
|
||||
move it to the plugin subdirectory
|
||||
|
||||
|
||||
==============================================================================
|
||||
7. GetLatestVimScripts History *getlatestvimscripts-history* *glvs-hist*
|
||||
|
||||
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
|
||||
unzip needs the -o flag to overwrite.
|
||||
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
|
||||
script! Fixed.
|
||||
v18 Mar 21, 2005 : * bugfix to automatic database construction
|
||||
* bugfix - nowrapscan caused an error
|
||||
(tnx to David Green for the fix)
|
||||
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in
|
||||
:AutoInstall:s, even though its o/s is windows
|
||||
Apr 01, 2005 * when downloading errors occurred, GLVS was
|
||||
terminating early. It now just goes on to trying
|
||||
the next script (after trying three times to
|
||||
download a script description page)
|
||||
Apr 20, 2005 * bugfix - when a failure to download occurred,
|
||||
GetLatestVimScripts would stop early and claim that
|
||||
everything was current. Fixed.
|
||||
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
|
||||
defaults to 1, can be used to prevent all
|
||||
:AutoInstall:
|
||||
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
|
||||
* fixed bug with :AutoInstall: use of helptags
|
||||
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
|
||||
always preventing downloads (just usually). Fixed.
|
||||
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
|
||||
s:dotvim. Fixed.
|
||||
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
|
||||
is zero. Useful for script authors; that way their
|
||||
own GetLatestVimScripts activity won't overwrite
|
||||
their scripts.
|
||||
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
|
||||
was intended only for testing. Removed, now works.
|
||||
* :AutoInstall: implemented
|
||||
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
|
||||
* :GetLatestVimScripts command
|
||||
* (runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
now holds scripts that need updating
|
||||
v10 Apr 19, 2004 : * moved history from script to doc
|
||||
v9 Jan 23, 2004 : windows (win32/win16/win95) will use
|
||||
double quotes ("") whereas other systems will use
|
||||
single quotes ('') around the urls in calls via wget
|
||||
v8 Dec 01, 2003 : makes three tries at downloading
|
||||
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="
|
||||
not found in downloaded webpage
|
||||
Uses t_ti, t_te, and rs to make progress visible
|
||||
v6 Aug 06, 2003 : final status messages now display summary of work
|
||||
( "Downloaded someqty scripts" or
|
||||
"Everything was current")
|
||||
Now GetLatestVimScripts is careful about downloading
|
||||
GetLatestVimScripts.vim itself!
|
||||
(goes to <NEW_GetLatestVimScripts.vim>)
|
||||
v5 Aug 04, 2003 : missing an endif near bottom
|
||||
v4 Jun 17, 2003 : redraw! just before each "considering" message
|
||||
v3 May 27, 2003 : Protects downloaded files from errant shell
|
||||
expansions with single quotes: '...'
|
||||
v2 May 14, 2003 : extracts name of item to be obtained from the
|
||||
script file. Uses it instead of comment field
|
||||
for output filename; comment is used in the
|
||||
"considering..." line and is now just a comment!
|
||||
* Fixed a bug: a string-of-numbers is not the
|
||||
same as a number, so I added zero to them
|
||||
and they became numbers. Fixes comparison.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.0. Last change: 2006 May 04
|
||||
*gui.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -510,7 +510,7 @@ floating menus that do not appear on the main menu bar.
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*E330* *E327* *E331* *E336* *E333*
|
||||
*E328* *E329* *E337*
|
||||
*E328* *E329* *E337* *E792*
|
||||
To create a new menu item, use the ":menu" commands. They are mostly like
|
||||
the ":map" set of commands but the first argument is a menu item name, given
|
||||
as a path of menus and submenus with a '.' between them, e.g.: >
|
||||
@@ -532,7 +532,7 @@ Special characters in a menu name:
|
||||
<Tab> Separates the menu name from right-aligned text. This can be
|
||||
used to show the equivalent typed command. The text "<Tab>"
|
||||
can be used here for convenience. If you are using a real
|
||||
Tab, don't forget to put a backslash before it!
|
||||
tab, don't forget to put a backslash before it!
|
||||
Example: >
|
||||
|
||||
:amenu &File.&Open<Tab>:e :browse e<CR>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w16.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*gui_w16.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -53,6 +53,16 @@ vimrc or gvimrc file: >
|
||||
There is a specific version of gvim.exe that runs under the Win32s subsystem
|
||||
of Windows 3.1 or 3.11. See |win32s|.
|
||||
|
||||
|
||||
Using Vim as a plugin *gui-w32-windowid*
|
||||
|
||||
When gvim starts up normally, it creates its own top level window. If you
|
||||
pass Vim the command-line option |--windowid| with a decimal or hexadecimal
|
||||
value, Vim will create a window that is a child of the window with the given
|
||||
ID. This enables Vim to act as a plugin in another application. This really
|
||||
is a programmer's interface, and is of no use without a supporting application
|
||||
to spawn Vim correctly.
|
||||
|
||||
==============================================================================
|
||||
2. Vim as default editor *vim-default-editor*
|
||||
|
||||
@@ -233,7 +243,8 @@ $VIMRUNTIME/mswin.vim script. You could add this line to your _vimrc file: >
|
||||
Since CTRL-C is used to copy the text to the clipboard, it can't be used to
|
||||
cancel an operation. Use CTRL-Break for that.
|
||||
|
||||
CTRL-Z is used for undo. This means you can't suspend Vim.
|
||||
CTRL-Z is used for undo. This means you can't suspend Vim with this key, use
|
||||
|:suspend| instead (if it's supported at all).
|
||||
|
||||
*CTRL-V-alternative* *CTRL-Q*
|
||||
Since CTRL-V is used to paste, you can't use it to start a blockwise Visual
|
||||
@@ -463,6 +474,8 @@ This maps Alt-Space to pop down the system menu for the Vim window. Note that
|
||||
Maps Control-N to produce the keys Alt-Space followed by N. This minimizes the
|
||||
Vim window via the system menu.
|
||||
|
||||
Note that the key changes depending on the language you are using.
|
||||
|
||||
*intellimouse-wheel-problems*
|
||||
When using the Intellimouse mouse wheel causes Vim to stop accepting input, go
|
||||
to:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*gui_x11.txt* For Vim version 7.1. Last change: 2006 Jul 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -406,8 +406,9 @@ These are the different looks:
|
||||
- That means the menubar and toolbar handles are back! Yeah! And the
|
||||
resizing grid still works too.
|
||||
|
||||
GNOME is automatically compiled with if it was found by configure.
|
||||
(FIXME: Is this still true? Use --enable-gnome-check to force it to.)
|
||||
GNOME is compiled with if it was found by configure and the
|
||||
--enable-gnome-check argument was used.
|
||||
|
||||
|
||||
GNOME session support *gui-gnome-session* *gnome-session*
|
||||
|
||||
@@ -436,7 +437,7 @@ command line argument).
|
||||
|
||||
==============================================================================
|
||||
7. KDE version *gui-kde* *kde* *KDE* *KVim*
|
||||
|
||||
*gui-x11-kde*
|
||||
There is no KDE version of Vim. There has been some work on a port using the
|
||||
Qt toolkit, but it never worked properly and it has been abandoned. Work
|
||||
continues on Yzis: www.yzis.org.
|
||||
@@ -497,12 +498,6 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
|
||||
scrollbars will remain the same, because Vim has its own, which are already
|
||||
3D (in fact, they look more like Motif).
|
||||
|
||||
*gui-x11-kde*
|
||||
For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs.
|
||||
To compile, you must use the --with-qt-dir configure flag because QTDIR is not
|
||||
automatically detected yet. Giving KDE's directories to the configure script
|
||||
may also help in some cases.
|
||||
|
||||
*gui-x11-neXtaw*
|
||||
The neXtaw version is mostly like Athena, but uses different widgets.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hangulin.txt* For Vim version 7.0. Last change: 2006 Apr 02
|
||||
*hangulin.txt* For Vim version 7.1. Last change: 2006 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hebrew.txt* For Vim version 7.0. Last change: 2003 May 11
|
||||
*hebrew.txt* For Vim version 7.1. Last change: 2003 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.0. Last change: 2006 May 07
|
||||
*help.txt* For Vim version 7.1. Last change: 2006 Nov 07
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -143,6 +143,7 @@ Special issues ~
|
||||
|farsi.txt| Farsi (Persian) editing
|
||||
|hebrew.txt| Hebrew language support and editing
|
||||
|russian.txt| Russian language support and editing
|
||||
|ada.txt| Ada (the programming language) support
|
||||
|hangulin.txt| Hangul (Korean) input mode
|
||||
|rileft.txt| right-to-left editing mode
|
||||
|
||||
@@ -189,11 +190,13 @@ Remarks about specific systems ~
|
||||
|os_win32.txt| MS-Windows 95/98/NT
|
||||
*standard-plugin-list*
|
||||
Standard plugins ~
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|pi_zip.txt| Zip archive explorer
|
||||
|pi_getscript.txt| Downloading latest version of Vim scripts
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|pi_vimball.txt| Create a self-installing Vim script
|
||||
|pi_zip.txt| Zip archive explorer
|
||||
|
||||
LOCAL ADDITIONS: *local-additions*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*howto.txt* For Vim version 7.0. Last change: 2006 Apr 02
|
||||
*howto.txt* For Vim version 7.1. Last change: 2006 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*if_cscop.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*if_mzsch.txt* For Vim version 7.1. Last change: 2007 May 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -23,6 +23,8 @@ Dynamic loading added by Sergey Khorev
|
||||
For downloading MzScheme and other info:
|
||||
http://www.plt-scheme.org/software/mzscheme/
|
||||
|
||||
Note: On FreeBSD you should use the "drscheme" port.
|
||||
|
||||
==============================================================================
|
||||
1. Commands *mzscheme-commands*
|
||||
|
||||
@@ -262,8 +264,9 @@ In a console window type "path" to see what directories are used.
|
||||
|
||||
The names of the DLLs must match the MzScheme version Vim was compiled with.
|
||||
For MzScheme version 209 they will be "libmzsch209_000.dll" and
|
||||
"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for
|
||||
"libmzsch\d\d\d_\d\d\d\.dll\c".
|
||||
"libmzgc209_000.dll". To know for sure look at the output of the ":version"
|
||||
command, look for -DDYNAMIC_MZSCH_DLL="something" and
|
||||
-DDYNAMIC_MZGC_DLL="something" in the "Compilation" info.
|
||||
|
||||
======================================================================
|
||||
vim:tw=78:ts=8:sts=4:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ole.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*if_ole.txt* For Vim version 7.1. Last change: 2007 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -40,6 +40,12 @@ instance), code similar to the following should be used:
|
||||
use Win32::OLE;
|
||||
$vim = new Win32::OLE 'Vim.Application';
|
||||
|
||||
[C#] >
|
||||
// Add a reference to VIM in your project.
|
||||
// Choose the COM tab.
|
||||
// Select "VIM Ole Interface 1.1 Type Library"
|
||||
Vim.Vim vimobj = new Vim.Vim();
|
||||
|
||||
Vim does not support acting as a "hidden" OLE server, like some other OLE
|
||||
Automation servers. When a client starts up an instance of Vim, that instance
|
||||
is immediately visible. Simply closing the OLE connection to the Vim instance
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_perl.txt* For Vim version 7.0. Last change: 2006 Mar 06
|
||||
*if_perl.txt* For Vim version 7.1. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sven Verdoolaege
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*if_pyth.txt* For Vim version 7.1. Last change: 2006 Apr 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*if_ruby.txt* For Vim version 7.1. Last change: 2006 Apr 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_sniff.txt* For Vim version 7.0. Last change: 2005 Mar 29
|
||||
*if_sniff.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 7.0. Last change: 2006 Mar 06
|
||||
*if_tcl.txt* For Vim version 7.1. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*indent.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -113,7 +113,7 @@ If you really want to reindent when you type 'o', 'O', 'e', '0', '<', '>',
|
||||
"<!>", respectively, for those keys.
|
||||
|
||||
For an emacs-style indent mode where lines aren't indented every time you
|
||||
press Enter but only if you press Tab, I suggest:
|
||||
press <Enter> but only if you press <Tab>, I suggest:
|
||||
:set cinkeys=0{,0},:,0#,!<Tab>,!^F
|
||||
You might also want to switch off 'autoindent' then.
|
||||
|
||||
@@ -434,10 +434,15 @@ assume a 'shiftwidth' of 4.
|
||||
limits the time needed to search for the start of a comment.
|
||||
(default 30 lines).
|
||||
|
||||
#N When N is non-zero recognize shell/Perl comments, starting with
|
||||
'#'. Default N is zero: don't recognizes '#' comments. Note
|
||||
that lines starting with # will still be seen as preprocessor
|
||||
lines.
|
||||
|
||||
|
||||
The defaults, spelled out in full, are:
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
|
||||
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30
|
||||
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30,#0
|
||||
|
||||
Vim puts a line in column 1 if:
|
||||
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
|
||||
@@ -510,6 +515,28 @@ Indent for a continuation line: >
|
||||
let g:pyindent_continue = '&sw * 2'
|
||||
|
||||
|
||||
SHELL *ft-sh-indent*
|
||||
|
||||
The amount of indent applied under various circumstances in a shell file can
|
||||
be configured by setting the following keys in the |Dictionary|
|
||||
b:sh_indent_defaults to a specific amount or to a |Funcref| that references a
|
||||
function that will return the amount desired:
|
||||
|
||||
b:sh_indent_options['default'] Default amount of indent.
|
||||
|
||||
b:sh_indent_options['continuation-line']
|
||||
Amount of indent to add to a continued line.
|
||||
|
||||
b:sh_indent_options['case-labels']
|
||||
Amount of indent to add for case labels.
|
||||
|
||||
b:sh_indent_options['case-statement']
|
||||
Amount of indent to add for case statements.
|
||||
|
||||
b:sh_indent_options['case-breaks']
|
||||
Amount of indent to add (or more likely
|
||||
remove) for case breaks.
|
||||
|
||||
VERILOG *ft-verilog-indent*
|
||||
|
||||
General block statements such as if, for, case, always, initial, function,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*index.txt* For Vim version 7.1. Last change: 2007 May 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -624,9 +624,10 @@ tag char note action in Normal mode ~
|
||||
included files that contains the word under
|
||||
the cursor, start searching at beginning of
|
||||
current file
|
||||
|[p| [p 2 like "P", but adjust indent to current line
|
||||
|[m| [m 1 cursor N times back to start of member
|
||||
function
|
||||
|[p| [p 2 like "P", but adjust indent to current line
|
||||
|[s| [s 1 move to the previous misspelled word
|
||||
|[z| [z 1 move to start of open fold
|
||||
|[{| [{ 1 cursor N times back to unmatched '{'
|
||||
|[<MiddleMouse> [<MiddleMouse> 2 same as "[p"
|
||||
@@ -663,9 +664,10 @@ tag char note action in Normal mode ~
|
||||
included files that contains the word under
|
||||
the cursor, start searching at cursor
|
||||
position
|
||||
|]p| ]p 2 like "p", but adjust indent to current line
|
||||
|]m| ]m 1 cursor N times forward to end of member
|
||||
function
|
||||
|]p| ]p 2 like "p", but adjust indent to current line
|
||||
|]s| ]s 1 move to next misspelled word
|
||||
|]z| ]z 1 move to end of open fold
|
||||
|]}| ]} 1 cursor N times forward to unmatched '}'
|
||||
|]<MiddleMouse> ]<MiddleMouse> 2 same as "]p"
|
||||
@@ -748,6 +750,8 @@ tag char note action in Normal mode ~
|
||||
|gu| gu{motion} 2 make Nmove text lowercase
|
||||
|gv| gv reselect the previous Visual area
|
||||
|gw| gw{motion} 2 format Nmove text and keep cursor
|
||||
|netrw-gx| gx execute application for file name under the
|
||||
cursor (only with |netrw| plugin)
|
||||
|g@| g@{motion} call 'operatorfunc'
|
||||
|g~| g~{motion} 2 swap case for Nmove text
|
||||
|g<Down>| g<Down> 1 same as "gj"
|
||||
@@ -984,7 +988,7 @@ file names, tags, commands etc. as appropriate.
|
||||
{expr}
|
||||
CTRL-\ f - z reserved for extensions
|
||||
CTRL-\ others not used
|
||||
CTRL-] not used
|
||||
|c_CTRL-]| CTRL-] trigger abbreviation
|
||||
|c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings
|
||||
|c_CTRL-_| CTRL-_ when 'allowrevins' set: change language
|
||||
(Hebrew, Farsi)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0. Last change: 2006 May 05
|
||||
*insert.txt* For Vim version 7.1. Last change: 2007 May 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -219,8 +219,8 @@ CTRL-_ Switch between languages, as follows:
|
||||
Please refer to |rileft.txt| for more information about
|
||||
right-to-left mode.
|
||||
{not in Vi}
|
||||
Only if compiled with the |+rightleft| feature (which is not
|
||||
the default).
|
||||
Only if compiled with the |+rightleft| feature.
|
||||
|
||||
*i_CTRL-^*
|
||||
CTRL-^ Toggle the use of typing language characters.
|
||||
When language |:lmap| mappings are defined:
|
||||
@@ -1156,24 +1156,25 @@ any printable, non-white character:
|
||||
|
||||
In all three states these can be used:
|
||||
CTRL-Y Yes: Accept the currently selected match and stop completion.
|
||||
CTRL-E End completion, go back to what was typed.
|
||||
CTRL-E End completion, go back to what was there before selecting a
|
||||
match (what was typed or longest common string).
|
||||
<PageUp> Select a match several entries back, but don't insert it.
|
||||
<PageDown> Select a match several entries further, but don't insert it.
|
||||
<Up> Select the previous match, as if CTRL-P was used, but don't
|
||||
insert it.
|
||||
<Down> Select the next match, as if CTRL-N was used, but don't
|
||||
insert it.
|
||||
space or <Tab> Stop completion without changing the match and insert the
|
||||
<Space> or <Tab> Stop completion without changing the match and insert the
|
||||
typed character.
|
||||
|
||||
The behavior of the Enter key depends on the state you are in:
|
||||
The behavior of the <Enter> key depends on the state you are in:
|
||||
first state: Use the text as it is and insert a line break.
|
||||
second state: Insert the currently selected match.
|
||||
third state: Use the text as it is and insert a line break.
|
||||
|
||||
In other words: If you used the cursor keys to select another entry in the
|
||||
list of matches then the Enter key inserts that match. If you typed something
|
||||
else then Enter inserts a line break.
|
||||
list of matches then the <Enter> key inserts that match. If you typed
|
||||
something else then <Enter> inserts a line break.
|
||||
|
||||
|
||||
The colors of the menu can be changed with these highlight groups:
|
||||
@@ -1210,7 +1211,8 @@ 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/
|
||||
it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended.
|
||||
|
||||
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
|
||||
A compiled .exe for MS-Windows can be found at:
|
||||
@@ -1330,9 +1332,9 @@ will be suggested. All other elements are not placed in suggestion list.
|
||||
|
||||
PHP *ft-php-omni*
|
||||
|
||||
Completion of PHP code requires tags file for completion of data from external
|
||||
files. You should use Exuberant ctags version 5.5.4 or newer. You can find it
|
||||
here: http://ctags.sourceforge.net/
|
||||
Completion of PHP code requires a tags file for completion of data from
|
||||
external files and for class aware completion. You should use Exuberant ctags
|
||||
version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/
|
||||
|
||||
Script completes:
|
||||
|
||||
@@ -1390,8 +1392,10 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
|
||||
|
||||
Notes:
|
||||
- Vim will load/evaluate code in order to provide completions. This may
|
||||
cause some code execution, which may be a concern.
|
||||
- In context 1 above, Vim can parse the entire buffer to add a list of
|
||||
cause some code execution, which may be a concern. This is no longer
|
||||
enabled by default, to enable this feature add >
|
||||
let g:rubycomplete_buffer_loading = 1
|
||||
<- In context 1 above, Vim can parse the entire buffer to add a list of
|
||||
classes to the completion results. This feature is turned off by default,
|
||||
to enable it add >
|
||||
let g:rubycomplete_classes_in_global = 1
|
||||
@@ -1407,8 +1411,13 @@ Notes:
|
||||
|
||||
SYNTAX *ft-syntax-omni*
|
||||
|
||||
This uses the current syntax highlighting for completion. It can be used for
|
||||
any filetype and provides a minimal language-sensitive completion.
|
||||
Vim has the ability to color syntax highlight nearly 500 languages. Part of
|
||||
this highlighting includes knowing what keywords are part of a language. Many
|
||||
filetypes already have custom completion scripts written for them, the
|
||||
syntaxcomplete plugin provides basic completion for all other filetypes. It
|
||||
does this by populating the omni completion list with the text Vim already
|
||||
knows how to color highlight. It can be used for any filetype and provides a
|
||||
minimal language-sensitive completion.
|
||||
|
||||
To enable syntax code completion you can run: >
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
@@ -1461,6 +1470,15 @@ groups: >
|
||||
You can create as many of these variables as you need, varying only the
|
||||
filetype at the end of the variable name.
|
||||
|
||||
The plugin uses the isKeyword option to determine where word boundaries are
|
||||
for the syntax items. For example, in the Scheme language completion should
|
||||
include the "-", call-with-output-file. Depending on your filetype, this may
|
||||
not provide the words you are expecting. Setting the
|
||||
g:omni_syntax_use_iskeyword option to 0 will force the syntax plugin to break
|
||||
on word characters. This can be controlled adding the following to your
|
||||
vimrc: >
|
||||
let g:omni_syntax_use_iskeyword = 0
|
||||
|
||||
|
||||
SQL *ft-sql-omni*
|
||||
|
||||
@@ -1771,13 +1789,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
|
||||
See |++opt| for the possible values of [++opt].
|
||||
|
||||
*:r!* *:read!*
|
||||
:r[ead] !{cmd} Execute {cmd} and insert its standard output below
|
||||
the cursor. A temporary file is used to store the
|
||||
output of the command which is then read into the
|
||||
buffer. 'shellredir' is used to save the output of
|
||||
the command, which can be set to include stderr or
|
||||
not. {cmd} is executed like with ":!{cmd}", any '!'
|
||||
is replaced with the previous command |:!|.
|
||||
:[range]r[ead] !{cmd} Execute {cmd} and insert its standard output below
|
||||
the cursor or the specified line. A temporary file is
|
||||
used to store the output of the command which is then
|
||||
read into the buffer. 'shellredir' is used to save
|
||||
the output of the command, which can be set to include
|
||||
stderr or not. {cmd} is executed like with ":!{cmd}",
|
||||
any '!' is replaced with the previous command |:!|.
|
||||
|
||||
These commands insert the contents of a file, or the output of a command,
|
||||
into the buffer. They can be undone. They cannot be repeated with the "."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.0. Last change: 2006 Apr 20
|
||||
*intro.txt* For Vim version 7.1. Last change: 2007 May 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -235,7 +235,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
David Leonard Port of Python extensions to Unix
|
||||
Avner Lottem Edit in right-to-left windows
|
||||
Flemming Madsen X11 client-server, various features and patches
|
||||
MicroSoft Gave me a copy of DevStudio to compile Vim with
|
||||
Microsoft Gave me a copy of DevStudio to compile Vim with
|
||||
Paul Moore Python interface extensions, many patches
|
||||
Katsuhito Nagano Work on multi-byte versions
|
||||
Sung-Hyun Nam Work on multi-byte versions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.0. Last change: 2006 May 03
|
||||
*map.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -227,10 +227,12 @@ text before the cursor and start omni completion when some condition is met.
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
For this reason the following is blocked:
|
||||
- changing the buffer text |textlock|
|
||||
- editing another buffer
|
||||
- the |:normal| command
|
||||
- moving the cursor is allowed, but it is restored afterwards
|
||||
- Changing the buffer text |textlock|.
|
||||
- Editing another buffer.
|
||||
- The |:normal| command.
|
||||
- Moving the cursor is allowed, but it is restored afterwards.
|
||||
- You can use getchar(), but the existing typeahead isn't seen and new
|
||||
typeahead is discarded.
|
||||
If you want the mapping to do any of these let the returned characters do
|
||||
that.
|
||||
|
||||
@@ -352,9 +354,11 @@ was already done when typing the mapping.
|
||||
When listing mappings the characters in the first two columns are:
|
||||
|
||||
CHAR MODE ~
|
||||
<Space> Normal, Visual and Operator-pending
|
||||
<Space> Normal, Visual, Select and Operator-pending
|
||||
n Normal
|
||||
v Visual
|
||||
v Visual and Select
|
||||
s Select
|
||||
x Visual
|
||||
o Operator-pending
|
||||
! Insert and Command-line
|
||||
i Insert
|
||||
@@ -590,7 +594,18 @@ the '<' flag must not be present in 'cpoptions' for this to work). >
|
||||
:map <M-g> /foo<CR>cwbar<Esc>
|
||||
:map _x d/END/e<CR>
|
||||
:map! qq quadrillion questions
|
||||
<
|
||||
|
||||
|
||||
Multiplying a count
|
||||
|
||||
When you type a count before triggering a mapping, it's like the count was
|
||||
typed before the {lhs}. For example, with this mapping: >
|
||||
:map <F4> 3w
|
||||
Typing 2<F4> will result in "23w". Thus not moving 2 * 3 words but 23 words.
|
||||
If you want to multiply counts use the expression register: >
|
||||
:map <F4> @='3w'<CR>
|
||||
The part between quotes is the expression being executed. |@=|
|
||||
|
||||
|
||||
1.9 USING MAPPINGS *map-typing*
|
||||
|
||||
@@ -777,7 +792,7 @@ stands for. This can be used to save typing for often used long words. And
|
||||
you can use it to automatically correct obvious spelling errors.
|
||||
Examples:
|
||||
|
||||
:iab ms MicroSoft
|
||||
:iab ms Microsoft
|
||||
:iab tihs this
|
||||
|
||||
There are three types of abbreviations:
|
||||
@@ -794,7 +809,7 @@ end-id The "end-id" type ends in a keyword character, but all the other
|
||||
Examples: "#i", "..f", "$/7"
|
||||
|
||||
non-id The "non-id" type ends in a non-keyword character, the other
|
||||
characters may be of any type, excluding space and Tab. {this type
|
||||
characters may be of any type, excluding space and tab. {this type
|
||||
is not supported by Vi}
|
||||
|
||||
Examples: "def#", "4/7$"
|
||||
@@ -819,12 +834,12 @@ an additional rule:
|
||||
full-id In front of the match is a non-keyword character, or this is where
|
||||
the line or insertion starts. Exception: When the abbreviation is
|
||||
only one character, it is not recognized if there is a non-keyword
|
||||
character in front of it, other than a space or a <Tab>.
|
||||
character in front of it, other than a space or a tab.
|
||||
|
||||
end-id In front of the match is a keyword character, or a space or a <Tab>,
|
||||
end-id In front of the match is a keyword character, or a space or a tab,
|
||||
or this is where the line or insertion starts.
|
||||
|
||||
non-id In front of the match is a space, <Tab> or the start of the line or
|
||||
non-id In front of the match is a space, tab or the start of the line or
|
||||
the insertion.
|
||||
|
||||
Examples: ({CURSOR} is where you type a non-keyword character) >
|
||||
@@ -1127,7 +1142,7 @@ There are a number of attributes, split into four categories: argument
|
||||
handling, completion behavior, range handling, and special cases. The
|
||||
attributes are described below, by category.
|
||||
|
||||
Argument handling *E175* *E176*
|
||||
Argument handling *E175* *E176* *:command-nargs*
|
||||
|
||||
By default, a user defined command will take no arguments (and an error is
|
||||
reported if any are supplied). However, it is possible to specify that the
|
||||
@@ -1139,7 +1154,7 @@ command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
-nargs=? 0 or 1 arguments are allowed
|
||||
-nargs=+ Arguments must be supplied, but any number are allowed
|
||||
|
||||
Arguments are considered to be separated by (unescaped) spaces or Tabs in this
|
||||
Arguments are considered to be separated by (unescaped) spaces or tabs in this
|
||||
context.
|
||||
|
||||
Note that arguments are used as text, not as expressions. Specifically,
|
||||
@@ -1155,8 +1170,8 @@ defined, not where it is invoked! Example:
|
||||
Executing script2.vim will result in "None" to be echoed. Not what you
|
||||
intended! Calling a function may be an alternative.
|
||||
|
||||
Completion behavior *:command-completion*
|
||||
*E179* *E180* *E181*
|
||||
Completion behavior *:command-completion* *E179*
|
||||
*E180* *E181* *:command-complete*
|
||||
By default, the arguments of user defined commands do not undergo completion.
|
||||
However, by specifying one or the other of the following attributes, argument
|
||||
completion can be enabled:
|
||||
@@ -1228,13 +1243,16 @@ the 'path' option: >
|
||||
:endfun
|
||||
<
|
||||
|
||||
Range handling *E177* *E178*
|
||||
|
||||
Range handling *E177* *E178* *:command-range*
|
||||
*:command-count*
|
||||
By default, user-defined commands do not accept a line number range. However,
|
||||
it is possible to specify that the command does take a range (the -range
|
||||
attribute), or that it takes an arbitrary count value, either in the line
|
||||
number position (-range=N, like the |:split| command) or as a "count"
|
||||
argument (-count=N, like the |:Next| command). Possible attributes are:
|
||||
argument (-count=N, like the |:Next| command). The count will then be
|
||||
available in the argument with |<count>|.
|
||||
|
||||
Possible attributes are:
|
||||
|
||||
-range Range allowed, default is current line
|
||||
-range=% Range allowed, default is whole file (1,$)
|
||||
@@ -1247,8 +1265,8 @@ argument (-count=N, like the |:Next| command). Possible attributes are:
|
||||
Note that -range=N and -count=N are mutually exclusive - only one should be
|
||||
specified.
|
||||
|
||||
Special cases
|
||||
|
||||
Special cases *:command-bang* *:command-bar*
|
||||
*:command-register* *:command-buffer*
|
||||
There are some special cases as well:
|
||||
|
||||
-bang The command can take a ! modifier (like :q or :w)
|
||||
@@ -1303,12 +1321,28 @@ If the first two characters of an escape sequence are "q-" (for example,
|
||||
<q-args>) then the value is quoted in such a way as to make it a valid value
|
||||
for use in an expression. This uses the argument as one single value.
|
||||
When there is no argument <q-args> is an empty string.
|
||||
|
||||
*<f-args>*
|
||||
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
|
||||
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. If no arguments are given <f-args> is removed.
|
||||
To embed whitespace into an argument of <f-args>, prepend a backslash.
|
||||
<f-args> replaces every pair of backslashes (\\) with one backslash. A
|
||||
backslash followed by a character other than white space or a backslash
|
||||
remains unmodified. Overview:
|
||||
|
||||
command <f-args> ~
|
||||
XX ab 'ab'
|
||||
XX a\b 'a\b'
|
||||
XX a\ b 'a b'
|
||||
XX a\ b 'a ', 'b'
|
||||
XX a\\b 'a\b'
|
||||
XX a\\ b 'a\', 'b'
|
||||
XX a\\\b 'a\\b'
|
||||
XX a\\\ b 'a\ b'
|
||||
XX a\\\\b 'a\\b'
|
||||
XX a\\\\ b 'a\\', 'b'
|
||||
|
||||
Examples >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*mbyte.txt* For Vim version 7.1. Last change: 2006 Aug 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -403,7 +403,8 @@ depends on the system used, no detailed list can be given.
|
||||
8bit 2byte MS-Windows: works for all codepages installed on your
|
||||
system; you can only type 8bit characters;
|
||||
Other systems: does NOT work.
|
||||
8bit Unicode Works, but you can only type 8bit characters; in a
|
||||
8bit Unicode Works, but only 8bit characters can be typed directly
|
||||
(others through digraphs, keymaps, etc.); in a
|
||||
terminal you can only see 8bit characters; the GUI can
|
||||
show all characters that the 'guifont' supports.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*message.txt* For Vim version 7.1. Last change: 2007 Mar 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -25,7 +25,8 @@ for other versions.
|
||||
*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.
|
||||
prompt. You are then back at the hit-enter prompt and can then scroll further
|
||||
back.
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mlang.txt* For Vim version 7.0. Last change: 2004 Feb 24
|
||||
*mlang.txt* For Vim version 7.1. Last change: 2006 Jul 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -114,7 +114,7 @@ the language of your choice. use "en" to disable translations. >
|
||||
==============================================================================
|
||||
2. Menus *multilang-menus*
|
||||
|
||||
See |45.2| for the basics.
|
||||
See |45.2| for the basics, esp. using 'langmenu'.
|
||||
|
||||
Note that if changes have been made to the menus after the translation was
|
||||
done, some of the menus may be shown in English. Please try contacting the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.0. Last change: 2006 Apr 30
|
||||
*motion.txt* For Vim version 7.1. Last change: 2006 Dec 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -169,15 +169,15 @@ l or *l*
|
||||
|
||||
*0*
|
||||
0 To the first character of the line. |exclusive|
|
||||
motion. When moving up or down, stay in same screen
|
||||
column (if possible).
|
||||
motion.
|
||||
|
||||
*<Home>* *<kHome>*
|
||||
<Home> To the first character of the line. |exclusive|
|
||||
motion. When moving up or down, stay in same text
|
||||
column (if possible). Works like "1|", which differs
|
||||
from "0" when the line starts with a <Tab>. {not in
|
||||
Vi}
|
||||
motion. When moving up or down next, stay in same
|
||||
TEXT column (if possible). Most other commands stay
|
||||
in the same SCREEN column. <Home> works like "1|",
|
||||
which differs from "0" when the line starts with a
|
||||
<Tab>. {not in Vi}
|
||||
|
||||
*^*
|
||||
^ To the first non-blank character of the line.
|
||||
@@ -752,11 +752,11 @@ m[ or m] Set the |'[| or |']| mark. Useful when an operator is
|
||||
be omitted.
|
||||
|
||||
*'* *'a* *`* *`a*
|
||||
'{a-z} `{a-z} Jump to the mark {a-z}.
|
||||
'{a-z} `{a-z} Jump to the mark {a-z} in the current buffer.
|
||||
|
||||
*'A* *'0* *`A* *`0*
|
||||
'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the correct file (not a motion
|
||||
command when in another file). {not in Vi}
|
||||
'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not
|
||||
a motion command when in another file). {not in Vi}
|
||||
|
||||
*g'* *g'a* *g`* *g`a*
|
||||
g'{mark} g`{mark}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user