mirror of
https://github.com/zoriya/vim.git
synced 2025-12-24 08:05:19 +00:00
Compare commits
447 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c0aac5759 | ||
|
|
a0f849ee40 | ||
|
|
e7d1376b63 | ||
|
|
f1a4c98ea6 | ||
|
|
c92399f4ee | ||
|
|
60cce2fb73 | ||
|
|
04dfd51229 | ||
|
|
4e86150ec5 | ||
|
|
b4f6a46b01 | ||
|
|
23d1b62746 | ||
|
|
f59c73da1e | ||
|
|
d1b15dec4d | ||
|
|
9d6ca1cc5e | ||
|
|
089af18d1f | ||
|
|
094454fa70 | ||
|
|
74b738d414 | ||
|
|
ba117c23df | ||
|
|
c2b717ebd6 | ||
|
|
1d478a6242 | ||
|
|
c79a5452ac | ||
|
|
ca63501fbc | ||
|
|
c1d20998d7 | ||
|
|
10ad1d90da | ||
|
|
5f1fea28f5 | ||
|
|
0a777ab989 | ||
|
|
02d803fc0c | ||
|
|
1d6328ca00 | ||
|
|
69b67f7e77 | ||
|
|
4d0c7bc74a | ||
|
|
b0262f239e | ||
|
|
3fe076f0fe | ||
|
|
8919554fe1 | ||
|
|
b8603882b1 | ||
|
|
0600f3511c | ||
|
|
7b256fe744 | ||
|
|
2455c4ede8 | ||
|
|
3b59755862 | ||
|
|
54f018cd59 | ||
|
|
9534680731 | ||
|
|
93c88e0f6a | ||
|
|
ed84b76021 | ||
|
|
e906c50207 | ||
|
|
43335ea394 | ||
|
|
5325b9bbae | ||
|
|
12969c04fe | ||
|
|
3cbe0c01ad | ||
|
|
a122b5e98a | ||
|
|
d8986fd914 | ||
|
|
aa23b37942 | ||
|
|
4a4b821085 | ||
|
|
a09a2c5857 | ||
|
|
7e2ec008f5 | ||
|
|
b58988b832 | ||
|
|
cf619daa8e | ||
|
|
ac360bf2ca | ||
|
|
615942452e | ||
|
|
544780248b | ||
|
|
8b5f65a527 | ||
|
|
5adfea1ac6 | ||
|
|
8667d66ca9 | ||
|
|
6017f3799d | ||
|
|
5df1ed2de3 | ||
|
|
37a8de17d4 | ||
|
|
d43f0951bc | ||
|
|
cdf0442d00 | ||
|
|
5ea87a0496 | ||
|
|
8e5f5b47c2 | ||
|
|
6ed535dbc0 | ||
|
|
8060687905 | ||
|
|
88774fdd23 | ||
|
|
80ce282107 | ||
|
|
0a38dd29d6 | ||
|
|
f6470c288c | ||
|
|
7e47d1ac6a | ||
|
|
e68c25c677 | ||
|
|
be83b73ddb | ||
|
|
3f188935ec | ||
|
|
b341dda575 | ||
|
|
7fb7d34caf | ||
|
|
670acbc70f | ||
|
|
8cba8ba3e0 | ||
|
|
3cfd5289ca | ||
|
|
1560d07045 | ||
|
|
8e8b486727 | ||
|
|
fc39ecf8de | ||
|
|
25c2f6783a | ||
|
|
cde8854730 | ||
|
|
bd8539aac3 | ||
|
|
8fee878fe2 | ||
|
|
901e58c243 | ||
|
|
89c17c02ca | ||
|
|
2288afed42 | ||
|
|
dd8a5286e1 | ||
|
|
73627d0bd4 | ||
|
|
382197865c | ||
|
|
dbd24b5967 | ||
|
|
fbd302ff38 | ||
|
|
204b93f958 | ||
|
|
9dd33af4ba | ||
|
|
75e6413546 | ||
|
|
bb86ebb0ef | ||
|
|
0bbcb5c8ef | ||
|
|
cc218ab3ca | ||
|
|
29bc9db36e | ||
|
|
43fe32900c | ||
|
|
f7bb86dc59 | ||
|
|
52e21cf057 | ||
|
|
278236000f | ||
|
|
829aef1eb4 | ||
|
|
6b9be1b6f2 | ||
|
|
31b259bf95 | ||
|
|
5f95f288a2 | ||
|
|
33c3a694fc | ||
|
|
dd1616e6ce | ||
|
|
b388be0abf | ||
|
|
d4a95c3bc5 | ||
|
|
f91328100d | ||
|
|
165bc69d1b | ||
|
|
6561d52ecb | ||
|
|
d51cb706a4 | ||
|
|
d113a80c77 | ||
|
|
9cac424d05 | ||
|
|
5cbb8dbc32 | ||
|
|
fb9bc4829a | ||
|
|
537443018d | ||
|
|
34d72d4b6c | ||
|
|
2cf6938706 | ||
|
|
2536d4f396 | ||
|
|
5d1bc78a2b | ||
|
|
fe6f186877 | ||
|
|
1db43b1145 | ||
|
|
3ec3261980 | ||
|
|
ae2fe73abc | ||
|
|
86ae720d75 | ||
|
|
694cac7a35 | ||
|
|
2c61ec65e8 | ||
|
|
efcabd6892 | ||
|
|
b6be1e2390 | ||
|
|
42a4512f62 | ||
|
|
ae94b7718a | ||
|
|
5c5c9801b1 | ||
|
|
5f1e68b7bc | ||
|
|
46fd4df719 | ||
|
|
2693ca21ce | ||
|
|
4392996461 | ||
|
|
fafeee6b9e | ||
|
|
92abe859ed | ||
|
|
9bb1930af9 | ||
|
|
6a57cce048 | ||
|
|
1f860d8590 | ||
|
|
4921c24b31 | ||
|
|
979243b990 | ||
|
|
e5401220b0 | ||
|
|
5081d20247 | ||
|
|
9514b1f9a1 | ||
|
|
fa67fbe6b8 | ||
|
|
b5c3265521 | ||
|
|
367fbf17da | ||
|
|
641e48c224 | ||
|
|
3a304b2382 | ||
|
|
74db34cc91 | ||
|
|
66312acf14 | ||
|
|
70b5a5f5b9 | ||
|
|
280a868a24 | ||
|
|
0e7c4b99c6 | ||
|
|
6a7e2a668b | ||
|
|
e2db6c975b | ||
|
|
b8c890035e | ||
|
|
01cf376da1 | ||
|
|
0fce425772 | ||
|
|
cf0213ef7e | ||
|
|
c004bc2726 | ||
|
|
a594d77ffc | ||
|
|
a7b7b1cef9 | ||
|
|
541f92d6cf | ||
|
|
c7a0d32c83 | ||
|
|
acc39888cd | ||
|
|
d710e0d247 | ||
|
|
6e8d3b0d41 | ||
|
|
b878bbbca6 | ||
|
|
e2e4b98622 | ||
|
|
d009e86826 | ||
|
|
d68f2219b5 | ||
|
|
f2571c61d5 | ||
|
|
d0d0fe09cf | ||
|
|
7098ee5c37 | ||
|
|
bc56336bb4 | ||
|
|
0481fee488 | ||
|
|
4270496716 | ||
|
|
9c60161888 | ||
|
|
1fd3e30ce9 | ||
|
|
659c94d483 | ||
|
|
7bc25aed33 | ||
|
|
4032cfdf17 | ||
|
|
73284b973a | ||
|
|
d59c099120 | ||
|
|
f300ad230b | ||
|
|
c4dc286fe6 | ||
|
|
81278efadf | ||
|
|
1cd5e613b0 | ||
|
|
cad2fc9935 | ||
|
|
2186ffa2c7 | ||
|
|
069dd08d8d | ||
|
|
ea98f8b4d6 | ||
|
|
1510f996c5 | ||
|
|
4c6b3b20dd | ||
|
|
7927836733 | ||
|
|
40ce3a4e1f | ||
|
|
77354e78a8 | ||
|
|
3cbac309f7 | ||
|
|
5b14f89164 | ||
|
|
bbc1a592a0 | ||
|
|
d82a2a990b | ||
|
|
f9bde2b152 | ||
|
|
d39a751280 | ||
|
|
ec45c4a6df | ||
|
|
ba172f2eab | ||
|
|
0a63dedf99 | ||
|
|
d5f6933d5c | ||
|
|
05b20fb14e | ||
|
|
9bc174b69d | ||
|
|
d94682ffb4 | ||
|
|
50ab994ab3 | ||
|
|
7c94ce910f | ||
|
|
83d1b19015 | ||
|
|
29d54df5cd | ||
|
|
5a5f45917d | ||
|
|
695baeefe1 | ||
|
|
de1502f2b4 | ||
|
|
f630387827 | ||
|
|
da6365774d | ||
|
|
d87c36ea5e | ||
|
|
478c46e50f | ||
|
|
1e7813a187 | ||
|
|
7d2757a472 | ||
|
|
0e462411ca | ||
|
|
e5c421cfd7 | ||
|
|
1ca2e361a8 | ||
|
|
09deeb7c94 | ||
|
|
dbcf19dc49 | ||
|
|
71371b1579 | ||
|
|
310f2d59b2 | ||
|
|
6383b92d8c | ||
|
|
f11ce667b0 | ||
|
|
a161e26d55 | ||
|
|
6c927557e2 | ||
|
|
eab316bdf9 | ||
|
|
77b7710d4e | ||
|
|
e7154eb5c3 | ||
|
|
5837f1f447 | ||
|
|
b5971141df | ||
|
|
4df702999d | ||
|
|
dcefba9934 | ||
|
|
3b7b83649c | ||
|
|
825e7ab423 | ||
|
|
fbc25b20cb | ||
|
|
b1fc2bf29c | ||
|
|
76feaf1bfe | ||
|
|
6b31467aa7 | ||
|
|
404c942fb8 | ||
|
|
438b64ab71 | ||
|
|
6c5bdb751c | ||
|
|
c7dc1f4a53 | ||
|
|
488eb26ec7 | ||
|
|
0f8dd840fc | ||
|
|
ab11a5914b | ||
|
|
d8b77f7dc0 | ||
|
|
b6c2735c56 | ||
|
|
a245bc79b4 | ||
|
|
e421450a5e | ||
|
|
4dcdf29910 | ||
|
|
4f36dc3bf7 | ||
|
|
5d3fbf3bfe | ||
|
|
cf48767cd1 | ||
|
|
f3c2afb77f | ||
|
|
2b8388bd01 | ||
|
|
bac203ea2d | ||
|
|
13cf77ba17 | ||
|
|
e25bb90b2e | ||
|
|
8da9bbfd02 | ||
|
|
ba17ed6797 | ||
|
|
c6b7217ff5 | ||
|
|
d45c07ac74 | ||
|
|
dfd7691bb8 | ||
|
|
c3bbad085c | ||
|
|
8fc6bc7126 | ||
|
|
46538ee46c | ||
|
|
1e997827f1 | ||
|
|
35e7594dd4 | ||
|
|
4653911950 | ||
|
|
05eb612ff3 | ||
|
|
f65aad5554 | ||
|
|
be20f9fa5d | ||
|
|
eaa330e8e9 | ||
|
|
4a42710695 | ||
|
|
c51b02d7d9 | ||
|
|
98f52500b6 | ||
|
|
8872ef1b4e | ||
|
|
494838a3fe | ||
|
|
eb2928595b | ||
|
|
24a6ff88bc | ||
|
|
9abd5c6507 | ||
|
|
a1d2c58985 | ||
|
|
168e04966c | ||
|
|
f554a3285e | ||
|
|
934b136193 | ||
|
|
b84634de30 | ||
|
|
9d49da8cbb | ||
|
|
0122c4070f | ||
|
|
c0a37b9db3 | ||
|
|
f2c03d7301 | ||
|
|
e71eea801e | ||
|
|
d7ce7a9ad2 | ||
|
|
70781ee403 | ||
|
|
e08dd4e49e | ||
|
|
b641df4965 | ||
|
|
016154919e | ||
|
|
2459a5ecaa | ||
|
|
4ac163ae5f | ||
|
|
73a156bf36 | ||
|
|
7cc8ec4720 | ||
|
|
3b3a9498d1 | ||
|
|
6bf7c523ad | ||
|
|
1c93429c48 | ||
|
|
18400e6430 | ||
|
|
0a988df731 | ||
|
|
0cd040b96a | ||
|
|
aaf3047de2 | ||
|
|
5c27fd100a | ||
|
|
9a492d456d | ||
|
|
932d88662f | ||
|
|
322a24af83 | ||
|
|
1dc92334eb | ||
|
|
e0ad365498 | ||
|
|
df5caa08f6 | ||
|
|
8a94d873aa | ||
|
|
df82661c9c | ||
|
|
eea478f885 | ||
|
|
1ec4dd41de | ||
|
|
4bde00c595 | ||
|
|
6a6028cf4b | ||
|
|
6bf7a5933f | ||
|
|
e823183254 | ||
|
|
ff8a75dab7 | ||
|
|
ff13610d7b | ||
|
|
ef795d1a5b | ||
|
|
7cbc703fdc | ||
|
|
164f3269b1 | ||
|
|
83caecf314 | ||
|
|
d574ea2f80 | ||
|
|
084abaec06 | ||
|
|
a20bcad15c | ||
|
|
ba3f58e296 | ||
|
|
ea67672534 | ||
|
|
615b9978dd | ||
|
|
5000869712 | ||
|
|
84c8e5ab9c | ||
|
|
435797304a | ||
|
|
0c7485fdbb | ||
|
|
9da7ff70cc | ||
|
|
651863c94a | ||
|
|
8be6388b76 | ||
|
|
e271909625 | ||
|
|
c60c4f6e06 | ||
|
|
8feef4ff62 | ||
|
|
a162bc555e | ||
|
|
3ffc79a4a8 | ||
|
|
49a6ed8a8a | ||
|
|
684d409f63 | ||
|
|
0027c218e9 | ||
|
|
abe382cd2a | ||
|
|
e88b0033f6 | ||
|
|
fc3f23bedf | ||
|
|
527a6785c7 | ||
|
|
140e995ed5 | ||
|
|
ae38d05271 | ||
|
|
36ff08479f | ||
|
|
6f2dd9e75e | ||
|
|
caad4f0a0b | ||
|
|
e3faf44bef | ||
|
|
c68c72ea7b | ||
|
|
b12db9f92e | ||
|
|
3f9be97015 | ||
|
|
ddfb925480 | ||
|
|
ef92390cb7 | ||
|
|
2d78cd7756 | ||
|
|
8340dd9b29 | ||
|
|
2f1e51a43c | ||
|
|
aff5c3a530 | ||
|
|
d96c52c71b | ||
|
|
cc2b9d5dc0 | ||
|
|
f1d6ccf2f9 | ||
|
|
b2a851fee4 | ||
|
|
ed32d9424d | ||
|
|
f8a447c6dc | ||
|
|
4d84d9325f | ||
|
|
0b10541606 | ||
|
|
76440e2efe | ||
|
|
f1e30ccb82 | ||
|
|
f240e181d7 | ||
|
|
2a0b33e284 | ||
|
|
9014074913 | ||
|
|
0a38396937 | ||
|
|
a3dfccc6e9 | ||
|
|
1c40a66bad | ||
|
|
b96a7f325c | ||
|
|
baf0344ed7 | ||
|
|
cbdf0a0b4a | ||
|
|
8c731505b0 | ||
|
|
66a3e797a2 | ||
|
|
b738c9a442 | ||
|
|
2683c8e7f7 | ||
|
|
2f3b510b0f | ||
|
|
b1e265045c | ||
|
|
4c7b2f50fd | ||
|
|
06e7ce1a01 | ||
|
|
57bc4633b2 | ||
|
|
dffa5b8ecf | ||
|
|
df46f6f07f | ||
|
|
a365091dbb | ||
|
|
1ba903fb92 | ||
|
|
c229967caa | ||
|
|
8a349ff944 | ||
|
|
54fb438134 | ||
|
|
ef6875be7a | ||
|
|
42d84f8aed | ||
|
|
b8e0bdbda3 | ||
|
|
3e9a161496 | ||
|
|
b103138b1e | ||
|
|
3a0c908983 | ||
|
|
983c4e93dc | ||
|
|
345326aa3d | ||
|
|
374bf024d2 | ||
|
|
f9e6c3b8b0 | ||
|
|
0434482e5a | ||
|
|
6b2e938f13 | ||
|
|
4391cf98ec | ||
|
|
c3940c76e8 | ||
|
|
32efaf6154 | ||
|
|
72971a2611 | ||
|
|
e90c853ff6 | ||
|
|
9c7d98d7c2 | ||
|
|
fda3729a06 | ||
|
|
4f7e821f26 | ||
|
|
666578b539 | ||
|
|
eda73607a7 | ||
|
|
086329d3f6 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -69,5 +69,7 @@ src/testdir/lua.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
src/testdir/test*.failed
|
||||
src/testdir/test.log
|
||||
src/testdir/dostmp/*
|
||||
src/memfile_test
|
||||
|
||||
41
.travis.yml
Normal file
41
.travis.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
language: c
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'"
|
||||
- COVERAGE=no FEATURES=small CONFOPT=
|
||||
- COVERAGE=no FEATURES=tiny CONFOPT=
|
||||
|
||||
sudo: false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^v[0-9]/
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- lcov
|
||||
- libperl-dev
|
||||
- python-dev
|
||||
- python3-dev
|
||||
- liblua5.1-0-dev
|
||||
- lua5.1
|
||||
|
||||
before_install:
|
||||
- pip install --user cpp-coveralls
|
||||
|
||||
script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && make -j$NPROC
|
||||
- ./src/vim --version
|
||||
- make test
|
||||
|
||||
after_success:
|
||||
- if [ x"$COVERAGE" = "xyes" ]; then ~/.local/bin/coveralls -b src -x .xs -e src/xxd -e src/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
|
||||
|
||||
# vim:set sts=2 sw=2 tw=0 et:
|
||||
54
CONTRIBUTING.md
Normal file
54
CONTRIBUTING.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Contributing to Vim
|
||||
|
||||
Patches are welcome in whatever form.
|
||||
Discussions about patches happen on the vim-dev maillist.
|
||||
If you create a pull request on GitHub it will be
|
||||
forwarded to the vim-dev maillist. You can also send your patch there
|
||||
directly. An attachment with a unified diff format is preferred.
|
||||
Information about the maillist can be found [on the Vim website].
|
||||
|
||||
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev
|
||||
|
||||
Please consider adding a test. Test coverage isn't very good yet, this needs
|
||||
to improve. Look through recent patches for examples. The tests are located
|
||||
under "src/testdir".
|
||||
|
||||
|
||||
# Reporting issues
|
||||
|
||||
We use GitHub issues, but that is not a requirement. Writing to the Vim
|
||||
maillist is also fine.
|
||||
|
||||
Please use the GitHub issues only for actual issues. If you are not 100% sure
|
||||
that your problem is a Vim issue, please first discuss this on the Vim user
|
||||
maillist. Try reproducing the problem without any plugins or settings:
|
||||
|
||||
vim -N -u NONE
|
||||
|
||||
If you report an issue, please describe exactly how to reproduce it.
|
||||
For example, don't say "insert some text" but say what you did exactly:
|
||||
"ahere is some text<Esc>".
|
||||
Ideally, the steps you list can be used to write a test to verify the problem
|
||||
is fixed.
|
||||
|
||||
Feel free to report even the smallest problem, also typos in the documentation.
|
||||
|
||||
You can find known issues in the todo file: ":help todo".
|
||||
Or open [the todo file] on GitHub to see the latest version.
|
||||
|
||||
[the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
|
||||
|
||||
|
||||
# Syntax, indent and other runtime files
|
||||
|
||||
The latest version of these files can be obtained from the repository.
|
||||
They are usually not updated with numbered patches.
|
||||
|
||||
If you find a problem with one of these files or have a suggestion for
|
||||
improvement, please first try to contact the maintainer directly.
|
||||
Look in the header of the file for the name and email address.
|
||||
|
||||
The maintainer will take care of issues and send updates to Bram for
|
||||
distribution with Vim.
|
||||
|
||||
If the maintainer does not react, contact the vim-dev maillist.
|
||||
8
Filelist
8
Filelist
@@ -4,6 +4,8 @@
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
.hgignore \
|
||||
.travis.yml \
|
||||
appveyor.yml \
|
||||
src/README.txt \
|
||||
src/arabic.c \
|
||||
src/arabic.h \
|
||||
@@ -102,6 +104,9 @@ SRC_ALL = \
|
||||
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
|
||||
src/testdir/python_after/*.py \
|
||||
src/testdir/python_before/*.py \
|
||||
src/testdir/bench*.in \
|
||||
src/testdir/bench*.vim \
|
||||
src/testdir/samples/*.txt \
|
||||
src/proto.h \
|
||||
src/proto/blowfish.pro \
|
||||
src/proto/buffer.pro \
|
||||
@@ -277,6 +282,7 @@ SRC_DOS = \
|
||||
src/Make_bc3.mak \
|
||||
src/Make_bc5.mak \
|
||||
src/Make_cyg.mak \
|
||||
src/Make_cyg_ming.mak \
|
||||
src/Make_djg.mak \
|
||||
src/Make_ivc.mak \
|
||||
src/Make_dvc.mak \
|
||||
@@ -477,6 +483,8 @@ SRC_EXTRA = \
|
||||
# runtime files for all distributions
|
||||
RT_ALL = \
|
||||
README.txt \
|
||||
README.md \
|
||||
CONTRIBUTING.md \
|
||||
runtime/bugreport.vim \
|
||||
runtime/doc/*.awk \
|
||||
runtime/doc/*.pl \
|
||||
|
||||
124
README.md
Normal file
124
README.md
Normal file
@@ -0,0 +1,124 @@
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
[](https://travis-ci.org/vim/vim)
|
||||
[](https://coveralls.io/github/vim/vim?branch=master)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
|
||||
|
||||
## What is Vim? ##
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
on-line help, spell checking, filename completion, block operations, etc.
|
||||
There is also a Graphical User Interface (GUI) available. See
|
||||
`runtime/doc/vi_diff.txt` for differences with Vi.
|
||||
|
||||
This editor is very useful for editing programs and other plain text files.
|
||||
All commands are given with normal keyboard characters, so those who can type
|
||||
with ten fingers can work very fast. Additionally, function keys can be
|
||||
defined by the user, and the mouse can be used.
|
||||
|
||||
Vim runs under Amiga DOS, MS-DOS, MS-Windows (95, 98, Me, NT, 2000, XP, Vista,
|
||||
7), Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
|
||||
UNIX. Porting to other systems should not be very difficult.
|
||||
|
||||
|
||||
## Distribution ##
|
||||
|
||||
You can often use your favorite package manager to install Vim. On Mac and
|
||||
Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
if you want more features.
|
||||
|
||||
There are separate distributions for Unix, PC, Amiga and some other systems.
|
||||
This `README.md` file comes with the runtime archive. It includes the
|
||||
documentation, syntax files and other files that are used at runtime. To run
|
||||
Vim you must get either one of the binary archives or a source archive.
|
||||
Which one you need depends on the system you want to run it on and whether you
|
||||
want or must compile it yourself. Check http://www.vim.org/download.php for
|
||||
an overview of currently available distributions.
|
||||
|
||||
|
||||
## Documentation ##
|
||||
|
||||
The vim tutor is a one hour training course for beginners. Mostly it can be
|
||||
started as `vimtutor`. See `:help tutor` for more information.
|
||||
|
||||
The best is to use `:help` in Vim. If you don't have an executable yet, read
|
||||
`runtime/doc/help.txt`. It contains pointers to the other documentation
|
||||
files. The User Manual reads like a book and is recommended to learn to use
|
||||
Vim. See `:help user-manual`.
|
||||
|
||||
|
||||
## Copying ##
|
||||
|
||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
`runtime/doc/uganda.txt` for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
|
||||
## Sponsoring ##
|
||||
|
||||
Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
Since Bram is back to a paid job the money will now be used to help children
|
||||
in Uganda. See `runtime/doc/uganda.txt`. But at the same time donations
|
||||
increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
http://www.vim.org/sponsor/
|
||||
|
||||
|
||||
## Compiling ##
|
||||
|
||||
If you obtained a binary distribution you don't need to compile Vim. If you
|
||||
obtained a source distribution, all the stuff for compiling Vim is in the
|
||||
`src` directory. See `src/INSTALL` for instructions.
|
||||
|
||||
|
||||
## Installation ##
|
||||
|
||||
See one of these files for system-specific instructions:
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS and MS-Windows
|
||||
README_os2.txt OS/2
|
||||
README_mac.txt Macintosh
|
||||
README_vms.txt VMS
|
||||
|
||||
There are more `README_*.txt` files, depending on the distribution you used.
|
||||
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you would like to help making Vim better, see the [CONTRIBUTING.md](https://github.com/vim/vim/blob/master/CONTRIBUTING.md) file.
|
||||
|
||||
|
||||
## Information ##
|
||||
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
If you have problems, have a look at the Vim documentation or tips:
|
||||
http://www.vim.org/docs.php
|
||||
http://vim.wikia.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
http://www.vim.org/maillist.php
|
||||
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
|
||||
## Main author ##
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
14
README.txt
14
README.txt
@@ -1,7 +1,7 @@
|
||||
README.txt for version 7.4 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
WHAT IS VIM
|
||||
WHAT IS VIM?
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
@@ -21,6 +21,10 @@ UNIX. Porting to other systems should not be very difficult.
|
||||
|
||||
DISTRIBUTION
|
||||
|
||||
You can often use your favorite package manager to install Vim. On Mac and
|
||||
Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
if you want more features.
|
||||
|
||||
There are separate distributions for Unix, PC, Amiga and some other systems.
|
||||
This README.txt file comes with the runtime archive. It includes the
|
||||
documentation, syntax files and other files that are used at runtime. To run
|
||||
@@ -94,8 +98,9 @@ INFORMATION
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
If you have problems, have a look at the Vim FAQ:
|
||||
http://vimdoc.sf.net/vimfaq.html
|
||||
If you have problems, have a look at the Vim documentation or tips:
|
||||
http://www.vim.org/docs.php
|
||||
http://vim.wikia.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
@@ -110,6 +115,3 @@ MAIN AUTHOR
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
|
||||
Bram Moolenaar E-mail: Bram@vim.org
|
||||
Finsterruetihof 1
|
||||
8134 Adliswil
|
||||
Switzerland
|
||||
|
||||
15
appveyor.yml
Normal file
15
appveyor.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: "{build}"
|
||||
|
||||
before_build:
|
||||
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release'
|
||||
|
||||
build_script:
|
||||
- cd src
|
||||
- sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
|
||||
- nmake -f Make_mvc2.mak CPU=AMD64 GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34-x64
|
||||
- .\gvim -u NONE -c "redir @a | ver | 0put a | wq!" ver.txt
|
||||
- type ver.txt
|
||||
|
||||
test_script:
|
||||
- cd testdir
|
||||
- nmake -f Make_dos.mak VIMPROG=..\gvim
|
||||
@@ -1,6 +1,6 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# It requires NSIS version 2.0 or later.
|
||||
# Last Change: 2010 Jul 30
|
||||
# Last Change: 2014 Nov 5
|
||||
|
||||
# WARNING: if you make changes to this script, look out for $0 to be valid,
|
||||
# because uninstall deletes most files in $0.
|
||||
@@ -38,7 +38,7 @@ SetDatablockOptimize on
|
||||
RequestExecutionLevel highest
|
||||
|
||||
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
|
||||
DirText "Choose a directory to install Vim (must end in 'vim')"
|
||||
DirText "Choose a directory to install Vim (should contain 'vim')"
|
||||
Icon icons\vim_16c.ico
|
||||
# NSIS2 uses a different strategy with six different images in a strip...
|
||||
#EnabledBitmap icons\enabled.bmp
|
||||
@@ -135,11 +135,6 @@ FunctionEnd
|
||||
# We only accept the directory if it ends in "vim". Using .onVerifyInstDir has
|
||||
# the disadvantage that the browse dialog is difficult to use.
|
||||
Function CheckInstallDir
|
||||
StrCpy $0 $INSTDIR 3 -3
|
||||
StrCmp $0 "vim" PathGood
|
||||
MessageBox MB_OK "The path must end in 'vim'."
|
||||
Abort
|
||||
PathGood:
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Jul 04
|
||||
" Last Change: 2014 Nov 05
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -120,6 +120,8 @@ fun gzip#read(cmd)
|
||||
silent! exe "bwipe " . tmp_esc
|
||||
silent! exe "bwipe " . tmpe_esc
|
||||
endif
|
||||
" Store the OK flag, so that we can use it when writing.
|
||||
let b:uncompressOk = ok
|
||||
|
||||
" Restore saved option values.
|
||||
let &pm = pm_save
|
||||
@@ -146,8 +148,10 @@ endfun
|
||||
|
||||
" After writing compressed file: Compress written file with "cmd"
|
||||
fun gzip#write(cmd)
|
||||
if exists('b:uncompressOk') && !b:uncompressOk
|
||||
echomsg "Not compressing file because uncompress failed; reset b:uncompressOk to compress anyway"
|
||||
" don't do anything if the cmd is not supported
|
||||
if s:check(a:cmd)
|
||||
elseif s:check(a:cmd)
|
||||
" Rename the file before compressing it.
|
||||
let nm = resolve(expand("<afile>"))
|
||||
let nmt = s:tempname(nm)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Aug 27, 2013
|
||||
" Date: Dec 30, 2014
|
||||
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 14
|
||||
" Version: 15
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v14"
|
||||
let g:loaded_netrwSettings = "v15"
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
" NetrwSettings: {{{1
|
||||
fun! netrwSettings#NetrwSettings()
|
||||
" this call is here largely just to insure that netrw has been loaded
|
||||
call netrw#NetrwSavePosn()
|
||||
call netrw#SavePosn()
|
||||
if !exists("g:loaded_netrw")
|
||||
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
|
||||
return
|
||||
@@ -177,6 +177,7 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
|
||||
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
|
||||
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
|
||||
put = 'let g:netrw_servername = '.g:netrw_servername
|
||||
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
|
||||
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
|
||||
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
|
||||
|
||||
@@ -61,9 +61,16 @@ function! netrw_gitignore#Hide(...)
|
||||
" convert gitignore patterns to Netrw/Vim regex patterns
|
||||
let escaped_lines = []
|
||||
for line in gitignore_lines
|
||||
let escaped = line
|
||||
let escaped = substitute(escaped, '\.', '\\.', 'g')
|
||||
let escaped = substitute(escaped, '*', '.*', 'g')
|
||||
let escaped = line
|
||||
let escaped = substitute(escaped, '\*\*', '*', 'g')
|
||||
let escaped = substitute(escaped, '\.', '\\.', 'g')
|
||||
let escaped = substitute(escaped, '\$', '\\$', 'g')
|
||||
let escaped = substitute(escaped, '*', '.*', 'g')
|
||||
" correction: dot, dollar and asterisks chars shouldn't be escaped when
|
||||
" within regex matching groups.
|
||||
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\\\.', '\.', 'g')
|
||||
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\\\$', '\$', 'g')
|
||||
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\.\*', '*', 'g')
|
||||
let escaped_lines = add(escaped_lines, escaped)
|
||||
endfor
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2014 Oct 02
|
||||
" Last Change: 2015 Jul 13
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@@ -141,71 +141,80 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
if a:base != ""
|
||||
let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
|
||||
end
|
||||
else
|
||||
let context = ''
|
||||
end
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
try
|
||||
let winheight = winheight(0)
|
||||
let winnr = winnr()
|
||||
|
||||
if context =~? '^use\s'
|
||||
return phpcomplete#CompleteUse(a:base)
|
||||
endif
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
|
||||
if context =~ '\(->\|::\)$'
|
||||
" {{{
|
||||
" Get name of the class
|
||||
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
|
||||
if context =~? '^use\s' || context ==? 'use'
|
||||
return phpcomplete#CompleteUse(a:base)
|
||||
endif
|
||||
|
||||
" Get location of class definition, we have to iterate through all
|
||||
if classname != ''
|
||||
if classname =~ '\'
|
||||
" split the last \ segment as a classname, everything else is the namespace
|
||||
let classname_parts = split(classname, '\')
|
||||
let namespace = join(classname_parts[0:-2], '\')
|
||||
let classname = classname_parts[-1]
|
||||
if context =~ '\(->\|::\)$'
|
||||
" {{{
|
||||
" Get name of the class
|
||||
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
|
||||
|
||||
" Get location of class definition, we have to iterate through all
|
||||
if classname != ''
|
||||
if classname =~ '\'
|
||||
" split the last \ segment as a classname, everything else is the namespace
|
||||
let classname_parts = split(classname, '\')
|
||||
let namespace = join(classname_parts[0:-2], '\')
|
||||
let classname = classname_parts[-1]
|
||||
else
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
|
||||
else
|
||||
let namespace = '\'
|
||||
let classlocation = ''
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
|
||||
|
||||
if classlocation != ''
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
|
||||
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
|
||||
|
||||
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
|
||||
endif
|
||||
endif
|
||||
|
||||
return phpcomplete#CompleteUnknownClass(a:base, context)
|
||||
" }}}
|
||||
elseif context =~? 'implements'
|
||||
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
|
||||
elseif context =~? 'extends\s\+.\+$' && a:base == ''
|
||||
return ['implements']
|
||||
elseif context =~? 'extends'
|
||||
let kinds = context =~? 'class\s' ? ['c'] : ['i']
|
||||
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
|
||||
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
|
||||
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
|
||||
elseif context =~? 'new'
|
||||
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
|
||||
endif
|
||||
|
||||
if a:base =~ '^\$'
|
||||
return phpcomplete#CompleteVariable(a:base)
|
||||
else
|
||||
let classlocation = ''
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
|
||||
if classlocation != ''
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
|
||||
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
|
||||
|
||||
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
|
||||
endif
|
||||
endif
|
||||
|
||||
return phpcomplete#CompleteUnknownClass(a:base, context)
|
||||
" }}}
|
||||
elseif context =~? 'implements'
|
||||
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
|
||||
elseif context =~? 'extends\s\+.\+$'
|
||||
return ['implements']
|
||||
elseif context =~? 'extends'
|
||||
let kinds = context =~? 'class\s' ? ['c'] : ['i']
|
||||
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
|
||||
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
|
||||
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
|
||||
elseif context =~? 'new'
|
||||
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
|
||||
endif
|
||||
|
||||
if a:base =~ '^\$'
|
||||
return phpcomplete#CompleteVariable(a:base)
|
||||
else
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
finally
|
||||
silent! exec winnr.'resize '.winheight
|
||||
endtry
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
@@ -244,12 +253,13 @@ function! phpcomplete#CompleteUse(base) " {{{
|
||||
if has_key(tag, 'namespace')
|
||||
let patched_ctags_detected = 1
|
||||
endif
|
||||
|
||||
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
|
||||
let patched_ctags_detected = 1
|
||||
call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
|
||||
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i') && tag.namespace ==? namespace_for_class
|
||||
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't') && tag.namespace ==? namespace_for_class
|
||||
call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
|
||||
elseif (tag.kind ==? 'c' || tag.kind ==? 'i')
|
||||
elseif (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't')
|
||||
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
|
||||
endif
|
||||
endfor
|
||||
@@ -272,6 +282,10 @@ function! phpcomplete#CompleteUse(base) " {{{
|
||||
endfor
|
||||
endif
|
||||
|
||||
for comp in res
|
||||
let comp.word = substitute(comp.word, '^\\', '', '')
|
||||
endfor
|
||||
|
||||
return res
|
||||
endfunction
|
||||
" }}}
|
||||
@@ -304,7 +318,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||
if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g')
|
||||
let f_args = matchstr(i,
|
||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)')
|
||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
|
||||
let int_functions[f_name.'('] = f_args.')'
|
||||
endif
|
||||
endfor
|
||||
@@ -326,6 +340,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
let ext_functions = {}
|
||||
let ext_constants = {}
|
||||
let ext_classes = {}
|
||||
let ext_traits = {}
|
||||
let ext_interfaces = {}
|
||||
let ext_namespaces = {}
|
||||
|
||||
@@ -420,7 +435,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
elseif tag.kind ==? 'c' || tag.kind ==? 'i'
|
||||
elseif tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't'
|
||||
let info = ' - '.tag.filename
|
||||
|
||||
let key = ''
|
||||
@@ -441,6 +456,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
let ext_classes[key] = info
|
||||
elseif tag.kind ==? 'i'
|
||||
let ext_interfaces[key] = info
|
||||
elseif tag.kind ==? 't'
|
||||
let ext_traits[key] = info
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -463,7 +480,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
endfor
|
||||
for [interfacename, info] in items(g:php_builtin_interfacenames)
|
||||
if interfacename =~? '^'.base
|
||||
let builtin_interfaces[leading_slash.interfacename] = info
|
||||
let builtin_interfaces[leading_slash.g:php_builtin_interfaces[tolower(interfacename)].name] = info
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
@@ -511,6 +528,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
else
|
||||
let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename
|
||||
endif
|
||||
elseif import.kind ==? 't'
|
||||
let ext_traits[imported_name] = ' '.import.name.' - '.import.filename
|
||||
endif
|
||||
|
||||
" no builtin interfaces
|
||||
@@ -540,6 +559,9 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
" Add external interfaces
|
||||
call extend(all_values, ext_interfaces)
|
||||
|
||||
" Add external traits
|
||||
call extend(all_values, ext_traits)
|
||||
|
||||
" Add built-in classes
|
||||
call extend(all_values, builtin_classnames)
|
||||
|
||||
@@ -566,6 +588,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i)
|
||||
let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin'
|
||||
let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}]
|
||||
elseif has_key(ext_traits, i)
|
||||
let final_list += [{'word':i, 'kind': 't', 'menu': ext_traits[i], 'info': ext_traits[i]}]
|
||||
elseif has_key(int_constants, i) || has_key(builtin_constants, i)
|
||||
let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin'
|
||||
let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}]
|
||||
@@ -622,7 +646,7 @@ function! phpcomplete#CompleteUnknownClass(base, context) " {{{
|
||||
let f_name = matchstr(i,
|
||||
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||
let f_args = matchstr(i,
|
||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)')
|
||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
|
||||
|
||||
let int_functions[f_name.'('] = f_args.')'
|
||||
endfor
|
||||
@@ -784,7 +808,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
|
||||
|
||||
let tags = []
|
||||
if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
|
||||
let tags = phpcomplete#GetTaglist('^'.tag_match_pattern)
|
||||
let tags = phpcomplete#GetTaglist('^\c'.tag_match_pattern)
|
||||
endif
|
||||
|
||||
if len(tags)
|
||||
@@ -861,6 +885,39 @@ function! phpcomplete#CompareCompletionRow(i1, i2) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! s:getNextCharWithPos(filelines, current_pos) " {{{
|
||||
let line_no = a:current_pos[0]
|
||||
let col_no = a:current_pos[1]
|
||||
let last_line = a:filelines[len(a:filelines) - 1]
|
||||
let end_pos = [len(a:filelines) - 1, strlen(last_line) - 1]
|
||||
if line_no > end_pos[0] || line_no == end_pos[0] && col_no > end_pos[1]
|
||||
return ['EOF', 'EOF']
|
||||
endif
|
||||
|
||||
" we've not reached the end of the current line break
|
||||
if col_no + 1 < strlen(a:filelines[line_no])
|
||||
let col_no += 1
|
||||
else
|
||||
" we've reached the end of the current line, jump to the next
|
||||
" non-blank line (blank lines have no position where we can read from,
|
||||
" not even a whitespace. The newline char does not positionable by vim
|
||||
let line_no += 1
|
||||
while strlen(a:filelines[line_no]) == 0
|
||||
let line_no += 1
|
||||
endwhile
|
||||
|
||||
let col_no = 0
|
||||
endif
|
||||
|
||||
" return 'EOF' string to signal end of file, normal results only one char
|
||||
" in length
|
||||
if line_no == end_pos[0] && col_no > end_pos[1]
|
||||
return ['EOF', 'EOF']
|
||||
endif
|
||||
|
||||
return [[line_no, col_no], a:filelines[line_no][col_no]]
|
||||
endfunction " }}}
|
||||
|
||||
function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
|
||||
" if theres no modifier, and no modifier is allowed and no modifier is required
|
||||
if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
|
||||
@@ -924,7 +981,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
|
||||
let f_name = matchstr(i,
|
||||
\ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||
let f_args = matchstr(i,
|
||||
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|\_$\)')
|
||||
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|\_$\)')
|
||||
if f_name != '' && stridx(f_name, '__') != 0
|
||||
let c_functions[f_name.'('] = f_args
|
||||
if g:phpcomplete_parse_docblock_comments
|
||||
@@ -1172,11 +1229,11 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
|
||||
" break if we are on a "naked" stop_char (operators, colon, openparent...)
|
||||
if index(stop_chars, current_char) != -1
|
||||
let do_break = 1
|
||||
" dont break does not look like a "->"
|
||||
" dont break if it does look like a "->"
|
||||
if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
|
||||
let do_break = 0
|
||||
endif
|
||||
" dont break if its looks like a "::"
|
||||
" dont break if it does look like a "::"
|
||||
if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
|
||||
let do_break = 0
|
||||
endif
|
||||
@@ -1322,8 +1379,8 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
||||
" Get Structured information of all classes and subclasses including namespace and includes
|
||||
" try to find the method's return type in docblock comment
|
||||
for classstructure in classcontents
|
||||
let doclock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
|
||||
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), doclock_target_pattern)
|
||||
let docblock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
|
||||
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
|
||||
if doc_str != ''
|
||||
break
|
||||
endif
|
||||
@@ -1356,8 +1413,12 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
||||
endif
|
||||
" make @return self, static, $this the same way
|
||||
" (not exactly what php means by these)
|
||||
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this'
|
||||
let classname_candidate = a:classname_candidate
|
||||
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
|
||||
if returnclass =~ '\[\]$'
|
||||
let classname_candidate = a:classname_candidate.'[]'
|
||||
else
|
||||
let classname_candidate = a:classname_candidate
|
||||
endif
|
||||
let class_candidate_namespace = a:class_candidate_namespace
|
||||
else
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
|
||||
@@ -1471,21 +1532,19 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
return ''
|
||||
endif
|
||||
|
||||
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class'
|
||||
let class_name = matchstr(line, '\c\s*class\s*\zs'.class_name_pattern.'\ze')
|
||||
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class\s'
|
||||
let class_name = matchstr(line, '\cclass\s\+\zs'.class_name_pattern.'\ze')
|
||||
let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze')
|
||||
|
||||
let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name
|
||||
else
|
||||
let i += 1
|
||||
continue
|
||||
if classname_candidate != ''
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
|
||||
" return absolute classname, without leading \
|
||||
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
|
||||
endif
|
||||
endif
|
||||
|
||||
if classname_candidate != ''
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
|
||||
" return absolute classname, without leading \
|
||||
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->'
|
||||
let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze')
|
||||
@@ -1527,7 +1586,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
|
||||
let search_end_line = max([1, function_boundary[0][0]])
|
||||
" -1 makes us ignore the current line (where the completion was invoked
|
||||
let lines = reverse(getline(search_end_line, line('.') - 1))
|
||||
let lines = reverse(getline(search_end_line, a:start_line - 1))
|
||||
|
||||
" check Constant lookup
|
||||
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
|
||||
@@ -1598,26 +1657,26 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
endif
|
||||
endif
|
||||
|
||||
" in-file lookup for typehinted function arguments
|
||||
" - the function can have a name or be anonymous (e.g., function qux() { ... } vs. function () { ... })
|
||||
" - the type-hinted argument can be anywhere in the arguments list.
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
||||
let f_args = matchstr(line, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
||||
let args = split(f_args, '\s*\zs,\ze\s*')
|
||||
for arg in args
|
||||
if arg =~# object.'\(,\|$\)'
|
||||
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
|
||||
" function declaration line
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
|
||||
let function_lines = join(reverse(copy(lines)), " ")
|
||||
" search for type hinted arguments
|
||||
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
||||
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
||||
let args = split(f_args, '\s*\zs,\ze\s*')
|
||||
for arg in args
|
||||
if arg =~# object.'\(,\|$\)'
|
||||
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if classname_candidate != ''
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if classname_candidate != ''
|
||||
break
|
||||
endif
|
||||
endif
|
||||
|
||||
" if we see a function declaration, try loading the docblock for it and look for matching @params
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.object
|
||||
" search for docblock for the function
|
||||
let match_line = substitute(line, '\\', '\\\\', 'g')
|
||||
let sccontent = getline(0, a:start_line - i)
|
||||
let doc_str = phpcomplete#GetDocBlock(sccontent, match_line)
|
||||
@@ -1637,10 +1696,40 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
endif
|
||||
|
||||
" assignment for the variable in question with a variable on the right hand side
|
||||
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
|
||||
let tailing_semicolon = match(line, ';\s*$')
|
||||
let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
|
||||
let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
|
||||
if line =~# '^\s*'.object.'\s*=&\?\s\+\(clone\)\?\s*'.variable_name_pattern
|
||||
|
||||
" try to find the next non-comment or string ";" char
|
||||
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
|
||||
let filelines = reverse(copy(lines))
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" function_boundary == 0 if we are not in a function
|
||||
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, pos)
|
||||
let chars_read += 1
|
||||
" we got a candidate
|
||||
if char == ';'
|
||||
" pos values is relative to the function's lines,
|
||||
" line 0 need to be offsetted with the line number
|
||||
" where te function was started to get the line number
|
||||
" in real buffer terms
|
||||
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
|
||||
" it's not a comment or string, end search
|
||||
if synIDName !~? 'comment\|string'
|
||||
break
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
|
||||
if prev_context == ''
|
||||
" cannot get previous context give up
|
||||
return
|
||||
endif
|
||||
let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
|
||||
|
||||
if stridx(prev_class, '\') != -1
|
||||
@@ -1656,9 +1745,38 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
|
||||
" assignment for the variable in question with a function on the right hand side
|
||||
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
|
||||
let tailing_semicolon = match(line, ';\s*$')
|
||||
let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
|
||||
let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
|
||||
" try to find the next non-comment or string ";" char
|
||||
let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
|
||||
let filelines = reverse(copy(lines))
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" function_boundary == 0 if we are not in a function
|
||||
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, pos)
|
||||
let chars_read += 1
|
||||
" we got a candidate
|
||||
if char == ';'
|
||||
" pos values is relative to the function's lines,
|
||||
" line 0 need to be offsetted with the line number
|
||||
" where te function was started to get the line number
|
||||
" in real buffer terms
|
||||
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
|
||||
" it's not a comment or string, end search
|
||||
if synIDName !~? 'comment\|string'
|
||||
break
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
|
||||
if prev_context == ''
|
||||
" cannot get previous context give up
|
||||
return
|
||||
endif
|
||||
|
||||
let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
|
||||
let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (
|
||||
@@ -1757,6 +1875,9 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
||||
if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
|
||||
return 'VIMPHP_BUILTINOBJECT'
|
||||
endif
|
||||
if has_key(g:php_builtin_interfaces, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
|
||||
return 'VIMPHP_BUILTINOBJECT'
|
||||
endif
|
||||
|
||||
if a:namespace == '' || a:namespace == '\'
|
||||
let search_namespace = '\'
|
||||
@@ -1769,7 +1890,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
||||
let i = 1
|
||||
while i < line('.')
|
||||
let line = getline(line('.')-i)
|
||||
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*class\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
|
||||
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
|
||||
return expand('%:p')
|
||||
else
|
||||
let i += 1
|
||||
@@ -1781,7 +1902,9 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
||||
let no_namespace_candidate = ''
|
||||
let tags = phpcomplete#GetTaglist('^'.a:classname.'$')
|
||||
for tag in tags
|
||||
if tag.kind == 'c' || tag.kind == 'i'
|
||||
" We'll allow interfaces and traits to be handled classes since you
|
||||
" can't have colliding names with different kinds anyway
|
||||
if tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't'
|
||||
if !has_key(tag, 'namespace')
|
||||
let no_namespace_candidate = tag.filename
|
||||
else
|
||||
@@ -1931,7 +2054,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =cfile
|
||||
call search('\(class\|interface\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
let cfline = line('.')
|
||||
call search('{')
|
||||
let endline = line('.')
|
||||
@@ -1939,13 +2062,62 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
let content = join(getline(cfline, endline), "\n")
|
||||
" Catch extends
|
||||
if content =~? 'extends'
|
||||
let extends_class = matchstr(content, 'class\_s\+'.a:class_name.'\_s\+extends\_s\+\zs'.class_name_pattern.'\ze')
|
||||
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
|
||||
let extended_classes = map(split(extends_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
|
||||
else
|
||||
let extends_class = ''
|
||||
let extended_classes = ''
|
||||
endif
|
||||
|
||||
" Catch implements
|
||||
if content =~? 'implements'
|
||||
let implements_string = matchstr(content, 'class\_s\+'.a:class_name.'\_.\+implements\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze')
|
||||
let implemented_interfaces = map(split(implements_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
|
||||
else
|
||||
let implemented_interfaces = []
|
||||
endif
|
||||
call searchpair('{', '', '}', 'W')
|
||||
let classcontent = join(getline(cfline, line('.')), "\n")
|
||||
let class_closing_bracket_line = line('.')
|
||||
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
|
||||
|
||||
let used_traits = []
|
||||
" move back to the line next to the class's definition
|
||||
call cursor(endline + 1, 1)
|
||||
let keep_searching = 1
|
||||
while keep_searching != 0
|
||||
" try to grab "use..." keywords
|
||||
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
|
||||
let syn_name = synIDattr(synID(lnum, col, 0), "name")
|
||||
if syn_name =~? 'string\|comment'
|
||||
call cursor(lnum + 1, 1)
|
||||
continue
|
||||
endif
|
||||
|
||||
let trait_line = getline(lnum)
|
||||
if trait_line !~? ';'
|
||||
" try to find the next line containing ';'
|
||||
let l = lnum
|
||||
let search_line = trait_line
|
||||
|
||||
" add lines from the file until theres no ';' in them
|
||||
while search_line !~? ';' && l > 0
|
||||
" file lines are reversed so we need to go backwards
|
||||
let l += 1
|
||||
let search_line = getline(l)
|
||||
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
|
||||
call cursor(lnum + 1, 1)
|
||||
|
||||
if [lnum, col] == [0, 0]
|
||||
let keep_searching = 0
|
||||
endif
|
||||
endwhile
|
||||
|
||||
silent! bw! %
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
|
||||
" go back to original window
|
||||
exe phpcomplete_original_window.'wincmd w'
|
||||
@@ -1958,21 +2130,35 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
\ 'mtime': getftime(full_file_path),
|
||||
\ })
|
||||
|
||||
if extends_class != ''
|
||||
let [extends_class, namespace] = phpcomplete#ExpandClassName(extends_class, current_namespace, imports)
|
||||
if namespace == ''
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(extends_class, namespace)
|
||||
if classlocation == "VIMPHP_BUILTINOBJECT"
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(extends_class)])]
|
||||
elseif classlocation != '' && filereadable(classlocation)
|
||||
let full_file_path = fnamemodify(classlocation, ':p')
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), extends_class)
|
||||
elseif tolower(current_namespace) == tolower(namespace)
|
||||
" try to find the declaration in the same file.
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, extends_class)
|
||||
endif
|
||||
let all_extends = used_traits
|
||||
if len(extended_classes) > 0
|
||||
call extend(all_extends, extended_classes)
|
||||
endif
|
||||
if len(implemented_interfaces) > 0
|
||||
call extend(all_extends, implemented_interfaces)
|
||||
endif
|
||||
if len(all_extends) > 0
|
||||
for class in all_extends
|
||||
let [class, namespace] = phpcomplete#ExpandClassName(class, current_namespace, imports)
|
||||
if namespace == ''
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(class, namespace)
|
||||
if classlocation == "VIMPHP_BUILTINOBJECT"
|
||||
if has_key(g:php_builtin_classes, tolower(class))
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub('class', g:php_builtin_classes[tolower(class)])]
|
||||
endif
|
||||
if has_key(g:php_builtin_interfaces, tolower(class))
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub('interface', g:php_builtin_interfaces[tolower(class)])]
|
||||
endif
|
||||
elseif classlocation != '' && filereadable(classlocation)
|
||||
let full_file_path = fnamemodify(classlocation, ':p')
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
|
||||
elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
|
||||
" try to find the declaration in the same file.
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
return result
|
||||
@@ -1989,43 +2175,53 @@ function! phpcomplete#GetClassContents(classlocation, class_name) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GenerateBuiltinClassStub(class_info) " {{{
|
||||
let re = 'class '.a:class_info['name']." {"
|
||||
for [name, initializer] in items(a:class_info.constants)
|
||||
let re .= "\n\tconst ".name." = ".initializer.";"
|
||||
endfor
|
||||
for [name, info] in items(a:class_info.properties)
|
||||
let re .= "\n\t// @var $".name." ".info.type
|
||||
let re .= "\n\tpublic $".name.";"
|
||||
endfor
|
||||
for [name, info] in items(a:class_info.static_properties)
|
||||
let re .= "\n\t// @var ".name." ".info.type
|
||||
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
|
||||
endfor
|
||||
for [name, info] in items(a:class_info.methods)
|
||||
if name =~ '^__'
|
||||
continue
|
||||
endif
|
||||
let re .= "\n\t/**"
|
||||
let re .= "\n\t * ".name
|
||||
let re .= "\n\t *"
|
||||
let re .= "\n\t * @return ".info.return_type
|
||||
let re .= "\n\t */"
|
||||
let re .= "\n\tpublic function ".name."(".info.signature."){"
|
||||
let re .= "\n\t}"
|
||||
endfor
|
||||
for [name, info] in items(a:class_info.static_methods)
|
||||
let re .= "\n\t/**"
|
||||
let re .= "\n\t * ".name
|
||||
let re .= "\n\t *"
|
||||
let re .= "\n\t * @return ".info.return_type
|
||||
let re .= "\n\t */"
|
||||
let re .= "\n\tpublic static function ".name."(".info.signature."){"
|
||||
let re .= "\n\t}"
|
||||
endfor
|
||||
function! phpcomplete#GenerateBuiltinClassStub(type, class_info) " {{{
|
||||
let re = a:type.' '.a:class_info['name']." {"
|
||||
if has_key(a:class_info, 'constants')
|
||||
for [name, initializer] in items(a:class_info.constants)
|
||||
let re .= "\n\tconst ".name." = ".initializer.";"
|
||||
endfor
|
||||
endif
|
||||
if has_key(a:class_info, 'properties')
|
||||
for [name, info] in items(a:class_info.properties)
|
||||
let re .= "\n\t// @var $".name." ".info.type
|
||||
let re .= "\n\tpublic $".name.";"
|
||||
endfor
|
||||
endif
|
||||
if has_key(a:class_info, 'static_properties')
|
||||
for [name, info] in items(a:class_info.static_properties)
|
||||
let re .= "\n\t// @var ".name." ".info.type
|
||||
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
|
||||
endfor
|
||||
endif
|
||||
if has_key(a:class_info, 'methods')
|
||||
for [name, info] in items(a:class_info.methods)
|
||||
if name =~ '^__'
|
||||
continue
|
||||
endif
|
||||
let re .= "\n\t/**"
|
||||
let re .= "\n\t * ".name
|
||||
let re .= "\n\t *"
|
||||
let re .= "\n\t * @return ".info.return_type
|
||||
let re .= "\n\t */"
|
||||
let re .= "\n\tpublic function ".name."(".info.signature."){"
|
||||
let re .= "\n\t}"
|
||||
endfor
|
||||
endif
|
||||
if has_key(a:class_info, 'static_methods')
|
||||
for [name, info] in items(a:class_info.static_methods)
|
||||
let re .= "\n\t/**"
|
||||
let re .= "\n\t * ".name
|
||||
let re .= "\n\t *"
|
||||
let re .= "\n\t * @return ".info.return_type
|
||||
let re .= "\n\t */"
|
||||
let re .= "\n\tpublic static function ".name."(".info.signature."){"
|
||||
let re .= "\n\t}"
|
||||
endfor
|
||||
endif
|
||||
let re .= "\n}"
|
||||
|
||||
return { 'class': a:class_info['name'],
|
||||
return { a:type : a:class_info['name'],
|
||||
\ 'content': re,
|
||||
\ 'namespace': '',
|
||||
\ 'imports': {},
|
||||
@@ -2049,8 +2245,11 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
||||
" start backward serch for the comment block
|
||||
while l != 0
|
||||
let line = a:sccontent[l]
|
||||
" if comment end found save line position and end search
|
||||
if line =~? '^\s*\*/'
|
||||
" if it's a one line docblock like comment and we can just return it right away
|
||||
if line =~? '^\s*\/\*\*.\+\*\/\s*$'
|
||||
return substitute(line, '\v^\s*(\/\*\*\s*)|(\s*\*\/)\s*$', '', 'g')
|
||||
"... or if comment end found save line position and end search
|
||||
elseif line =~? '^\s*\*/'
|
||||
let comment_end = l
|
||||
break
|
||||
" ... or the line doesn't blank (only whitespace or nothing) end search
|
||||
@@ -2072,6 +2271,7 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
||||
endif
|
||||
let l -= 1
|
||||
endwhile
|
||||
|
||||
" no docblock comment start found
|
||||
if comment_start == -1
|
||||
return ''
|
||||
@@ -2220,19 +2420,48 @@ endfunction!
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let original_window = winnr()
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =a:file_lines
|
||||
normal! G
|
||||
|
||||
" clear out classes, functions and other blocks
|
||||
while 1
|
||||
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
|
||||
if block_start_pos == [0, 0]
|
||||
break
|
||||
endif
|
||||
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
||||
|
||||
if block_end_pos != [0, 0]
|
||||
" end of the block found, just delete it
|
||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
|
||||
else
|
||||
" block pair not found, use block start as beginning and the end
|
||||
" of the buffer instead
|
||||
silent! exec block_start_pos[0].',$d _'
|
||||
endif
|
||||
endwhile
|
||||
normal! G
|
||||
|
||||
" grab the remains
|
||||
let file_lines = reverse(getline(1, line('.') - 1))
|
||||
|
||||
silent! bw! %
|
||||
exe original_window.'wincmd w'
|
||||
|
||||
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let file_lines = reverse(copy(a:file_lines))
|
||||
let i = 0
|
||||
let file_length = len(file_lines)
|
||||
let imports = {}
|
||||
|
||||
let current_namespace = '\'
|
||||
|
||||
while i < file_length
|
||||
let line = file_lines[i]
|
||||
|
||||
if line =~? '^\s*namespace\s*'.namespace_name_pattern
|
||||
let current_namespace = matchstr(line, '^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||
if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
|
||||
let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||
break
|
||||
endif
|
||||
|
||||
@@ -2253,11 +2482,11 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(use_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_expression = matchstr(use_line, '^\c\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
for part in use_parts
|
||||
if part =~? '\s\+as\s\+'
|
||||
let [object, name] = split(part, '\s\+as\s\+')
|
||||
let [object, name] = split(part, '\s\+as\s\+\c')
|
||||
let object = substitute(object, '^\\', '', '')
|
||||
let name = substitute(name, '^\\', '', '')
|
||||
else
|
||||
@@ -2293,7 +2522,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
break
|
||||
endif
|
||||
" if the name matches with the extracted classname and namespace
|
||||
if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname
|
||||
if (tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') && tag.name == classname
|
||||
if has_key(tag, 'namespace')
|
||||
let patched_ctags_detected = 1
|
||||
if tag.namespace == namespace_for_classes
|
||||
@@ -2336,7 +2565,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
|
||||
for tag in tags
|
||||
" search for the first matchin namespace, class, interface with no namespace
|
||||
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i')
|
||||
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
|
||||
call extend(import, tag)
|
||||
let import['builtin'] = 0
|
||||
break
|
||||
@@ -2395,7 +2624,7 @@ endfunction
|
||||
|
||||
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
|
||||
" if there's an imported class, just use that class's information
|
||||
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i')
|
||||
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
|
||||
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
|
||||
return [a:imports[a:classname].name, namespace]
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"python3complete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009
|
||||
" Last Updated: 18 Jun 2009 (small fix 2015 Sep 14 from Debian)
|
||||
"
|
||||
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
|
||||
"
|
||||
@@ -359,6 +359,7 @@ class PyParser:
|
||||
def __init__(self):
|
||||
self.top = Scope('global',0)
|
||||
self.scope = self.top
|
||||
self.parserline = 0
|
||||
|
||||
def _parsedotname(self,pre=None):
|
||||
#returns (dottedname, nexttoken)
|
||||
|
||||
@@ -377,6 +377,7 @@ class PyParser:
|
||||
def __init__(self):
|
||||
self.top = Scope('global',0)
|
||||
self.scope = self.top
|
||||
self.parserline = 0
|
||||
|
||||
def _parsedotname(self,pre=None):
|
||||
#returns (dottedname, nexttoken)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2013 Jun 19
|
||||
" Last Change: 2013 Sep 03
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -302,7 +302,7 @@ func! tohtml#Convert2HTML(line1, line2) "{{{
|
||||
else "{{{
|
||||
let win_list = []
|
||||
let buf_list = []
|
||||
windo | if &diff | call add(win_list, winbufnr(0)) | endif
|
||||
windo if &diff | call add(win_list, winbufnr(0)) | endif
|
||||
let s:settings.whole_filler = 1
|
||||
let g:html_diff_win_num = 0
|
||||
for window in win_list
|
||||
|
||||
@@ -75,6 +75,7 @@ DOCS = \
|
||||
pattern.txt \
|
||||
pi_getscript.txt \
|
||||
pi_gzip.txt \
|
||||
pi_logipat.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
@@ -207,6 +208,7 @@ HTMLS = \
|
||||
pattern.html \
|
||||
pi_getscript.html \
|
||||
pi_gzip.html \
|
||||
pi_logipat.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
@@ -229,7 +231,6 @@ HTMLS = \
|
||||
starting.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tags.html \
|
||||
tagsrch.html \
|
||||
term.html \
|
||||
tips.html \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2014 Sep 23
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2015 Aug 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -259,6 +259,7 @@ Name triggered by ~
|
||||
|Syntax| when the 'syntax' option has been set
|
||||
|EncodingChanged| after the 'encoding' option has been changed
|
||||
|TermChanged| after the value of 'term' has changed
|
||||
|OptionSet| after setting any option
|
||||
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
@@ -505,6 +506,8 @@ ColorScheme After loading a color scheme. |:colorscheme|
|
||||
CompleteDone After Insert mode completion is done. Either
|
||||
when something was completed or abandoning
|
||||
completion. |ins-completion|
|
||||
The |v:completed_item| variable contains
|
||||
information about the completed item.
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
@@ -742,6 +745,29 @@ MenuPopup Just before showing the popup menu (under the
|
||||
o Operator-pending
|
||||
i Insert
|
||||
c Command line
|
||||
*OptionSet*
|
||||
OptionSet After setting an option. The pattern is
|
||||
matched against the long option name.
|
||||
The |v:option_old| variable indicates the
|
||||
old option value, |v:option_new| variable
|
||||
indicates the newly set value, the
|
||||
|v:option_type| variable indicates whether
|
||||
it's global or local scoped and |<amatch>|
|
||||
indicates what option has been set.
|
||||
|
||||
Is not triggered on startup and for the 'key'
|
||||
option for obvious reasons.
|
||||
|
||||
Usage example: Check for the existence of the
|
||||
directory in the 'backupdir' and 'undodir'
|
||||
options, create the directory if it doesn't
|
||||
exist yet.
|
||||
|
||||
Note: It's a bad idea to reset an option
|
||||
during this autocommand, this may break a
|
||||
plugin. You can always use `:noa` to prevent
|
||||
triggering this autocommand.
|
||||
|
||||
*QuickFixCmdPre*
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||
@@ -933,6 +959,13 @@ WinLeave Before leaving a window. If the window to be
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{pat}*
|
||||
|
||||
The {pat} argument can be a comma separated list. This works as if the
|
||||
command was given with each pattern separately. Thus this command: >
|
||||
:autocmd BufRead *.txt,*.info set et
|
||||
Is equivalent to: >
|
||||
:autocmd BufRead *.txt set et
|
||||
:autocmd BufRead *.info set et
|
||||
|
||||
The file pattern {pat} is tested for a match against the file name in one of
|
||||
two ways:
|
||||
1. When there is no '/' in the pattern, Vim checks for a match against only
|
||||
@@ -1039,7 +1072,7 @@ Instead of a pattern buffer-local autocommands use one of these forms:
|
||||
Examples: >
|
||||
:au CursorHold <buffer> echo 'hold'
|
||||
:au CursorHold <buffer=33> echo 'hold'
|
||||
:au CursorHold <buffer=abuf> echo 'hold'
|
||||
:au BufNewFile * au CursorHold <buffer=abuf> echo 'hold'
|
||||
|
||||
All the commands for autocommands also work with buffer-local autocommands,
|
||||
simply use the special string instead of the pattern. Examples: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.4. Last change: 2014 Jun 26
|
||||
*change.txt* For Vim version 7.4. Last change: 2015 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -379,10 +379,43 @@ Adding and subtracting ~
|
||||
CTRL-A Add [count] to the number or alphabetic character at
|
||||
or after the cursor. {not in Vi}
|
||||
|
||||
*v_CTRL-A*
|
||||
{Visual}CTRL-A Add [count] to the number or alphabetic character in
|
||||
the highlighted text. {not in Vi}
|
||||
|
||||
*v_g_CTRL-A*
|
||||
{Visual}g CTRL-A Add [count] to the number or alphabetic character in
|
||||
the highlighted text. If several lines are
|
||||
highlighted, each one will be incremented by an
|
||||
additional [count] (so effectively creating a
|
||||
[count] incrementing sequence). {not in Vi}
|
||||
For Example, if you have this list of numbers:
|
||||
1. ~
|
||||
1. ~
|
||||
1. ~
|
||||
1. ~
|
||||
Move to the second "1." and Visually select three
|
||||
lines, pressing g CTRL-A results in:
|
||||
1. ~
|
||||
2. ~
|
||||
3. ~
|
||||
4. ~
|
||||
|
||||
*CTRL-X*
|
||||
CTRL-X Subtract [count] from the number or alphabetic
|
||||
character at or after the cursor. {not in Vi}
|
||||
|
||||
*v_CTRL-X*
|
||||
{Visual}CTRL-X Subtract [count] from the number or alphabetic
|
||||
character in the highlighted text. {not in Vi}
|
||||
|
||||
*v_g_CTRL-X*
|
||||
{Visual}g CTRL-X Subtract [count] from the number or alphabetic
|
||||
character in the highlighted text. If several lines
|
||||
are highlighted, each value will be decremented by an
|
||||
additional [count] (so effectively creating a [count]
|
||||
decrementing sequence). {not in Vi}
|
||||
|
||||
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
|
||||
octal and hexadecimal numbers and alphabetic characters. This depends on the
|
||||
'nrformats' option.
|
||||
@@ -399,6 +432,10 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the
|
||||
under or after the cursor. This is useful to make lists with an alphabetic
|
||||
index.
|
||||
|
||||
For decimals a leading negative sign is considered for incrementing/
|
||||
decrementing, for octal and hex values, it won't be considered.
|
||||
To ignore the sign Visually select the number before using CTRL-A or CTRL-X.
|
||||
|
||||
For numbers with leading zeros (including all octal and hexadecimal numbers),
|
||||
Vim preserves the number of characters in the number when possible. CTRL-A on
|
||||
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
|
||||
@@ -597,9 +634,9 @@ For other systems the tmpnam() library function is used.
|
||||
may add [flags], see |:s_flags|.
|
||||
Note that after `:substitute` the '&' flag can't be
|
||||
used, it's recognized as a pattern separator.
|
||||
The space between `:substitute` and the 'c', 'g' and
|
||||
'r' flags isn't required, but in scripts it's a good
|
||||
idea to keep it to avoid confusion.
|
||||
The space between `:substitute` and the 'c', 'g',
|
||||
'i', 'I' and 'r' flags isn't required, but in scripts
|
||||
it's a good idea to keep it to avoid confusion.
|
||||
|
||||
:[range]~[&][flags] [count] *:~*
|
||||
Repeat last substitute with same substitute string
|
||||
@@ -826,6 +863,36 @@ either the first or second pattern in parentheses did not match, so either
|
||||
:s/\([ab]\)\|\([cd]\)/\1x/g modifies "a b c d" to "ax bx x x"
|
||||
<
|
||||
|
||||
*:sc* *:sce* *:scg* *:sci* *:scI* *:scl* *:scp* *:sg* *:sgc*
|
||||
*:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si*
|
||||
*:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp*
|
||||
*:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl*
|
||||
*:srn* *:srp*
|
||||
2-letter and 3-letter :substitute commands ~
|
||||
|
||||
List of :substitute commands
|
||||
| c e g i I n p l r
|
||||
| c :sc :sce :scg :sci :scI :scn :scp :scl ---
|
||||
| e
|
||||
| g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr
|
||||
| i :sic :sie --- :si :siI :sin :sip --- :sir
|
||||
| I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr
|
||||
| n
|
||||
| p
|
||||
| l
|
||||
| r :src --- :srg :sri :srI :srn :srp :srl :sr
|
||||
|
||||
Exceptions:
|
||||
:scr is `:scriptnames`
|
||||
:se is `:set`
|
||||
:sig is `:sign`
|
||||
:sil is `:silent`
|
||||
:sn is `:snext`
|
||||
:sp is `:split`
|
||||
:sl is `:sleep`
|
||||
:sre is `:srewind`
|
||||
|
||||
|
||||
Substitute with an expression *sub-replace-expression*
|
||||
*sub-replace-\=* *s/\=*
|
||||
When the substitute string starts with "\=" the remainder is interpreted as an
|
||||
@@ -1098,16 +1165,17 @@ Rationale: In Vi the "y" command followed by a backwards motion would
|
||||
With a linewise yank command the cursor is put in the first line, but the
|
||||
column is unmodified, thus it may not be on the first yanked character.
|
||||
|
||||
There are nine types of registers: *registers* *E354*
|
||||
There are ten types of registers: *registers* *E354*
|
||||
1. The unnamed register ""
|
||||
2. 10 numbered registers "0 to "9
|
||||
3. The small delete register "-
|
||||
4. 26 named registers "a to "z or "A to "Z
|
||||
5. four read-only registers ":, "., "% and "#
|
||||
6. the expression register "=
|
||||
7. The selection and drop registers "*, "+ and "~
|
||||
8. The black hole register "_
|
||||
9. Last search pattern register "/
|
||||
5. three read-only registers ":, "., "%
|
||||
6. alternate buffer register "#
|
||||
7. the expression register "=
|
||||
8. The selection and drop registers "*, "+ and "~
|
||||
9. The black hole register "_
|
||||
10. Last search pattern register "/
|
||||
|
||||
1. Unnamed register "" *quote_quote* *quotequote*
|
||||
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
|
||||
@@ -1153,7 +1221,7 @@ letters to replace their previous contents or as uppercase letters to append
|
||||
to their previous contents. When the '>' flag is present in 'cpoptions' then
|
||||
a line break is inserted before the appended text.
|
||||
|
||||
5. Read-only registers ":, "., "% and "#
|
||||
5. Read-only registers ":, ". and "%
|
||||
These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
|
||||
and ":put" commands and with CTRL-R. {not in Vi}
|
||||
*quote_.* *quote.* *E29*
|
||||
@@ -1164,8 +1232,6 @@ and ":put" commands and with CTRL-R. {not in Vi}
|
||||
('textwidth' and other options affect what is inserted).
|
||||
*quote_%* *quote%*
|
||||
"% Contains the name of the current file.
|
||||
*quote_#* *quote#*
|
||||
"# Contains the name of the alternate file.
|
||||
*quote_:* *quote:* *E30*
|
||||
": Contains the most recent executed command-line. Example: Use
|
||||
"@:" to repeat the previous command-line command.
|
||||
@@ -1174,16 +1240,33 @@ and ":put" commands and with CTRL-R. {not in Vi}
|
||||
the command was completely from a mapping.
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
feature}
|
||||
*quote_#* *quote#*
|
||||
6. Alternate file register "#
|
||||
Contains the name of the alternate file for the current window. It will
|
||||
change how the |CTRL-^| command works.
|
||||
This register is writable, mainly to allow for restoring it after a plugin has
|
||||
changed it. It accepts buffer number: >
|
||||
let altbuf = bufnr(@#)
|
||||
...
|
||||
let @# = altbuf
|
||||
It will give error |E86| if you pass buffer number and this buffer does not
|
||||
exist.
|
||||
It can also accept a match with an existing buffer name: >
|
||||
let @# = 'buffer_name'
|
||||
Error |E93| if there is more than one buffer matching the given name or |E94|
|
||||
if none of buffers matches the given name.
|
||||
|
||||
6. Expression register "= *quote_=* *quote=* *@=*
|
||||
7. 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
|
||||
the command-line, where you can enter any expression (see |expression|). All
|
||||
normal command-line editing commands are available, including a special
|
||||
history for expressions. When you end the command-line by typing <CR>, Vim
|
||||
computes the result of the expression. If you end it with <Esc>, Vim abandons
|
||||
the expression. If you do not enter an expression, Vim uses the previous
|
||||
read-write.
|
||||
|
||||
When typing the '=' after " or CTRL-R the cursor moves to the command-line,
|
||||
where you can enter any expression (see |expression|). All normal
|
||||
command-line editing commands are available, including a special history for
|
||||
expressions. When you end the command-line by typing <CR>, Vim computes the
|
||||
result of the expression. If you end it with <Esc>, Vim abandons the
|
||||
expression. If you do not enter an expression, Vim uses the previous
|
||||
expression (like with the "/" command).
|
||||
|
||||
The expression must evaluate to a String. A Number is always automatically
|
||||
@@ -1196,7 +1279,7 @@ If the "= register is used for the "p" command, the String is split up at <NL>
|
||||
characters. If the String ends in a <NL>, it is regarded as a linewise
|
||||
register. {not in Vi}
|
||||
|
||||
7. Selection and drop registers "*, "+ and "~
|
||||
8. Selection and drop registers "*, "+ and "~
|
||||
Use these registers for storing and retrieving the selected text for the GUI.
|
||||
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
||||
working, the unnamed register is used instead. For Unix systems the clipboard
|
||||
@@ -1218,17 +1301,17 @@ GTK GUI}
|
||||
Note: The "~ register is only used when dropping plain text onto Vim.
|
||||
Drag'n'drop of URI lists is handled internally.
|
||||
|
||||
8. Black hole register "_ *quote_*
|
||||
9. Black hole register "_ *quote_*
|
||||
When writing to this register, nothing happens. This can be used to delete
|
||||
text without affecting the normal registers. When reading from this register,
|
||||
nothing is returned. {not in Vi}
|
||||
|
||||
9. Last search pattern register "/ *quote_/* *quote/*
|
||||
10. Last search pattern register "/ *quote_/* *quote/*
|
||||
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
||||
It is writable with `:let`, you can change it to have 'hlsearch' highlight
|
||||
other matches without actually searching. You can't yank or delete into this
|
||||
register. The search direction is available in |v:searchforward|.
|
||||
Note that the valued is restored when returning from a function
|
||||
Note that the value is restored when returning from a function
|
||||
|function-search-undo|.
|
||||
{not in Vi}
|
||||
|
||||
@@ -1443,10 +1526,10 @@ When you hit Return in a C-comment, Vim will insert the middle comment leader
|
||||
for the new line: " * ". To close this comment you just have to type "/"
|
||||
before typing anything else on the new line. This will replace the
|
||||
middle-comment leader with the end-comment leader and apply any specified
|
||||
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||
alignment, leaving just " */". There is no need to hit Backspace first.
|
||||
|
||||
When there is a match with a middle part, but there also is a maching end part
|
||||
which is longer, the end part is used. This makes a C style comment work
|
||||
When there is a match with a middle part, but there also is a matching end
|
||||
part which is longer, the end part is used. This makes a C style comment work
|
||||
without requiring the middle part to end with a space.
|
||||
|
||||
Here is an example of alignment flags at work to make a comment stand out
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.4. Last change: 2014 Sep 06
|
||||
*cmdline.txt* For Vim version 7.4. Last change: 2015 Sep 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -511,6 +511,8 @@ followed by another Vim command:
|
||||
:argdo
|
||||
:autocmd
|
||||
:bufdo
|
||||
:cdo
|
||||
:cfdo
|
||||
:command
|
||||
:cscope
|
||||
:debug
|
||||
@@ -521,6 +523,8 @@ followed by another Vim command:
|
||||
:help
|
||||
:helpfind
|
||||
:lcscope
|
||||
:ldo
|
||||
:lfdo
|
||||
:make
|
||||
:normal
|
||||
:perl
|
||||
@@ -597,6 +601,7 @@ starts editing the three files "foo bar", "goes to" and "school ".
|
||||
When you want to use the special characters '"' or '|' in a command, or want
|
||||
to use '%' or '#' in a file name, precede them with a backslash. The
|
||||
backslash is not required in a range and in the ":substitute" command.
|
||||
See also |`=|.
|
||||
|
||||
*:_!*
|
||||
The '!' (bang) character after an Ex command makes the command behave in a
|
||||
@@ -749,13 +754,13 @@ to insert special things while typing you can use the CTRL-R command. For
|
||||
example, "%" stands for the current file name, while CTRL-R % inserts the
|
||||
current file name right away. See |c_CTRL-R|.
|
||||
|
||||
Note: If you want to avoid the special characters in a Vim script you may want
|
||||
to use |fnameescape()|.
|
||||
Note: If you want to avoid the effects of special characters in a Vim script
|
||||
you may want to use |fnameescape()|. Also see |`=|.
|
||||
|
||||
|
||||
In Ex commands, at places where a file name can be used, the following
|
||||
characters have a special meaning. These can also be used in the expression
|
||||
function expand() |expand()|.
|
||||
function |expand()|.
|
||||
% Is replaced with the current file name. *:_%* *c_%*
|
||||
# Is replaced with the alternate file name. *:_#* *c_#*
|
||||
This is remembered for every window.
|
||||
@@ -790,6 +795,7 @@ it, no matter how many backslashes.
|
||||
# alternate.file
|
||||
\# #
|
||||
\\# \#
|
||||
Also see |`=|.
|
||||
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
@@ -811,13 +817,13 @@ Note: these are typed literally, they are not special keys!
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with
|
||||
"function {function-name}"; function call nesting is
|
||||
indicated like this:
|
||||
"function {function-name1}..{function-name2}". Note that
|
||||
filename-modifiers are useless when <sfile> is used inside
|
||||
a function.
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with:
|
||||
"function {function-name}[{lnum}]"
|
||||
function call nesting is indicated like this:
|
||||
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
|
||||
Note that filename-modifiers are useless when <sfile> is
|
||||
used inside a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
@@ -880,7 +886,7 @@ These modifiers can be given, in this order:
|
||||
:gs?pat?sub?
|
||||
Substitute all occurrences of "pat" with "sub". Otherwise
|
||||
this works like ":s".
|
||||
:S Escape special characters for use with a shell command (see
|
||||
:S Escape special characters for use with a shell command (see
|
||||
|shellescape()|). Must be the last one. Examples: >
|
||||
:!dir <cfile>:S
|
||||
:call system('chmod +w -- ' . expand('%:S'))
|
||||
@@ -933,9 +939,8 @@ name). This is included for backwards compatibility with version 3.0, the
|
||||
|
||||
Note: Where a file name is expected wildcards expansion is done. On Unix the
|
||||
shell is used for this, unless it can be done internally (for speed).
|
||||
Backticks also work, like in >
|
||||
Unless in |restricted-mode|, backticks work also, like in >
|
||||
:n `echo *.c`
|
||||
(backtick expansion is not possible in |restricted-mode|)
|
||||
But expansion is only done if there are any wildcards before expanding the
|
||||
'%', '#', etc.. This avoids expanding wildcards inside a file name. If you
|
||||
want to expand the result of <cfile>, add a wildcard character to it.
|
||||
@@ -946,6 +951,7 @@ Examples: (alternate file name is "?readme?")
|
||||
:e #.* :e {files matching "?readme?.*"}
|
||||
:cd <cfile> :cd {file name under cursor}
|
||||
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
|
||||
Also see |`=|.
|
||||
|
||||
When the expanded argument contains a "!" and it is used for a shell command
|
||||
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
|
||||
@@ -972,6 +978,8 @@ for the file "$home" in the root directory. A few examples:
|
||||
/\$home file "$home" in root directory
|
||||
\\$home file "\\", followed by expanded $home
|
||||
|
||||
Also see |`=|.
|
||||
|
||||
==============================================================================
|
||||
7. Command-line window *cmdline-window* *cmdwin*
|
||||
*command-line-window*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.4. Last change: 2014 May 20
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Jul 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -132,8 +132,9 @@ file for a moment and come back to the same file and be in diff mode again.
|
||||
if the current window does not have 'diff' set then no options
|
||||
in it are changed.
|
||||
|
||||
The ":diffoff" command resets the relevant options to the values they had when
|
||||
using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
|
||||
The `:diffoff` command resets the relevant options to the values they had when
|
||||
using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode.
|
||||
When using `:diffoff` twice the last saved values are restored.
|
||||
Otherwise they are set to their default value:
|
||||
|
||||
'diff' off
|
||||
@@ -266,13 +267,17 @@ that the buffers will be equal within the specified range.
|
||||
See below for [range].
|
||||
|
||||
*do*
|
||||
do Same as ":diffget" without argument or range. The "o" stands
|
||||
for "obtain" ("dg" can't be used, it could be the start of
|
||||
"dgg"!). Note: this doesn't work in Visual mode.
|
||||
[count]do Same as ":diffget" without range. The "o" stands for "obtain"
|
||||
("dg" can't be used, it could be the start of "dgg"!). Note:
|
||||
this doesn't work in Visual mode.
|
||||
If you give a [count], it is used as the [bufspec] argument
|
||||
for ":diffget".
|
||||
|
||||
*dp*
|
||||
dp Same as ":diffput" without argument or range.
|
||||
Note: this doesn't work in Visual mode.
|
||||
[count]dp Same as ":diffput" without range. Note: this doesn't work in
|
||||
Visual mode.
|
||||
If you give a [count], it is used as the [bufspec] argument
|
||||
for ":diffput".
|
||||
|
||||
|
||||
When no [range] is given, the diff at the cursor position or just above it is
|
||||
@@ -310,6 +315,19 @@ name or a part of a buffer name. Examples:
|
||||
|
||||
Also see |'diffopt'| and the "diff" item of |'fillchars'|.
|
||||
|
||||
*diff-slow* *diff_translations*
|
||||
For very long lines, the diff syntax highlighting might be slow, especially
|
||||
since it tries to match all different kind of localisations. To disable
|
||||
localisations and speed up the syntax highlighting, set the global variable
|
||||
g:diff_translations to zero: >
|
||||
|
||||
let g:diff_translations = 0
|
||||
<
|
||||
After setting this variable, Reload the syntax script: >
|
||||
|
||||
set syntax=diff
|
||||
<
|
||||
|
||||
|
||||
FINDING THE DIFFERENCES *diff-diffexpr*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.4. Last change: 2014 Sep 19
|
||||
*editing.txt* For Vim version 7.4. Last change: 2015 Aug 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -304,7 +304,8 @@ CTRL-^ Edit the alternate file. Mostly the alternate file is
|
||||
Mnemonic: "goto file".
|
||||
Uses the 'isfname' option to find out which characters
|
||||
are supposed to be in a file name. Trailing
|
||||
punctuation characters ".,:;!" are ignored.
|
||||
punctuation characters ".,:;!" are ignored. Escaped
|
||||
spaces "\ " are reduced to a single space.
|
||||
Uses the 'path' option as a list of directory names to
|
||||
look for the file. See the 'path' option for details
|
||||
about relative directories and wildcards.
|
||||
@@ -411,25 +412,38 @@ Finds files:
|
||||
/usr/include/sys/types.h
|
||||
/usr/inc_old/types.h
|
||||
*backtick-expansion* *`-expansion*
|
||||
On Unix and a few other systems you can also use backticks in the file name,
|
||||
for example: >
|
||||
:e `find . -name ver\\*.c -print`
|
||||
The backslashes before the star are required to prevent "ver*.c" to be
|
||||
expanded by the shell before executing the find program.
|
||||
On Unix and a few other systems you can also use backticks for the file name
|
||||
argument, for example: >
|
||||
:next `find . -name ver\\*.c -print`
|
||||
:view `ls -t *.patch \| head -n1`
|
||||
The backslashes before the star are required to prevent the shell from
|
||||
expanding "ver*.c" prior to execution of the find program. The backslash
|
||||
before the shell pipe symbol "|" prevents Vim from parsing it as command
|
||||
termination.
|
||||
This also works for most other systems, with the restriction that the
|
||||
backticks must be around the whole item. It is not possible to have text
|
||||
directly before the first or just after the last backtick.
|
||||
|
||||
*`=*
|
||||
You can have the backticks expanded as a Vim expression, instead of an
|
||||
external command, by using the syntax `={expr}` e.g.: >
|
||||
You can have the backticks expanded as a Vim expression, instead of as an
|
||||
external command, by putting an equal sign right after the first backtick,
|
||||
e.g.: >
|
||||
:e `=tempname()`
|
||||
The expression can contain just about anything, thus this can also be used to
|
||||
avoid the special meaning of '"', '|', '%' and '#'. However, 'wildignore'
|
||||
does apply like to other wildcards.
|
||||
|
||||
Environment variables in the expression are expanded when evaluating the
|
||||
expression, thus this works: >
|
||||
:e `=$HOME . '/.vimrc'`
|
||||
This does not work, $HOME is inside a string and used literally: >
|
||||
:e `='$HOME' . '/.vimrc'`
|
||||
|
||||
If the expression returns a string then names are to be separated with line
|
||||
breaks. When the result is a |List| then each item is used as a name. Line
|
||||
breaks also separate names.
|
||||
Note that such expressions are only supported in places where a filename is
|
||||
expected as an argument to an Ex-command.
|
||||
|
||||
*++opt* *[++opt]*
|
||||
The [++opt] argument can be used to force the value of 'fileformat',
|
||||
@@ -611,7 +625,7 @@ list of the current window.
|
||||
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
|
||||
:[count]arga[dd]
|
||||
Add the {name}s to the argument list. When {name} is
|
||||
omitted at the current buffer name to the argument
|
||||
omitted add the current buffer name to the argument
|
||||
list.
|
||||
If [count] is omitted, the {name}s are added just
|
||||
after the current entry in the argument list.
|
||||
@@ -622,7 +636,8 @@ list of the current window.
|
||||
:argadd x a b x c
|
||||
:0argadd x x a b c
|
||||
:1argadd x a x b c
|
||||
:99argadd x a b c x
|
||||
:$argadd x a b c x
|
||||
:+2argadd y a b c x y
|
||||
There is no check for duplicates, it is possible to
|
||||
add a file to the argument list twice.
|
||||
The currently edited file is not changed.
|
||||
@@ -644,11 +659,19 @@ list of the current window.
|
||||
< {not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
|
||||
:{range}argd[elete] Delete the {range} files from the argument list.
|
||||
:[range]argd[elete] Delete the {range} files from the argument list.
|
||||
Example: >
|
||||
:10,$argdel
|
||||
< Deletes arguments 10 and further, keeping 1-9. >
|
||||
:$argd
|
||||
< Deletes just the last one. >
|
||||
:argd
|
||||
:.argd
|
||||
< Deletes the current argument. >
|
||||
:%argd
|
||||
< Removes all the files from the arglist.
|
||||
When the last number in the range is too high, up to
|
||||
the last argument is deleted. Example: >
|
||||
:10,1000argdel
|
||||
< Deletes arguments 10 and further, keeping 1-9.
|
||||
the last argument is deleted.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
|
||||
@@ -823,8 +846,9 @@ current window. The two windows then share this list, until one of them uses
|
||||
USING THE ARGUMENT LIST
|
||||
|
||||
*:argdo*
|
||||
:argdo[!] {cmd} Execute {cmd} for each file in the argument list.
|
||||
It works like doing this: >
|
||||
:[range]argdo[!] {cmd} Execute {cmd} for each file in the argument list or
|
||||
if [range] is specified only for arguments in that
|
||||
range. It works like doing this: >
|
||||
:rewind
|
||||
:{cmd}
|
||||
:next
|
||||
@@ -844,7 +868,8 @@ USING THE ARGUMENT LIST
|
||||
each file.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:windo|, |:tabdo| and |:bufdo|.
|
||||
Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|
|
||||
|
||||
Example: >
|
||||
:args *.c
|
||||
@@ -1080,9 +1105,12 @@ The names can be in upper- or lowercase.
|
||||
the last file in the argument list has not been
|
||||
edited. See |:confirm| and 'confirm'. {not in Vi}
|
||||
|
||||
:q[uit]! Quit without writing, also when visible buffers have
|
||||
changes. Does not exit when there are changed hidden
|
||||
buffers. Use ":qall!" to exit always.
|
||||
:q[uit]! Quit without writing, also when currently visible
|
||||
buffers have changes. Does not exit when this is the
|
||||
last window and there is a changed hidden buffer.
|
||||
In this case, the first changed hidden buffer becomes
|
||||
the current buffer.
|
||||
Use ":qall!" to exit always.
|
||||
|
||||
:cq[uit] Quit always, without writing, and return an error
|
||||
code. See |:cq|. Used for Manx's QuickFix mode (see
|
||||
@@ -1349,7 +1377,7 @@ There are a few things to remember when editing binary files:
|
||||
- <Nul> characters are shown on the screen as ^@. You can enter them with
|
||||
"CTRL-V CTRL-@" or "CTRL-V 000" {Vi cannot handle <Nul> characters in the
|
||||
file}
|
||||
- To insert a <NL> character in the file split up a line. When writing the
|
||||
- To insert a <NL> character in the file split a line. When writing the
|
||||
buffer to a file a <NL> will be written for the <EOL>.
|
||||
- Vim normally appends an <EOL> at the end of the file if there is none.
|
||||
Setting the 'binary' option prevents this. If you want to add the final
|
||||
@@ -1379,7 +1407,8 @@ reveal it to others. The 'viminfo' file is not encrypted.
|
||||
You could do this to edit very secret text: >
|
||||
:set noundofile viminfo=
|
||||
:noswapfile edit secrets.txt
|
||||
Keep in mind that without a swap file you risk loosing your work in a crash.
|
||||
Keep in mind that without a swap file you risk losing your work in the event
|
||||
of a crash or a power failure.
|
||||
|
||||
WARNING: If you make a typo when entering the key and then write the file and
|
||||
exit, the text will be lost!
|
||||
@@ -1415,13 +1444,11 @@ Do this before writing the file. When reading an encrypted file it will be
|
||||
set automatically to the method used when that file was written. You can
|
||||
change 'cryptmethod' before writing that file to change the method.
|
||||
|
||||
To set the default method, used for new files, use one of these in your
|
||||
|vimrc| file: >
|
||||
set cm=zip
|
||||
To set the default method, used for new files, use this in your |vimrc|
|
||||
file: >
|
||||
set cm=blowfish2
|
||||
Use the first one if you need to be compatible with Vim 7.2 and older. Using
|
||||
"blowfish2" is highly recommended if you can use a Vim version that supports
|
||||
it.
|
||||
Using "blowfish2" is highly recommended. Only use another method if you
|
||||
must use an older Vim version that does not support it.
|
||||
|
||||
The message given for reading and writing a file will show "[crypted]" when
|
||||
using zip, "[blowfish]" when using blowfish, etc.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2014 Sep 27
|
||||
*eval.txt* For Vim version 7.4. Last change: 2015 Sep 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -525,7 +525,7 @@ Funcref to a Dictionary, but the "self" variable is not available then.
|
||||
To avoid the extra name for the function it can be defined and directly
|
||||
assigned to a Dictionary in this way: >
|
||||
:let mydict = {'data': [0, 1, 2, 3]}
|
||||
:function mydict.len() dict
|
||||
:function mydict.len()
|
||||
: return len(self.data)
|
||||
:endfunction
|
||||
:echo mydict.len()
|
||||
@@ -956,7 +956,7 @@ Decimal, Hexadecimal (starting with 0x or 0X), or Octal (starting with 0).
|
||||
Floating point numbers can be written in two forms:
|
||||
|
||||
[-+]{N}.{M}
|
||||
[-+]{N}.{M}e[-+]{exp}
|
||||
[-+]{N}.{M}[eE][-+]{exp}
|
||||
|
||||
{N} and {M} are numbers. Both {N} and {M} must be present and can only
|
||||
contain digits.
|
||||
@@ -1005,7 +1005,7 @@ function. Example: >
|
||||
|
||||
|
||||
|
||||
string *string* *expr-string* *E114*
|
||||
string *string* *String* *expr-string* *E114*
|
||||
------
|
||||
"string" string constant *expr-quote*
|
||||
|
||||
@@ -1021,7 +1021,7 @@ A string constant accepts these special characters:
|
||||
\X. same as \x.
|
||||
\u.... character specified with up to 4 hex numbers, stored according to the
|
||||
current value of 'encoding' (e.g., "\u02a4")
|
||||
\U.... same as \u....
|
||||
\U.... same as \u but allows up to 8 hex numbers.
|
||||
\b backspace <BS>
|
||||
\e escape <Esc>
|
||||
\f formfeed <FF>
|
||||
@@ -1330,6 +1330,12 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
|
||||
can only be used in autocommands. For user commands |<bang>|
|
||||
can be used.
|
||||
|
||||
*v:completed_item* *completed_item-variable*
|
||||
v:completed_item
|
||||
|Dictionary| containing the |complete-items| for the most
|
||||
recently completed word after |CompleteDone|. The
|
||||
|Dictionary| is empty if the completion failed.
|
||||
|
||||
*v:count* *count-variable*
|
||||
v:count The count given for the last Normal mode command. Can be used
|
||||
to get the count before a mapping. Read-only. Example: >
|
||||
@@ -1457,12 +1463,14 @@ v:foldstart Used for 'foldtext': first line of closed fold.
|
||||
Read-only in the |sandbox|. |fold-foldtext|
|
||||
|
||||
*v:hlsearch* *hlsearch-variable*
|
||||
v:hlsearch Variable that determines whether search highlighting is on.
|
||||
Makes sense only if 'hlsearch' is enabled which requires
|
||||
|+extra_search|. Setting this variable to zero acts the like
|
||||
|:nohlsearch| command, setting it to one acts like >
|
||||
v:hlsearch Variable that indicates whether search highlighting is on.
|
||||
Setting it makes sense only if 'hlsearch' is enabled which
|
||||
requires |+extra_search|. Setting this variable to zero acts
|
||||
the like |:nohlsearch| command, setting it to one acts like >
|
||||
let &hlsearch = &hlsearch
|
||||
<
|
||||
< Note that the value is restored when returning from a
|
||||
function. |function-search-undo|.
|
||||
|
||||
*v:insertmode* *insertmode-variable*
|
||||
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
|
||||
events. Values:
|
||||
@@ -1527,6 +1535,15 @@ v:oldfiles List of file names that is loaded from the |viminfo| file on
|
||||
than String this will cause trouble.
|
||||
{only when compiled with the |+viminfo| feature}
|
||||
|
||||
*v:option_new*
|
||||
v:option_new New value of the option. Valid while executing an |OptionSet|
|
||||
autocommand.
|
||||
*v:option_old*
|
||||
v:option_old Old value of the option. Valid while executing an |OptionSet|
|
||||
autocommand.
|
||||
*v:option_type*
|
||||
v:option_type Scope of the set command. Valid while executing an
|
||||
|OptionSet| autocommand. Can be either "global" or "local"
|
||||
*v:operator* *operator-variable*
|
||||
v:operator The last operator given in Normal mode. This is a single
|
||||
character except for commands starting with <g> or <z>,
|
||||
@@ -1730,7 +1747,7 @@ bufexists( {expr}) Number TRUE if buffer {expr} exists
|
||||
buflisted( {expr}) Number TRUE if buffer {expr} is listed
|
||||
bufloaded( {expr}) Number TRUE if buffer {expr} is loaded
|
||||
bufname( {expr}) String Name of the buffer {expr}
|
||||
bufnr( {expr}) Number Number of the buffer {expr}
|
||||
bufnr( {expr} [, {create}]) Number Number of the buffer {expr}
|
||||
bufwinnr( {expr}) Number window number of buffer {expr}
|
||||
byte2line( {byte}) Number line number at byte count {byte}
|
||||
byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
|
||||
@@ -1755,8 +1772,8 @@ count( {list}, {expr} [, {ic} [, {start}]])
|
||||
Number count how many {expr} are in {list}
|
||||
cscope_connection( [{num} , {dbpath} [, {prepend}]])
|
||||
Number checks existence of cscope connection
|
||||
cursor( {lnum}, {col} [, {coladd}])
|
||||
Number move cursor to {lnum}, {col}, {coladd}
|
||||
cursor( {lnum}, {col} [, {off}])
|
||||
Number move cursor to {lnum}, {col}, {off}
|
||||
cursor( {list}) Number move cursor to position in {list}
|
||||
deepcopy( {expr} [, {noref}]) any make a full copy of {expr}
|
||||
delete( {fname}) Number delete file {fname}
|
||||
@@ -1805,6 +1822,7 @@ getbufvar( {expr}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {expr}
|
||||
getchar( [expr]) Number get one character from the user
|
||||
getcharmod( ) Number modifiers for the last typed character
|
||||
getcharsearch() Dict last character search
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdtype() String return current command-line type
|
||||
@@ -1834,9 +1852,10 @@ getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar( {nr}, {varname} [, {def}])
|
||||
any variable {varname} in window {nr}
|
||||
glob( {expr} [, {nosuf} [, {list}]])
|
||||
glob( {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
any expand file wildcards in {expr}
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list}]])
|
||||
glob2regpat( {expr}) String convert a glob pat into a search pat
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
String do glob({expr}) for all dirs in {path}
|
||||
has( {feature}) Number TRUE if feature {feature} supported
|
||||
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
||||
@@ -1953,6 +1972,7 @@ server2client( {clientid}, {string})
|
||||
Number send reply string
|
||||
serverlist() String get a list of available servers
|
||||
setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
|
||||
setcharsearch( {dict}) Dict set character search from {dict}
|
||||
setcmdpos( {pos}) Number set cursor position in command-line
|
||||
setline( {lnum}, {line}) Number set line {lnum} to {line}
|
||||
setloclist( {nr}, {list}[, {action}])
|
||||
@@ -1984,7 +2004,7 @@ split( {expr} [, {pat} [, {keepempty}]])
|
||||
sqrt( {expr}) Float square root of {expr}
|
||||
str2float( {expr}) Float convert String to Float
|
||||
str2nr( {expr} [, {base}]) Number convert String to Number
|
||||
strchars( {expr}) Number character length of the String {expr}
|
||||
strchars( {expr} [, {skipcc}]) Number character length of the String {expr}
|
||||
strdisplaywidth( {expr} [, {col}]) Number display length of the String {expr}
|
||||
strftime( {format}[, {time}]) String time in specified format
|
||||
stridx( {haystack}, {needle}[, {start}])
|
||||
@@ -2041,7 +2061,7 @@ winrestcmd() String returns command to restore window sizes
|
||||
winrestview( {dict}) none restore view of current window
|
||||
winsaveview() Dict save view of current window
|
||||
winwidth( {nr}) Number width of window {nr}
|
||||
writefile( {list}, {fname} [, {binary}])
|
||||
writefile( {list}, {fname} [, {flags}])
|
||||
Number write list of lines to file {fname}
|
||||
xor( {expr}, {expr}) Number bitwise XOR
|
||||
|
||||
@@ -2395,6 +2415,10 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
number of bytes in the cursor line plus one)
|
||||
'x position of mark x (if the mark is not set, 0 is
|
||||
returned)
|
||||
v In Visual mode: the start of the Visual area (the
|
||||
cursor is the end). When not in Visual mode
|
||||
returns the cursor position. Differs from |'<| in
|
||||
that it's updated right away.
|
||||
Additionally {expr} can be [lnum, col]: a |List| with the line
|
||||
and column number. Most useful when the column is "$", to get
|
||||
the last column of a specific line. When "lnum" or "col" is
|
||||
@@ -2623,6 +2647,7 @@ cursor({list})
|
||||
If {col} is zero, the cursor will stay in the current column.
|
||||
If {curswant} is given it is used to set the preferred column
|
||||
for vertical movement. Otherwise {col} is used.
|
||||
|
||||
When 'virtualedit' is used {off} specifies the offset in
|
||||
screen columns from the start of the character. E.g., a
|
||||
position within a <Tab> or after the last character.
|
||||
@@ -2955,14 +2980,19 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
{expr1} is changed when {expr2} is not empty. If necessary
|
||||
make a copy of {expr1} first.
|
||||
{expr2} remains unchanged.
|
||||
When {expr1} is locked and {expr2} is not empty the operation
|
||||
fails.
|
||||
Returns {expr1}.
|
||||
|
||||
|
||||
feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
Characters in {string} are queued for processing as if they
|
||||
come from a mapping or were typed by the user. They are added
|
||||
to the end of the typeahead buffer, thus if a mapping is still
|
||||
being executed these characters come after them.
|
||||
come from a mapping or were typed by the user.
|
||||
By default the string is added to the end of the typeahead
|
||||
buffer, thus if a mapping is still being executed the
|
||||
characters come after them. Use the 'i' flag to insert before
|
||||
other characters, they will be executed next, before any
|
||||
characters from a mapping.
|
||||
The function does not wait for processing of keys contained in
|
||||
{string}.
|
||||
To include special keys into {string}, use double-quotes
|
||||
@@ -2976,6 +3006,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
't' Handle keys as if typed; otherwise they are handled as
|
||||
if coming from a mapping. This matters for undo,
|
||||
opening folds, etc.
|
||||
'i' Insert the string instead of appending (see above).
|
||||
Return value is always 0.
|
||||
|
||||
filereadable({file}) *filereadable()*
|
||||
@@ -3304,6 +3335,17 @@ getchar([expr]) *getchar()*
|
||||
: endif
|
||||
: endwhile
|
||||
:endfunction
|
||||
<
|
||||
You may also receive synthetic characters, such as
|
||||
|<CursorHold>|. Often you will want to ignore this and get
|
||||
another character: >
|
||||
:function GetKey()
|
||||
: let c = getchar()
|
||||
: while c == "\<CursorHold>"
|
||||
: let c = getchar()
|
||||
: endwhile
|
||||
: return c
|
||||
:endfunction
|
||||
|
||||
getcharmod() *getcharmod()*
|
||||
The result is a Number which is the state of the modifiers for
|
||||
@@ -3321,6 +3363,26 @@ getcharmod() *getcharmod()*
|
||||
character itself are obtained. Thus Shift-a results in "A"
|
||||
without a modifier.
|
||||
|
||||
getcharsearch() *getcharsearch()*
|
||||
Return the current character search information as a {dict}
|
||||
with the following entries:
|
||||
|
||||
char character previously used for a character
|
||||
search (|t|, |f|, |T|, or |F|); empty string
|
||||
if no character search has been performed
|
||||
forward direction of character search; 1 for forward,
|
||||
0 for backward
|
||||
until type of character search; 1 for a |t| or |T|
|
||||
character search, 0 for an |f| or |F|
|
||||
character search
|
||||
|
||||
This can be useful to always have |;| and |,| search
|
||||
forward/backward regardless of the direction of the previous
|
||||
character search: >
|
||||
:nnoremap <expr> ; getcharsearch().forward ? ';' : ','
|
||||
:nnoremap <expr> , getcharsearch().forward ? ',' : ';'
|
||||
< Also see |setcharsearch()|.
|
||||
|
||||
getcmdline() *getcmdline()*
|
||||
Return the current command-line. Only works when the command
|
||||
line is being edited, thus requires use of |c_CTRL-\_e| or
|
||||
@@ -3514,7 +3576,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
This can be used to save and restore the position of a mark: >
|
||||
let save_a_mark = getpos("'a")
|
||||
...
|
||||
call setpos(''a', save_a_mark
|
||||
call setpos("'a", save_a_mark)
|
||||
< Also see |getcurpos()| and |setpos()|.
|
||||
|
||||
|
||||
@@ -3618,7 +3680,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
|
||||
:let list_is_on = getwinvar(2, '&list')
|
||||
:echo "myvar = " . getwinvar(1, 'myvar')
|
||||
<
|
||||
glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
|
||||
Expand the file wildcards in {expr}. See |wildcards| for the
|
||||
use of special characters.
|
||||
|
||||
@@ -3635,8 +3697,11 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
matches, they are separated by <NL> characters.
|
||||
|
||||
If the expansion fails, the result is an empty String or List.
|
||||
|
||||
A name for a non-existing file is not included. A symbolic
|
||||
link is only included if it points to an existing file.
|
||||
However, when the {alllinks} argument is present and it is
|
||||
non-zero then all symbolic links are included.
|
||||
|
||||
For most systems backticks can be used to get files names from
|
||||
any external command. Example: >
|
||||
@@ -3648,7 +3713,16 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
See |expand()| for expanding special Vim variables. See
|
||||
|system()| for getting the raw output of an external command.
|
||||
|
||||
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
glob2regpat({expr}) *glob2regpat()*
|
||||
Convert a file pattern, as used by glob(), into a search
|
||||
pattern. The result can be used to match with a string that
|
||||
is a file name. E.g. >
|
||||
if filename =~ glob2regpat('Make*.mak')
|
||||
< This is equivalent to: >
|
||||
if filename =~ '^Make.*\.mak$'
|
||||
<
|
||||
*globpath()*
|
||||
globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]])
|
||||
Perform glob() on all directories in {path} and concatenate
|
||||
the results. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim")
|
||||
@@ -3674,6 +3748,8 @@ globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
they are separated by <NL> characters. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim", 0, 1)
|
||||
<
|
||||
{allinks} is used as with |glob()|.
|
||||
|
||||
The "**" item can be used to search in a directory tree.
|
||||
For example, to find all "README.txt" files in the directories
|
||||
in 'runtimepath' and below: >
|
||||
@@ -4351,7 +4427,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
|
||||
done like 'magic' is set and 'cpoptions' is empty.
|
||||
|
||||
*matchadd()* *E798* *E799* *E801*
|
||||
matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
|
||||
Defines a pattern to be highlighted in the current window (a
|
||||
"match"). It will be highlighted with {group}. Returns an
|
||||
identification number (ID), which can be used to delete the
|
||||
@@ -4359,6 +4435,8 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
Matching is case sensitive and magic, unless case sensitivity
|
||||
or magicness are explicitly overridden in {pattern}. The
|
||||
'magic', 'smartcase' and 'ignorecase' options are not used.
|
||||
The "Conceal" value is special, it causes the match to be
|
||||
concealed.
|
||||
|
||||
The optional {priority} argument assigns a priority to the
|
||||
match. A match with a high priority will have its
|
||||
@@ -4376,9 +4454,18 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
message will appear and the match will not be added. An ID
|
||||
is specified as a positive integer (zero excluded). IDs 1, 2
|
||||
and 3 are reserved for |:match|, |:2match| and |:3match|,
|
||||
respectively. If the {id} argument is not specified,
|
||||
respectively. If the {id} argument is not specified or -1,
|
||||
|matchadd()| automatically chooses a free ID.
|
||||
|
||||
The optional {dict} argmument allows for further custom
|
||||
values. Currently this is used to specify a match specifc
|
||||
conceal character that will be shown for |hl-Conceal|
|
||||
highlighted matches. The dict can have the following members:
|
||||
|
||||
conceal Special character to show instead of the
|
||||
match (only for |hl-Conceal| highlighed
|
||||
matches, see |:syn-cchar|)
|
||||
|
||||
The number of matches is not limited, as it is the case with
|
||||
the |:match| commands.
|
||||
|
||||
@@ -4392,7 +4479,7 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
available from |getmatches()|. All matches can be deleted in
|
||||
one operation by |clearmatches()|.
|
||||
|
||||
matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()*
|
||||
matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]]) *matchaddpos()*
|
||||
Same as |matchadd()|, but requires a list of positions {pos}
|
||||
instead of a pattern. This command is faster than |matchadd()|
|
||||
because it does not require to handle regular expressions and
|
||||
@@ -4746,6 +4833,7 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
s The text of the String argument is used. If a
|
||||
precision is specified, no more bytes than the number
|
||||
specified are used.
|
||||
*printf-S*
|
||||
S The text of the String argument is used. If a
|
||||
precision is specified, no more display cells than the
|
||||
number specified are used. Without the |+multi_byte|
|
||||
@@ -4807,7 +4895,7 @@ py3eval({expr}) *py3eval()*
|
||||
Evaluate Python expression {expr} and return its result
|
||||
converted to Vim data structures.
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though, unicode strings are additionally converted to
|
||||
copied though, Unicode strings are additionally converted to
|
||||
'encoding').
|
||||
Lists are represented as Vim |List| type.
|
||||
Dictionaries are represented as Vim |Dictionary| type with
|
||||
@@ -4851,7 +4939,7 @@ readfile({fname} [, {binary} [, {max}]])
|
||||
separated with CR will result in a single long line (unless a
|
||||
NL appears somewhere).
|
||||
All NUL characters are replaced with a NL character.
|
||||
When {binary} is equal to "b" binary mode is used:
|
||||
When {binary} contains "b" binary mode is used:
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
added.
|
||||
- No CR characters are removed.
|
||||
@@ -5331,6 +5419,26 @@ setbufvar({expr}, {varname}, {val}) *setbufvar()*
|
||||
:call setbufvar("todo", "myvar", "foobar")
|
||||
< This function is not available in the |sandbox|.
|
||||
|
||||
setcharsearch({dict}) *setcharsearch()*
|
||||
Set the current character search information to {dict},
|
||||
which contains one or more of the following entries:
|
||||
|
||||
char character which will be used for a subsequent
|
||||
|,| or |;| command; an empty string clears the
|
||||
character search
|
||||
forward direction of character search; 1 for forward,
|
||||
0 for backward
|
||||
until type of character search; 1 for a |t| or |T|
|
||||
character search, 0 for an |f| or |F|
|
||||
character search
|
||||
|
||||
This can be useful to save/restore a user's character search
|
||||
from a script: >
|
||||
:let prevsearch = getcharsearch()
|
||||
:" Perform a command which clobbers user's search
|
||||
:call setcharsearch(prevsearch)
|
||||
< Also see |getcharsearch()|.
|
||||
|
||||
setcmdpos({pos}) *setcmdpos()*
|
||||
Set the cursor position in the command line to byte position
|
||||
{pos}. The first position is 1.
|
||||
@@ -5546,7 +5654,7 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
|
||||
:call setwinvar(2, "myvar", "foobar")
|
||||
|
||||
sha256({string}) *sha256()*
|
||||
Returns a String with 64 hex charactes, which is the SHA256
|
||||
Returns a String with 64 hex characters, which is the SHA256
|
||||
checksum of {string}.
|
||||
{only available when compiled with the |+cryptv| feature}
|
||||
|
||||
@@ -5753,7 +5861,8 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()*
|
||||
:let words = split(getline('.'), '\W\+')
|
||||
< To split a string in individual characters: >
|
||||
:for c in split(mystring, '\zs')
|
||||
< If you want to keep the separator you can also use '\zs': >
|
||||
< If you want to keep the separator you can also use '\zs' at
|
||||
the end of the pattern: >
|
||||
:echo split('abc:def:ghi', ':\zs')
|
||||
< ['abc:', 'def:', 'ghi'] ~
|
||||
Splitting a table where the first element can be empty: >
|
||||
@@ -5801,15 +5910,35 @@ str2nr( {expr} [, {base}]) *str2nr()*
|
||||
Text after the number is silently ignored.
|
||||
|
||||
|
||||
strchars({expr}) *strchars()*
|
||||
strchars({expr} [, {skipcc}]) *strchars()*
|
||||
The result is a Number, which is the number of characters
|
||||
String {expr} occupies. Composing characters are counted
|
||||
separately.
|
||||
in String {expr}.
|
||||
When {skipcc} is omitted or zero, composing characters are
|
||||
counted separately.
|
||||
When {skipcc} set to 1, Composing characters are ignored.
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
|
||||
{skipcc} is only available after 7.4.755. For backward
|
||||
compatibility, you can define a wrapper function: >
|
||||
if has("patch-7.4.755")
|
||||
function s:strchars(str, skipcc)
|
||||
return strchars(a:str, a:skipcc)
|
||||
endfunction
|
||||
else
|
||||
function s:strchars(str, skipcc)
|
||||
if a:skipcc
|
||||
return strlen(substitute(a:str, ".", "x", "g"))
|
||||
else
|
||||
return strchars(a:str)
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
<
|
||||
|
||||
strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
|
||||
The result is a Number, which is the number of display cells
|
||||
String {expr} occupies on the screen when it starts a {col}.
|
||||
String {expr} occupies on the screen when it starts at {col}.
|
||||
When {col} is omitted zero is used. Otherwise it is the
|
||||
screen column where to start. This matters for Tab
|
||||
characters.
|
||||
@@ -5875,15 +6004,11 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
|
||||
*strlen()*
|
||||
strlen({expr}) The result is a Number, which is the length of the String
|
||||
{expr} in bytes.
|
||||
If you want to count the number of multi-byte characters (not
|
||||
counting composing characters) use something like this: >
|
||||
|
||||
:let len = strlen(substitute(str, ".", "x", "g"))
|
||||
<
|
||||
If the argument is a Number it is first converted to a String.
|
||||
For other types an error is given.
|
||||
Also see |len()|, |strchars()|, |strdisplaywidth()| and
|
||||
|strwidth()|.
|
||||
If you want to count the number of multi-byte characters use
|
||||
|strchars()|.
|
||||
Also see |len()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
strpart({src}, {start}[, {len}]) *strpart()*
|
||||
The result is a String, which is part of {src}, starting from
|
||||
@@ -5997,6 +6122,9 @@ synID({lnum}, {col}, {trans}) *synID()*
|
||||
|
||||
{col} is 1 for the leftmost column, {lnum} is 1 for the first
|
||||
line. 'synmaxcol' applies, in a longer line zero is returned.
|
||||
Note that when the position is after the last character,
|
||||
that's where the cursor can be in Insert mode, synID() returns
|
||||
zero.
|
||||
|
||||
When {trans} is non-zero, transparent items are reduced to the
|
||||
item that they reveal. This is useful when wanting to know
|
||||
@@ -6406,6 +6534,10 @@ virtcol({expr}) *virtcol()*
|
||||
plus one)
|
||||
'x position of mark x (if the mark is not set, 0 is
|
||||
returned)
|
||||
v In Visual mode: the start of the Visual area (the
|
||||
cursor is the end). When not in Visual mode
|
||||
returns the cursor position. Differs from |'<| in
|
||||
that it's updated right away.
|
||||
Note that only marks in the current file can be used.
|
||||
Examples: >
|
||||
virtcol(".") with text "foo^Lbar", with cursor on the "^L", returns 5
|
||||
@@ -6555,14 +6687,20 @@ winwidth({nr}) *winwidth()*
|
||||
:endif
|
||||
<
|
||||
*writefile()*
|
||||
writefile({list}, {fname} [, {binary}])
|
||||
writefile({list}, {fname} [, {flags}])
|
||||
Write |List| {list} to file {fname}. Each list item is
|
||||
separated with a NL. Each list item must be a String or
|
||||
Number.
|
||||
When {binary} is equal to "b" binary mode is used: There will
|
||||
When {flags} contains "b" then binary mode is used: There will
|
||||
not be a NL after the last list item. An empty item at the
|
||||
end does cause the last line in the file to end in a NL.
|
||||
All NL characters are replaced with a NUL character.
|
||||
|
||||
When {flags} contains "a" then append mode is used, lines are
|
||||
append to the file: >
|
||||
:call writefile(["foo"], "event.log", "a")
|
||||
:call writefile(["bar"], "event.log", "a")
|
||||
>
|
||||
< All NL characters are replaced with a NUL character.
|
||||
Inserting CR characters needs to be done before passing {list}
|
||||
to writefile().
|
||||
An existing file is overwritten, if possible.
|
||||
@@ -7345,7 +7483,7 @@ This does NOT work: >
|
||||
:unlet v
|
||||
< *E741*
|
||||
If you try to change a locked variable you get an
|
||||
error message: "E741: Value of {name} is locked"
|
||||
error message: "E741: Value is locked: {name}"
|
||||
|
||||
[depth] is relevant when locking a |List| or
|
||||
|Dictionary|. It specifies how deep the locking goes:
|
||||
@@ -8249,7 +8387,7 @@ You can catch all Vim errors by the pattern >
|
||||
*catch-text*
|
||||
NOTE: You should never catch the error message text itself: >
|
||||
:catch /No such variable/
|
||||
only works in the english locale, but not when the user has selected
|
||||
only works in the English locale, but not when the user has selected
|
||||
a different language by the |:language| command. It is however helpful to
|
||||
cite the message text in a comment: >
|
||||
:catch /^Vim(\a\+):E108:/ " No such variable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*farsi.txt* For Vim version 7.4. Last change: 2010 Aug 07
|
||||
*farsi.txt* For Vim version 7.4. Last change: 2015 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
||||
@@ -59,7 +59,7 @@ o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
|
||||
right-to-left mode, this function is also supported only in right-to-left
|
||||
mode.
|
||||
|
||||
Farsi Fonts *farsi fonts*
|
||||
Farsi Fonts *farsi-fonts*
|
||||
-----------
|
||||
|
||||
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
|
||||
@@ -222,7 +222,7 @@ o Keyboard
|
||||
Note:
|
||||
<09> stands for Farsi PSP (break without space)
|
||||
|
||||
<09> stands for Farsi PCN (for HAMZE attribute )
|
||||
<09> stands for Farsi PCN (for HAMZE attribute)
|
||||
|
||||
Restrictions
|
||||
------------
|
||||
|
||||
@@ -365,7 +365,7 @@ zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
||||
Also forces recomputing folds, like |zx|.
|
||||
|
||||
*zm*
|
||||
zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
|
||||
zm Fold more: Subtract |v:count1| from 'foldlevel'. If 'foldlevel' was
|
||||
already zero nothing happens.
|
||||
'foldenable' will be set.
|
||||
|
||||
@@ -374,7 +374,7 @@ zM Close all folds: set 'foldlevel' to 0.
|
||||
'foldenable' will be set.
|
||||
|
||||
*zr*
|
||||
zr Reduce folding: Add one to 'foldlevel'.
|
||||
zr Reduce folding: Add |v:count1| to 'foldlevel'.
|
||||
|
||||
*zR*
|
||||
zR Open all folds. This sets 'foldlevel' to highest fold level.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.4. Last change: 2012 Aug 04
|
||||
*gui_w32.txt* For Vim version 7.4. Last change: 2014 Dec 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -452,9 +452,10 @@ detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
|
||||
You can drag and drop one or more files into the Vim window, where they will
|
||||
be opened as normal. See |drag-n-drop|.
|
||||
|
||||
*:simalt* *:si*
|
||||
*:simalt* *:sim*
|
||||
:sim[alt] {key} simulate pressing {key} while holding Alt pressed.
|
||||
{not in Vi} {only for Win32 versions}
|
||||
Note: ":si" means ":s" with the "i" flag.
|
||||
|
||||
Normally, Vim takes control of all Alt-<Key> combinations, to increase the
|
||||
number of possible mappings. This clashes with the standard use of Alt as the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.4. Last change: 2012 Dec 06
|
||||
*help.txt* For Vim version 7.4. Last change: 2015 Jun 21
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -24,6 +24,7 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
Command-line editing c_ :help c_<Del>
|
||||
Vim command argument - :help -r
|
||||
Option ' :help 'textwidth'
|
||||
Regular expression / :help /[
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
@@ -196,6 +197,7 @@ Remarks about specific systems ~
|
||||
Standard plugins ~
|
||||
|pi_getscript.txt| Downloading latest version of Vim scripts
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_logipat.txt| Logical operators on patterns
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|
||||
@@ -197,7 +197,7 @@ files in it.
|
||||
--remote-silent "+call cursor(10, 27)"
|
||||
- Places the cursor on line 10 column 27
|
||||
In Vim >
|
||||
:h --remote-silent for mor details
|
||||
:h --remote-silent for more details
|
||||
|
||||
[.Net remarks provided by Dave Fishburn and Brian Sturk]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.4. Last change: 2012 Aug 02
|
||||
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Feb 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -120,9 +120,13 @@ VIM::command({cmd})
|
||||
*ruby-evaluate*
|
||||
VIM::evaluate({expr})
|
||||
Evaluates {expr} using the vim internal expression evaluator (see
|
||||
|expression|). Returns the expression result as a string.
|
||||
A |List| is turned into a string by joining the items and inserting
|
||||
line breaks.
|
||||
|expression|). Returns the expression result as:
|
||||
- a Integer if the Vim expression evaluates to a number
|
||||
- a Float if the Vim expression evaluates to a float
|
||||
- a String if the Vim expression evaluates to a string
|
||||
- a Array if the Vim expression evaluates to a Vim list
|
||||
- a Hash if the Vim expression evaluates to a Vim dictionary
|
||||
Dictionaries and lists are recursively expanded.
|
||||
|
||||
==============================================================================
|
||||
3. VIM::Buffer objects *ruby-buffer*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
|
||||
*indent.txt* For Vim version 7.4. Last change: 2014 Dec 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2014 Sep 19
|
||||
*index.txt* For Vim version 7.4. Last change: 2015 Sep 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -702,12 +702,16 @@ tag char note action in Normal mode ~
|
||||
|g'| g'{mark} 1 like |'| but without changing the jumplist
|
||||
|g`| g`{mark} 1 like |`| but without changing the jumplist
|
||||
|gstar| g* 1 like "*", but without using "\<" and "\>"
|
||||
|g+| g+ go to newer text state N times
|
||||
|g,| g, 1 go to N newer position in change list
|
||||
|g-| g- go to older text state N times
|
||||
|g0| g0 1 when 'wrap' off go to leftmost character of
|
||||
the current line that is on the screen;
|
||||
when 'wrap' on go to the leftmost character
|
||||
of the current screen line
|
||||
|g8| g8 print hex value of bytes used in UTF-8
|
||||
character under the cursor
|
||||
|g;| g; 1 go to N older position in change list
|
||||
|g<| g< display previous command output
|
||||
|g?| g? 2 Rot13 encoding operator
|
||||
|g?g?| g?? 2 Rot13 encode current line
|
||||
@@ -736,6 +740,7 @@ tag char note action in Normal mode ~
|
||||
the screen; when 'wrap' on go to the
|
||||
leftmost non-white character of the current
|
||||
screen line
|
||||
|g_| g_ 1 cursor to the last CHAR N - 1 lines lower
|
||||
|ga| ga print ascii value of character under the
|
||||
cursor
|
||||
|gd| gd 1 go to definition of word under the cursor
|
||||
@@ -1133,6 +1138,8 @@ tag command action ~
|
||||
|:cc| :cc go to specific error
|
||||
|:cclose| :ccl[ose] close quickfix window
|
||||
|:cd| :cd change directory
|
||||
|:cdo| :cdo execute command in each valid error list entry
|
||||
|:cfdo| :cfd[o] execute command in each file in error list
|
||||
|:center| :ce[nter] format lines at the center
|
||||
|:cexpr| :cex[pr] read errors from expr and jump to first
|
||||
|:cfile| :cf[ile] read file with error messages and jump to first
|
||||
@@ -1291,6 +1298,8 @@ tag command action ~
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
|:lclose| :lcl[ose] close location window
|
||||
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|
||||
|:ldo| :ld[o] execute command in valid location list entries
|
||||
|:lfdo| :lfd[o] execute command in each file in location list
|
||||
|:left| :le[ft] left align lines
|
||||
|:leftabove| :lefta[bove] make split window appear left or above
|
||||
|:let| :let assign a value to a variable or option
|
||||
@@ -1465,7 +1474,7 @@ tag command action ~
|
||||
buffer list
|
||||
|:sbrewind| :sbr[ewind] split window and go to first file in the
|
||||
buffer list
|
||||
|:scriptnames| :scrip[tnames] list names of all sourced Vim scripts
|
||||
|:scriptnames| :scr[iptnames] list names of all sourced Vim scripts
|
||||
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|
||||
|:scscope| :scs[cope] split window and execute cscope command
|
||||
|:set| :se[t] show or set options
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.4. Last change: 2014 Aug 04
|
||||
*insert.txt* For Vim version 7.4. Last change: 2015 Sep 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -81,9 +81,11 @@ CTRL-W Delete the word before the cursor (see |i_backspacing| about
|
||||
joining lines). See the section "word motions",
|
||||
|word-motions|, for the definition of a word.
|
||||
*i_CTRL-U*
|
||||
CTRL-U Delete all entered characters in the current line (see
|
||||
|i_backspacing| about joining lines).
|
||||
|
||||
CTRL-U Delete all entered characters before the cursor in the current
|
||||
line. If there are no newly entered characters and
|
||||
'backspace' is not empty, delete all characters before the
|
||||
cursor in the current line.
|
||||
See |i_backspacing| about joining lines.
|
||||
*i_CTRL-I* *i_<Tab>* *i_Tab*
|
||||
<Tab> or CTRL-I Insert a tab. If the 'expandtab' option is on, the
|
||||
equivalent number of spaces is inserted (use CTRL-V <Tab> to
|
||||
@@ -150,7 +152,7 @@ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
|
||||
CTRL-R a results in "ac".
|
||||
CTRL-R CTRL-R a results in "ab^Hc".
|
||||
< Options 'textwidth', 'formatoptions', etc. still apply. If
|
||||
you also want to avoid these, use "<C-R><C-O>r", see below.
|
||||
you also want to avoid these, use CTRL-R CTRL-O, see below.
|
||||
The '.' register (last inserted text) is still inserted as
|
||||
typed. {not in Vi}
|
||||
|
||||
@@ -375,6 +377,9 @@ CTRL-O execute one command, return to Insert mode *i_CTRL-O*
|
||||
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
||||
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
|
||||
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
|
||||
CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
|
||||
movement (but only if the cursor stays
|
||||
within same the line)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
|
||||
@@ -414,6 +419,28 @@ that, with CTRL-O u. Another example: >
|
||||
This breaks undo at each line break. It also expands abbreviations before
|
||||
this.
|
||||
|
||||
An example for using CTRL-G U: >
|
||||
|
||||
inoremap <Left> <C-G>U<Left>
|
||||
inoremap <Right> <C-G>U<Right>
|
||||
inoremap <expr> <Home> col('.') == match(getline('.'), '\S') + 1 ?
|
||||
\ repeat('<C-G>U<Left>', col('.') - 1) :
|
||||
\ (col('.') < match(getline('.'), '\S') ?
|
||||
\ repeat('<C-G>U<Right>', match(getline('.'), '\S') + 0) :
|
||||
\ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S')))
|
||||
inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
|
||||
inoremap ( ()<C-G>U<Left>
|
||||
|
||||
This makes it possible to use the cursor keys in Insert mode, without breaking
|
||||
the undo sequence and therefore using |.| (redo) will work as expected.
|
||||
Also entering a text like (with the "(" mapping from above): >
|
||||
|
||||
Lorem ipsum (dolor
|
||||
|
||||
will be repeatable by the |.|to the expected
|
||||
|
||||
Lorem ipsum (dolor)
|
||||
|
||||
Using CTRL-O splits undo: the text typed before and after it is undone
|
||||
separately. If you want to avoid this (e.g., in a mapping) you might be able
|
||||
to use CTRL-R = |i_CTRL-R|. E.g., to call a function: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.4. Last change: 2014 May 24
|
||||
*intro.txt* For Vim version 7.4. Last change: 2015 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,7 +135,7 @@ http://www.vim.org/maillist.php
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim Developers <vim_dev@vim.org>
|
||||
Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will see
|
||||
the message. If you don't want that, e.g. because it is a security issue,
|
||||
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.4. Last change: 2014 Oct 03
|
||||
*map.txt* For Vim version 7.4. Last change: 2014 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1358,6 +1358,19 @@ Possible attributes are:
|
||||
Note that -range=N and -count=N are mutually exclusive - only one should be
|
||||
specified.
|
||||
|
||||
*E889* *:command-addr*
|
||||
It is possible that the special characters in the range like ., $ or % which
|
||||
by default correspond to the current line, last line and the whole buffer,
|
||||
relate to arguments, (loaded) buffers, windows or tab pages.
|
||||
|
||||
Possible values are:
|
||||
-addr=lines Range of lines (this is the default)
|
||||
-addr=arguments Range for arguments
|
||||
-addr=buffers Range for buffers (also not loaded buffers)
|
||||
-addr=loaded_buffers Range for loaded buffers
|
||||
-addr=windows Range for windows
|
||||
-addr=tabs Range for tab pages
|
||||
|
||||
Special cases *:command-bang* *:command-bar*
|
||||
*:command-register* *:command-buffer*
|
||||
There are some special cases as well:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.4. Last change: 2014 Feb 11
|
||||
*motion.txt* For Vim version 7.4. Last change: 2015 Jun 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -172,6 +172,8 @@ CTRL-H or *CTRL-H* *<BS>*
|
||||
l or *l*
|
||||
<Right> or *<Right>* *<Space>*
|
||||
<Space> [count] characters to the right. |exclusive| motion.
|
||||
See the 'whichwrap' option for adjusting the behavior
|
||||
at end of line
|
||||
|
||||
*0*
|
||||
0 To the first character of the line. |exclusive|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2012 Jan 26
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2015 Mar 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -306,7 +306,12 @@ bufID Buffer number. A message may be either for a specific buffer
|
||||
or generic. Generic messages use a bufID of zero. NOTE: this
|
||||
buffer ID is assigned by the IDE, it is not Vim's buffer
|
||||
number. The bufID must be a sequentially rising number,
|
||||
starting at one.
|
||||
starting at one. When the 'switchbuf' option is set to
|
||||
"usetab" and the "bufID" buffer is not found in the current
|
||||
tab page, the netbeans commands and functions that set this
|
||||
buffer as the current buffer will jump to the first open
|
||||
window that contains this buffer in other tab pages instead of
|
||||
replacing the buffer in the current window.
|
||||
|
||||
seqno The IDE uses a sequence number for Commands and Functions. A
|
||||
Reply must use the sequence number of the Function that it is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2014 Sep 23
|
||||
*options.txt* For Vim version 7.4. Last change: 2015 Sep 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -50,18 +50,26 @@ achieve special effects. These options come in three forms:
|
||||
:se[t] {option}&vi Reset option to its Vi default value. {not in Vi}
|
||||
:se[t] {option}&vim Reset option to its Vim default value. {not in Vi}
|
||||
|
||||
:se[t] all& Set all options, except terminal options, to their
|
||||
default value. The values of 'term', 'lines' and
|
||||
'columns' are not changed. {not in Vi}
|
||||
:se[t] all& Set all options to their default value. The values of
|
||||
these options are not changed:
|
||||
all terminal options, starting with t_
|
||||
'columns'
|
||||
'cryptmethod'
|
||||
'encoding'
|
||||
'key'
|
||||
'lines'
|
||||
'term'
|
||||
'ttymouse'
|
||||
'ttytype'
|
||||
Warning: This may have a lot of side effects.
|
||||
{not in Vi}
|
||||
|
||||
*:set-args* *E487* *E521*
|
||||
:se[t] {option}={value} or
|
||||
:se[t] {option}:{value}
|
||||
Set string or number option to {value}.
|
||||
For numeric options the value can be given in decimal,
|
||||
hex (preceded with 0x) or octal (preceded with '0')
|
||||
(hex and octal are only available for machines which
|
||||
have the strtol() function).
|
||||
hex (preceded with 0x) or octal (preceded with '0').
|
||||
The old value can be inserted by typing 'wildchar' (by
|
||||
default this is a <Tab> or CTRL-E if 'compatible' is
|
||||
set). See |cmdline-completion|.
|
||||
@@ -538,11 +546,11 @@ number can be specified where "vim:" or "Vim:" is used:
|
||||
vim<{vers}: version before {vers}
|
||||
vim={vers}: version {vers}
|
||||
vim>{vers}: version after {vers}
|
||||
{vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
|
||||
For example, to use a modeline only for Vim 6.0 and later:
|
||||
/* vim600: set foldmethod=marker: */ ~
|
||||
To use a modeline for Vim before version 5.7:
|
||||
/* vim<570: set sw=4: */ ~
|
||||
{vers} is 700 for Vim 7.0 (hundred times the major version plus minor).
|
||||
For example, to use a modeline only for Vim 7.0:
|
||||
/* vim700: set foldmethod=marker */ ~
|
||||
To use a modeline for Vim after version 7.2:
|
||||
/* vim>702: set cole=2: */ ~
|
||||
There can be no blanks between "vim" and the ":".
|
||||
|
||||
|
||||
@@ -730,8 +738,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
open a file, switch buffers, delete a buffer or open/close a window.
|
||||
It will change to the directory containing the file which was opened
|
||||
or selected.
|
||||
This option is provided for backward compatibility with the Vim
|
||||
released with Sun ONE Studio 4 Enterprise Edition.
|
||||
Note: When this option is on some plugins may not work.
|
||||
|
||||
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
|
||||
@@ -790,7 +796,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
line.
|
||||
When 'smartindent' or 'cindent' is on the indent is changed in
|
||||
a different way.
|
||||
The 'autoindent' option is reset when the 'paste' option is set.
|
||||
The 'autoindent' option is reset when the 'paste' option is set and
|
||||
restored when 'paste' is reset.
|
||||
{small difference from Vi: After the indent is deleted when typing
|
||||
<Esc> or <CR>, the cursor position when moving up or down is after the
|
||||
deleted indent; Vi puts the cursor somewhere in the deleted indent}.
|
||||
@@ -1128,6 +1135,47 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
expression evaluates to a |List| this is equal to using each List item
|
||||
as a string and putting "\n" in between them.
|
||||
|
||||
*'belloff'* *'bo'*
|
||||
'belloff' 'bo' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
Specifies for which events the bell will not be rung. It is a comma
|
||||
separated list of items. For each item that is present, the bell
|
||||
will be silenced. This is most useful to specify specific events in
|
||||
insert mode to be silenced.
|
||||
|
||||
item meaning when present ~
|
||||
all All events.
|
||||
backspace When hitting <BS> or <Del> and deleting results in an
|
||||
error.
|
||||
cursor Fail to move around using the cursor keys or
|
||||
<PageUp>/<PageDown> in |Insert-mode|.
|
||||
complete Error occurred when using |i_CTRL-X_CTRL-K| or
|
||||
|i_CTRL-X_CTRL-T|.
|
||||
copy Cannot copy char from insert mode using |i_CTRL-Y| or
|
||||
|i_CTRL-E|.
|
||||
ctrlg Unknown Char after <C-G> in Insert mode.
|
||||
error Other Error occurred (e.g. try to join last line)
|
||||
(mostly used in |Normal-mode| or |Cmdline-mode|).
|
||||
esc hitting <Esc> in |Normal-mode|.
|
||||
ex In |Visual-mode|, hitting |Q| results in an error.
|
||||
hangul Error occurred when using hangul input.
|
||||
insertmode Pressing <Esc> in 'insertmode'.
|
||||
lang Calling the beep module for Lua/Mzscheme/TCL.
|
||||
mess No output available for |g<|.
|
||||
showmatch Error occurred for 'showmatch' function.
|
||||
operator Empty region error |cpo-E|.
|
||||
register Unknown register after <C-R> in |Insert-mode|.
|
||||
shell Bell from shell output |:!|.
|
||||
spell Error happened on spell suggest.
|
||||
wildmode More matches in |cmdline-completion| available
|
||||
(depends on the 'wildmode' setting).
|
||||
|
||||
This is most useful, to fine tune when in insert mode the bell should
|
||||
be rung. For normal mode and ex commands, the bell is often rung to
|
||||
indicate that an error occurred. It can be silenced by adding the
|
||||
"error" keyword.
|
||||
|
||||
*'binary'* *'bin'* *'nobinary'* *'nobin'*
|
||||
'binary' 'bin' boolean (default off)
|
||||
local to buffer
|
||||
@@ -1320,6 +1368,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
nofile only: The buffer name is fixed, it is not handled like a
|
||||
file name. It is not modified in response to a |:cd|
|
||||
command.
|
||||
both: When using ":e bufname" and already editing "bufname"
|
||||
the buffer is made empty and autocommands are
|
||||
triggered as usual for |:edit|.
|
||||
*E676*
|
||||
"acwrite" implies that the buffer name is not related to a file, like
|
||||
"nofile", but it will be written. Thus, in contrast to "nofile" and
|
||||
@@ -1820,6 +1871,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
completion in the preview window. Only works in
|
||||
combination with "menu" or "menuone".
|
||||
|
||||
noinsert Do not insert any text for a match until the user selects
|
||||
a match from the menu. Only works in combination with
|
||||
"menu" or "menuone". No effect if "longest" is present.
|
||||
|
||||
noselect Do not select a match in the menu, force the user to
|
||||
select one from the menu. Only works in combination with
|
||||
"menu" or "menuone".
|
||||
|
||||
|
||||
*'concealcursor'* *'cocu'*
|
||||
'concealcursor' 'cocu' string (default: "")
|
||||
@@ -2221,7 +2280,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
|
||||
*'cryptmethod'* *'cm'*
|
||||
'cryptmethod' string (default "zip")
|
||||
'cryptmethod' 'cm' string (default "zip")
|
||||
global or local to buffer |global-local|
|
||||
{not in Vi}
|
||||
Method used for encryption when the buffer is written to a file:
|
||||
@@ -2664,15 +2723,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
When writing a file and this option is off and the 'binary' option
|
||||
is on, no <EOL> will be written for the last line in the file. This
|
||||
option is automatically set when starting to edit a new file, unless
|
||||
the file does not have an <EOL> for the last line in the file, in
|
||||
which case it is reset. Normally you don't have to set or reset this
|
||||
option. When 'binary' is off the value is not used when writing the
|
||||
file. When 'binary' is on it is used to remember the presence of a
|
||||
<EOL> for the last line in the file, so that when you write the file
|
||||
the situation from the original file can be kept. But you can change
|
||||
it if you want to.
|
||||
is on, or 'fixeol' option is off, no <EOL> will be written for the
|
||||
last line in the file. This option is automatically set or reset when
|
||||
starting to edit a new file, depending on whether file has an <EOL>
|
||||
for the last line in the file. Normally you don't have to set or
|
||||
reset this option.
|
||||
When 'binary' is off and 'fixeol' is on the value is not used when
|
||||
writing the file. When 'binary' is on or 'fixeol' is off it is used
|
||||
to remember the presence of a <EOL> for the last line in the file, so
|
||||
that when you write the file the situation from the original file can
|
||||
be kept. But you can change it if you want to.
|
||||
|
||||
*'equalalways'* *'ea'* *'noequalalways'* *'noea'*
|
||||
'equalalways' 'ea' boolean (default on)
|
||||
@@ -2713,7 +2773,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
makes a difference for error messages, the bell will be used always
|
||||
for a lot of errors without a message (e.g., hitting <Esc> in Normal
|
||||
mode). See 'visualbell' on how to make the bell behave like a beep,
|
||||
screen flash or do nothing.
|
||||
screen flash or do nothing. See 'belloff' to finetune when to ring the
|
||||
bell.
|
||||
|
||||
*'errorfile'* *'ef'*
|
||||
'errorfile' 'ef' string (Amiga default: "AztecC.Err",
|
||||
@@ -2775,6 +2836,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<Tab>. Spaces are used in indents with the '>' and '<' commands and
|
||||
when 'autoindent' is on. To insert a real tab when 'expandtab' is
|
||||
on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|.
|
||||
This option is reset when the 'paste' option is set and restored when
|
||||
the 'paste' option is reset.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'exrc'* *'ex'* *'noexrc'* *'noex'*
|
||||
@@ -2952,8 +3015,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
|
||||
is set to "unix". Note that when a <NL> is found without a
|
||||
preceding <CR>, "unix" is preferred over "dos".
|
||||
3. If 'fileformat' has not yet been set, and if 'fileformats'
|
||||
includes "mac", 'fileformat' is set to "mac".
|
||||
3. If 'fileformat' has not yet been set, and if a <CR> is found, and
|
||||
if 'fileformats' includes "mac", 'fileformat' is set to "mac".
|
||||
This means that "mac" is only chosen when:
|
||||
"unix" is not present or no <NL> is found in the file, and
|
||||
"dos" is not present or no <CR><NL> is found in the file.
|
||||
@@ -3057,6 +3120,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
fold:c Folded |hl-Folded|
|
||||
diff:c DiffDelete |hl-DiffDelete|
|
||||
|
||||
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
|
||||
'fixendofline' 'fixeol' boolean (default on)
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
When writing a file and this option is on, <EOL> at the end of file
|
||||
will be restored if missing. Turn this option off if you want to
|
||||
preserve the situation from the original file.
|
||||
When the 'binary' option is set the value of this option doesn't
|
||||
matter.
|
||||
See the 'endofline' option.
|
||||
|
||||
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
|
||||
'fkmap' 'fk' boolean (default off) *E198*
|
||||
global
|
||||
@@ -3421,7 +3495,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the height of the cursor can be changed. This can be done by
|
||||
specifying a block cursor, or a percentage for a vertical or
|
||||
horizontal cursor.
|
||||
For a console the 't_SI' and 't_EI' escape sequences are used.
|
||||
For a console the 't_SI', 't_SR', and 't_EI' escape sequences are
|
||||
used.
|
||||
|
||||
The option is a comma separated list of parts. Each part consist of a
|
||||
mode-list and an argument-list:
|
||||
@@ -4534,6 +4609,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be able to execute Normal mode commands.
|
||||
This is the opposite of the 'keymap' option, where characters are
|
||||
mapped in Insert mode.
|
||||
Also consider setting 'langnoremap' to avoid 'langmap' applies to
|
||||
characters resulting from a mapping.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -4589,6 +4666,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:source $VIMRUNTIME/menu.vim
|
||||
< Warning: This deletes all menus that you defined yourself!
|
||||
|
||||
*'langnoremap'* *'lnr'*
|
||||
'langnoremap' 'lnr' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+langmap|
|
||||
feature}
|
||||
When on, setting 'langmap' does not apply to characters resulting from
|
||||
a mapping. This basically means, if you noticed that setting
|
||||
'langmap' disables some of your mappings, try setting this option.
|
||||
This option defaults to off for backwards compatibility. Set it on if
|
||||
that works for you to avoid mappings to break.
|
||||
|
||||
*'laststatus'* *'ls'*
|
||||
'laststatus' 'ls' number (default 1)
|
||||
global
|
||||
@@ -4703,33 +4792,38 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Strings to use in 'list' mode and for the |:list| command. It is a
|
||||
comma separated list of string settings.
|
||||
*lcs-eol*
|
||||
*lcs-eol*
|
||||
eol:c Character to show at the end of each line. When
|
||||
omitted, there is no extra character at the end of the
|
||||
line.
|
||||
*lcs-tab*
|
||||
*lcs-tab*
|
||||
tab:xy Two characters to be used to show a tab. The first
|
||||
char is used once. The second char is repeated to
|
||||
fill the space that the tab normally occupies.
|
||||
"tab:>-" will show a tab that takes four spaces as
|
||||
">---". When omitted, a tab is show as ^I.
|
||||
*lcs-trail*
|
||||
*lcs-space*
|
||||
space:c Character to show for a space. When omitted, spaces
|
||||
are left blank.
|
||||
*lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank.
|
||||
*lcs-extends*
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
setting for trailing spaces.
|
||||
*lcs-extends*
|
||||
extends:c Character to show in the last column, when 'wrap' is
|
||||
off and the line continues beyond the right of the
|
||||
screen.
|
||||
*lcs-precedes*
|
||||
*lcs-precedes*
|
||||
precedes:c Character to show in the first column, when 'wrap'
|
||||
is off and there is text preceding the character
|
||||
visible in the first column.
|
||||
*lcs-conceal*
|
||||
*lcs-conceal*
|
||||
conceal:c Character to show in place of concealed text, when
|
||||
'conceallevel' is set to 1.
|
||||
*lcs-nbsp*
|
||||
nbsp:c Character to show for a non-breakable space (character
|
||||
0xA0, 160). Left blank when omitted.
|
||||
*lcs-nbsp*
|
||||
nbsp:c Character to show for a non-breakable space character
|
||||
(0xA0 (160 decimal) and U+202F). Left blank when
|
||||
omitted.
|
||||
|
||||
The characters ':' and ',' should not be used. UTF-8 characters can
|
||||
be used when 'encoding' is "utf-8", otherwise only printable
|
||||
@@ -4740,7 +4834,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set lcs=tab:>-,eol:<,nbsp:%
|
||||
:set lcs=extends:>,precedes:<
|
||||
< The "NonText" highlighting will be used for "eol", "extends" and
|
||||
"precedes". "SpecialKey" for "nbsp", "tab" and "trail".
|
||||
"precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail".
|
||||
|hl-NonText| |hl-SpecialKey|
|
||||
|
||||
*'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
|
||||
@@ -5321,19 +5415,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When the 'paste' option is switched on (also when it was already on):
|
||||
- mapping in Insert mode and Command-line mode is disabled
|
||||
- abbreviations are disabled
|
||||
- 'textwidth' is set to 0
|
||||
- 'wrapmargin' is set to 0
|
||||
- 'autoindent' is reset
|
||||
- 'smartindent' is reset
|
||||
- 'softtabstop' is set to 0
|
||||
- 'expandtab' is reset
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'revins' is reset
|
||||
- 'ruler' is reset
|
||||
- 'showmatch' is reset
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'smartindent' is reset
|
||||
- 'smarttab' is reset
|
||||
- 'softtabstop' is set to 0
|
||||
- 'textwidth' is set to 0
|
||||
- 'wrapmargin' is set to 0
|
||||
These options keep their value, but their effect is disabled:
|
||||
- 'lisp'
|
||||
- 'indentexpr'
|
||||
- 'cindent'
|
||||
- 'indentexpr'
|
||||
- 'lisp'
|
||||
NOTE: When you start editing another file while the 'paste' option is
|
||||
on, settings from the modelines or autocommands may change the
|
||||
settings again, causing trouble when pasting text. You might want to
|
||||
@@ -5626,6 +5722,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note that when using the NFA engine and the pattern contains something
|
||||
that is not supported the pattern will not match. This is only useful
|
||||
for debugging the regexp engine.
|
||||
Using automatic selection enables Vim to switch the engine, if the
|
||||
default engine becomes too costly. E.g., when the NFA engine uses too
|
||||
many states. This should prevent Vim from hanging on a combination of
|
||||
a complex pattern with long text.
|
||||
|
||||
*'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
|
||||
'relativenumber' 'rnu' boolean (default off)
|
||||
@@ -5762,7 +5862,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Inserting characters in Insert mode will work backwards. See "typing
|
||||
backwards" |ins-reverse|. This option can be toggled with the CTRL-_
|
||||
command in Insert mode, when 'allowrevins' is set.
|
||||
NOTE: This option is reset when 'compatible' or 'paste' is set.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
This option is reset when 'paste' is set and restored when 'paste' is
|
||||
reset.
|
||||
|
||||
*'rightleft'* *'rl'* *'norightleft'* *'norl'*
|
||||
'rightleft' 'rl' boolean (default off)
|
||||
@@ -5818,7 +5920,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
separated with a dash.
|
||||
For an empty line "0-1" is shown.
|
||||
For an empty buffer the line number will also be zero: "0,0-1".
|
||||
This option is reset when the 'paste' option is set.
|
||||
This option is reset when 'paste' is set and restored when 'paste' is
|
||||
reset.
|
||||
If you don't want to see the ruler all the time but want to know where
|
||||
you are, use "g CTRL-G" |g_CTRL-G|.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
@@ -6457,7 +6560,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
jump is only done if the match can be seen on the screen. The time to
|
||||
show the match can be set with 'matchtime'.
|
||||
A Beep is given if there is no match (no matter if the match can be
|
||||
seen or not). This option is reset when the 'paste' option is set.
|
||||
seen or not).
|
||||
This option is reset when 'paste' is set and restored when 'paste' is
|
||||
reset.
|
||||
When the 'm' flag is not included in 'cpoptions', typing a character
|
||||
will immediately move the cursor back to where it belongs.
|
||||
See the "sm" field in 'guicursor' for setting the cursor shape and
|
||||
@@ -6566,8 +6671,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
|
||||
When using the ">>" command, lines starting with '#' are not shifted
|
||||
right.
|
||||
NOTE: 'smartindent' is reset when 'compatible' is set. When 'paste'
|
||||
is set smart indenting is disabled.
|
||||
NOTE: 'smartindent' is reset when 'compatible' is set.
|
||||
This option is reset when 'paste' is set and restored when 'paste' is
|
||||
reset.
|
||||
|
||||
*'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
|
||||
'smarttab' 'sta' boolean (default off)
|
||||
@@ -6583,6 +6689,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
What gets inserted (a <Tab> or spaces) depends on the 'expandtab'
|
||||
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
|
||||
number of spaces is minimized by using <Tab>s.
|
||||
This option is reset when 'paste' is set and restored when 'paste' is
|
||||
reset.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'softtabstop'* *'sts'*
|
||||
@@ -6597,7 +6705,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
commands like "x" still work on the actual characters.
|
||||
When 'sts' is zero, this feature is off.
|
||||
When 'sts' is negative, the value of 'shiftwidth' is used.
|
||||
'softtabstop' is set to 0 when the 'paste' option is set.
|
||||
'softtabstop' is set to 0 when the 'paste' option is set and restored
|
||||
when 'paste' is reset.
|
||||
See also |ins-expandtab|. When 'expandtab' is not set, the number of
|
||||
spaces is minimized by using <Tab>s.
|
||||
The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is
|
||||
@@ -7044,6 +7153,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
split If included, split the current window before loading
|
||||
a buffer for a |quickfix| command that display errors.
|
||||
Otherwise: do not split, use current window.
|
||||
vsplit Just like "split" but split vertically.
|
||||
newtab Like "split", but open a new tab page. Overrules
|
||||
"split" when both are present.
|
||||
|
||||
@@ -7300,14 +7410,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the GUI it only applies to the keyboard ( 'encoding' is used for the
|
||||
display). Except for the Mac when 'macatsui' is off, then
|
||||
'termencoding' should be "macroman".
|
||||
In the Win32 console version the default value is the console codepage
|
||||
when it differs from the ANSI codepage.
|
||||
*E617*
|
||||
Note: This does not apply to the GTK+ 2 GUI. After the GUI has been
|
||||
successfully initialized, 'termencoding' is forcibly set to "utf-8".
|
||||
Any attempts to set a different value will be rejected, and an error
|
||||
message is shown.
|
||||
For the Win32 GUI 'termencoding' is not used for typed characters,
|
||||
For the Win32 GUI and console versions 'termencoding' is not used,
|
||||
because the Win32 system always passes Unicode characters.
|
||||
When empty, the same encoding is used as for the 'encoding' option.
|
||||
This is the normal value.
|
||||
@@ -7357,8 +7465,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Maximum width of text that is being inserted. A longer line will be
|
||||
broken after white space to get this width. A zero value disables
|
||||
this. 'textwidth' is set to 0 when the 'paste' option is set. When
|
||||
'textwidth' is zero, 'wrapmargin' may be used. See also
|
||||
this.
|
||||
'textwidth' is set to 0 when the 'paste' option is set and restored
|
||||
when 'paste' is reset.
|
||||
When 'textwidth' is zero, 'wrapmargin' may be used. See also
|
||||
'formatoptions' and |ins-textwidth|.
|
||||
When 'formatexpr' is set it will be used to break the line.
|
||||
NOTE: This option is set to 0 when 'compatible' is set.
|
||||
@@ -7744,6 +7854,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
current buffer: >
|
||||
setlocal ul=-1
|
||||
< This helps when you run out of memory for a single change.
|
||||
|
||||
The local value is set to -123456 when the global value is to be used.
|
||||
|
||||
Also see |clear-undo|.
|
||||
|
||||
*'undoreload'* *'ur'*
|
||||
@@ -8377,6 +8490,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Options that add a margin, such as 'number' and 'foldcolumn', cause
|
||||
the text width to be further reduced. This is Vi compatible.
|
||||
When 'textwidth' is non-zero, this option is not used.
|
||||
This option is set to 0 when 'paste' is set and restored when 'paste'
|
||||
is reset.
|
||||
See also 'formatoptions' and |ins-textwidth|. {Vi: works differently
|
||||
and less usefully}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2014 Sep 06
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2015 Mar 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -59,6 +59,8 @@ explanations are in chapter 27 |usr_27.txt|.
|
||||
|
||||
*n*
|
||||
n Repeat the latest "/" or "?" [count] times.
|
||||
If the cursor doesn't move the search is repeated with
|
||||
count + 1.
|
||||
|last-pattern| {Vi: no count}
|
||||
|
||||
*N*
|
||||
@@ -1058,7 +1060,10 @@ x A single character, with no special meaning, matches itself
|
||||
*E769*
|
||||
When the ']' is not there Vim will not give an error message but
|
||||
assume no collection is used. Useful to search for '['. However, you
|
||||
do get E769 for internal searching.
|
||||
do get E769 for internal searching. And be aware that in a
|
||||
`:substitute` command the whole command becomes the pattern. E.g.
|
||||
":s/[/x/" searches for "[/x" and replaces it with nothing. It does
|
||||
not search for "[" and replaces it with "x"!
|
||||
|
||||
If the sequence begins with "^", it matches any single character NOT
|
||||
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
|
||||
|
||||
117
runtime/doc/pi_logipat.txt
Normal file
117
runtime/doc/pi_logipat.txt
Normal file
@@ -0,0 +1,117 @@
|
||||
*pi_logipat.txt* Logical Patterns Mar 13, 2013
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*
|
||||
The VIM LICENSE applies to LogiPat.vim and LogiPat.txt
|
||||
(see |copyright|) except use "LogiPat" instead of "Vim"
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *logipat* *logipat-contents*
|
||||
|
||||
1. Contents.................: |logipat-contents|
|
||||
2. LogiPat Manual...........: |logipat-manual|
|
||||
3. LogiPat Examples.........: |logipat-examples|
|
||||
4. Caveat...................: |logipat-caveat|
|
||||
5. LogiPat History..........: |logipat-history|
|
||||
|
||||
==============================================================================
|
||||
2. LogiPat Manual *logipat-manual* *logipat-man*
|
||||
|
||||
|
||||
*logipat-arg* *logipat-input* *logipat-pattern* *logipat-operators*
|
||||
Boolean logic patterns are composed of
|
||||
|
||||
operators ! = not
|
||||
| = logical-or
|
||||
& = logical-and
|
||||
grouping ( ... )
|
||||
patterns "pattern"
|
||||
|
||||
:LogiPat {boolean-logic pattern} *:LogiPat*
|
||||
:LogiPat is a command which takes a boolean-logic
|
||||
argument (|logipat-arg|).
|
||||
|
||||
:LP {boolean-logic pattern} *:LP*
|
||||
:LP is a shorthand command version of :LogiPat
|
||||
(|:LogiPat|).
|
||||
|
||||
:ELP {boolean-logic pattern} *:ELP*
|
||||
No search is done, but the conversion from the
|
||||
boolean logic pattern to the regular expression
|
||||
is performed and echoed onto the display.
|
||||
|
||||
:LogiPatFlags {search flags} *LogiPat-flags*
|
||||
:LogiPatFlags {search flags}
|
||||
LogiPat uses the |search()| command. The flags
|
||||
passed to that call to search() may be specified
|
||||
by the :LogiPatFlags command.
|
||||
|
||||
:LPF {search flags} *:LPF*
|
||||
:LPF is a shorthand version of :LogiPatFlags.
|
||||
|
||||
:let pat=LogiPat({boolean-logic pattern}) *LogiPat()*
|
||||
If one calls LogiPat() directly, no search
|
||||
is done, but the transformation from the boolean
|
||||
logic pattern into a regular expression pattern
|
||||
is performed and returned.
|
||||
|
||||
To get a " inside a pattern, as opposed to having it delimit
|
||||
the pattern, double it.
|
||||
|
||||
==============================================================================
|
||||
3. LogiPat Examples *logipat-examples*
|
||||
|
||||
LogiPat takes Boolean logic arguments and produces a regular
|
||||
expression which implements the choices. A series of examples
|
||||
follows:
|
||||
>
|
||||
:LogiPat "abc"
|
||||
< will search for lines containing the string :abc:
|
||||
>
|
||||
:LogiPat "ab""cd"
|
||||
< will search for lines containing the string :ab"c:
|
||||
>
|
||||
:LogiPat !"abc"
|
||||
< will search for lines which don't contain the string :abc:
|
||||
>
|
||||
:LogiPat "abc"|"def"
|
||||
< will search for lines which contain either the string
|
||||
:abc: or the string :def:
|
||||
>
|
||||
:LogiPat !("abc"|"def")
|
||||
< will search for lines which don't contain either
|
||||
of the strings :abc: or :def:
|
||||
>
|
||||
:LogiPat "abc"&"def"
|
||||
< will search for lines which contain both of the strings
|
||||
:abc: and :def:
|
||||
>
|
||||
:let pat= LogiPat('!"abc"')
|
||||
< will return the regular expression which will match
|
||||
all lines not containing :abc: . The double quotes
|
||||
are needed to pass normal patterns to LogiPat, and
|
||||
differentiate such patterns from boolean logic
|
||||
operators.
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. Caveat *logipat-caveat*
|
||||
|
||||
The "not" operator may be fragile; ie. it may not always play well
|
||||
with the & (logical-and) and | (logical-or) operators. Please try out
|
||||
your patterns, possibly with :set hls, to insure that what is matching
|
||||
is what you want.
|
||||
|
||||
==============================================================================
|
||||
3. LogiPat History *logipat-history*
|
||||
|
||||
v3 Sep 25, 2006 * LP_Or() fixed; it now encapsulates its output
|
||||
in \%(...\) parentheses
|
||||
Dec 12, 2011 * |:ELP| added
|
||||
* "" is mapped to a single " and left inside patterns
|
||||
v2 May 31, 2005 * LPF and LogiPatFlags commands weren't working
|
||||
v1 May 23, 2005 * initial release
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help
|
||||
File diff suppressed because it is too large
Load Diff
@@ -693,7 +693,7 @@ It is possible to achieve a poor man's version of duplex printing using the PS
|
||||
utility psselect. This utility has options -e and -o for printing just the
|
||||
even or odd pages of a PS file respectively.
|
||||
|
||||
First generate a PS file with the 'hardcopy' command, then generate a new
|
||||
First generate a PS file with the 'hardcopy' command, then generate new
|
||||
files with all the odd and even numbered pages with: >
|
||||
|
||||
psselect -o test.ps odd.ps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2014 Mar 27
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2015 Sep 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -299,6 +299,75 @@ use this code: >
|
||||
au QuickfixCmdPost make call QfMakeConv()
|
||||
|
||||
|
||||
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
|
||||
*:cdo*
|
||||
:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list.
|
||||
It works like doing this: >
|
||||
:cfirst
|
||||
:{cmd}
|
||||
:cnext
|
||||
:{cmd}
|
||||
etc.
|
||||
< When the current file can't be |abandon|ed and the [!]
|
||||
is not present, the command fails.
|
||||
When an error is detected excecution stops.
|
||||
The last buffer (or where an error occurred) becomes
|
||||
the current buffer.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
|
||||
Only valid entries in the quickfix list are used.
|
||||
A range can be used to select entries, e.g.: >
|
||||
:10,$cdo cmd
|
||||
< To skip entries 1 to 9.
|
||||
|
||||
Note: While this command is executing, the Syntax
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|
||||
|:ldo|, |:cfdo| and |:lfdo|.
|
||||
|
||||
*:cfdo*
|
||||
:cfdo[!] {cmd} Execute {cmd} in each file in the quickfix list.
|
||||
It works like doing this: >
|
||||
:cfirst
|
||||
:{cmd}
|
||||
:cnfile
|
||||
:{cmd}
|
||||
etc.
|
||||
< Otherwise it works the same as `:cdo`.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
|
||||
*:ldo*
|
||||
:ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list
|
||||
for the current window.
|
||||
It works like doing this: >
|
||||
:lfirst
|
||||
:{cmd}
|
||||
:lnext
|
||||
:{cmd}
|
||||
etc.
|
||||
< Only valid entries in the location list are used.
|
||||
Otherwise it works the same as `:cdo`.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
|
||||
*:lfdo*
|
||||
:lfdo[!] {cmd} Execute {cmd} in each file in the location list for
|
||||
the current window.
|
||||
It works like doing this: >
|
||||
:lfirst
|
||||
:{cmd}
|
||||
:lnfile
|
||||
:{cmd}
|
||||
etc.
|
||||
< Otherwise it works the same as `:ldo`.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
|
||||
=============================================================================
|
||||
2. The error window *quickfix-window*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2014 Aug 06
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -620,6 +620,7 @@ Short explanation of each option: *option-list*
|
||||
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
|
||||
'ballooneval' 'beval' switch on balloon evaluation
|
||||
'balloonexpr' 'bexpr' expression to show in balloon
|
||||
'belloff' 'bo' do not ring the bell for these reasons
|
||||
'binary' 'bin' read/write/edit file in binary mode
|
||||
'bioskey' 'biosk' MS-DOS: use bios calls for input characters
|
||||
'bomb' prepend a Byte Order Mark to the file
|
||||
@@ -696,6 +697,7 @@ Short explanation of each option: *option-list*
|
||||
'fileignorecase' 'fic' ignore case when using file names
|
||||
'filetype' 'ft' type of file, used for autocommands
|
||||
'fillchars' 'fcs' characters to use for displaying special items
|
||||
'fixendofline' 'fixeol' make sure last line in file has <EOL>
|
||||
'fkmap' 'fk' Farsi keyboard mapping
|
||||
'foldclose' 'fcl' close a fold when the cursor leaves it
|
||||
'foldcolumn' 'fdc' width of the column used to indicate folds
|
||||
@@ -710,10 +712,10 @@ Short explanation of each option: *option-list*
|
||||
'foldnestmax' 'fdn' maximum fold depth
|
||||
'foldopen' 'fdo' for which commands a fold will be opened
|
||||
'foldtext' 'fdt' expression used to display for a closed fold
|
||||
'formatexpr' 'fex' expression used with "gq" command
|
||||
'formatlistpat' 'flp' pattern used to recognize a list header
|
||||
'formatoptions' 'fo' how automatic formatting is to be done
|
||||
'formatprg' 'fp' name of external program used with "gq" command
|
||||
'formatexpr' 'fex' expression used with "gq" command
|
||||
'fsync' 'fs' whether to invoke fsync() after file write
|
||||
'gdefault' 'gd' the ":substitute" flag 'g' is default on
|
||||
'grepformat' 'gfm' format of 'grepprg' output
|
||||
@@ -732,15 +734,15 @@ Short explanation of each option: *option-list*
|
||||
'helplang' 'hlg' preferred help languages
|
||||
'hidden' 'hid' don't unload buffer when it is |abandon|ed
|
||||
'highlight' 'hl' sets highlighting mode for various occasions
|
||||
'hlsearch' 'hls' highlight matches with last search pattern
|
||||
'history' 'hi' number of command-lines that are remembered
|
||||
'hkmap' 'hk' Hebrew keyboard mapping
|
||||
'hkmapp' 'hkp' phonetic Hebrew keyboard mapping
|
||||
'hlsearch' 'hls' highlight matches with last search pattern
|
||||
'icon' let Vim set the text of the window icon
|
||||
'iconstring' string to use for the Vim icon text
|
||||
'ignorecase' 'ic' ignore case in search patterns
|
||||
'imactivatekey' 'imak' key that activates the X input method
|
||||
'imactivatefunc' 'imaf' function to enable/disable the X input method
|
||||
'imactivatekey' 'imak' key that activates the X input method
|
||||
'imcmdline' 'imc' use IM when starting to edit a command line
|
||||
'imdisable' 'imd' do not use the IM in any mode
|
||||
'iminsert' 'imi' use :lmap or IM in Insert mode
|
||||
@@ -764,6 +766,7 @@ Short explanation of each option: *option-list*
|
||||
'keywordprg' 'kp' program to use for the "K" command
|
||||
'langmap' 'lmap' alphabetic characters for other language mode
|
||||
'langmenu' 'lm' language to be used for the menus
|
||||
'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
|
||||
'laststatus' 'ls' tells when last window has status lines
|
||||
'lazyredraw' 'lz' don't redraw while executing macros
|
||||
'linebreak' 'lbr' wrap long lines at a blank
|
||||
@@ -892,9 +895,9 @@ Short explanation of each option: *option-list*
|
||||
'switchbuf' 'swb' sets behavior when switching to another buffer
|
||||
'synmaxcol' 'smc' maximum column to find syntax items
|
||||
'syntax' 'syn' syntax to be loaded for current buffer
|
||||
'tabstop' 'ts' number of spaces that <Tab> in file uses
|
||||
'tabline' 'tal' custom format for the console tab pages line
|
||||
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
|
||||
'tabstop' 'ts' number of spaces that <Tab> in file uses
|
||||
'tagbsearch' 'tbs' use binary searching in tags files
|
||||
'taglength' 'tl' number of significant characters for a tag
|
||||
'tagrelative' 'tr' file names in tag file are relative
|
||||
@@ -1313,11 +1316,16 @@ Context-sensitive completion on the command-line:
|
||||
|CTRL-W_R| CTRL-W R rotate windows upwards
|
||||
|CTRL-W_x| CTRL-W x exchange current window with next one
|
||||
|
||||
|CTRL-W_=| CTRL-W = make all windows equal height
|
||||
|CTRL-W_=| CTRL-W = make all windows equal height & width
|
||||
|CTRL-W_-| CTRL-W - decrease current window height
|
||||
|CTRL-W_+| CTRL-W + increase current window height
|
||||
|CTRL-W__| CTRL-W _ set current window height (default:
|
||||
very high)
|
||||
|
||||
|CTRL-W_<| CTRL-W < decrease current window width
|
||||
|CTRL-W_>| CTRL-W > increase current window width
|
||||
|CTRL-W_bar| CTRL-W | set current window width (default:
|
||||
widest possible)
|
||||
------------------------------------------------------------------------------
|
||||
*Q_bu* Buffer list commands
|
||||
|
||||
|
||||
@@ -178,14 +178,14 @@ Hurrah for VIM!! It is "at your fingertips" like vi, and has the extensions
|
||||
that vi sorely needs: highlighting for executing commands on blocks, an easily
|
||||
navigable and digestible help screen, and more. (Paul Pax)
|
||||
|
||||
The reason WHY I don't have this amazingly useful macro any more, is that I
|
||||
The reason WHY I don't have this amazingly useful macro anymore, is that I
|
||||
now use VIM - and this is built in!! (Stephen Riehm, Germany)
|
||||
|
||||
I am a user of VIM and I love it. I use it to do all my programming, C,
|
||||
C++, HTML what ever. (Tim Allwine)
|
||||
|
||||
I discovered VIM after years of struggling with the original vi, and I just
|
||||
can't live without it any more. (Emmanuel Mogenet, USA)
|
||||
can't live without it anymore. (Emmanuel Mogenet, USA)
|
||||
|
||||
Emacs has not a bit of chance to survive so long as VIM is around. Besides,
|
||||
it also has the most detailed software documentation I have ever seen---much
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*remote.txt* For Vim version 7.4. Last change: 2008 May 24
|
||||
*remote.txt* For Vim version 7.4. Last change: 2015 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,7 +36,8 @@ The following command line arguments are available:
|
||||
The remote Vim is raised. If you don't want
|
||||
this use >
|
||||
vim --remote-send "<C-\><C-N>:n filename<CR>"
|
||||
< --remote-silent [+{cmd}] {file} ... *--remote-silent*
|
||||
<
|
||||
--remote-silent [+{cmd}] {file} ... *--remote-silent*
|
||||
As above, but don't complain if there is no
|
||||
server and the file is edited locally.
|
||||
--remote-wait [+{cmd}] {file} ... *--remote-wait*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2014 Mar 25
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2015 Apr 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -64,6 +64,9 @@ replacement string.
|
||||
|
||||
For the definition of a pattern, see |pattern|.
|
||||
|
||||
NOTE [cmd] may contain a range; see |collapse| and |edit-paragraph-join| for
|
||||
examples.
|
||||
|
||||
The global commands work by first scanning through the [range] lines and
|
||||
marking each line where a match occurs (for a multi-line pattern, only the
|
||||
start of the match matters).
|
||||
@@ -232,8 +235,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
command is ignored.
|
||||
{not in Vi}
|
||||
|
||||
*:scrip* *:scriptnames*
|
||||
:scrip[tnames] List all sourced script names, in the order they were
|
||||
*:scr* *:scriptnames*
|
||||
:scr[iptnames] List all sourced script names, in the order they were
|
||||
first sourced. The number is used for the script ID
|
||||
|<SID>|.
|
||||
{not in Vi} {not available when compiled without the
|
||||
@@ -597,6 +600,7 @@ For example, to profile the one_script.vim script file: >
|
||||
|
||||
:prof[ile] start {fname} *:prof* *:profile* *E750*
|
||||
Start profiling, write the output in {fname} upon exit.
|
||||
"~/" and environment variables in {fname} will be expanded.
|
||||
If {fname} already exists it will be silently overwritten.
|
||||
The variable |v:profiling| is set to one.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 27
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,7 +211,8 @@ thing. These are then linked to a highlight group that specifies the color.
|
||||
A syntax group name doesn't specify any color or attributes itself.
|
||||
|
||||
The name for a highlight or syntax group must consist of ASCII letters, digits
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*"
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
|
||||
an error when using other characters.
|
||||
|
||||
To be able to allow each user to pick his favorite set of colors, there must
|
||||
be preferred names for highlight groups that are common for many languages.
|
||||
@@ -421,18 +422,19 @@ and last line to be converted. Example, using the last set Visual area: >
|
||||
*:TOhtml*
|
||||
:[range]TOhtml The ":TOhtml" command is defined in a standard plugin.
|
||||
This command will source |2html.vim| for you. When a
|
||||
range is given, set |g:html_start_line| and
|
||||
|g:html_end_line| to the start and end of the range,
|
||||
respectively. Default range is the entire buffer.
|
||||
range is given, this command sets |g:html_start_line|
|
||||
and |g:html_end_line| to the start and end of the
|
||||
range, respectively. Default range is the entire
|
||||
buffer.
|
||||
|
||||
If the current window is part of a |diff|, unless
|
||||
|g:html_diff_one_file| is set, :TOhtml will convert
|
||||
all windows which are part of the diff in the current
|
||||
tab and place them side-by-side in a <table> element
|
||||
in the generated HTML. With |g:html_line_ids| you can
|
||||
jump to lines in specific windows with (for example)
|
||||
#W1L42 for line 42 in the first diffed window, or
|
||||
#W3L87 for line 87 in the third.
|
||||
If the current window is part of a |diff|, unless
|
||||
|g:html_diff_one_file| is set, :TOhtml will convert
|
||||
all windows which are part of the diff in the current
|
||||
tab and place them side-by-side in a <table> element
|
||||
in the generated HTML. With |g:html_line_ids| you can
|
||||
jump to lines in specific windows with (for example)
|
||||
#W1L42 for line 42 in the first diffed window, or
|
||||
#W3L87 for line 87 in the third.
|
||||
|
||||
Examples: >
|
||||
|
||||
@@ -746,6 +748,22 @@ and UTF-32 instead, use: >
|
||||
Note that documents encoded in either UTF-32 or UTF-16 have known
|
||||
compatibility problems with some major browsers.
|
||||
|
||||
*g:html_font*
|
||||
Default: "monospace"
|
||||
You can specify the font or fonts used in the converted document using
|
||||
g:html_font. If this option is set to a string, then the value will be
|
||||
surrounded with single quotes. If this option is set to a list then each list
|
||||
item is surrounded by single quotes and the list is joined with commas. Either
|
||||
way, "monospace" is added as the fallback generic family name and the entire
|
||||
result used as the font family (using CSS) or font face (if not using CSS).
|
||||
Examples: >
|
||||
|
||||
" font-family: 'Consolas', monospace;
|
||||
:let g:html_font = "Consolas"
|
||||
|
||||
" font-family: 'DejaVu Sans Mono', 'Consolas', monospace;
|
||||
:let g:html_font = ["DejaVu Sans Mono", "Consolas"]
|
||||
<
|
||||
*convert-to-XML* *convert-to-XHTML* *g:html_use_xhtml*
|
||||
Default: 0.
|
||||
When 0, generate standard HTML 4.01 (strict when possible).
|
||||
@@ -1063,7 +1081,7 @@ CPP *cpp.vim* *ft-cpp-syntax*
|
||||
Most of things are same as |ft-c-syntax|.
|
||||
|
||||
Variable Highlight ~
|
||||
cpp_no_c11 don't highlight C++11 standard items
|
||||
cpp_no_cpp11 don't highlight C++11 standard items
|
||||
|
||||
|
||||
CSH *csh.vim* *ft-csh-syntax*
|
||||
@@ -1128,6 +1146,16 @@ to standard by placing this in your vimrc file: >
|
||||
:let enforce_freedesktop_standard = 1
|
||||
|
||||
|
||||
DIFF *diff.vim*
|
||||
|
||||
The diff highlighting normally finds translated headers. This can be slow if
|
||||
there are very long lines in the file. To disable translations: >
|
||||
|
||||
:let diff_translations = 0
|
||||
|
||||
Also see |diff-slow|.
|
||||
|
||||
|
||||
DIRCOLORS *dircolors.vim* *ft-dircolors-syntax*
|
||||
|
||||
The dircolors utility highlighting definition has one option. It exists to
|
||||
@@ -3220,7 +3248,8 @@ improve screen updating rates (see |:syn-sync| for more on this). >
|
||||
The g:vimsyn_embed option allows users to select what, if any, types of
|
||||
embedded script highlighting they wish to have. >
|
||||
|
||||
g:vimsyn_embed == 0 : don't embed any scripts
|
||||
g:vimsyn_embed == 0 : don't support any embedded scripts
|
||||
g:vimsyn_embed =~ 'l' : support embedded lua
|
||||
g:vimsyn_embed =~ 'm' : support embedded mzscheme
|
||||
g:vimsyn_embed =~ 'p' : support embedded perl
|
||||
g:vimsyn_embed =~ 'P' : support embedded python
|
||||
@@ -3238,6 +3267,7 @@ Some folding is now supported with syntax/vim.vim: >
|
||||
g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding
|
||||
g:vimsyn_folding =~ 'a' : augroups
|
||||
g:vimsyn_folding =~ 'f' : fold functions
|
||||
g:vimsyn_folding =~ 'l' : fold lua script
|
||||
g:vimsyn_folding =~ 'm' : fold mzscheme script
|
||||
g:vimsyn_folding =~ 'p' : fold perl script
|
||||
g:vimsyn_folding =~ 'P' : fold python script
|
||||
@@ -3311,6 +3341,32 @@ must not click outside of the pixel strings, but feel free to improve it.
|
||||
It will look much better with a font in a quadratic cell size, e.g. for X: >
|
||||
:set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*
|
||||
|
||||
|
||||
YAML *yaml.vim* *ft-yaml-syntax*
|
||||
|
||||
*g:yaml_schema* *b:yaml_schema*
|
||||
A YAML schema is a combination of a set of tags and a mechanism for resolving
|
||||
non-specific tags. For user this means that YAML parser may, depending on
|
||||
plain scalar contents, treat plain scalar (which can actually be only string
|
||||
and nothing else) as a value of the other type: null, boolean, floating-point,
|
||||
integer. `g:yaml_schema` option determines according to which schema values
|
||||
will be highlighted specially. Supported schemas are
|
||||
|
||||
Schema Description ~
|
||||
failsafe No additional highlighting.
|
||||
json Supports JSON-style numbers, booleans and null.
|
||||
core Supports more number, boolean and null styles.
|
||||
pyyaml In addition to core schema supports highlighting timestamps,
|
||||
but there are some differences in what is recognized as
|
||||
numbers and many additional boolean values not present in core
|
||||
schema.
|
||||
|
||||
Default schema is `core`.
|
||||
|
||||
Note that schemas are not actually limited to plain scalars, but this is the
|
||||
only difference between schemas defined in YAML specification and the only
|
||||
difference defined in the syntax file.
|
||||
|
||||
==============================================================================
|
||||
5. Defining a syntax *:syn-define* *E410*
|
||||
|
||||
@@ -3408,7 +3464,7 @@ DEFINING KEYWORDS *:syn-keyword*
|
||||
:syntax keyword Type contained int long char
|
||||
:syntax keyword Type int long contained char
|
||||
:syntax keyword Type int long char contained
|
||||
< *E789*
|
||||
< *E789* *E890*
|
||||
When you have a keyword with an optional tail, like Ex commands in
|
||||
Vim, you can put the optional characters inside [], to define all the
|
||||
variations at once: >
|
||||
@@ -3662,6 +3718,7 @@ Whether or not it is actually concealed depends on the value of the
|
||||
'conceallevel' option. The 'concealcursor' option is used to decide whether
|
||||
concealable items in the current line are displayed unconcealed to be able to
|
||||
edit the line.
|
||||
Another way to conceal text with with |matchadd()|.
|
||||
|
||||
concealends *:syn-concealends*
|
||||
|
||||
@@ -4243,7 +4300,7 @@ If the "maxlines={N}" argument is given, the number of lines that are searched
|
||||
for a comment or syncing pattern is restricted to N lines backwards (after
|
||||
adding "minlines"). This is useful if you have few things to sync on and a
|
||||
slow machine. Example: >
|
||||
:syntax sync ccomment maxlines=500
|
||||
:syntax sync maxlines=500 ccomment
|
||||
<
|
||||
*:syn-sync-linebreaks*
|
||||
When using a pattern that matches multiple lines, a change in one line may
|
||||
@@ -4637,6 +4694,8 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
Note that for some color terminals these names may result in the wrong
|
||||
colors!
|
||||
|
||||
You can also use "NONE" to remove the color.
|
||||
|
||||
*:hi-normal-cterm*
|
||||
When setting the "ctermfg" or "ctermbg" colors for the Normal group,
|
||||
these will become the colors used for the non-highlighted text.
|
||||
@@ -5065,6 +5124,7 @@ This will set the "w:current_syntax" variable to "foo". The value of
|
||||
restoring "b:current_syntax", since the syntax files do set
|
||||
"b:current_syntax". The value set by the syntax file is assigned to
|
||||
"w:current_syntax".
|
||||
Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options.
|
||||
|
||||
Once a window has its own syntax, syntax commands executed from other windows
|
||||
on the same buffer (including :syntax clear) have no effect. Conversely,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 7.4. Last change: 2012 Aug 08
|
||||
*tabpage.txt* For Vim version 7.4. Last change: 2015 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -61,16 +61,25 @@ In the GUI tab pages line you can use the right mouse button to open menu.
|
||||
:[count]tabe[dit] *:tabe* *:tabedit* *:tabnew*
|
||||
:[count]tabnew
|
||||
Open a new tab page with an empty window, after the current
|
||||
tab page. For [count] see |:tab| below.
|
||||
tab page. If [count] is given the new tab page appears after
|
||||
the tab page [count] otherwise the new tab page will appear
|
||||
after the current one. >
|
||||
:tabnew " opens tabpage after the current one
|
||||
:.tabnew " as above
|
||||
:+tabnew " opens tabpage after the next tab page
|
||||
" note: it is one further than :tabnew
|
||||
:-tabnew " opens tabpage before the current one
|
||||
:0tabnew " opens tabpage before the first one
|
||||
:$tabnew " opens tabpage after the last one
|
||||
|
||||
:[count]tabe[dit] [++opt] [+cmd] {file}
|
||||
:[count]tabnew [++opt] [+cmd] {file}
|
||||
Open a new tab page and edit {file}, like with |:edit|.
|
||||
For [count] see |:tab| below.
|
||||
For [count] see |:tabnew| above.
|
||||
|
||||
:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
|
||||
Open a new tab page and edit {file} in 'path', like with
|
||||
|:find|. For [count] see |:tab| below.
|
||||
|:find|. For [count] see |:tabnew| above.
|
||||
{not available when the |+file_in_path| feature was disabled
|
||||
at compile time}
|
||||
|
||||
@@ -110,12 +119,18 @@ something else.
|
||||
- When 'hidden' is not set, [!] is not used, a buffer has
|
||||
changes, and there is no other window on this buffer.
|
||||
Changes to the buffer are not written and won't get lost, so
|
||||
this is a "safe" command.
|
||||
this is a "safe" command. >
|
||||
:tabclose " close the current tab page
|
||||
|
||||
:{count}tabc[lose][!]
|
||||
:tabc[lose][!] {count}
|
||||
Close tab page {count}. Fails in the same way as `:tabclose`
|
||||
above.
|
||||
|
||||
above. >
|
||||
:-tabclose " close the previous tab page
|
||||
:+tabclose " close the next tab page
|
||||
:1tabclose " close the first tab page
|
||||
:$tabclose " close the last tab page
|
||||
<
|
||||
*:tabo* *:tabonly*
|
||||
:tabo[nly][!] Close all other tab pages.
|
||||
When the 'hidden' option is set, all buffers in closed windows
|
||||
@@ -124,7 +139,17 @@ something else.
|
||||
modified buffers are written. Otherwise, windows that have
|
||||
buffers that are modified are not removed, unless the [!] is
|
||||
given, then they become hidden. But modified buffers are
|
||||
never abandoned, so changes cannot get lost.
|
||||
never abandoned, so changes cannot get lost. >
|
||||
:tabonly " close all tab pages except the current
|
||||
|
||||
:{count}tabo[nly][!]
|
||||
Close all tab pages except the {count}th one. >
|
||||
:.tabonly " one
|
||||
:-tabonly " close all tab pages except the previous
|
||||
" one
|
||||
:+tabonly " close all tab pages except the next one
|
||||
:1tabonly " close all tab pages except the first one
|
||||
:$tabonly " close all tab pages except the last one
|
||||
|
||||
|
||||
SWITCHING TO ANOTHER TAB PAGE:
|
||||
@@ -176,23 +201,39 @@ REORDERING TAB PAGES:
|
||||
:[N]tabm[ove]
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. Without N the tab
|
||||
page is made the last one.
|
||||
page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
:+tabmove " move the tab page to the right
|
||||
:0tabmove " move the tab page to the beginning of the tab
|
||||
" list
|
||||
:tabmove 0 " as above
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
|
||||
:tabm[ove] +[N]
|
||||
:tabm[ove] -[N]
|
||||
Move the current tab page N places to the right (with +) or to
|
||||
the left (with -).
|
||||
the left (with -). >
|
||||
:tabmove - " move the tab page to the left
|
||||
:tabmove -1 " as above
|
||||
:tabmove + " move the tab page to the right
|
||||
:tabmove +1 " as above
|
||||
|
||||
|
||||
Note that although it is possible to move a tab behind the N-th one by using
|
||||
:Ntabmove, it is impossible to move it by N places by using :+Ntabmove. For
|
||||
clarification what +N means in this context see |[range]|.
|
||||
:Ntabmove. And move it by N places by using :+Ntabmove. For clarification what
|
||||
+N means in this context see |[range]|.
|
||||
|
||||
|
||||
LOOPING OVER TAB PAGES:
|
||||
|
||||
*:tabd* *:tabdo*
|
||||
:tabd[o] {cmd} Execute {cmd} in each tab page.
|
||||
It works like doing this: >
|
||||
:[range]tabd[o] {cmd}
|
||||
Execute {cmd} in each tab page or if [range] is given only in
|
||||
tab pages which tab page number is in the [range]. It works
|
||||
like doing this: >
|
||||
:tabfirst
|
||||
:{cmd}
|
||||
:tabnext
|
||||
@@ -207,7 +248,8 @@ LOOPING OVER TAB PAGES:
|
||||
{cmd} must not open or close tab pages or reorder them.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:windo|, |:argdo| and |:bufdo|.
|
||||
Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
|
||||
and |:lfdo|
|
||||
|
||||
==============================================================================
|
||||
3. Other items *tab-page-other*
|
||||
@@ -238,8 +280,8 @@ window on the same buffer and then edit another buffer. Thus ":tabnew"
|
||||
triggers:
|
||||
WinLeave leave current window
|
||||
TabLeave leave current tab page
|
||||
TabEnter enter new tab page
|
||||
WinEnter enter window in new tab page
|
||||
TabEnter enter new tab page
|
||||
BufLeave leave current buffer
|
||||
BufEnter enter new empty buffer
|
||||
|
||||
|
||||
139
runtime/doc/tags
139
runtime/doc/tags
@@ -76,6 +76,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'bdir' options.txt /*'bdir'*
|
||||
'bdlay' options.txt /*'bdlay'*
|
||||
'beautify' vi_diff.txt /*'beautify'*
|
||||
'belloff' options.txt /*'belloff'*
|
||||
'beval' options.txt /*'beval'*
|
||||
'bex' options.txt /*'bex'*
|
||||
'bexpr' options.txt /*'bexpr'*
|
||||
@@ -89,6 +90,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'bk' options.txt /*'bk'*
|
||||
'bkc' options.txt /*'bkc'*
|
||||
'bl' options.txt /*'bl'*
|
||||
'bo' options.txt /*'bo'*
|
||||
'bomb' options.txt /*'bomb'*
|
||||
'breakat' options.txt /*'breakat'*
|
||||
'breakindent' options.txt /*'breakindent'*
|
||||
@@ -246,6 +248,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'fileignorecase' options.txt /*'fileignorecase'*
|
||||
'filetype' options.txt /*'filetype'*
|
||||
'fillchars' options.txt /*'fillchars'*
|
||||
'fixendofline' options.txt /*'fixendofline'*
|
||||
'fixeol' options.txt /*'fixeol'*
|
||||
'fk' options.txt /*'fk'*
|
||||
'fkmap' options.txt /*'fkmap'*
|
||||
'fl' vi_diff.txt /*'fl'*
|
||||
@@ -392,6 +396,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'kp' options.txt /*'kp'*
|
||||
'langmap' options.txt /*'langmap'*
|
||||
'langmenu' options.txt /*'langmenu'*
|
||||
'langnoremap' options.txt /*'langnoremap'*
|
||||
'laststatus' options.txt /*'laststatus'*
|
||||
'lazyredraw' options.txt /*'lazyredraw'*
|
||||
'lbr' options.txt /*'lbr'*
|
||||
@@ -405,6 +410,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'listchars' options.txt /*'listchars'*
|
||||
'lm' options.txt /*'lm'*
|
||||
'lmap' options.txt /*'lmap'*
|
||||
'lnr' options.txt /*'lnr'*
|
||||
'loadplugins' options.txt /*'loadplugins'*
|
||||
'lpl' options.txt /*'lpl'*
|
||||
'ls' options.txt /*'ls'*
|
||||
@@ -538,6 +544,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'nofen' options.txt /*'nofen'*
|
||||
'nofic' options.txt /*'nofic'*
|
||||
'nofileignorecase' options.txt /*'nofileignorecase'*
|
||||
'nofixendofline' options.txt /*'nofixendofline'*
|
||||
'nofixeol' options.txt /*'nofixeol'*
|
||||
'nofk' options.txt /*'nofk'*
|
||||
'nofkmap' options.txt /*'nofkmap'*
|
||||
'nofoldenable' options.txt /*'nofoldenable'*
|
||||
@@ -927,9 +935,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
't_KJ' term.txt /*'t_KJ'*
|
||||
't_KK' term.txt /*'t_KK'*
|
||||
't_KL' term.txt /*'t_KL'*
|
||||
't_RB' term.txt /*'t_RB'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
't_SI' term.txt /*'t_SI'*
|
||||
't_SR' term.txt /*'t_SR'*
|
||||
't_Sb' term.txt /*'t_Sb'*
|
||||
't_Sf' term.txt /*'t_Sf'*
|
||||
't_WP' term.txt /*'t_WP'*
|
||||
@@ -993,6 +1003,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
't_ve' term.txt /*'t_ve'*
|
||||
't_vi' term.txt /*'t_vi'*
|
||||
't_vs' term.txt /*'t_vs'*
|
||||
't_xn' term.txt /*'t_xn'*
|
||||
't_xs' term.txt /*'t_xs'*
|
||||
'ta' options.txt /*'ta'*
|
||||
'tabline' options.txt /*'tabline'*
|
||||
@@ -1396,6 +1407,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
.dic spell.txt /*.dic*
|
||||
.exrc starting.txt /*.exrc*
|
||||
.gvimrc gui.txt /*.gvimrc*
|
||||
.netrwbook pi_netrw.txt /*.netrwbook*
|
||||
.netrwhist pi_netrw.txt /*.netrwhist*
|
||||
.vimrc starting.txt /*.vimrc*
|
||||
/ pattern.txt /*\/*
|
||||
/$ pattern.txt /*\/$*
|
||||
@@ -1831,6 +1844,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:CompilerSet usr_41.txt /*:CompilerSet*
|
||||
:DiffOrig diff.txt /*:DiffOrig*
|
||||
:DoMatchParen pi_paren.txt /*:DoMatchParen*
|
||||
:ELP pi_logipat.txt /*:ELP*
|
||||
:Explore pi_netrw.txt /*:Explore*
|
||||
:GLVS pi_getscript.txt /*:GLVS*
|
||||
:GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat*
|
||||
@@ -1838,7 +1852,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:GnatPretty ft_ada.txt /*:GnatPretty*
|
||||
:GnatTags ft_ada.txt /*:GnatTags*
|
||||
:Hexplore pi_netrw.txt /*:Hexplore*
|
||||
:LP pi_logipat.txt /*:LP*
|
||||
:LPF pi_logipat.txt /*:LPF*
|
||||
:Lexplore pi_netrw.txt /*:Lexplore*
|
||||
:LogiPat pi_logipat.txt /*:LogiPat*
|
||||
:Man filetype.txt /*:Man*
|
||||
:MkVimball pi_vimball.txt /*:MkVimball*
|
||||
:N editing.txt /*:N*
|
||||
@@ -1998,11 +2015,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:cclose quickfix.txt /*:cclose*
|
||||
:cd editing.txt /*:cd*
|
||||
:cd- editing.txt /*:cd-*
|
||||
:cdo quickfix.txt /*:cdo*
|
||||
:ce change.txt /*:ce*
|
||||
:center change.txt /*:center*
|
||||
:cex quickfix.txt /*:cex*
|
||||
:cexpr quickfix.txt /*:cexpr*
|
||||
:cf quickfix.txt /*:cf*
|
||||
:cfdo quickfix.txt /*:cfdo*
|
||||
:cfile quickfix.txt /*:cfile*
|
||||
:cfir quickfix.txt /*:cfir*
|
||||
:cfirst quickfix.txt /*:cfirst*
|
||||
@@ -2055,6 +2074,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:comc map.txt /*:comc*
|
||||
:comclear map.txt /*:comclear*
|
||||
:command map.txt /*:command*
|
||||
:command-addr map.txt /*:command-addr*
|
||||
:command-bang map.txt /*:command-bang*
|
||||
:command-bar map.txt /*:command-bar*
|
||||
:command-buffer map.txt /*:command-buffer*
|
||||
@@ -2348,6 +2368,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:lclose quickfix.txt /*:lclose*
|
||||
:lcs if_cscop.txt /*:lcs*
|
||||
:lcscope if_cscop.txt /*:lcscope*
|
||||
:ldo quickfix.txt /*:ldo*
|
||||
:le change.txt /*:le*
|
||||
:left change.txt /*:left*
|
||||
:lefta windows.txt /*:lefta*
|
||||
@@ -2366,6 +2387,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:lex quickfix.txt /*:lex*
|
||||
:lexpr quickfix.txt /*:lexpr*
|
||||
:lf quickfix.txt /*:lf*
|
||||
:lfdo quickfix.txt /*:lfdo*
|
||||
:lfile quickfix.txt /*:lfile*
|
||||
:lfir quickfix.txt /*:lfir*
|
||||
:lfirst quickfix.txt /*:lfirst*
|
||||
@@ -2692,6 +2714,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:rviminfo starting.txt /*:rviminfo*
|
||||
:s change.txt /*:s*
|
||||
:s% change.txt /*:s%*
|
||||
:sI change.txt /*:sI*
|
||||
:sIc change.txt /*:sIc*
|
||||
:sIe change.txt /*:sIe*
|
||||
:sIg change.txt /*:sIg*
|
||||
:sIl change.txt /*:sIl*
|
||||
:sIn change.txt /*:sIn*
|
||||
:sIp change.txt /*:sIp*
|
||||
:sIr change.txt /*:sIr*
|
||||
:sN windows.txt /*:sN*
|
||||
:sNext windows.txt /*:sNext*
|
||||
:s\= change.txt /*:s\\=*
|
||||
@@ -2723,7 +2753,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:sbr windows.txt /*:sbr*
|
||||
:sbrewind windows.txt /*:sbrewind*
|
||||
:sbuffer windows.txt /*:sbuffer*
|
||||
:scrip repeat.txt /*:scrip*
|
||||
:sc change.txt /*:sc*
|
||||
:scI change.txt /*:scI*
|
||||
:sce change.txt /*:sce*
|
||||
:scg change.txt /*:scg*
|
||||
:sci change.txt /*:sci*
|
||||
:scl change.txt /*:scl*
|
||||
:scp change.txt /*:scp*
|
||||
:scr repeat.txt /*:scr*
|
||||
:scripte repeat.txt /*:scripte*
|
||||
:scriptencoding repeat.txt /*:scriptencoding*
|
||||
:scriptnames repeat.txt /*:scriptnames*
|
||||
@@ -2756,9 +2793,20 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:sfind windows.txt /*:sfind*
|
||||
:sfir windows.txt /*:sfir*
|
||||
:sfirst windows.txt /*:sfirst*
|
||||
:sg change.txt /*:sg*
|
||||
:sgI change.txt /*:sgI*
|
||||
:sgc change.txt /*:sgc*
|
||||
:sge change.txt /*:sge*
|
||||
:sgi change.txt /*:sgi*
|
||||
:sgl change.txt /*:sgl*
|
||||
:sgn change.txt /*:sgn*
|
||||
:sgp change.txt /*:sgp*
|
||||
:sgr change.txt /*:sgr*
|
||||
:sh various.txt /*:sh*
|
||||
:shell various.txt /*:shell*
|
||||
:si gui_w32.txt /*:si*
|
||||
:si change.txt /*:si*
|
||||
:sic change.txt /*:sic*
|
||||
:sie change.txt /*:sie*
|
||||
:sig sign.txt /*:sig*
|
||||
:sign sign.txt /*:sign*
|
||||
:sign-define sign.txt /*:sign-define*
|
||||
@@ -2771,7 +2819,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:sign-unplace sign.txt /*:sign-unplace*
|
||||
:sil various.txt /*:sil*
|
||||
:silent various.txt /*:silent*
|
||||
:sim gui_w32.txt /*:sim*
|
||||
:simalt gui_w32.txt /*:simalt*
|
||||
:sin change.txt /*:sin*
|
||||
:sip change.txt /*:sip*
|
||||
:sir change.txt /*:sir*
|
||||
:sl various.txt /*:sl*
|
||||
:sla windows.txt /*:sla*
|
||||
:slast windows.txt /*:slast*
|
||||
@@ -2816,8 +2868,16 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:split_f windows.txt /*:split_f*
|
||||
:spr windows.txt /*:spr*
|
||||
:sprevious windows.txt /*:sprevious*
|
||||
:sr change.txt /*:sr*
|
||||
:srI change.txt /*:srI*
|
||||
:src change.txt /*:src*
|
||||
:sre windows.txt /*:sre*
|
||||
:srewind windows.txt /*:srewind*
|
||||
:srg change.txt /*:srg*
|
||||
:sri change.txt /*:sri*
|
||||
:srl change.txt /*:srl*
|
||||
:srn change.txt /*:srn*
|
||||
:srp change.txt /*:srp*
|
||||
:st starting.txt /*:st*
|
||||
:sta windows.txt /*:sta*
|
||||
:stag windows.txt /*:stag*
|
||||
@@ -4333,7 +4393,9 @@ E885 sign.txt /*E885*
|
||||
E886 starting.txt /*E886*
|
||||
E887 if_pyth.txt /*E887*
|
||||
E888 pattern.txt /*E888*
|
||||
E889 map.txt /*E889*
|
||||
E89 message.txt /*E89*
|
||||
E890 syntax.txt /*E890*
|
||||
E90 message.txt /*E90*
|
||||
E91 options.txt /*E91*
|
||||
E92 message.txt /*E92*
|
||||
@@ -4413,6 +4475,8 @@ L motion.txt /*L*
|
||||
Linux-backspace options.txt /*Linux-backspace*
|
||||
List eval.txt /*List*
|
||||
Lists eval.txt /*Lists*
|
||||
LogiPat() pi_logipat.txt /*LogiPat()*
|
||||
LogiPat-flags pi_logipat.txt /*LogiPat-flags*
|
||||
Lua if_lua.txt /*Lua*
|
||||
M motion.txt /*M*
|
||||
MDI starting.txt /*MDI*
|
||||
@@ -4459,6 +4523,7 @@ OffTheSpot mbyte.txt /*OffTheSpot*
|
||||
OnTheSpot mbyte.txt /*OnTheSpot*
|
||||
Operator-pending intro.txt /*Operator-pending*
|
||||
Operator-pending-mode intro.txt /*Operator-pending-mode*
|
||||
OptionSet autocmd.txt /*OptionSet*
|
||||
OverTheSpot mbyte.txt /*OverTheSpot*
|
||||
P change.txt /*P*
|
||||
PATHEXT eval.txt /*PATHEXT*
|
||||
@@ -4548,6 +4613,7 @@ SourcePre autocmd.txt /*SourcePre*
|
||||
SpellFileMissing autocmd.txt /*SpellFileMissing*
|
||||
StdinReadPost autocmd.txt /*StdinReadPost*
|
||||
StdinReadPre autocmd.txt /*StdinReadPre*
|
||||
String eval.txt /*String*
|
||||
SwapExists autocmd.txt /*SwapExists*
|
||||
Syntax autocmd.txt /*Syntax*
|
||||
T motion.txt /*T*
|
||||
@@ -4867,6 +4933,7 @@ b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
|
||||
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
|
||||
b:tex_stylish syntax.txt /*b:tex_stylish*
|
||||
b:var eval.txt /*b:var*
|
||||
b:yaml_schema syntax.txt /*b:yaml_schema*
|
||||
baan-folding syntax.txt /*baan-folding*
|
||||
baan-syntax syntax.txt /*baan-syntax*
|
||||
baan.vim syntax.txt /*baan.vim*
|
||||
@@ -5193,6 +5260,7 @@ complete_CTRL-E insert.txt /*complete_CTRL-E*
|
||||
complete_CTRL-Y insert.txt /*complete_CTRL-Y*
|
||||
complete_add() eval.txt /*complete_add()*
|
||||
complete_check() eval.txt /*complete_check()*
|
||||
completed_item-variable eval.txt /*completed_item-variable*
|
||||
completion-functions usr_41.txt /*completion-functions*
|
||||
complex-change change.txt /*complex-change*
|
||||
complex-repeat repeat.txt /*complex-repeat*
|
||||
@@ -5410,9 +5478,12 @@ diff-mode diff.txt /*diff-mode*
|
||||
diff-options diff.txt /*diff-options*
|
||||
diff-original-file diff.txt /*diff-original-file*
|
||||
diff-patchexpr diff.txt /*diff-patchexpr*
|
||||
diff-slow diff.txt /*diff-slow*
|
||||
diff.txt diff.txt /*diff.txt*
|
||||
diff.vim syntax.txt /*diff.vim*
|
||||
diff_filler() eval.txt /*diff_filler()*
|
||||
diff_hlID() eval.txt /*diff_hlID()*
|
||||
diff_translations diff.txt /*diff_translations*
|
||||
digraph digraph.txt /*digraph*
|
||||
digraph-arg change.txt /*digraph-arg*
|
||||
digraph-encoding digraph.txt /*digraph-encoding*
|
||||
@@ -5473,6 +5544,7 @@ edit-dialogs editing.txt /*edit-dialogs*
|
||||
edit-files editing.txt /*edit-files*
|
||||
edit-intro editing.txt /*edit-intro*
|
||||
edit-no-break usr_25.txt /*edit-no-break*
|
||||
edit-paragraph-join usr_25.txt /*edit-paragraph-join*
|
||||
editing.txt editing.txt /*editing.txt*
|
||||
efm-%> quickfix.txt /*efm-%>*
|
||||
efm-entries quickfix.txt /*efm-entries*
|
||||
@@ -5626,6 +5698,7 @@ extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
faq intro.txt /*faq*
|
||||
farsi farsi.txt /*farsi*
|
||||
farsi-fonts farsi.txt /*farsi-fonts*
|
||||
farsi.txt farsi.txt /*farsi.txt*
|
||||
fasm.vim syntax.txt /*fasm.vim*
|
||||
fcs_choice-variable eval.txt /*fcs_choice-variable*
|
||||
@@ -5872,6 +5945,7 @@ ft-xhtml-omni insert.txt /*ft-xhtml-omni*
|
||||
ft-xml-omni insert.txt /*ft-xml-omni*
|
||||
ft-xml-syntax syntax.txt /*ft-xml-syntax*
|
||||
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
|
||||
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
|
||||
ft_ada.txt ft_ada.txt /*ft_ada.txt*
|
||||
ft_sql.txt ft_sql.txt /*ft_sql.txt*
|
||||
ftdetect filetype.txt /*ftdetect*
|
||||
@@ -5906,6 +5980,7 @@ g0 motion.txt /*g0*
|
||||
g8 various.txt /*g8*
|
||||
g: eval.txt /*g:*
|
||||
g:NetrwTopLvlMenu pi_netrw.txt /*g:NetrwTopLvlMenu*
|
||||
g:Netrw_UserMaps pi_netrw.txt /*g:Netrw_UserMaps*
|
||||
g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler*
|
||||
g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref*
|
||||
g:ada#Comment ft_ada.txt /*g:ada#Comment*
|
||||
@@ -5964,6 +6039,7 @@ g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds*
|
||||
g:html_encoding_override syntax.txt /*g:html_encoding_override*
|
||||
g:html_end_line syntax.txt /*g:html_end_line*
|
||||
g:html_expand_tabs syntax.txt /*g:html_expand_tabs*
|
||||
g:html_font syntax.txt /*g:html_font*
|
||||
g:html_hover_unfold syntax.txt /*g:html_hover_unfold*
|
||||
g:html_id_expr syntax.txt /*g:html_id_expr*
|
||||
g:html_ignore_conceal syntax.txt /*g:html_ignore_conceal*
|
||||
@@ -6003,6 +6079,7 @@ g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
|
||||
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
|
||||
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
|
||||
g:netrw_ffkeep pi_netrw.txt /*g:netrw_ffkeep*
|
||||
g:netrw_file_cmd pi_netrw.txt /*g:netrw_file_cmd*
|
||||
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
|
||||
g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
|
||||
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
|
||||
@@ -6014,6 +6091,7 @@ g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd*
|
||||
g:netrw_ftpextracmd pi_netrw.txt /*g:netrw_ftpextracmd*
|
||||
g:netrw_ftpmode pi_netrw.txt /*g:netrw_ftpmode*
|
||||
g:netrw_glob_escape pi_netrw.txt /*g:netrw_glob_escape*
|
||||
g:netrw_gx pi_netrw.txt /*g:netrw_gx*
|
||||
g:netrw_hide pi_netrw.txt /*g:netrw_hide*
|
||||
g:netrw_home pi_netrw.txt /*g:netrw_home*
|
||||
g:netrw_http_cmd pi_netrw.txt /*g:netrw_http_cmd*
|
||||
@@ -6021,10 +6099,13 @@ g:netrw_http_put_cmd pi_netrw.txt /*g:netrw_http_put_cmd*
|
||||
g:netrw_http_xcmd pi_netrw.txt /*g:netrw_http_xcmd*
|
||||
g:netrw_ignorenetrc pi_netrw.txt /*g:netrw_ignorenetrc*
|
||||
g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir*
|
||||
g:netrw_keepj pi_netrw.txt /*g:netrw_keepj*
|
||||
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
|
||||
g:netrw_list_cmd_options pi_netrw.txt /*g:netrw_list_cmd_options*
|
||||
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
|
||||
g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle*
|
||||
g:netrw_localcopycmd pi_netrw.txt /*g:netrw_localcopycmd*
|
||||
g:netrw_localcopydircmd pi_netrw.txt /*g:netrw_localcopydircmd*
|
||||
g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
|
||||
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
|
||||
g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
|
||||
@@ -6045,6 +6126,7 @@ g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd*
|
||||
g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd*
|
||||
g:netrw_scpport pi_netrw.txt /*g:netrw_scpport*
|
||||
g:netrw_sepchr pi_netrw.txt /*g:netrw_sepchr*
|
||||
g:netrw_servername pi_netrw.txt /*g:netrw_servername*
|
||||
g:netrw_sftp_cmd pi_netrw.txt /*g:netrw_sftp_cmd*
|
||||
g:netrw_silent pi_netrw.txt /*g:netrw_silent*
|
||||
g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by*
|
||||
@@ -6061,8 +6143,10 @@ g:netrw_uid pi_netrw.txt /*g:netrw_uid*
|
||||
g:netrw_use_errorwindow pi_netrw.txt /*g:netrw_use_errorwindow*
|
||||
g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf*
|
||||
g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
|
||||
g:netrw_usetab pi_netrw.txt /*g:netrw_usetab*
|
||||
g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp*
|
||||
g:netrw_winsize pi_netrw.txt /*g:netrw_winsize*
|
||||
g:netrw_wiw pi_netrw.txt /*g:netrw_wiw*
|
||||
g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen*
|
||||
g:sh_isk syntax.txt /*g:sh_isk*
|
||||
g:sh_noisk syntax.txt /*g:sh_noisk*
|
||||
@@ -6095,6 +6179,7 @@ g:vimsyn_folding syntax.txt /*g:vimsyn_folding*
|
||||
g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines*
|
||||
g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
|
||||
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
|
||||
g:yaml_schema syntax.txt /*g:yaml_schema*
|
||||
g:zip_nomax pi_zip.txt /*g:zip_nomax*
|
||||
g:zip_shq pi_zip.txt /*g:zip_shq*
|
||||
g:zip_unzipcmd pi_zip.txt /*g:zip_unzipcmd*
|
||||
@@ -6146,6 +6231,7 @@ getbufline() eval.txt /*getbufline()*
|
||||
getbufvar() eval.txt /*getbufvar()*
|
||||
getchar() eval.txt /*getchar()*
|
||||
getcharmod() eval.txt /*getcharmod()*
|
||||
getcharsearch() eval.txt /*getcharsearch()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcmdtype() eval.txt /*getcmdtype()*
|
||||
@@ -6185,6 +6271,7 @@ gi insert.txt /*gi*
|
||||
gj motion.txt /*gj*
|
||||
gk motion.txt /*gk*
|
||||
glob() eval.txt /*glob()*
|
||||
glob2regpat() eval.txt /*glob2regpat()*
|
||||
global-ime mbyte.txt /*global-ime*
|
||||
global-local options.txt /*global-local*
|
||||
global-variable eval.txt /*global-variable*
|
||||
@@ -6502,6 +6589,7 @@ i_CTRL-G_<Down> insert.txt /*i_CTRL-G_<Down>*
|
||||
i_CTRL-G_<Up> insert.txt /*i_CTRL-G_<Up>*
|
||||
i_CTRL-G_CTRL-J insert.txt /*i_CTRL-G_CTRL-J*
|
||||
i_CTRL-G_CTRL-K insert.txt /*i_CTRL-G_CTRL-K*
|
||||
i_CTRL-G_U insert.txt /*i_CTRL-G_U*
|
||||
i_CTRL-G_j insert.txt /*i_CTRL-G_j*
|
||||
i_CTRL-G_k insert.txt /*i_CTRL-G_k*
|
||||
i_CTRL-G_u insert.txt /*i_CTRL-G_u*
|
||||
@@ -6711,6 +6799,7 @@ lcs-eol options.txt /*lcs-eol*
|
||||
lcs-extends options.txt /*lcs-extends*
|
||||
lcs-nbsp options.txt /*lcs-nbsp*
|
||||
lcs-precedes options.txt /*lcs-precedes*
|
||||
lcs-space options.txt /*lcs-space*
|
||||
lcs-tab options.txt /*lcs-tab*
|
||||
lcs-trail options.txt /*lcs-trail*
|
||||
left-right-motions motion.txt /*left-right-motions*
|
||||
@@ -6758,6 +6847,18 @@ location-list quickfix.txt /*location-list*
|
||||
location-list-window quickfix.txt /*location-list-window*
|
||||
log() eval.txt /*log()*
|
||||
log10() eval.txt /*log10()*
|
||||
logipat pi_logipat.txt /*logipat*
|
||||
logipat-arg pi_logipat.txt /*logipat-arg*
|
||||
logipat-caveat pi_logipat.txt /*logipat-caveat*
|
||||
logipat-contents pi_logipat.txt /*logipat-contents*
|
||||
logipat-copyright pi_logipat.txt /*logipat-copyright*
|
||||
logipat-examples pi_logipat.txt /*logipat-examples*
|
||||
logipat-history pi_logipat.txt /*logipat-history*
|
||||
logipat-input pi_logipat.txt /*logipat-input*
|
||||
logipat-man pi_logipat.txt /*logipat-man*
|
||||
logipat-manual pi_logipat.txt /*logipat-manual*
|
||||
logipat-operators pi_logipat.txt /*logipat-operators*
|
||||
logipat-pattern pi_logipat.txt /*logipat-pattern*
|
||||
long-lines version5.txt /*long-lines*
|
||||
love intro.txt /*love*
|
||||
lowercase change.txt /*lowercase*
|
||||
@@ -6993,6 +7094,8 @@ netrw-:Hexplore pi_netrw.txt /*netrw-:Hexplore*
|
||||
netrw-:Lexplore pi_netrw.txt /*netrw-:Lexplore*
|
||||
netrw-:MF pi_netrw.txt /*netrw-:MF*
|
||||
netrw-:MT pi_netrw.txt /*netrw-:MT*
|
||||
netrw-:NetrwC pi_netrw.txt /*netrw-:NetrwC*
|
||||
netrw-:NetrwMB pi_netrw.txt /*netrw-:NetrwMB*
|
||||
netrw-:Rexplore pi_netrw.txt /*netrw-:Rexplore*
|
||||
netrw-:Sexplore pi_netrw.txt /*netrw-:Sexplore*
|
||||
netrw-:Texplore pi_netrw.txt /*netrw-:Texplore*
|
||||
@@ -7001,6 +7104,11 @@ netrw-C pi_netrw.txt /*netrw-C*
|
||||
netrw-D pi_netrw.txt /*netrw-D*
|
||||
netrw-O pi_netrw.txt /*netrw-O*
|
||||
netrw-P pi_netrw.txt /*netrw-P*
|
||||
netrw-P18 pi_netrw.txt /*netrw-P18*
|
||||
netrw-P19 pi_netrw.txt /*netrw-P19*
|
||||
netrw-P20 pi_netrw.txt /*netrw-P20*
|
||||
netrw-P21 pi_netrw.txt /*netrw-P21*
|
||||
netrw-P22 pi_netrw.txt /*netrw-P22*
|
||||
netrw-R pi_netrw.txt /*netrw-R*
|
||||
netrw-S pi_netrw.txt /*netrw-S*
|
||||
netrw-Tb pi_netrw.txt /*netrw-Tb*
|
||||
@@ -7020,6 +7128,7 @@ netrw-browser-settings pi_netrw.txt /*netrw-browser-settings*
|
||||
netrw-browser-var pi_netrw.txt /*netrw-browser-var*
|
||||
netrw-browsing pi_netrw.txt /*netrw-browsing*
|
||||
netrw-c pi_netrw.txt /*netrw-c*
|
||||
netrw-c-tab pi_netrw.txt /*netrw-c-tab*
|
||||
netrw-cadaver pi_netrw.txt /*netrw-cadaver*
|
||||
netrw-chgup pi_netrw.txt /*netrw-chgup*
|
||||
netrw-clean pi_netrw.txt /*netrw-clean*
|
||||
@@ -7030,6 +7139,7 @@ netrw-createfile pi_netrw.txt /*netrw-createfile*
|
||||
netrw-credits pi_netrw.txt /*netrw-credits*
|
||||
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
|
||||
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
|
||||
netrw-ctrl-r pi_netrw.txt /*netrw-ctrl-r*
|
||||
netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l*
|
||||
netrw-curdir pi_netrw.txt /*netrw-curdir*
|
||||
netrw-d pi_netrw.txt /*netrw-d*
|
||||
@@ -7040,6 +7150,7 @@ netrw-dir pi_netrw.txt /*netrw-dir*
|
||||
netrw-dirlist pi_netrw.txt /*netrw-dirlist*
|
||||
netrw-downdir pi_netrw.txt /*netrw-downdir*
|
||||
netrw-edithide pi_netrw.txt /*netrw-edithide*
|
||||
netrw-editwindow pi_netrw.txt /*netrw-editwindow*
|
||||
netrw-ex pi_netrw.txt /*netrw-ex*
|
||||
netrw-explore pi_netrw.txt /*netrw-explore*
|
||||
netrw-explore-cmds pi_netrw.txt /*netrw-explore-cmds*
|
||||
@@ -7055,7 +7166,9 @@ netrw-getftype pi_netrw.txt /*netrw-getftype*
|
||||
netrw-gf pi_netrw.txt /*netrw-gf*
|
||||
netrw-gh pi_netrw.txt /*netrw-gh*
|
||||
netrw-gitignore pi_netrw.txt /*netrw-gitignore*
|
||||
netrw-gn pi_netrw.txt /*netrw-gn*
|
||||
netrw-gp pi_netrw.txt /*netrw-gp*
|
||||
netrw-grep pi_netrw.txt /*netrw-grep*
|
||||
netrw-gx pi_netrw.txt /*netrw-gx*
|
||||
netrw-handler pi_netrw.txt /*netrw-handler*
|
||||
netrw-help pi_netrw.txt /*netrw-help*
|
||||
@@ -7077,6 +7190,7 @@ netrw-login pi_netrw.txt /*netrw-login*
|
||||
netrw-mB pi_netrw.txt /*netrw-mB*
|
||||
netrw-mF pi_netrw.txt /*netrw-mF*
|
||||
netrw-mT pi_netrw.txt /*netrw-mT*
|
||||
netrw-mX pi_netrw.txt /*netrw-mX*
|
||||
netrw-mb pi_netrw.txt /*netrw-mb*
|
||||
netrw-mc pi_netrw.txt /*netrw-mc*
|
||||
netrw-md pi_netrw.txt /*netrw-md*
|
||||
@@ -7094,15 +7208,18 @@ netrw-mr pi_netrw.txt /*netrw-mr*
|
||||
netrw-ms pi_netrw.txt /*netrw-ms*
|
||||
netrw-mt pi_netrw.txt /*netrw-mt*
|
||||
netrw-mu pi_netrw.txt /*netrw-mu*
|
||||
netrw-mv pi_netrw.txt /*netrw-mv*
|
||||
netrw-mx pi_netrw.txt /*netrw-mx*
|
||||
netrw-mz pi_netrw.txt /*netrw-mz*
|
||||
netrw-netrc pi_netrw.txt /*netrw-netrc*
|
||||
netrw-newfile pi_netrw.txt /*netrw-newfile*
|
||||
netrw-nexplore pi_netrw.txt /*netrw-nexplore*
|
||||
netrw-noload pi_netrw.txt /*netrw-noload*
|
||||
netrw-nread pi_netrw.txt /*netrw-nread*
|
||||
netrw-ntree pi_netrw.txt /*netrw-ntree*
|
||||
netrw-nwrite pi_netrw.txt /*netrw-nwrite*
|
||||
netrw-o pi_netrw.txt /*netrw-o*
|
||||
netrw-obtain pi_netrw.txt /*netrw-obtain*
|
||||
netrw-options pi_netrw.txt /*netrw-options*
|
||||
netrw-p pi_netrw.txt /*netrw-p*
|
||||
netrw-p1 pi_netrw.txt /*netrw-p1*
|
||||
@@ -7113,6 +7230,7 @@ netrw-p13 pi_netrw.txt /*netrw-p13*
|
||||
netrw-p14 pi_netrw.txt /*netrw-p14*
|
||||
netrw-p15 pi_netrw.txt /*netrw-p15*
|
||||
netrw-p16 pi_netrw.txt /*netrw-p16*
|
||||
netrw-p17 pi_netrw.txt /*netrw-p17*
|
||||
netrw-p2 pi_netrw.txt /*netrw-p2*
|
||||
netrw-p3 pi_netrw.txt /*netrw-p3*
|
||||
netrw-p4 pi_netrw.txt /*netrw-p4*
|
||||
@@ -7143,6 +7261,7 @@ netrw-quickmaps pi_netrw.txt /*netrw-quickmaps*
|
||||
netrw-r pi_netrw.txt /*netrw-r*
|
||||
netrw-read pi_netrw.txt /*netrw-read*
|
||||
netrw-ref pi_netrw.txt /*netrw-ref*
|
||||
netrw-refresh pi_netrw.txt /*netrw-refresh*
|
||||
netrw-rename pi_netrw.txt /*netrw-rename*
|
||||
netrw-reverse pi_netrw.txt /*netrw-reverse*
|
||||
netrw-rexplore pi_netrw.txt /*netrw-rexplore*
|
||||
@@ -7169,6 +7288,7 @@ netrw-transparent pi_netrw.txt /*netrw-transparent*
|
||||
netrw-u pi_netrw.txt /*netrw-u*
|
||||
netrw-updir pi_netrw.txt /*netrw-updir*
|
||||
netrw-urls pi_netrw.txt /*netrw-urls*
|
||||
netrw-usermaps pi_netrw.txt /*netrw-usermaps*
|
||||
netrw-userpass pi_netrw.txt /*netrw-userpass*
|
||||
netrw-v pi_netrw.txt /*netrw-v*
|
||||
netrw-var pi_netrw.txt /*netrw-var*
|
||||
@@ -7393,6 +7513,7 @@ php3.vim syntax.txt /*php3.vim*
|
||||
phtml.vim syntax.txt /*phtml.vim*
|
||||
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
|
||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
|
||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
@@ -7439,6 +7560,7 @@ printf() eval.txt /*printf()*
|
||||
printf-% eval.txt /*printf-%*
|
||||
printf-E eval.txt /*printf-E*
|
||||
printf-G eval.txt /*printf-G*
|
||||
printf-S eval.txt /*printf-S*
|
||||
printf-X eval.txt /*printf-X*
|
||||
printf-c eval.txt /*printf-c*
|
||||
printf-d eval.txt /*printf-d*
|
||||
@@ -7732,6 +7854,7 @@ session-file starting.txt /*session-file*
|
||||
set-option options.txt /*set-option*
|
||||
set-spc-auto spell.txt /*set-spc-auto*
|
||||
setbufvar() eval.txt /*setbufvar()*
|
||||
setcharsearch() eval.txt /*setcharsearch()*
|
||||
setcmdpos() eval.txt /*setcmdpos()*
|
||||
setline() eval.txt /*setline()*
|
||||
setloclist() eval.txt /*setloclist()*
|
||||
@@ -8073,9 +8196,11 @@ t_KI term.txt /*t_KI*
|
||||
t_KJ term.txt /*t_KJ*
|
||||
t_KK term.txt /*t_KK*
|
||||
t_KL term.txt /*t_KL*
|
||||
t_RB term.txt /*t_RB*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RV term.txt /*t_RV*
|
||||
t_SI term.txt /*t_SI*
|
||||
t_SR term.txt /*t_SR*
|
||||
t_Sb term.txt /*t_Sb*
|
||||
t_Sf term.txt /*t_Sf*
|
||||
t_WP term.txt /*t_WP*
|
||||
@@ -8178,6 +8303,7 @@ t_vb term.txt /*t_vb*
|
||||
t_ve term.txt /*t_ve*
|
||||
t_vi term.txt /*t_vi*
|
||||
t_vs term.txt /*t_vs*
|
||||
t_xn term.txt /*t_xn*
|
||||
t_xs term.txt /*t_xs*
|
||||
tab intro.txt /*tab*
|
||||
tab-page tabpage.txt /*tab-page*
|
||||
@@ -8436,6 +8562,7 @@ v:charconvert_from eval.txt /*v:charconvert_from*
|
||||
v:charconvert_to eval.txt /*v:charconvert_to*
|
||||
v:cmdarg eval.txt /*v:cmdarg*
|
||||
v:cmdbang eval.txt /*v:cmdbang*
|
||||
v:completed_item eval.txt /*v:completed_item*
|
||||
v:count eval.txt /*v:count*
|
||||
v:count1 eval.txt /*v:count1*
|
||||
v:ctype eval.txt /*v:ctype*
|
||||
@@ -8463,6 +8590,9 @@ v:mouse_lnum eval.txt /*v:mouse_lnum*
|
||||
v:mouse_win eval.txt /*v:mouse_win*
|
||||
v:oldfiles eval.txt /*v:oldfiles*
|
||||
v:operator eval.txt /*v:operator*
|
||||
v:option_new eval.txt /*v:option_new*
|
||||
v:option_old eval.txt /*v:option_old*
|
||||
v:option_type eval.txt /*v:option_type*
|
||||
v:prevcount eval.txt /*v:prevcount*
|
||||
v:profiling eval.txt /*v:profiling*
|
||||
v:progname eval.txt /*v:progname*
|
||||
@@ -8494,11 +8624,13 @@ v_<Esc> visual.txt /*v_<Esc>*
|
||||
v_= change.txt /*v_=*
|
||||
v_> change.txt /*v_>*
|
||||
v_C change.txt /*v_C*
|
||||
v_CTRL-A change.txt /*v_CTRL-A*
|
||||
v_CTRL-C visual.txt /*v_CTRL-C*
|
||||
v_CTRL-G visual.txt /*v_CTRL-G*
|
||||
v_CTRL-H change.txt /*v_CTRL-H*
|
||||
v_CTRL-O visual.txt /*v_CTRL-O*
|
||||
v_CTRL-V visual.txt /*v_CTRL-V*
|
||||
v_CTRL-X change.txt /*v_CTRL-X*
|
||||
v_CTRL-Z starting.txt /*v_CTRL-Z*
|
||||
v_CTRL-\_CTRL-G intro.txt /*v_CTRL-\\_CTRL-G*
|
||||
v_CTRL-\_CTRL-N intro.txt /*v_CTRL-\\_CTRL-N*
|
||||
@@ -8554,7 +8686,9 @@ v_gJ change.txt /*v_gJ*
|
||||
v_gN visual.txt /*v_gN*
|
||||
v_gV visual.txt /*v_gV*
|
||||
v_g] tagsrch.txt /*v_g]*
|
||||
v_g_CTRL-A change.txt /*v_g_CTRL-A*
|
||||
v_g_CTRL-G editing.txt /*v_g_CTRL-G*
|
||||
v_g_CTRL-X change.txt /*v_g_CTRL-X*
|
||||
v_g_CTRL-] tagsrch.txt /*v_g_CTRL-]*
|
||||
v_gf editing.txt /*v_gf*
|
||||
v_gn visual.txt /*v_gn*
|
||||
@@ -8859,6 +8993,7 @@ xterm-screens tips.txt /*xterm-screens*
|
||||
xterm-scroll-region term.txt /*xterm-scroll-region*
|
||||
xterm-shifted-keys term.txt /*xterm-shifted-keys*
|
||||
y change.txt /*y*
|
||||
yaml.vim syntax.txt /*yaml.vim*
|
||||
yank change.txt /*yank*
|
||||
ye-option-gone version4.txt /*ye-option-gone*
|
||||
year-2000 intro.txt /*year-2000*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.4. Last change: 2014 May 13
|
||||
*term.txt* For Vim version 7.4. Last change: 2015 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -224,10 +224,11 @@ The options are listed below. The associated termcap code is always equal to
|
||||
the last two characters of the option name. Only one termcap code is
|
||||
required: Cursor motion, 't_cm'.
|
||||
|
||||
The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap.
|
||||
When the termcap flag is present, the option will be set to "y". But any
|
||||
non-empty string means that the flag is set. An empty string means that the
|
||||
flag is not set. 't_CS' works like this too, but it isn't a termcap flag.
|
||||
The options 't_da', 't_db', 't_ms', 't_xs', 't_xn' represent flags in the
|
||||
termcap. When the termcap flag is present, the option will be set to "y".
|
||||
But any non-empty string means that the flag is set. An empty string means
|
||||
that the flag is not set. 't_CS' works like this too, but it isn't a termcap
|
||||
flag.
|
||||
|
||||
OUTPUT CODES
|
||||
option meaning ~
|
||||
@@ -281,6 +282,9 @@ OUTPUT CODES
|
||||
t_vs cursor very visible *t_vs* *'t_vs'*
|
||||
*t_xs* *'t_xs'*
|
||||
t_xs if non-empty, standout not erased by overwriting (hpterm)
|
||||
*t_xn* *'t_xn'*
|
||||
t_xn if non-empty, writing a character at the last screen cell
|
||||
does not cause scrolling
|
||||
t_ZH italics mode *t_ZH* *'t_ZH'*
|
||||
t_ZR italics end *t_ZR* *'t_ZR'*
|
||||
|
||||
@@ -290,12 +294,15 @@ Added by Vim (there are no standard codes for these):
|
||||
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
|
||||
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
|
||||
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
|
||||
t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
|
||||
t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'*
|
||||
t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
|
||||
|termcap-cursor-shape|
|
||||
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|
||||
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
|
||||
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
|
||||
see |'ambiwidth'|
|
||||
t_RB request terminal background color *t_RB* *'t_RB'*
|
||||
see |'ambiwidth'|
|
||||
|
||||
KEY CODES
|
||||
Note: Use the <> form if possible
|
||||
@@ -410,7 +417,7 @@ adjust the various t_ codes. This avoids the problem that the xterm can
|
||||
produce different codes, depending on the mode it is in (8-bit, VT102,
|
||||
VT220, etc.). The result is that codes like <xF1> are no longer needed.
|
||||
Note: This is only done on startup. If the xterm options are changed after
|
||||
Vim has started, the escape sequences may not be recognized any more.
|
||||
Vim has started, the escape sequences may not be recognized anymore.
|
||||
|
||||
*xterm-resize*
|
||||
Window resizing with xterm only works if the allowWindowOps resource is
|
||||
@@ -434,13 +441,16 @@ If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
|
||||
to reset to the default colors.
|
||||
|
||||
*termcap-cursor-shape* *termcap-cursor-color*
|
||||
When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving
|
||||
Insert mode 't_EI' is used. But only if both are defined. This can be used
|
||||
to change the shape or color of the cursor in Insert mode. These are not
|
||||
standard termcap/terminfo entries, you need to set them yourself.
|
||||
When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
|
||||
enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise
|
||||
't_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This
|
||||
can be used to change the shape or color of the cursor in Insert or Replace
|
||||
mode. These are not standard termcap/terminfo entries, you need to set them
|
||||
yourself.
|
||||
Example for an xterm, this changes the color of the cursor: >
|
||||
if &term =~ "xterm"
|
||||
let &t_SI = "\<Esc>]12;purple\x7"
|
||||
let &t_SR = "\<Esc>]12;red\x7"
|
||||
let &t_EI = "\<Esc>]12;blue\x7"
|
||||
endif
|
||||
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2014 Oct 15
|
||||
*todo.txt* For Vim version 7.4. Last change: 2015 Oct 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,8 +35,14 @@ not be repeated below, unless there is extra information.
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Regexp problems:
|
||||
- The NFA engine does not implement the time limit passed to
|
||||
nfa_regexec_multi()
|
||||
- The regexp engines are not reentrant, causing havoc when interrupted by a
|
||||
remote expression or something else. Move global variables onto the stack
|
||||
or into an allocated struct.
|
||||
- The old engine does not find a match for "/\%#=1\(\)\{80}", the new engine
|
||||
matches everywhere.
|
||||
- Using win_linetabsize() can still be slow. Cache the result, store col and
|
||||
vcol. Reset them when moving to another line.
|
||||
- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
|
||||
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
|
||||
(Lech Lorens, 2014 Feb 3)
|
||||
- Issue 164: freeze on regexp search.
|
||||
@@ -44,138 +50,338 @@ Regexp problems:
|
||||
2013 Dec 11)
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
|
||||
Remark from Brett 2014 Jan 6 and 7.
|
||||
- Difference in NFA and old engine. (Brett Stahlman, 2014 Nov 5)
|
||||
- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13)
|
||||
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
|
||||
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
|
||||
2015 Feb 7)
|
||||
- Using back reference before the capturing group sometimes works with the old
|
||||
engine, can we do this with the new engine? E.g. with
|
||||
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
|
||||
This problem is probably the same: "\%(^\1.*$\n\)\@<=\(\d\+\).*$".
|
||||
(guotuofeng, 2015 Jun 22)
|
||||
- Strange matching with "\(Hello\n\)\@<=A". (Anas Syed, 2015 Feb 12)
|
||||
- Problem with \v(A)@<=b+\1c. (Issue 334)
|
||||
- Diff highlighting can be very slow. (Issue 309)
|
||||
- Using %> for a virtual column has a check based on 'tabsize'. Better would
|
||||
be to cache the result of win_linetabsize(col), storing both col and vcol,
|
||||
and use them to decide whether win_linetabsize() needs to be called. Reset
|
||||
col and vcol when moving to another line.
|
||||
- this doesn't work: "syntax match ErrorMsg /.\%9l\%>20c\&\%<28c/". Leaving
|
||||
out the \& works. Seems any column check after \& fails.
|
||||
- The pattern "\1" with the old engine gives E65, with the new engine it
|
||||
matches the empty string. (Dominique Pelle, 2015 Oct 2)
|
||||
|
||||
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
|
||||
More info Jul 24. Not clear why.
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28)
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Netrw update. (Charles 2015 Oct 23)
|
||||
|
||||
Patch to use local value of 'errorformat' in :cexpr. (Christian Brabandt,
|
||||
2015 Oct 16) Only do this for :lexpr ?
|
||||
|
||||
Update Oracle syntax file from:
|
||||
https://github.com/chrisbra/vim-sqloracle-syntax/blob/master/syntax/sqloracle.vim
|
||||
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
Updated syntax files. (Charles Campbell, 2015 Oct 19)
|
||||
|
||||
Patch to include .desktop files in the distribution. PR #455.
|
||||
|
||||
Better changelog syntax file. (Martin Florian, 2015 Oct 25)
|
||||
|
||||
Better readline syntax file. (Raphael Bazaud, 2015 Oct 25)
|
||||
|
||||
English spell checking has an error. Updating doesn't work.
|
||||
(Dominique Pelle, 2015 Oct 15)
|
||||
Hint for new URL: Christian Brabandt, 2015 Oct 15.
|
||||
But that file looks old.
|
||||
|
||||
Using ":windo" to set options in all windows has the side effect that it
|
||||
changes the window layout and the current window. Make a variant that saves
|
||||
and restores. Use in the matchparen plugin.
|
||||
Perhaps we can use ":silent window"?
|
||||
|
||||
Patch for documentation mistakes. (Hirohito Higashi, 2015 Oct 22)
|
||||
|
||||
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
|
||||
|
||||
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
|
||||
|
||||
Patch for yaml indent, #458.
|
||||
|
||||
Patch for Python to add isatty, readable, etc. (PR #464)
|
||||
|
||||
Patch to add options for specifying dll names. (Kazuki Sakamoto, 2015 Oct 16)
|
||||
PR #452 Check if it's secure (can't set from modeline).
|
||||
|
||||
Unexpected delay when using CTRL-O u. It's not timeoutlen.
|
||||
(Gary Johnson, 2015 Aug 28)
|
||||
|
||||
Can src/GvimExt/Make_cyg.mak be removed?
|
||||
Same for src/xxd/Make_cyg.mak
|
||||
|
||||
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
|
||||
Patch to add debug backtrace. (Alberto Fanjul, 2015 Sep 27)
|
||||
Asked for :frame command.
|
||||
|
||||
MS-Windows: When editing a file with a leading space, writing it uses the
|
||||
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
|
||||
|
||||
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
|
||||
specifically? First try with the parens, then without.
|
||||
|
||||
Patch to add 'tagcase' option, whether to ignore case for tags.
|
||||
(Gary Johnson, 2015 Oct 17)
|
||||
|
||||
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
|
||||
24)
|
||||
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
When complete() first argument is before where insert started and 'backspace'
|
||||
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
|
||||
|
||||
Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
|
||||
handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)
|
||||
|
||||
Weird encryption problems on Windows. (Ben Fritz, 2015 Feb 13)
|
||||
Goes away when disabling the swap file. (might1, Feb 16)
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
If libiconv.dll is not found search for libiconv2.dll. (Yasuhiro Matsumoto,
|
||||
2015 Oct 7)
|
||||
|
||||
The OptionSet autocommand event is not always triggered. (Rick Howe, 2015 Sep
|
||||
24): :diffthis, :diffoff.
|
||||
|
||||
":set all&" still does not handle all side effects. Centralize handling side
|
||||
effects for when set by the user, on init and when reset to default.
|
||||
|
||||
":tag" does not jump to the right entry of a :tselect. (James Speros, 2015 Oct
|
||||
9)
|
||||
|
||||
The argument for "-S" is not taken literally, the ":so" command expands
|
||||
wildcards. Add a ":nowild" command modifier? (ZyX, 2015 March 4)
|
||||
|
||||
Proposal to make options.txt easier to read. (Arnaud Decara, 2015 Aug 5)
|
||||
Update Aug 14.
|
||||
|
||||
Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
|
||||
|
||||
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
|
||||
Sep 10)
|
||||
|
||||
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
|
||||
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8.
|
||||
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
Example in editing.txt uses $HOME with the expectating that it ends in a
|
||||
slash. For me it does, but perhaps not for everybody. Add a function that
|
||||
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)
|
||||
|
||||
ml_updatechunk() is slow when retrying for another encoding. (John Little,
|
||||
2014 Sep 11)
|
||||
|
||||
Patch to fix checking global option value when not using it.
|
||||
(Arnaud Decara, 2015 Jul 23)
|
||||
|
||||
When 'showbreak' is set repeating a Visual operation counts the size of the
|
||||
'showbreak' text as part of the operation. (Axel Bender, 2015 Jul 20)
|
||||
|
||||
Patch to apply 'fileformats' when starting Vim. (Mike Williams, 2015 Jul 22)
|
||||
|
||||
Patch for matchit plugin related to multibyte chars. (Ken Takata, 2015 Jul 22)
|
||||
|
||||
Patch for multi-byte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12, update July 25)
|
||||
Is this the right solution?
|
||||
|
||||
Patch to add grepfile(). (Scott Prager, 2015 May 26)
|
||||
Work in progress.
|
||||
|
||||
Patch for global-local options consistency. (Arnaud Decara, 2015 Jul 22)
|
||||
Is this right?
|
||||
|
||||
Patch to have CTRL-A and CTRL-X update the '[ and '] marks.
|
||||
(Yukihiro Nakadaira, 2015 Aug 23)
|
||||
|
||||
Patch to make getregtype() return the right size for non-linux systems.
|
||||
(Yasuhiro Matsumoto, 2014 Jul 8)
|
||||
Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28)
|
||||
Patch to use different terminal mode settings for system(). (Hayaki Saito)
|
||||
Does this work for everybody?
|
||||
|
||||
Patch to avoid problems with encoding conversion with diff.vim.
|
||||
(Yasuhiro Matsumoto, 2014 Sep 1.
|
||||
Depends on current language, language of file can be different.
|
||||
Patch to fix that wide characters do not work properly after exiting.
|
||||
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
|
||||
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
Patch for man.vim. (SungHyun Nam, 2015 May 20)
|
||||
Doesn't work completely (Dominique Orban)
|
||||
|
||||
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
|
||||
14, Aug 30)
|
||||
Make ":1close" close the first window.
|
||||
Make ":+1close" close the next window.
|
||||
Make ":-1close" close the previous window.
|
||||
Doesn't look right, asked for updates.
|
||||
Patch to add a "literal" argument to bufnr(). (Olaf Dabrunz, 2015 Aug 4)
|
||||
|
||||
The entries added by matchaddpos() are returned by getmatches() but can't be
|
||||
set with setmatches(). (lcd47, 2014 Jun 29)
|
||||
Cannot execute the shell when it's in a directory with a space.
|
||||
Issue #459.
|
||||
|
||||
Patch to fix that 0x80 in abbreviation isn't handled correctly.
|
||||
(Christian Brabandt, 2014 Oct 1)
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Check for valid yank reg seems wrong. Patch by Zyx, 2014 Oct 12.
|
||||
Extended file attributes lost on write (backupcopy=no). Issue 306.
|
||||
|
||||
":sign-jump" uses first window in buffer instead of current window.
|
||||
Patch by James McCoy, 2013 Nov 22. Update 2014 Oct 5.
|
||||
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
|
||||
OK to not block marks?
|
||||
|
||||
Patch to fix issue 57, on the issue.
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Patch for issue 101, maintainer unreachable.
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
|
||||
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
Patch to fix that last_changedtick is not update on saving. (Christian
|
||||
Brabandt, 2014 Oct 10, second one)
|
||||
When 'balloonexpr' returns a list the result has a trailing newline.
|
||||
Just remove one trailing newline. (lcd, 2014 Oct 17)
|
||||
|
||||
substitute() can be slow with long strings. Patch by Ozaki Kiichi, 2014 Oct
|
||||
12.
|
||||
|
||||
Remove restriction in NSIS installer that the end of the path must be "Vim".
|
||||
(Tim Lebedkov, 2014 Sep 24) Again Oct 12.
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
|
||||
'foldexpr' applies to help. (Paul Marshall, 2014 Sep 24)
|
||||
|
||||
Patch to fix issue 203. (Christian Brabandt, 2014 Oct 8)
|
||||
|
||||
Patch to fix issue 253. (Christian Brabandt, 2014 Oct 8)
|
||||
|
||||
Patch to fix issue 78. (Christian Brabandt, 2014 Oct 8)
|
||||
|
||||
Patch to fix leak in map() with error. (Christian Brabandt, 2014 Oct 11)
|
||||
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
On MS-Windows running tests with Mercurial has problems when the input files
|
||||
are changed. (Ken Takata, Taro Muraoka, 2014 Sep 25)
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
ml_updatechunk() is slow when retrying for another encoding. (John Little,
|
||||
2014 Sep 11)
|
||||
When two SIGWINCH arrive very quickly, the second one may be lost.
|
||||
(Josh Triplett, 2015 Sep 17)
|
||||
|
||||
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
|
||||
|
||||
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
|
||||
26, update 2013 Dec 14, another 2014 Nov 22)
|
||||
|
||||
Patch to improve behavior of dead keys on MS-Windows. (John Wellesz, 2015 Aug
|
||||
25) https://github.com/vim/vim/pull/399.diff
|
||||
|
||||
Result of systemlist() does not show whether text ended in line break.
|
||||
(Bjorn Linse, 2014 Nov 27)
|
||||
|
||||
When in 'comments' "n:x" follows after three-part comment directly it repeats
|
||||
any one-character from the previous line. (Kartik Agaram, 2014 Sep 19)
|
||||
|
||||
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
|
||||
|
||||
Patch to add the EndOfBuffer highlight group, used instead of NonText for "~"
|
||||
lines. (Marco Hinz, 2014 Nov 2)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
2015 Feb 6.
|
||||
|
||||
Plugins need to make a lot of effort, lots of mappings, to know what happened
|
||||
before pressing the key that triggers a plugin action. How about keeping the
|
||||
last N pressed keys, so that they do not need to be mapped?
|
||||
|
||||
":q!" should reset modified flag for current buffer, if another buffer is
|
||||
modified no need to abandon it again.
|
||||
Patch from Yasuhiro Matsumoto, 2014 Nov 21.
|
||||
Update from Hirohito Higashi, 2014 Nov 21.
|
||||
With test, Nov 23.
|
||||
|
||||
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
|
||||
Is this a good solution?
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
Patch to add digits argument to round(). (Yasuhiro Matsumoto, 2015 Apr 26)
|
||||
|
||||
Can assign to s:type when a function s:type has been defined.
|
||||
Also the other way around: define a function while a variable with that name
|
||||
was already defined.
|
||||
(Yasuhiro Matsumoto, 2014 Nov 3)
|
||||
|
||||
Patch for ordered dict. (Ozaki Kiichi, 2015 May 7)
|
||||
|
||||
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
|
||||
Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
Updated patch from Charles, Dec 29.
|
||||
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
|
||||
Patch for building a 32bit Vim with 64bit MingW compiler.
|
||||
(Michael Soyka, 2014 Oct 15)
|
||||
|
||||
Delete old code in os_msdos.c, mch_FullName().
|
||||
|
||||
Patch: On MS-Windows shellescape() may have to triple double quotes.
|
||||
(Ingo Karkat, 2015 Jan 16)
|
||||
|
||||
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
|
||||
Update 2015 Jul 25 (email).
|
||||
|
||||
Redo only remembers the last change. Could use "{count}g." to redo an older
|
||||
change. How does the user know which change? At least have a way to list
|
||||
them: ":repeats".
|
||||
|
||||
Patch for glob(), adding slash to normal files. (Ingo Karkat, 2014 Dec 22)
|
||||
|
||||
When entering and leaving the preview window autocommands are triggered, but
|
||||
these may not work well. Perhaps set a flag to indicate that the preview
|
||||
window is involved? (John Otter, 2015 Oct 27)
|
||||
|
||||
Using "." to repeat an Ex command puts that command in history. Probably
|
||||
should not happen. If the command is the result of a mapping it's not put in
|
||||
history either. (Jacob Niehus, 2014 Nov 2)
|
||||
Patch from Jacob, Nov 2.
|
||||
|
||||
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
|
||||
Jun 8)
|
||||
|
||||
Patch to switch to the BT regexp engine when the NFA engine uses many states.
|
||||
(Christian Brabandt, 2014 Oct 3)
|
||||
Bug: Autocompleting ":tag/pat" replaces "/pat" with a match but does not
|
||||
insert a space. (Micha Mos, 2014 Nov 7)
|
||||
|
||||
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
|
||||
Update Dec 6.
|
||||
|
||||
Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
|
||||
|
||||
No error for missing endwhile. (ZyX, 2014 Mar 20)
|
||||
|
||||
start_global_changes() plus end_global_changes() causes problem for
|
||||
clip_unnamed_plus. (Jason Pleau, 2014 Sep 12)
|
||||
Patch to make extend() fail early when it might fail at some point.
|
||||
(Olaf Dabrunz, 2015 May 2) Makes extend() slower, do we still want it?
|
||||
Perhaps only the checks that can be done without looping over the dict or
|
||||
arguments.
|
||||
|
||||
Patch to add :arglocal and :arglists. (Marcin Szamotulski, 2014 Aug 6)
|
||||
|
||||
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
|
||||
|
||||
Spell files use a latin single quote. Unicode also has another single quote:
|
||||
0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be downloaded.
|
||||
|
||||
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
|
||||
Saito, 2013 Apr 24) Has a problem (email 2015 Jan 7).
|
||||
Update 2015 Jan 10.
|
||||
|
||||
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
|
||||
More tests May 14. Update May 29. Update Aug 10.
|
||||
|
||||
The garbage collector may use too much stack. Make set_ref_in_item()
|
||||
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
|
||||
Patch by Ben Fritz, 2014 Jun 22.
|
||||
Related: Vim hangs when freeing a lot of objects. Patch by Yasuhiro
|
||||
Matsumoto, 2014 Aug 26.
|
||||
|
||||
Idea: For a window in the middle (has window above and below it), use
|
||||
right-mouse-drag on the status line to move a window up/down without changing
|
||||
its height? It's like dragging the status bar above it at the same time.
|
||||
@@ -183,6 +389,11 @@ its height? It's like dragging the status bar above it at the same time.
|
||||
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
|
||||
What for systems that don't have unsetenv()?
|
||||
|
||||
Patch to add a :domodeline command. (Christian Brabandt, 2014 Oct 21)
|
||||
|
||||
Patch to add TabNew, TabNewEntered and TabClosed autocommand events.
|
||||
(Felipe Morales, 2015 Feb 1)
|
||||
|
||||
This does not give an error: (Andre Sihera, 2014 Mar 21)
|
||||
vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1'
|
||||
This neither: (ZyX)
|
||||
@@ -246,7 +457,7 @@ Editing an ascii file as ucs-2 or ucs-4 causes display errors.
|
||||
":Next 1 some-arg" does not complain about trailing argument. Also for
|
||||
various other commands. (ZyX, 2014 Mar 30)
|
||||
|
||||
patch to skip sort if no line matches the expression.
|
||||
Patch to skip sort if no line matches the expression.
|
||||
(Christian Brabandt, 2014 Jun 25)
|
||||
|
||||
Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
|
||||
@@ -260,6 +471,10 @@ Yasuhiro Matsumoto, 2013 May 31.
|
||||
Or should we add a more general mechanism, like a lambda() function?
|
||||
Patch by Yasuhiro Matsumoto, 2014 Sep 16.
|
||||
|
||||
Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
|
||||
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
|
||||
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
|
||||
|
||||
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
|
||||
instead. (Samuel Ferencik, 2013 Sep 28)
|
||||
|
||||
@@ -269,23 +484,15 @@ Remark on the docs. Should not be a compile time feature. But then what?
|
||||
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
|
||||
command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
|
||||
Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29).
|
||||
|
||||
Patch to get MSVC version in a nicer way. (Ken Takata, 2014 Jul 24)
|
||||
|
||||
Patch to make test 100 work on MS-Windows. (Taro Muraoka, 2013 Dec 12)
|
||||
|
||||
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
|
||||
|
||||
Perl: support for Activestate perl 5.18: Issue 170.
|
||||
|
||||
Several syntax file match "^\s*" which may get underlined if that's in the
|
||||
highlight group. Add a "\zs" after it?
|
||||
|
||||
Patch to fix temp directories for Windows, so that it works without tweaking.
|
||||
Issue 28.
|
||||
|
||||
Go through more coverity reports.
|
||||
The undo file name can get too long. (Issue 346)
|
||||
For the path use a hash instead of dir%dir%dir%name hash%name.
|
||||
|
||||
Patch to add ":undorecover", get as much text out of the undo file as
|
||||
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
|
||||
@@ -337,15 +544,9 @@ When evaluating expression in backticks, autoload doesn't work.
|
||||
Using <nr>ifoobar<esc> can slow down Vim. Patch by Christian Brabandt, 2013
|
||||
Dec 13.
|
||||
|
||||
Fold can't be opened after ":move". (Ein Brown)
|
||||
Patch from Christian Brabandt doesn't fix it completely.
|
||||
|
||||
Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
|
||||
GTK: problem with 'L' in 'guioptions' changing the window width.
|
||||
(Aaron Cornelius, 2012 Feb 6)
|
||||
|
||||
@@ -373,9 +574,6 @@ Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar
|
||||
Patch by Christian Brabandt, 2013 Mar 23.
|
||||
Not 100% sure this is the right solution.
|
||||
|
||||
Problem caused by patch 7.3.638: window->open does not update window
|
||||
correctly. Issue 91.
|
||||
|
||||
Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
|
||||
(Christian Brabandt, 2013 Dec 9)
|
||||
|
||||
@@ -415,17 +613,11 @@ optional. (2013 Jul 12)
|
||||
|
||||
Dialog is too big on Linux too. (David Fishburn, 2013 Sep 2)
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
Patch to check whether a buffer is quickfix or a location list.
|
||||
(Yasuhiro Matsumoto, 2014 Dec 9)
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
MS-Windows: Patch to make tests copy files to avoid changing the fileformat of
|
||||
the files under version control. (Taro Muraoka, 2013 Jul 5)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
|
||||
- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine
|
||||
@@ -434,8 +626,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
|
||||
|
||||
Bug: findfile("any", "file:///tmp;") does not work.
|
||||
|
||||
'ff' is wrong for one-line file without EOL. (Issue 77)
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
Needs a different check for CLEARTYPE_QUALITY.
|
||||
|
||||
@@ -474,10 +664,6 @@ signs? Patch by Christian Brabandt, 2013 Aug 22.
|
||||
|
||||
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
|
||||
|
||||
Patch to add 'completeselect' option. Specifies how to select a candidate in
|
||||
insert completion. (Shougo, 2013 May 29)
|
||||
Update to add to existing 'completeopt'. 2013 May 30
|
||||
|
||||
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
|
||||
|
||||
b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
|
||||
@@ -499,15 +685,10 @@ Patch to improve equivalence classes in regexp patterns.
|
||||
Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
|
||||
But use Gnome instead of GTK?
|
||||
|
||||
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
|
||||
Saito, 2013 Apr 24)
|
||||
|
||||
Should be possible to enable/disable matchparen per window or buffer.
|
||||
Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin
|
||||
Szamotulski, 2012 Nov 8)
|
||||
|
||||
Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
loading all files.
|
||||
|
||||
@@ -515,9 +696,6 @@ Win32: When 'autochdir' is on and 'encoding' is changed, files on the command
|
||||
line are opened again, but from the wrong directory. Apply 'autochdir' only
|
||||
after starting up?
|
||||
|
||||
Patch to add ":ldo" and ":cdo", execute commands over quickfix list and
|
||||
location list. (Yegappan Lakshmanan, 2013 Jun 2)
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
@@ -528,6 +706,14 @@ MS-Windows resizing problems:
|
||||
causes the window to move unnecessarily. (William E. Skeith III, 2012 Jan
|
||||
12) Patch: 2012 Jan 13 Needs more work (2012 Feb 2)
|
||||
|
||||
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
|
||||
Latest version: 2011 May 18
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
Version from Guopeng Wen that does this (2010 Dec 27)
|
||||
Alternative: MSI installer: https://github.com/petrkle/vim-msi/
|
||||
Or the one on Issue 279
|
||||
|
||||
'iminsert' global value set when using ":setlocal iminsert"? (Wu, 2012 Jun 23)
|
||||
|
||||
Patch to append regexp to tag commands to make it possible to select one out
|
||||
@@ -635,6 +821,9 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
|
||||
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
|
||||
21, Ben Fritz, 2010 Sep 14)
|
||||
|
||||
The :syntax cchar value can only be a single character. It would be useful to
|
||||
support combining characters. (Charles Campbell)
|
||||
|
||||
'cursorline' works on a text line only. Add 'cursorscreenline' for
|
||||
highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
|
||||
|
||||
@@ -690,9 +879,6 @@ Patch to make "z=" work when 'spell' is off. Does this have nasty side
|
||||
effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
|
||||
Would also need to do this for spellbadword() and spellsuggest().
|
||||
|
||||
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
|
||||
Update Aug 16 (email).
|
||||
|
||||
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
|
||||
64 bits value. Change all number options to use nropt_T and define it to the
|
||||
right type.
|
||||
@@ -759,6 +945,10 @@ Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
Add event for when the text scrolls. A bit like CursorMoved. Also a similar
|
||||
one for insert mode. Use the event in matchparen to update the highlight if
|
||||
the match scrolls into view.
|
||||
|
||||
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
|
||||
Patch by Christian Brabandt, 2011 Jul 27.
|
||||
Update by Ben Fritz, with fix for TOhtml. (2011 Jul 30)
|
||||
@@ -846,9 +1036,6 @@ names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
the system encoding (usually utf-8).
|
||||
|
||||
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
|
||||
26, update 2013 Dec 14)
|
||||
|
||||
Problem producing tags file when hebrew.frx is present. It has a BOM.
|
||||
Results in E670. (Tony Mechelynck, 2010 May 2)
|
||||
|
||||
@@ -897,9 +1084,6 @@ Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
@@ -957,8 +1141,8 @@ Dominique can't reproduce it.
|
||||
":function f(x) keepjumps" creates a function where every command is executed
|
||||
like it has ":keepjumps" before it.
|
||||
|
||||
Coverity: ask someone to create new user: Dominique.
|
||||
Check if there are new reported defects: http://scan.coverity.com/rung2.html
|
||||
Coverity: Check if there are new reported defects:
|
||||
https://scan.coverity.com/projects/241
|
||||
|
||||
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
2010 Nov 5)
|
||||
@@ -994,7 +1178,7 @@ string value.
|
||||
|
||||
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
|
||||
For running gvim on an USB stick: avoid the OLE registration. Use a command
|
||||
For running gvim on a USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
When using an expression in 'statusline' leading white space sometimes goes
|
||||
@@ -1308,6 +1492,7 @@ Kondakoff, 2009 May 13)
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
Possibly related problem: Alexey Muranov, 2015 Apr 2
|
||||
|
||||
Problem with CTRL-F. (Charles Campbell, 2008 March 21)
|
||||
Only happens with "gvim -geometry "160x26+4+27" -u NONE -U NONE prop.c".
|
||||
@@ -1507,13 +1692,6 @@ with "gvim -nb:localhost:55555:foo". From nc do: '1:editFile!0 "foo"'. Then
|
||||
go to Insert mode and add a few lines. Then backspacing every other time
|
||||
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
|
||||
|
||||
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
|
||||
Latest version: 2011 May 18
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
Version from Guopeng Wen that does this (2010 Dec 27)
|
||||
Alternative: MSI installer: https://github.com/petrkle/vim-msi/
|
||||
|
||||
Windows installer should install 32-bit version of right-click handler also on
|
||||
64-bit systems. (Brian Cunningham, 2011 Dec 28)
|
||||
|
||||
@@ -1537,8 +1715,6 @@ Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
|
||||
Win32: Can't complete shell command names. Why is setting xp_context in
|
||||
set_one_cmd_context() inside #ifndef BACKSLASH_IN_FILENAME?
|
||||
|
||||
Win32: Patch for convert_filterW(). (Taro Muraoka, 2007 Mar 2)
|
||||
|
||||
Win32: Patch for cscope external command. (Mike Williams, 2007 Aug 7)
|
||||
|
||||
Win32: XPM support only works with path without spaces. Patch by Mathias
|
||||
@@ -1577,12 +1753,6 @@ Check for this and use iconv? (Edward L. Fox, 2007 Sep 12)
|
||||
Does the conversion in the other direction work when 'fileencodings' is set
|
||||
properly?
|
||||
|
||||
Add a few features to xxd. (Vadim Vygonets, 2013 Nov 11)
|
||||
Patches: 2013 Nov 19
|
||||
1: Add -e: little endian hexdump
|
||||
2: Add -o: add offset to displayed position
|
||||
3: Change displayed file position width to 8 chars
|
||||
|
||||
Cursor displayed in the wrong position when using 'numberwidth'. (James Vega,
|
||||
2007 Jun 21)
|
||||
|
||||
@@ -2027,8 +2197,6 @@ Awaiting updated patches:
|
||||
Search in 'runtimepath'?
|
||||
More docs needed about how to use this.
|
||||
How to get the messages into the .po files?
|
||||
strchars() Like strlen() and strwidth() but counting characters
|
||||
instead of bytes.
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
layout and 'c' for console dialog. (Haegg)
|
||||
Flemming Madsen has a patch for the 'c' flag
|
||||
@@ -3963,8 +4131,6 @@ Autocommands:
|
||||
8 Autocommand for when modified files have been found, when getting input
|
||||
focus again (e.g., FileChangedFocus).
|
||||
Check when: getting focus, jumping to another buffer, ...
|
||||
7 Autocommand for when an option is changed. Match buffer name or option
|
||||
name?
|
||||
8 Autocommands should not change registers. And marks? And the jumplist?
|
||||
And anything else? Add a command to save and restore these things.
|
||||
8 Add autocommands, user functions and user commands to ":mkvimrc".
|
||||
@@ -4578,7 +4744,6 @@ Searching:
|
||||
should be ignored (like "*/" or "#endif" inside /* */).
|
||||
Also: use "%" to jump from start to end of syntax region and back.
|
||||
Alternative: use matchit.vim
|
||||
8 "/:/e+1" gets stuck on a match at the end of the line. Do we care?
|
||||
8 A pattern like "\([^a]\+\)\+" takes an awful long time. Recognize that
|
||||
the recursive "\+" is meaningless and optimize for it.
|
||||
This one is also very slow on "/* some comment */": "^\/\*\(.*[^/]\)*$".
|
||||
@@ -5005,8 +5170,6 @@ Argument list:
|
||||
|
||||
Registers:
|
||||
8 Don't display empty registers with ":display". (Etienne)
|
||||
8 Make the # register writable, so that it can be restored after jumping
|
||||
around in windows.
|
||||
8 Add put command that overwrites existing text. Should also work for
|
||||
blocks. Useful to move text around in a table. Works like using "R ^R r"
|
||||
for every line.
|
||||
|
||||
@@ -194,7 +194,7 @@ child, you should have the intention to do this for at least one year.
|
||||
|
||||
How do you know that the money will be spent right? First of all you have my
|
||||
personal guarantee as the author of Vim. I trust the people that are working
|
||||
at the centre, I know them personally. Further more, the centre has been
|
||||
at the centre, I know them personally. Furthermore, the centre has been
|
||||
co-sponsored and inspected by World Vision, Save the Children Fund and is now
|
||||
under the supervision of Pacific Academy Outreach Society. The centre is
|
||||
visited about once a year to check the progress (at our own cost). I have
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_02.txt* For Vim version 7.4. Last change: 2010 Jul 20
|
||||
*usr_02.txt* For Vim version 7.4. Last change: 2015 Apr 12
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -527,9 +527,11 @@ Summary: *help-summary* >
|
||||
:help subject()
|
||||
< Function "subject". >
|
||||
:help -subject
|
||||
< Command-line option "-subject". >
|
||||
< Command-line argument "-subject". >
|
||||
:help +subject
|
||||
< Compile-time feature "+subject". >
|
||||
:help /*
|
||||
< Regular expression item "*" >
|
||||
:help EventName
|
||||
< Autocommand event "EventName". >
|
||||
:help digraphs.txt
|
||||
|
||||
@@ -532,7 +532,7 @@ MATCHING ANY SINGLE CHARACTER
|
||||
|
||||
The . (dot) character matches any existing character. For example, the
|
||||
pattern "c.m" matches a string whose first character is a c, whose second
|
||||
character is anything, and whose the third character is m. Example:
|
||||
character is anything, and whose third character is m. Example:
|
||||
|
||||
We use a computer that became the cummin winter. ~
|
||||
xxx xxx xxx
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_25.txt* For Vim version 7.4. Last change: 2007 May 11
|
||||
*usr_25.txt* For Vim version 7.4. Last change: 2014 Oct 29
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -402,7 +402,7 @@ the cursor keys: >
|
||||
:map <Down> gj
|
||||
|
||||
|
||||
TURNING A PARAGRAPH INTO ONE LINE
|
||||
TURNING A PARAGRAPH INTO ONE LINE *edit-paragraph-join*
|
||||
|
||||
If you want to import text into a program like MS-Word, each paragraph should
|
||||
be a single line. If your paragraphs are currently separated with empty
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_43.txt* For Vim version 7.4. Last change: 2008 Dec 28
|
||||
*usr_43.txt* For Vim version 7.4. Last change: 2015 Oct 23
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -46,6 +46,7 @@ three-line comment. You do this with only two steps:
|
||||
|
||||
setlocal softtabstop=4
|
||||
noremap <buffer> <LocalLeader>c o/**************<CR><CR>/<Esc>
|
||||
let b:undo_ftplugin = "setl softtabstop< | unmap <buffer> <LocalLeader>c"
|
||||
|
||||
Try editing a C file. You should notice that the 'softtabstop' option is set
|
||||
to 4. But when you edit another file it's reset to the default zero. That is
|
||||
@@ -60,6 +61,11 @@ buffer. This works with any mapping command: ":map!", ":vmap", etc. The
|
||||
|<LocalLeader>| in the mapping is replaced with the value of the
|
||||
"maplocalleader" variable.
|
||||
|
||||
The line to set b:undo_ftplugin is for when the filetype is set to another
|
||||
value. In that case you will want to undo your preferences. The
|
||||
b:undo_ftplugin variable is executed as a command. Watch out for characters
|
||||
with a special meaning inside a string, such as a backslash.
|
||||
|
||||
You can find examples for filetype plugins in this directory: >
|
||||
|
||||
$VIMRUNTIME/ftplugin/
|
||||
|
||||
@@ -135,7 +135,7 @@ For the first file the cursor will be positioned on line "num".
|
||||
If "num" is missing, the cursor will be positioned on the last line.
|
||||
.TP
|
||||
+/{pat}
|
||||
For the first file the cursor will be positioned on the
|
||||
For the first file the cursor will be positioned in the line with the
|
||||
first occurrence of {pat}.
|
||||
See ":help search\-pattern" for the available search patterns.
|
||||
.TP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VIM(1) VIM(1)
|
||||
VIM(1) General Commands Manual VIM(1)
|
||||
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ DESCRIPTION
|
||||
to edit all kinds of plain text. It is especially useful for editing
|
||||
programs.
|
||||
|
||||
There are a lot of enhancements above Vi: multi level undo, multi win-
|
||||
There are a lot of enhancements above Vi: multi level undo, multi win‐
|
||||
dows and buffers, syntax highlighting, command line editing, filename
|
||||
completion, on-line help, visual selection, etc.. See ":help
|
||||
vi_diff.txt" for a summary of the differences between Vim and Vi.
|
||||
|
||||
While running Vim a lot of help can be obtained from the on-line help
|
||||
system, with the ":help" command. See the ON-LINE HELP section below.
|
||||
system, with the ":help" command. See the ON-LINE HELP section below.
|
||||
|
||||
Most often Vim is started to edit a single file with the command
|
||||
|
||||
@@ -38,44 +38,44 @@ DESCRIPTION
|
||||
vim [options] [filelist]
|
||||
|
||||
If the filelist is missing, the editor will start with an empty buffer.
|
||||
Otherwise exactly one out of the following four may be used to choose
|
||||
Otherwise exactly one out of the following four may be used to choose
|
||||
one or more files to be edited.
|
||||
|
||||
file .. A list of filenames. The first one will be the current
|
||||
file and read into the buffer. The cursor will be posi-
|
||||
file .. A list of filenames. The first one will be the current
|
||||
file and read into the buffer. The cursor will be posi‐
|
||||
tioned on the first line of the buffer. You can get to the
|
||||
other files with the ":next" command. To edit a file that
|
||||
other files with the ":next" command. To edit a file that
|
||||
starts with a dash, precede the filelist with "--".
|
||||
|
||||
- The file to edit is read from stdin. Commands are read
|
||||
- The file to edit is read from stdin. Commands are read
|
||||
from stderr, which should be a tty.
|
||||
|
||||
-t {tag} The file to edit and the initial cursor position depends on
|
||||
a "tag", a sort of goto label. {tag} is looked up in the
|
||||
a "tag", a sort of goto label. {tag} is looked up in the
|
||||
tags file, the associated file becomes the current file and
|
||||
the associated command is executed. Mostly this is used
|
||||
for C programs, in which case {tag} could be a function
|
||||
the associated command is executed. Mostly this is used
|
||||
for C programs, in which case {tag} could be a function
|
||||
name. The effect is that the file containing that function
|
||||
becomes the current file and the cursor is positioned on
|
||||
becomes the current file and the cursor is positioned on
|
||||
the start of the function. See ":help tag-commands".
|
||||
|
||||
-q [errorfile]
|
||||
Start in quickFix mode. The file [errorfile] is read and
|
||||
the first error is displayed. If [errorfile] is omitted,
|
||||
Start in quickFix mode. The file [errorfile] is read and
|
||||
the first error is displayed. If [errorfile] is omitted,
|
||||
the filename is obtained from the 'errorfile' option
|
||||
(defaults to "AztecC.Err" for the Amiga, "errors.err" on
|
||||
other systems). Further errors can be jumped to with the
|
||||
(defaults to "AztecC.Err" for the Amiga, "errors.err" on
|
||||
other systems). Further errors can be jumped to with the
|
||||
":cn" command. See ":help quickfix".
|
||||
|
||||
Vim behaves differently, depending on the name of the command (the exe-
|
||||
Vim behaves differently, depending on the name of the command (the exe‐
|
||||
cutable may still be the same file).
|
||||
|
||||
vim The "normal" way, everything is default.
|
||||
|
||||
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
|
||||
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
|
||||
Can also be done with the "-e" argument.
|
||||
|
||||
view Start in read-only mode. You will be protected from writing
|
||||
view Start in read-only mode. You will be protected from writing
|
||||
the files. Can also be done with the "-R" argument.
|
||||
|
||||
gvim gview
|
||||
@@ -87,102 +87,102 @@ DESCRIPTION
|
||||
be done with the "-y" argument.
|
||||
|
||||
rvim rview rgvim rgview
|
||||
Like the above, but with restrictions. It will not be possi-
|
||||
ble to start shell commands, or suspend Vim. Can also be
|
||||
Like the above, but with restrictions. It will not be possi‐
|
||||
ble to start shell commands, or suspend Vim. Can also be
|
||||
done with the "-Z" argument.
|
||||
|
||||
OPTIONS
|
||||
The options may be given in any order, before or after filenames.
|
||||
The options may be given in any order, before or after filenames.
|
||||
Options without an argument can be combined after a single dash.
|
||||
|
||||
+[num] For the first file the cursor will be positioned on line
|
||||
"num". If "num" is missing, the cursor will be positioned
|
||||
+[num] For the first file the cursor will be positioned on line
|
||||
"num". If "num" is missing, the cursor will be positioned
|
||||
on the last line.
|
||||
|
||||
+/{pat} For the first file the cursor will be positioned on the
|
||||
first occurrence of {pat}. See ":help search-pattern" for
|
||||
the available search patterns.
|
||||
+/{pat} For the first file the cursor will be positioned in the
|
||||
line with the first occurrence of {pat}. See ":help
|
||||
search-pattern" for the available search patterns.
|
||||
|
||||
+{command}
|
||||
|
||||
-c {command}
|
||||
{command} will be executed after the first file has been
|
||||
read. {command} is interpreted as an Ex command. If the
|
||||
{command} contains spaces it must be enclosed in double
|
||||
quotes (this depends on the shell that is used). Example:
|
||||
{command} will be executed after the first file has been
|
||||
read. {command} is interpreted as an Ex command. If the
|
||||
{command} contains spaces it must be enclosed in double
|
||||
quotes (this depends on the shell that is used). Example:
|
||||
Vim "+set si" main.c
|
||||
Note: You can use up to 10 "+" or "-c" commands.
|
||||
|
||||
-S {file} {file} will be sourced after the first file has been read.
|
||||
This is equivalent to -c "source {file}". {file} cannot
|
||||
-S {file} {file} will be sourced after the first file has been read.
|
||||
This is equivalent to -c "source {file}". {file} cannot
|
||||
start with '-'. If {file} is omitted "Session.vim" is used
|
||||
(only works when -S is the last argument).
|
||||
|
||||
--cmd {command}
|
||||
Like using "-c", but the command is executed just before
|
||||
processing any vimrc file. You can use up to 10 of these
|
||||
Like using "-c", but the command is executed just before
|
||||
processing any vimrc file. You can use up to 10 of these
|
||||
commands, independently from "-c" commands.
|
||||
|
||||
-A If Vim has been compiled with ARABIC support for editing
|
||||
right-to-left oriented files and Arabic keyboard mapping,
|
||||
this option starts Vim in Arabic mode, i.e. 'arabic' is
|
||||
-A If Vim has been compiled with ARABIC support for editing
|
||||
right-to-left oriented files and Arabic keyboard mapping,
|
||||
this option starts Vim in Arabic mode, i.e. 'arabic' is
|
||||
set. Otherwise an error message is given and Vim aborts.
|
||||
|
||||
-b Binary mode. A few options will be set that makes it pos-
|
||||
-b Binary mode. A few options will be set that makes it pos‐
|
||||
sible to edit a binary or executable file.
|
||||
|
||||
-C Compatible. Set the 'compatible' option. This will make
|
||||
Vim behave mostly like Vi, even though a .vimrc file
|
||||
-C Compatible. Set the 'compatible' option. This will make
|
||||
Vim behave mostly like Vi, even though a .vimrc file
|
||||
exists.
|
||||
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
differences between them. Works like vimdiff(1).
|
||||
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
Example: "-d con:20/30/600/150".
|
||||
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
command from a script.
|
||||
|
||||
-e Start Vim in Ex mode, just like the executable was called
|
||||
-e Start Vim in Ex mode, just like the executable was called
|
||||
"ex".
|
||||
|
||||
-E Start Vim in improved Ex mode, just like the executable was
|
||||
called "exim".
|
||||
|
||||
-f Foreground. For the GUI version, Vim will not fork and
|
||||
-f Foreground. For the GUI version, Vim will not fork and
|
||||
detach from the shell it was started in. On the Amiga, Vim
|
||||
is not restarted to open a new window. This option should
|
||||
be used when Vim is executed by a program that will wait
|
||||
for the edit session to finish (e.g. mail). On the Amiga
|
||||
is not restarted to open a new window. This option should
|
||||
be used when Vim is executed by a program that will wait
|
||||
for the edit session to finish (e.g. mail). On the Amiga
|
||||
the ":sh" and ":!" commands will not work.
|
||||
|
||||
--nofork Foreground. For the GUI version, Vim will not fork and
|
||||
--nofork Foreground. For the GUI version, Vim will not fork and
|
||||
detach from the shell it was started in.
|
||||
|
||||
-F If Vim has been compiled with FKMAP support for editing
|
||||
right-to-left oriented files and Farsi keyboard mapping,
|
||||
this option starts Vim in Farsi mode, i.e. 'fkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-g If Vim has been compiled with GUI support, this option
|
||||
enables the GUI. If no GUI support was compiled in, an
|
||||
error message is given and Vim aborts.
|
||||
|
||||
-h Give a bit of help about the command line arguments and
|
||||
options. After this Vim exits.
|
||||
|
||||
-H If Vim has been compiled with RIGHTLEFT support for editing
|
||||
right-to-left oriented files and Hebrew keyboard mapping,
|
||||
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
|
||||
-F If Vim has been compiled with FKMAP support for editing
|
||||
right-to-left oriented files and Farsi keyboard mapping,
|
||||
this option starts Vim in Farsi mode, i.e. 'fkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-g If Vim has been compiled with GUI support, this option
|
||||
enables the GUI. If no GUI support was compiled in, an
|
||||
error message is given and Vim aborts.
|
||||
|
||||
-h Give a bit of help about the command line arguments and
|
||||
options. After this Vim exits.
|
||||
|
||||
-H If Vim has been compiled with RIGHTLEFT support for editing
|
||||
right-to-left oriented files and Hebrew keyboard mapping,
|
||||
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-i {viminfo}
|
||||
When using the viminfo file is enabled, this option sets
|
||||
the filename to use, instead of the default "~/.viminfo".
|
||||
When using the viminfo file is enabled, this option sets
|
||||
the filename to use, instead of the default "~/.viminfo".
|
||||
This can also be used to skip the use of the .viminfo file,
|
||||
by giving the name "NONE".
|
||||
|
||||
@@ -190,92 +190,92 @@ OPTIONS
|
||||
|
||||
-l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
|
||||
|
||||
-m Modifying files is disabled. Resets the 'write' option.
|
||||
You can still modify the buffer, but writing a file is not
|
||||
-m Modifying files is disabled. Resets the 'write' option.
|
||||
You can still modify the buffer, but writing a file is not
|
||||
possible.
|
||||
|
||||
-M Modifications not allowed. The 'modifiable' and 'write'
|
||||
options will be unset, so that changes are not allowed and
|
||||
files can not be written. Note that these options can be
|
||||
-M Modifications not allowed. The 'modifiable' and 'write'
|
||||
options will be unset, so that changes are not allowed and
|
||||
files can not be written. Note that these options can be
|
||||
set to enable making modifications.
|
||||
|
||||
-N No-compatible mode. Reset the 'compatible' option. This
|
||||
will make Vim behave a bit better, but less Vi compatible,
|
||||
-N No-compatible mode. Reset the 'compatible' option. This
|
||||
will make Vim behave a bit better, but less Vi compatible,
|
||||
even though a .vimrc file does not exist.
|
||||
|
||||
-n No swap file will be used. Recovery after a crash will be
|
||||
impossible. Handy if you want to edit a file on a very
|
||||
slow medium (e.g. floppy). Can also be done with ":set
|
||||
-n No swap file will be used. Recovery after a crash will be
|
||||
impossible. Handy if you want to edit a file on a very
|
||||
slow medium (e.g. floppy). Can also be done with ":set
|
||||
uc=0". Can be undone with ":set uc=200".
|
||||
|
||||
-nb Become an editor server for NetBeans. See the docs for
|
||||
-nb Become an editor server for NetBeans. See the docs for
|
||||
details.
|
||||
|
||||
-o[N] Open N windows stacked. When N is omitted, open one window
|
||||
for each file.
|
||||
|
||||
-O[N] Open N windows side by side. When N is omitted, open one
|
||||
-O[N] Open N windows side by side. When N is omitted, open one
|
||||
window for each file.
|
||||
|
||||
-p[N] Open N tab pages. When N is omitted, open one tab page for
|
||||
each file.
|
||||
|
||||
-R Read-only mode. The 'readonly' option will be set. You
|
||||
can still edit the buffer, but will be prevented from acci-
|
||||
dently overwriting a file. If you do want to overwrite a
|
||||
file, add an exclamation mark to the Ex command, as in
|
||||
":w!". The -R option also implies the -n option (see
|
||||
below). The 'readonly' option can be reset with ":set
|
||||
-R Read-only mode. The 'readonly' option will be set. You
|
||||
can still edit the buffer, but will be prevented from acci‐
|
||||
dently overwriting a file. If you do want to overwrite a
|
||||
file, add an exclamation mark to the Ex command, as in
|
||||
":w!". The -R option also implies the -n option (see
|
||||
below). The 'readonly' option can be reset with ":set
|
||||
noro". See ":help 'readonly'".
|
||||
|
||||
-r List swap files, with information about using them for
|
||||
-r List swap files, with information about using them for
|
||||
recovery.
|
||||
|
||||
-r {file} Recovery mode. The swap file is used to recover a crashed
|
||||
editing session. The swap file is a file with the same
|
||||
-r {file} Recovery mode. The swap file is used to recover a crashed
|
||||
editing session. The swap file is a file with the same
|
||||
filename as the text file with ".swp" appended. See ":help
|
||||
recovery".
|
||||
|
||||
-s Silent mode. Only when started as "Ex" or when the "-e"
|
||||
-s Silent mode. Only when started as "Ex" or when the "-e"
|
||||
option was given before the "-s" option.
|
||||
|
||||
-s {scriptin}
|
||||
The script file {scriptin} is read. The characters in the
|
||||
file are interpreted as if you had typed them. The same
|
||||
The script file {scriptin} is read. The characters in the
|
||||
file are interpreted as if you had typed them. The same
|
||||
can be done with the command ":source! {scriptin}". If the
|
||||
end of the file is reached before the editor exits, further
|
||||
characters are read from the keyboard.
|
||||
|
||||
-T {terminal}
|
||||
Tells Vim the name of the terminal you are using. Only
|
||||
required when the automatic way doesn't work. Should be a
|
||||
terminal known to Vim (builtin) or defined in the termcap
|
||||
Tells Vim the name of the terminal you are using. Only
|
||||
required when the automatic way doesn't work. Should be a
|
||||
terminal known to Vim (builtin) or defined in the termcap
|
||||
or terminfo file.
|
||||
|
||||
-u {vimrc} Use the commands in the file {vimrc} for initializations.
|
||||
All the other initializations are skipped. Use this to
|
||||
edit a special kind of files. It can also be used to skip
|
||||
all initializations by giving the name "NONE". See ":help
|
||||
-u {vimrc} Use the commands in the file {vimrc} for initializations.
|
||||
All the other initializations are skipped. Use this to
|
||||
edit a special kind of files. It can also be used to skip
|
||||
all initializations by giving the name "NONE". See ":help
|
||||
initialization" within vim for more details.
|
||||
|
||||
-U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa-
|
||||
tions. All the other GUI initializations are skipped. It
|
||||
can also be used to skip all GUI initializations by giving
|
||||
the name "NONE". See ":help gui-init" within vim for more
|
||||
-U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa‐
|
||||
tions. All the other GUI initializations are skipped. It
|
||||
can also be used to skip all GUI initializations by giving
|
||||
the name "NONE". See ":help gui-init" within vim for more
|
||||
details.
|
||||
|
||||
-V[N] Verbose. Give messages about which files are sourced and
|
||||
for reading and writing a viminfo file. The optional num-
|
||||
-V[N] Verbose. Give messages about which files are sourced and
|
||||
for reading and writing a viminfo file. The optional num‐
|
||||
ber N is the value for 'verbose'. Default is 10.
|
||||
|
||||
-v Start Vim in Vi mode, just like the executable was called
|
||||
"vi". This only has effect when the executable is called
|
||||
-v Start Vim in Vi mode, just like the executable was called
|
||||
"vi". This only has effect when the executable is called
|
||||
"ex".
|
||||
|
||||
-w {scriptout}
|
||||
All the characters that you type are recorded in the file
|
||||
{scriptout}, until you exit Vim. This is useful if you
|
||||
want to create a script file to be used with "vim -s" or
|
||||
All the characters that you type are recorded in the file
|
||||
{scriptout}, until you exit Vim. This is useful if you
|
||||
want to create a script file to be used with "vim -s" or
|
||||
":source!". If the {scriptout} file exists, characters are
|
||||
appended.
|
||||
|
||||
@@ -285,27 +285,27 @@ OPTIONS
|
||||
-x Use encryption when writing files. Will prompt for a crypt
|
||||
key.
|
||||
|
||||
-X Don't connect to the X server. Shortens startup time in a
|
||||
terminal, but the window title and clipboard will not be
|
||||
-X Don't connect to the X server. Shortens startup time in a
|
||||
terminal, but the window title and clipboard will not be
|
||||
used.
|
||||
|
||||
-y Start Vim in easy mode, just like the executable was called
|
||||
"evim" or "eview". Makes Vim behave like a click-and-type
|
||||
"evim" or "eview". Makes Vim behave like a click-and-type
|
||||
editor.
|
||||
|
||||
-Z Restricted mode. Works like the executable starts with
|
||||
-Z Restricted mode. Works like the executable starts with
|
||||
"r".
|
||||
|
||||
-- Denotes the end of the options. Arguments after this will
|
||||
be handled as a file name. This can be used to edit a
|
||||
-- Denotes the end of the options. Arguments after this will
|
||||
be handled as a file name. This can be used to edit a
|
||||
filename that starts with a '-'.
|
||||
|
||||
--echo-wid GTK GUI only: Echo the Window ID on stdout.
|
||||
|
||||
--help Give a help message and exit, just like "-h".
|
||||
|
||||
--literal Take file name arguments literally, do not expand wild-
|
||||
cards. This has no effect on Unix where the shell expands
|
||||
--literal Take file name arguments literally, do not expand wild‐
|
||||
cards. This has no effect on Unix where the shell expands
|
||||
wildcards.
|
||||
|
||||
--noplugin Skip loading plugins. Implied by -u NONE.
|
||||
@@ -315,18 +315,18 @@ OPTIONS
|
||||
is given and the files are edited in the current Vim.
|
||||
|
||||
--remote-expr {expr}
|
||||
Connect to a Vim server, evaluate {expr} in it and print
|
||||
Connect to a Vim server, evaluate {expr} in it and print
|
||||
the result on stdout.
|
||||
|
||||
--remote-send {keys}
|
||||
Connect to a Vim server and send {keys} to it.
|
||||
|
||||
--remote-silent
|
||||
As --remote, but without the warning when no server is
|
||||
As --remote, but without the warning when no server is
|
||||
found.
|
||||
|
||||
--remote-wait
|
||||
As --remote, but Vim does not exit until the files have
|
||||
As --remote, but Vim does not exit until the files have
|
||||
been edited.
|
||||
|
||||
--remote-wait-silent
|
||||
@@ -337,31 +337,31 @@ OPTIONS
|
||||
List the names of all Vim servers that can be found.
|
||||
|
||||
--servername {name}
|
||||
Use {name} as the server name. Used for the current Vim,
|
||||
Use {name} as the server name. Used for the current Vim,
|
||||
unless used with a --remote argument, then it's the name of
|
||||
the server to connect to.
|
||||
|
||||
--socketid {id}
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in
|
||||
another window.
|
||||
|
||||
--version Print version information and exit.
|
||||
|
||||
ON-LINE HELP
|
||||
Type ":help" in Vim to get started. Type ":help subject" to get help
|
||||
on a specific subject. For example: ":help ZZ" to get help for the
|
||||
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
|
||||
line-completion"). Tags are present to jump from one place to another
|
||||
Type ":help" in Vim to get started. Type ":help subject" to get help
|
||||
on a specific subject. For example: ":help ZZ" to get help for the
|
||||
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd‐
|
||||
line-completion"). Tags are present to jump from one place to another
|
||||
(sort of hypertext links, see ":help"). All documentation files can be
|
||||
viewed in this way, for example ":help syntax.txt".
|
||||
|
||||
FILES
|
||||
/usr/local/lib/vim/doc/*.txt
|
||||
The Vim documentation files. Use ":help doc-file-list"
|
||||
The Vim documentation files. Use ":help doc-file-list"
|
||||
to get the complete list.
|
||||
|
||||
/usr/local/lib/vim/doc/tags
|
||||
The tags file used for finding information in the docu-
|
||||
The tags file used for finding information in the docu‐
|
||||
mentation files.
|
||||
|
||||
/usr/local/lib/vim/syntax/syntax.vim
|
||||
@@ -381,7 +381,7 @@ FILES
|
||||
~/.gvimrc Your personal gvim initializations.
|
||||
|
||||
/usr/local/lib/vim/optwin.vim
|
||||
Script used for the ":options" command, a nice way to
|
||||
Script used for the ":options" command, a nice way to
|
||||
view and set options.
|
||||
|
||||
/usr/local/lib/vim/menu.vim
|
||||
@@ -391,11 +391,11 @@ FILES
|
||||
Script to generate a bug report. See ":help bugs".
|
||||
|
||||
/usr/local/lib/vim/filetype.vim
|
||||
Script to detect the type of a file by its name. See
|
||||
Script to detect the type of a file by its name. See
|
||||
":help 'filetype'".
|
||||
|
||||
/usr/local/lib/vim/scripts.vim
|
||||
Script to detect the type of a file by its contents.
|
||||
Script to detect the type of a file by its contents.
|
||||
See ":help 'filetype'".
|
||||
|
||||
/usr/local/lib/vim/print/*.ps
|
||||
@@ -410,8 +410,8 @@ SEE ALSO
|
||||
AUTHOR
|
||||
Most of Vim was made by Bram Moolenaar, with a lot of help from others.
|
||||
See ":help credits" in Vim.
|
||||
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
|
||||
G.R. (Fred) Walter. Although hardly any of the original code remains.
|
||||
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
|
||||
G.R. (Fred) Walter. Although hardly any of the original code remains.
|
||||
|
||||
BUGS
|
||||
Probably. See ":help todo" for a list of known problems.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.4. Last change: 2014 Sep 23
|
||||
*windows.txt* For Vim version 7.4. Last change: 2015 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -263,28 +263,57 @@ left of the Vim window.
|
||||
Closing a window
|
||||
----------------
|
||||
|
||||
:q[uit]
|
||||
:{count}q[uit]
|
||||
CTRL-W q *CTRL-W_q*
|
||||
CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
|
||||
:q[uit] Quit current window. When quitting the last window (not
|
||||
counting a help window), exit Vim.
|
||||
Without {count}: Quit the current window. If {count} is
|
||||
given quit the {count} window.
|
||||
|
||||
When quitting the last window (not counting a help window),
|
||||
exit Vim.
|
||||
|
||||
When 'hidden' is set, and there is only one window for the
|
||||
current buffer, it becomes hidden.
|
||||
When 'hidden' is not set, and there is only one window for the
|
||||
current buffer, and the buffer was changed, the command fails.
|
||||
(Note: CTRL-Q does not work on all terminals)
|
||||
current buffer, it becomes hidden. When 'hidden' is not set,
|
||||
and there is only one window for the current buffer, and the
|
||||
buffer was changed, the command fails.
|
||||
|
||||
(Note: CTRL-Q does not work on all terminals).
|
||||
|
||||
If [count] is greater than the last window number the last
|
||||
window will be closed: >
|
||||
:1quit " quit the first window
|
||||
:$quit " quit the last window
|
||||
:9quit " quit the last window
|
||||
" if there are less than 9 windows opened
|
||||
:-quit " quit the previews window
|
||||
:+quit " quit the next window
|
||||
:+2quit " quit the second next window
|
||||
<
|
||||
:q[uit]!
|
||||
:{count}q[uit]!
|
||||
Without {count}: Quit the current window. If {count} is
|
||||
given quit the {count} window.
|
||||
|
||||
:q[uit]! Quit current window. If this was the last window for a buffer,
|
||||
any changes to that buffer are lost. When quitting the last
|
||||
window (not counting help windows), exit Vim. The contents of
|
||||
the buffer are lost, even when 'hidden' is set.
|
||||
If this was the last window for a buffer, any changes to that
|
||||
buffer are lost. When quitting the last window (not counting
|
||||
help windows), exit Vim. The contents of the buffer are lost,
|
||||
even when 'hidden' is set.
|
||||
|
||||
:clo[se][!]
|
||||
:{count}clo[se][!]
|
||||
CTRL-W c *CTRL-W_c* *:clo* *:close*
|
||||
:clo[se][!] Close current window. When the 'hidden' option is set, or
|
||||
when the buffer was changed and the [!] is used, the buffer
|
||||
becomes hidden (unless there is another window editing it).
|
||||
Without {count}: Close the current window. If {count} is
|
||||
given close the {count} window.
|
||||
|
||||
When the 'hidden' option is set, or when the buffer was
|
||||
changed and the [!] is used, the buffer becomes hidden (unless
|
||||
there is another window editing it).
|
||||
|
||||
When there is only one window in the current tab page and
|
||||
there is another tab page, this closes the current tab page.
|
||||
|tab-page|.
|
||||
|
||||
This command fails when: *E444*
|
||||
- There is only one window on the screen.
|
||||
- When 'hidden' is not set, [!] is not used, the buffer has
|
||||
@@ -298,14 +327,19 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
|
||||
command.
|
||||
|
||||
*:hide*
|
||||
:hid[e] Quit current window, unless it is the last window on the
|
||||
screen. The buffer becomes hidden (unless there is another
|
||||
window editing it or 'bufhidden' is "unload" or "delete").
|
||||
:hid[e]
|
||||
:{count}hid[e]
|
||||
Quit the current window, unless it is the last window on the
|
||||
screen. For {count} see |:quit| command.
|
||||
|
||||
The buffer becomes hidden (unless there is another window
|
||||
editing it or 'bufhidden' is "unload", "delete" or "wipe").
|
||||
If the window is the last one in the current tab page the tab
|
||||
page is closed. |tab-page|
|
||||
The value of 'hidden' is irrelevant for this command.
|
||||
Changes to the buffer are not written and won't get lost, so
|
||||
this is a "safe" command.
|
||||
page is closed. |tab-page|
|
||||
|
||||
The value of 'hidden' is irrelevant for this command. Changes
|
||||
to the buffer are not written and won't get lost, so this is a
|
||||
"safe" command.
|
||||
|
||||
:hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of
|
||||
'hidden' is restored after {cmd} has been executed.
|
||||
@@ -314,12 +348,16 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
|
||||
< This will edit "Makefile", and hide the current buffer if it
|
||||
has any changes.
|
||||
|
||||
:on[ly][!]
|
||||
:{count}on[ly][!]
|
||||
CTRL-W o *CTRL-W_o* *E445*
|
||||
CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only*
|
||||
:on[ly][!] Make the current window the only one on the screen. All other
|
||||
windows are closed.
|
||||
Make the current window the only one on the screen. All other
|
||||
windows are closed. For {count} see |:quit| command.
|
||||
|
||||
When the 'hidden' option is set, all buffers in closed windows
|
||||
become hidden.
|
||||
|
||||
When 'hidden' is not set, and the 'autowrite' option is set,
|
||||
modified buffers are written. Otherwise, windows that have
|
||||
buffers that are modified are not removed, unless the [!] is
|
||||
@@ -660,8 +698,9 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
8. Do a command in all buffers or windows *list-repeat*
|
||||
|
||||
*:windo*
|
||||
:windo {cmd} Execute {cmd} in each window.
|
||||
It works like doing this: >
|
||||
:[range]windo {cmd} Execute {cmd} in each window or if [range] is given
|
||||
only in windows for which the window number lies in
|
||||
the [range]. It works like doing this: >
|
||||
CTRL-W t
|
||||
:{cmd}
|
||||
CTRL-W w
|
||||
@@ -676,11 +715,14 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
{cmd} must not open or close windows or reorder them.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:tabdo|, |:argdo| and |:bufdo|.
|
||||
Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|
|
||||
|
||||
*:bufdo*
|
||||
:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list.
|
||||
It works like doing this: >
|
||||
:[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if
|
||||
[range] is given only for buffers for which their
|
||||
buffer numer is in the [range]. It works like doing
|
||||
this: >
|
||||
:bfirst
|
||||
:{cmd}
|
||||
:bnext
|
||||
@@ -702,7 +744,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
each buffer.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+listcmds| feature}
|
||||
Also see |:tabdo|, |:argdo| and |:windo|.
|
||||
Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|
|
||||
|
||||
Examples: >
|
||||
|
||||
@@ -945,9 +988,10 @@ A buffer can also be unlisted. This means it exists, but it is not in the
|
||||
list of buffers. |unlisted-buffer|
|
||||
|
||||
|
||||
:files[!] *:files*
|
||||
:buffers[!] *:buffers* *:ls*
|
||||
:ls[!] Show all buffers. Example:
|
||||
:files[!] [flags] *:files*
|
||||
:buffers[!] [flags] *:buffers* *:ls*
|
||||
:ls[!] [flags]
|
||||
Show all buffers. Example:
|
||||
|
||||
1 #h "/test/text" line 1 ~
|
||||
2u "asdf" line 0 ~
|
||||
@@ -957,8 +1001,8 @@ list of buffers. |unlisted-buffer|
|
||||
(the term "unlisted" is a bit confusing then...).
|
||||
|
||||
Each buffer has a unique number. That number will not change,
|
||||
so you can always go to a specific buffer with ":buffer N" or
|
||||
"N CTRL-^", where N is the buffer number.
|
||||
thus you can always go to a specific buffer with ":buffer N"
|
||||
or "N CTRL-^", where N is the buffer number.
|
||||
|
||||
Indicators (chars in the same column are mutually exclusive):
|
||||
u an unlisted buffer (only displayed when [!] is used)
|
||||
@@ -973,6 +1017,21 @@ list of buffers. |unlisted-buffer|
|
||||
+ a modified buffer
|
||||
x a buffer with read errors
|
||||
|
||||
[flags] can be a combination of the following characters,
|
||||
which restrict the buffers to be listed:
|
||||
+ modified buffers
|
||||
- buffers with 'modifiable' off
|
||||
= readonly buffers
|
||||
a active buffers
|
||||
u unloaded buffers (overrides the "!")
|
||||
h hidden buffers
|
||||
x buffers with a read error
|
||||
% current buffer
|
||||
# alternate buffer
|
||||
Combining flags means they are "and"ed together, e.g.:
|
||||
h+ hidden buffers which are modified
|
||||
a+ active buffers which are modified
|
||||
|
||||
*:bad* *:badd*
|
||||
:bad[d] [+lnum] {fname}
|
||||
Add file name {fname} to the buffer list, without loading it.
|
||||
@@ -992,7 +1051,11 @@ list of buffers. |unlisted-buffer|
|
||||
Actually, the buffer isn't completely deleted, it is removed
|
||||
from the buffer list |unlisted-buffer| and option values,
|
||||
variables and mappings/abbreviations for the buffer are
|
||||
cleared.
|
||||
cleared. Examples: >
|
||||
:.,$-bdelete " delete buffers from the current one to
|
||||
" last but one
|
||||
:%bdelete " delete all buffers
|
||||
<
|
||||
|
||||
:bdelete[!] {bufname} *E93* *E94*
|
||||
Like ":bdelete[!] [N]", but buffer given by name. Note that a
|
||||
@@ -1016,7 +1079,11 @@ list of buffers. |unlisted-buffer|
|
||||
Like |:bdelete|, but really delete the buffer. Everything
|
||||
related to the buffer is lost. All marks in this buffer
|
||||
become invalid, option settings are lost, etc. Don't use this
|
||||
unless you know what you are doing.
|
||||
unless you know what you are doing. Examples: >
|
||||
:.+,$bwipeout " wipe out all buffers after the current
|
||||
" one
|
||||
:%bwipeout " wipe out all buffers
|
||||
<
|
||||
|
||||
:[N]bun[load][!] *:bun* *:bunload* *E515*
|
||||
:bun[load][!] [N]
|
||||
@@ -1050,13 +1117,13 @@ list of buffers. |unlisted-buffer|
|
||||
the current buffer remains being edited. See |:buffer-!| for
|
||||
[!]. This will also edit a buffer that is not in the buffer
|
||||
list, without setting the 'buflisted' flag.
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:[N]b[uffer][!] [+cmd] {bufname}
|
||||
Edit buffer for {bufname} from the buffer list. See
|
||||
|:buffer-!| for [!]. This will also edit a buffer that is not
|
||||
in the buffer list, without setting the 'buflisted' flag.
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:[N]sb[uffer] [+cmd] [N] *:sb* *:sbuffer*
|
||||
Split window and edit buffer [N] from the buffer list. If [N]
|
||||
@@ -1064,7 +1131,7 @@ list of buffers. |unlisted-buffer|
|
||||
"useopen" setting of 'switchbuf' when splitting. This will
|
||||
also edit a buffer that is not in the buffer list, without
|
||||
setting the 'buflisted' flag.
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:[N]sb[uffer] [+cmd] {bufname}
|
||||
Split window and edit buffer for {bufname} from the buffer
|
||||
@@ -1073,13 +1140,13 @@ list of buffers. |unlisted-buffer|
|
||||
Note: If what you want to do is split the buffer, make a copy
|
||||
under another name, you can do it this way: >
|
||||
:w foobar | sp #
|
||||
< Also see ||+cmd|.
|
||||
< Also see |+cmd|.
|
||||
|
||||
:[N]bn[ext][!] [+cmd] [N] *:bn* *:bnext* *E87*
|
||||
Go to [N]th next buffer in buffer list. [N] defaults to one.
|
||||
Wraps around the end of the buffer list.
|
||||
See |:buffer-!| for [!].
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
If you are in a help buffer, this takes you to the next help
|
||||
buffer (if there is one). Similarly, if you are in a normal
|
||||
(non-help) buffer, this takes you to the next normal buffer.
|
||||
@@ -1092,21 +1159,21 @@ list of buffers. |unlisted-buffer|
|
||||
:[N]sbn[ext] [+cmd] [N]
|
||||
Split window and go to [N]th next buffer in buffer list.
|
||||
Wraps around the end of the buffer list. Uses 'switchbuf'
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:[N]bN[ext][!] [+cmd] [N] *:bN* *:bNext* *:bp* *:bprevious* *E88*
|
||||
:[N]bp[revious][!] [+cmd] [N]
|
||||
Go to [N]th previous buffer in buffer list. [N] defaults to
|
||||
one. Wraps around the start of the buffer list.
|
||||
See |:buffer-!| for [!] and 'switchbuf'.
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:[N]sbN[ext] [+cmd] [N] *:sbN* *:sbNext* *:sbp* *:sbprevious*
|
||||
:[N]sbp[revious] [+cmd] [N]
|
||||
Split window and go to [N]th previous buffer in buffer list.
|
||||
Wraps around the start of the buffer list.
|
||||
Uses 'switchbuf'.
|
||||
Also see ||+cmd|.
|
||||
Also see |+cmd|.
|
||||
|
||||
:br[ewind][!] [+cmd] *:br* *:brewind*
|
||||
Go to first buffer in buffer list. If the buffer list is
|
||||
|
||||
@@ -76,6 +76,16 @@ Change the character encoding in the righthand column from ASCII to EBCDIC.
|
||||
This does not change the hexadecimal representation. The option is
|
||||
meaningless in combinations with \-r, \-p or \-i.
|
||||
.TP
|
||||
.IR \-e
|
||||
Switch to little-endian hexdump.
|
||||
This option treats byte groups as words in little-endian byte order.
|
||||
The default grouping of 4 bytes may be changed using
|
||||
.RI "" \-g .
|
||||
This option only applies to hexdump, leaving the ASCII (or EBCDIC)
|
||||
representation unchanged.
|
||||
The command line switches
|
||||
\-r, \-p, \-i do not work with this mode.
|
||||
.TP
|
||||
.IR "\-g bytes " | " \-groupsize bytes"
|
||||
separate the output of every
|
||||
.RI < bytes >
|
||||
@@ -84,7 +94,7 @@ Specify
|
||||
.I \-g 0
|
||||
to suppress grouping.
|
||||
.RI < Bytes "> defaults to " 2
|
||||
in normal mode and \fI1\fP in bits mode.
|
||||
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
||||
Grouping does not apply to postscript or include style.
|
||||
.TP
|
||||
.IR \-h " | " \-help
|
||||
@@ -99,6 +109,11 @@ stop after writing
|
||||
.RI < len >
|
||||
octets.
|
||||
.TP
|
||||
.I \-o offset
|
||||
add
|
||||
.RI < offset >
|
||||
to the displayed file position.
|
||||
.TP
|
||||
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
||||
output in postscript continuous hexdump style. Also known as plain hexdump
|
||||
style.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
XXD(1) XXD(1)
|
||||
XXD(1) General Commands Manual XXD(1)
|
||||
|
||||
|
||||
|
||||
@@ -14,30 +14,29 @@ DESCRIPTION
|
||||
xxd creates a hex dump of a given file or standard input. It can also
|
||||
convert a hex dump back to its original binary form. Like uuencode(1)
|
||||
and uudecode(1) it allows the transmission of binary data in a `mail-
|
||||
safe' ASCII representation, but has the advantage of decoding to stan-
|
||||
safe' ASCII representation, but has the advantage of decoding to stan‐
|
||||
dard output. Moreover, it can be used to perform binary file patching.
|
||||
|
||||
OPTIONS
|
||||
If no infile is given, standard input is read. If infile is specified
|
||||
as a `-' character, then input is taken from standard input. If no
|
||||
If no infile is given, standard input is read. If infile is specified
|
||||
as a `-' character, then input is taken from standard input. If no
|
||||
outfile is given (or a `-' character is in its place), results are sent
|
||||
to standard output.
|
||||
|
||||
Note that a "lazy" parser is used which does not check for more than
|
||||
the first option letter, unless the option is followed by a parameter.
|
||||
Spaces between a single option letter and its parameter are optional.
|
||||
Note that a "lazy" parser is used which does not check for more than
|
||||
the first option letter, unless the option is followed by a parameter.
|
||||
Spaces between a single option letter and its parameter are optional.
|
||||
Parameters to options can be specified in decimal, hexadecimal or octal
|
||||
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
|
||||
|
||||
|
||||
-a | -autoskip
|
||||
toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
|
||||
-b | -bits
|
||||
Switch to bits (binary digits) dump, rather than hexdump. This
|
||||
option writes octets as eight digits "1"s and "0"s instead of a
|
||||
normal hexadecimal dump. Each line is preceded by a line number
|
||||
in hexadecimal and followed by an ascii (or ebcdic) representa-
|
||||
in hexadecimal and followed by an ascii (or ebcdic) representa‐
|
||||
tion. The command line switches -r, -p, -i do not work with this
|
||||
mode.
|
||||
|
||||
@@ -50,25 +49,34 @@ OPTIONS
|
||||
to EBCDIC. This does not change the hexadecimal representation.
|
||||
The option is meaningless in combinations with -r, -p or -i.
|
||||
|
||||
-e Switch to little-endian hexdump. This option treats byte groups
|
||||
as words in little-endian byte order. The default grouping of 4
|
||||
bytes may be changed using -g. This option only applies to hex‐
|
||||
dump, leaving the ASCII (or EBCDIC) representation unchanged.
|
||||
The command line switches -r, -p, -i do not work with this mode.
|
||||
|
||||
-g bytes | -groupsize bytes
|
||||
separate the output of every <bytes> bytes (two hex characters
|
||||
or eight bit-digits each) by a whitespace. Specify -g 0 to sup-
|
||||
press grouping. <Bytes> defaults to 2 in normal mode and 1 in
|
||||
bits mode. Grouping does not apply to postscript or include
|
||||
style.
|
||||
or eight bit-digits each) by a whitespace. Specify -g 0 to sup‐
|
||||
press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit‐
|
||||
tle-endian mode and 1 in bits mode. Grouping does not apply to
|
||||
postscript or include style.
|
||||
|
||||
-h | -help
|
||||
print a summary of available commands and exit. No hex dumping
|
||||
is performed.
|
||||
|
||||
-i | -include
|
||||
output in C include file style. A complete static array defini-
|
||||
output in C include file style. A complete static array defini‐
|
||||
tion is written (named after the input file), unless xxd reads
|
||||
from stdin.
|
||||
|
||||
-l len | -len len
|
||||
stop after writing <len> octets.
|
||||
|
||||
-o offset
|
||||
add <offset> to the displayed file position.
|
||||
|
||||
-p | -ps | -postscript | -plain
|
||||
output in postscript continuous hexdump style. Also known as
|
||||
plain hexdump style.
|
||||
@@ -76,8 +84,8 @@ OPTIONS
|
||||
-r | -revert
|
||||
reverse operation: convert (or patch) hexdump into binary. If
|
||||
not writing to stdout, xxd writes into its output file without
|
||||
truncating it. Use the combination -r -p to read plain hexadeci-
|
||||
mal dumps without line number information and without a particu-
|
||||
truncating it. Use the combination -r -p to read plain hexadeci‐
|
||||
mal dumps without line number information and without a particu‐
|
||||
lar column layout. Additional Whitespace and line-breaks are
|
||||
allowed anywhere.
|
||||
|
||||
@@ -101,7 +109,7 @@ OPTIONS
|
||||
CAVEATS
|
||||
xxd -r has some builtin magic while evaluating line number information.
|
||||
If the output file is seekable, then the linenumbers at the start of
|
||||
each hexdump line may be out of order, lines may be missing, or over-
|
||||
each hexdump line may be out of order, lines may be missing, or over‐
|
||||
lapping. In these cases xxd will lseek(2) to the next position. If the
|
||||
output file is not seekable, only gaps are allowed, which will be
|
||||
filled by null-bytes.
|
||||
@@ -112,8 +120,8 @@ CAVEATS
|
||||
input line after reading enough columns of hexadecimal data (see option
|
||||
-c). This also means, that changes to the printable ascii (or ebcdic)
|
||||
columns are always ignored. Reverting a plain (or postscript) style
|
||||
hexdump with xxd -r -p does not depend on the correct number of col-
|
||||
umns. Here anything that looks like a pair of hex-digits is inter-
|
||||
hexdump with xxd -r -p does not depend on the correct number of col‐
|
||||
umns. Here anything that looks like a pair of hex-digits is inter‐
|
||||
preted.
|
||||
|
||||
Note the difference between
|
||||
@@ -218,7 +226,6 @@ EXAMPLES
|
||||
% stty < /dev/term/b -echo -opost -isig -icanon min 1
|
||||
% echo -n foo > /dev/term/b
|
||||
|
||||
|
||||
RETURN VALUES
|
||||
The following error values are returned:
|
||||
|
||||
@@ -256,7 +263,4 @@ AUTHOR
|
||||
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
|
||||
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
|
||||
|
||||
|
||||
|
||||
|
||||
Manual page for xxd August 1996 XXD(1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Oct 09
|
||||
" Last Change: 2015 Oct 13
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -143,7 +143,7 @@ au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
|
||||
au BufNewFile,BufRead *.art setf art
|
||||
|
||||
" AsciiDoc
|
||||
au BufNewFile,BufRead *.asciidoc setf asciidoc
|
||||
au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc
|
||||
|
||||
" ASN.1
|
||||
au BufNewFile,BufRead *.asn,*.asn1 setf asn
|
||||
@@ -308,6 +308,9 @@ au BufNewFile,BufRead *.bl setf blank
|
||||
" Blkid cache file
|
||||
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
|
||||
" Bazel (http://bazel.io)
|
||||
autocmd BufRead,BufNewFile *.bzl,BUILD,WORKSPACE setfiletype bzl
|
||||
|
||||
" C or lpc
|
||||
au BufNewFile,BufRead *.c call s:FTlpc()
|
||||
|
||||
@@ -499,7 +502,7 @@ au BufNewFile,BufRead *.prg
|
||||
\ endif
|
||||
|
||||
" Clojure
|
||||
au BufNewFile,BufRead *.clj,*.cljs setf clojure
|
||||
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
|
||||
|
||||
" Cmake
|
||||
au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
|
||||
@@ -776,12 +779,14 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead MERGE_MSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
if !empty($XDG_CONFIG_HOME)
|
||||
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
||||
endif
|
||||
au BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
au BufNewFile,BufRead .msg.[0-9]*
|
||||
\ if getline(1) =~ '^From.*# This line is ignored.$' |
|
||||
@@ -824,7 +829,7 @@ au BufNewFile,BufRead *.gs setf grads
|
||||
au BufNewFile,BufRead *.gretl setf gretl
|
||||
|
||||
" Groovy
|
||||
au BufNewFile,BufRead *.groovy setf groovy
|
||||
au BufNewFile,BufRead *.gradle,*.groovy setf groovy
|
||||
|
||||
" GNU Server Pages
|
||||
au BufNewFile,BufRead *.gsp setf gsp
|
||||
@@ -870,7 +875,7 @@ func! s:FThtml()
|
||||
setf xhtml
|
||||
return
|
||||
endif
|
||||
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>'
|
||||
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
|
||||
setf htmldjango
|
||||
return
|
||||
endif
|
||||
@@ -1049,6 +1054,9 @@ au BufNewFile,BufRead *.ldif setf ldif
|
||||
" Ld loader
|
||||
au BufNewFile,BufRead *.ld setf ld
|
||||
|
||||
" Less
|
||||
au BufNewFile,BufRead *.less setf less
|
||||
|
||||
" Lex
|
||||
au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex
|
||||
|
||||
@@ -1163,7 +1171,7 @@ func! s:FTm()
|
||||
let n = 1
|
||||
while n < 10
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\|//\)'
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)'
|
||||
setf objc
|
||||
return
|
||||
endif
|
||||
@@ -1261,8 +1269,8 @@ au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf m
|
||||
" Mplayer config
|
||||
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
|
||||
|
||||
" Moterola S record
|
||||
au BufNewFile,BufRead *.s19,*.s28,*.s37 setf srec
|
||||
" Motorola S record
|
||||
au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
|
||||
|
||||
" Mrxvtrc
|
||||
au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
|
||||
@@ -1289,7 +1297,7 @@ au BufNewFile,BufRead *.mush setf mush
|
||||
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
|
||||
|
||||
" Nano
|
||||
au BufNewFile,BufRead */etc/nanorc,.nanorc setf nanorc
|
||||
au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
|
||||
|
||||
" Nastran input/DMAP
|
||||
"au BufNewFile,BufRead *.dat setf nastran
|
||||
@@ -1331,7 +1339,7 @@ func! s:FTmm()
|
||||
let n = 1
|
||||
while n < 10
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\)'
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
|
||||
setf objcpp
|
||||
return
|
||||
endif
|
||||
@@ -1853,7 +1861,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
|
||||
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
||||
" Gentoo ebuilds are actually bash scripts
|
||||
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass call SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
|
||||
|
||||
@@ -2023,6 +2031,10 @@ func! s:FTRules()
|
||||
setf conf " Better than hog
|
||||
return
|
||||
endif
|
||||
if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
|
||||
setf javascript
|
||||
return
|
||||
endif
|
||||
try
|
||||
let config_lines = readfile('/etc/udev/udev.conf')
|
||||
catch /^Vim\%((\a\+)\)\=:E484/
|
||||
@@ -2105,6 +2117,9 @@ au BufNewFile,BufRead *.cm setf voscm
|
||||
" Sysctl
|
||||
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
|
||||
|
||||
" Systemd unit files
|
||||
au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd
|
||||
|
||||
" Synopsys Design Constraints
|
||||
au BufNewFile,BufRead *.sdc setf sdc
|
||||
|
||||
@@ -2160,6 +2175,9 @@ au BufNewFile,BufRead *.tli setf tli
|
||||
" Telix Salt
|
||||
au BufNewFile,BufRead *.slt setf tsalt
|
||||
|
||||
" Tera Term Language
|
||||
au BufRead,BufNewFile *.ttl setf teraterm
|
||||
|
||||
" Terminfo
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
|
||||
@@ -2499,6 +2517,8 @@ au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
|
||||
" Zimbu
|
||||
au BufNewFile,BufRead *.zu setf zimbu
|
||||
" Zimbu Templates
|
||||
au BufNewFile,BufRead *.zut setf zimbutempl
|
||||
|
||||
" Zope
|
||||
" dtml (zope dynamic template markup language), pt (zope page template),
|
||||
|
||||
94
runtime/ftplugin/bzl.vim
Normal file
94
runtime/ftplugin/bzl.vim
Normal file
@@ -0,0 +1,94 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Bazel (http://bazel.io)
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
|
||||
" Last Change: 2015 Aug 11
|
||||
|
||||
""
|
||||
" @section Introduction, intro
|
||||
" Core settings for the bzl filetype, used for BUILD and *.bzl files for the
|
||||
" Bazel build system (http://bazel.io/).
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" Vim 7.4.051 has opinionated settings in ftplugin/python.vim that try to force
|
||||
" PEP8 conventions on every python file, but these conflict with Google's
|
||||
" indentation guidelines. As a workaround, we explicitly source the system
|
||||
" ftplugin, but save indentation settings beforehand and restore them after.
|
||||
let s:save_expandtab = &l:expandtab
|
||||
let s:save_shiftwidth = &l:shiftwidth
|
||||
let s:save_softtabstop = &l:softtabstop
|
||||
let s:save_tabstop = &l:tabstop
|
||||
|
||||
" NOTE: Vim versions before 7.3.511 had a ftplugin/python.vim that was broken
|
||||
" for compatible mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Load base python ftplugin (also defines b:did_ftplugin).
|
||||
source $VIMRUNTIME/ftplugin/python.vim
|
||||
|
||||
" NOTE: Vim versions before 7.4.104 and later set this in ftplugin/python.vim.
|
||||
setlocal comments=b:#,fb:-
|
||||
|
||||
" Restore pre-existing indentation settings.
|
||||
let &l:expandtab = s:save_expandtab
|
||||
let &l:shiftwidth = s:save_shiftwidth
|
||||
let &l:softtabstop = s:save_softtabstop
|
||||
let &l:tabstop = s:save_tabstop
|
||||
|
||||
setlocal formatoptions-=t
|
||||
|
||||
" Make gf work with imports in BUILD files.
|
||||
setlocal includeexpr=substitute(v:fname,'//','','')
|
||||
|
||||
" Enable syntax-based folding, if specified.
|
||||
if get(g:, 'ft_bzl_fold', 0)
|
||||
setlocal foldmethod=syntax
|
||||
setlocal foldtext=BzlFoldText()
|
||||
endif
|
||||
|
||||
if exists('*BzlFoldText')
|
||||
finish
|
||||
endif
|
||||
|
||||
function BzlFoldText() abort
|
||||
let l:start_num = nextnonblank(v:foldstart)
|
||||
let l:end_num = prevnonblank(v:foldend)
|
||||
|
||||
if l:end_num <= l:start_num + 1
|
||||
" If the fold is empty, don't print anything for the contents.
|
||||
let l:content = ''
|
||||
else
|
||||
" Otherwise look for something matching the content regex.
|
||||
" And if nothing matches, print an ellipsis.
|
||||
let l:content = '...'
|
||||
for l:line in getline(l:start_num + 1, l:end_num - 1)
|
||||
let l:content_match = matchstr(l:line, '\m\C^\s*name = \zs.*\ze,$')
|
||||
if !empty(l:content_match)
|
||||
let l:content = l:content_match
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Enclose content with start and end
|
||||
let l:start_text = getline(l:start_num)
|
||||
let l:end_text = substitute(getline(l:end_num), '^\s*', '', '')
|
||||
let l:text = l:start_text . ' ' . l:content . ' ' . l:end_text
|
||||
|
||||
" Compute the available width for the displayed text.
|
||||
let l:width = winwidth(0) - &foldcolumn - (&number ? &numberwidth : 0)
|
||||
let l:lines_folded = ' ' . string(1 + v:foldend - v:foldstart) . ' lines'
|
||||
|
||||
" Expand tabs, truncate, pad, and concatenate
|
||||
let l:text = substitute(l:text, '\t', repeat(' ', &tabstop), 'g')
|
||||
let l:text = strpart(l:text, 0, l:width - len(l:lines_folded))
|
||||
let l:padding = repeat(' ', l:width - len(l:lines_folded) - len(l:text))
|
||||
return l:text . l:padding . l:lines_folded
|
||||
endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2014-04-05
|
||||
" Last Change: 2015-09-27
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -12,43 +12,49 @@ let b:did_ftplugin = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=48-57,A-Z,_,a-z
|
||||
setlocal iskeyword=48-57,A-Z,a-z,_
|
||||
setlocal comments=:NB.
|
||||
setlocal commentstring=NB.\ %s
|
||||
setlocal formatoptions-=t
|
||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||
setlocal matchpairs=(:)
|
||||
setlocal path-=/usr/include
|
||||
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
||||
" Includes. To make the shorthand form "require 'web/cgi'" work, double the
|
||||
" last path component. Also strip off leading folder names like "~addons/".
|
||||
setlocal include=\\v^\\s*(load\|require)\\s*'\\zs\\f+\\ze'
|
||||
setlocal includeexpr=substitute(substitute(tr(v:fname,'\\','/'),'\\v^[^~][^/.]*(/[^/.]+)$','&\\1',''),'\\v^\\~[^/]+/','','')
|
||||
setlocal suffixesadd=.ijs
|
||||
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword< path< include< includeexpr< suffixesadd<'
|
||||
|
||||
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
|
||||
" inside the function in order to avoid matching on the current cursor line.
|
||||
let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*'
|
||||
let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*'
|
||||
let s:sectionend = '\s*)\s*'
|
||||
|
||||
function! s:SearchSection(end, backwards, visualmode) abort
|
||||
if a:visualmode !=# ''
|
||||
normal! gv
|
||||
endif
|
||||
let flags = a:backwards ? 'bsW' : 'sW'
|
||||
let l:flags = a:backwards ? 'bsW' : 'sW'
|
||||
if a:end
|
||||
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
||||
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
|
||||
else
|
||||
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
||||
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
|
||||
noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
|
||||
xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
|
||||
sunmap <buffer> ]]
|
||||
noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
|
||||
noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
|
||||
xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
|
||||
sunmap <buffer> ][
|
||||
noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
|
||||
noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
|
||||
xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
|
||||
sunmap <buffer> [[
|
||||
noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
|
||||
noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
|
||||
xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
|
||||
sunmap <buffer> []
|
||||
|
||||
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
|
||||
@@ -66,7 +72,7 @@ endif
|
||||
" Enhanced "%" matching (see ":help matchit")
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$'
|
||||
let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$'
|
||||
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
||||
endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Vim syntax file
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-kconfig
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -14,5 +18,10 @@ let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
" For matchit.vim
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words = '^\<menu\>:\<endmenu\>,^\<if\>:\<endif\>,^\<choice\>:\<endchoice\>'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
20
runtime/ftplugin/less.vim
Normal file
20
runtime/ftplugin/less.vim
Normal file
@@ -0,0 +1,20 @@
|
||||
" Vim filetype plugin
|
||||
" Language: less
|
||||
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
|
||||
" URL: https://github.com/genoma/vim-less
|
||||
" Last Change: 2014 November 24
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<"
|
||||
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
setlocal comments=:// commentstring=//\ %s
|
||||
|
||||
setlocal omnifunc=csscomplete#CompleteCSS
|
||||
setlocal suffixesadd=.less
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2013 Jul 17
|
||||
" Last Change: 2014 Dec 29
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -63,7 +63,9 @@ endtry
|
||||
func <SID>PreGetPage(cnt)
|
||||
if a:cnt == 0
|
||||
let old_isk = &iskeyword
|
||||
setl iskeyword+=(,)
|
||||
if &ft == 'man'
|
||||
setl iskeyword+=(,)
|
||||
endif
|
||||
let str = expand("<cword>")
|
||||
let &l:iskeyword = old_isk
|
||||
let page = substitute(str, '(*\(\k\+\).*', '\1', '')
|
||||
@@ -157,10 +159,10 @@ func <SID>GetPage(...)
|
||||
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
|
||||
" Remove blank lines from top and bottom.
|
||||
while getline(1) =~ '^\s*$'
|
||||
silent norm ggdd
|
||||
silent keepj norm ggdd
|
||||
endwhile
|
||||
while getline('$') =~ '^\s*$'
|
||||
silent norm Gdd
|
||||
silent keepj norm Gdd
|
||||
endwhile
|
||||
1
|
||||
setl ft=man nomod
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: matlab
|
||||
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
|
||||
" Last Changed: 2006 Jan 12
|
||||
" Last Changed: 2014 Dec 30
|
||||
|
||||
" Contributors:
|
||||
" Charles Campbell
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -12,10 +15,11 @@ let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let s:conditionalEnd = '\(([^()]*\)\@!\<end\>\([^()]*)\)\@!'
|
||||
let b:match_words = '\<if\>\|\<while\>\|\<for\>\|\<switch\>:' .
|
||||
\ s:conditionalEnd . ',\<if\>:\<elseif\>:\<else\>:' .
|
||||
\ s:conditionalEnd
|
||||
let s:conditionalEnd = '\%(([^()]*\)\@!\<end\>\%([^()]*)\)\@!'
|
||||
let b:match_words=
|
||||
\ '\<\%(if\|switch\|for\|while\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\)\>:'.s:conditionalEnd.','.
|
||||
\ '\<function\>:\<return\>:\<endfunction\>'
|
||||
unlet s:conditionalEnd
|
||||
endif
|
||||
|
||||
setlocal suffixesadd=.m
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Filename: spec.vim
|
||||
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
||||
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
|
||||
" Last Change: Sun Mar 2 11:24 MSK 2014 Igor Gnatenko
|
||||
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -18,13 +18,40 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps")
|
||||
endif
|
||||
endif
|
||||
|
||||
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
|
||||
if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
|
||||
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
|
||||
endif
|
||||
|
||||
if !exists("*s:GetRelVer")
|
||||
function! s:GetRelVer()
|
||||
if has('python')
|
||||
python << PYEND
|
||||
import sys, datetime, shutil, tempfile
|
||||
import vim
|
||||
|
||||
try:
|
||||
import rpm
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
specfile = vim.current.buffer.name
|
||||
if specfile:
|
||||
spec = rpm.spec(specfile)
|
||||
headers = spec.packages[0].header
|
||||
version = headers['Version']
|
||||
release = ".".join(headers['Release'].split(".")[:-1])
|
||||
vim.command("let ver = " + version)
|
||||
vim.command("let rel = " + release)
|
||||
PYEND
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if !exists("*s:SpecChangelog")
|
||||
function s:SpecChangelog(format)
|
||||
if strlen(a:format) == 0
|
||||
if !exists("g:spec_chglog_format")
|
||||
let email = input("Email address: ")
|
||||
let email = input("Name <email address>: ")
|
||||
let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
echo "\r"
|
||||
endif
|
||||
@@ -69,6 +96,9 @@ if !exists("*s:SpecChangelog")
|
||||
else
|
||||
let include_release_info = 0
|
||||
endif
|
||||
|
||||
call s:GetRelVer()
|
||||
|
||||
if (chgline == -1)
|
||||
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
|
||||
if (option == 1)
|
||||
@@ -83,7 +113,7 @@ if !exists("*s:SpecChangelog")
|
||||
endif
|
||||
endif
|
||||
if (chgline != -1)
|
||||
let parsed_format = "* ".strftime(format)
|
||||
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
|
||||
let release_info = "+ ".name."-".ver."-".rel
|
||||
let wrong_format = 0
|
||||
let wrong_release = 0
|
||||
|
||||
7
runtime/ftplugin/systemd.vim
Normal file
7
runtime/ftplugin/systemd.vim
Normal file
@@ -0,0 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: systemd.unit(5)
|
||||
|
||||
if !exists('b:did_ftplugin')
|
||||
" Looks a lot like dosini files.
|
||||
runtime! ftplugin/dosini.vim
|
||||
endif
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-01-23
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
||||
97
runtime/indent/bzl.vim
Normal file
97
runtime/indent/bzl.vim
Normal file
@@ -0,0 +1,97 @@
|
||||
" Vim indent file
|
||||
" Language: Bazel (http://bazel.io)
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
|
||||
" Last Change: 2015 Aug 11
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Load base python indent.
|
||||
if !exists('*GetPythonIndent')
|
||||
runtime! indent/python.vim
|
||||
endif
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
" Only enable bzl google indent if python google indent is enabled.
|
||||
if !get(g:, 'no_google_python_indent')
|
||||
setlocal indentexpr=GetBzlIndent(v:lnum)
|
||||
endif
|
||||
|
||||
if exists('*GetBzlIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
" Maximum number of lines to look backwards.
|
||||
let s:maxoff = 50
|
||||
|
||||
""
|
||||
" Determine the correct indent level given an {lnum} in the current buffer.
|
||||
function GetBzlIndent(lnum) abort
|
||||
let l:use_recursive_indent = !get(g:, 'no_google_python_recursive_indent')
|
||||
if l:use_recursive_indent
|
||||
" Backup and override indent setting variables.
|
||||
if exists('g:pyindent_nested_paren')
|
||||
let l:pyindent_nested_paren = g:pyindent_nested_paren
|
||||
endif
|
||||
if exists('g:pyindent_open_paren')
|
||||
let l:pyindent_open_paren = g:pyindent_open_paren
|
||||
endif
|
||||
" Vim 7.3.693 and later defines a shiftwidth() function to get the effective
|
||||
" shiftwidth value. Fall back to &shiftwidth if the function doesn't exist.
|
||||
let l:sw_expr = exists('*shiftwidth') ? 'shiftwidth()' : '&shiftwidth'
|
||||
let g:pyindent_nested_paren = l:sw_expr . ' * 2'
|
||||
let g:pyindent_open_paren = l:sw_expr . ' * 2'
|
||||
endif
|
||||
|
||||
let l:indent = -1
|
||||
|
||||
" Indent inside parens.
|
||||
" Align with the open paren unless it is at the end of the line.
|
||||
" E.g.
|
||||
" open_paren_not_at_EOL(100,
|
||||
" (200,
|
||||
" 300),
|
||||
" 400)
|
||||
" open_paren_at_EOL(
|
||||
" 100, 200, 300, 400)
|
||||
call cursor(a:lnum, 1)
|
||||
let [l:par_line, l:par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
|
||||
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" .
|
||||
\ " synIDattr(synID(line('.'), col('.'), 1), 'name')" .
|
||||
\ " =~ '\\(Comment\\|String\\)$'")
|
||||
if l:par_line > 0
|
||||
call cursor(l:par_line, 1)
|
||||
if l:par_col != col('$') - 1
|
||||
let l:indent = l:par_col
|
||||
endif
|
||||
endif
|
||||
|
||||
" Delegate the rest to the original function.
|
||||
if l:indent == -1
|
||||
let l:indent = GetPythonIndent(a:lnum)
|
||||
endif
|
||||
|
||||
if l:use_recursive_indent
|
||||
" Restore global variables.
|
||||
if exists('l:pyindent_nested_paren')
|
||||
let g:pyindent_nested_paren = l:pyindent_nested_paren
|
||||
else
|
||||
unlet g:pyindent_nested_paren
|
||||
endif
|
||||
if exists('l:pyindent_open_paren')
|
||||
let g:pyindent_open_paren = l:pyindent_open_paren
|
||||
else
|
||||
unlet g:pyindent_open_paren
|
||||
endif
|
||||
endif
|
||||
|
||||
return l:indent
|
||||
endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
@@ -1,9 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
|
||||
" Version: 0.40
|
||||
" Last Change: 2011 Dec. 28
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/>
|
||||
" Language: Fortran 2008 (and earlier versions: 2003, 95, 90, and 77)
|
||||
" Version: 0.41
|
||||
" Last Change: 2015 Jan. 15
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: Do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by: Albert Oliver Serra.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -36,8 +38,8 @@ if !exists("b:fortran_fixed_source")
|
||||
else
|
||||
" f90 and f95 allow both fixed and free source form
|
||||
" assume fixed source form unless signs of free source form
|
||||
" are detected in the first five columns of the first 250 lines
|
||||
" Detection becomes more accurate and time-consuming if more lines
|
||||
" are detected in the first five columns of the first s:lmax lines.
|
||||
" Detection becomes more accurate and more time-consuming if more lines
|
||||
" are checked. Increase the limit below if you keep lots of comments at
|
||||
" the very top of each file and you have a fast computer
|
||||
let s:lmax = 500
|
||||
@@ -129,7 +131,7 @@ function FortranGetIndent(lnum)
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|'
|
||||
\. 'end\s*\(if\|where\|select\|interface\|'
|
||||
\. 'type\|forall\|associate\|enum\)\)\>'
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - &sw
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\s\+\(case\|type\)\>'
|
||||
@@ -141,8 +143,11 @@ function FortranGetIndent(lnum)
|
||||
if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
if prevstat =~ '&\s*$' && prevstat =~ '\<else\s*if\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
"Line after last continuation line
|
||||
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$'
|
||||
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Header: "{{{
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2014 Aug 23
|
||||
" Last Change: 2015 Sep 25
|
||||
" Version: 1.0
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@@ -94,7 +94,7 @@ func! HtmlIndent_CheckUserSettings()
|
||||
let autotags = g:html_indent_autotags
|
||||
endif
|
||||
let b:hi_removed_tags = {}
|
||||
if autotags
|
||||
if len(autotags) > 0
|
||||
call s:RemoveITags(b:hi_removed_tags, split(autotags, ","))
|
||||
endif
|
||||
|
||||
@@ -178,13 +178,15 @@ let s:countonly = 0
|
||||
" 3 "script"
|
||||
" 4 "style"
|
||||
" 5 comment start
|
||||
" 6 conditional comment start
|
||||
" -1 closing tag
|
||||
" -2 "/pre"
|
||||
" -3 "/script"
|
||||
" -4 "/style"
|
||||
" -5 comment end
|
||||
" -6 conditional comment end
|
||||
let s:indent_tags = {}
|
||||
let s:endtags = [0,0,0,0,0,0] " long enough for the highest index
|
||||
let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index
|
||||
"}}}
|
||||
|
||||
" Add a list of tag names for a pair of <tag> </tag> to "tags".
|
||||
@@ -245,6 +247,10 @@ call s:AddITags(s:indent_tags, [
|
||||
\ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output',
|
||||
\ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video',
|
||||
\ 'wbr', 'text'])
|
||||
|
||||
" Tags added for web components:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'content', 'shadow', 'template'])
|
||||
"}}}
|
||||
|
||||
" Add Block Tags: these contain alien content
|
||||
@@ -253,6 +259,7 @@ call s:AddBlockTag('pre', 2)
|
||||
call s:AddBlockTag('script', 3)
|
||||
call s:AddBlockTag('style', 4)
|
||||
call s:AddBlockTag('<!--', 5, '-->')
|
||||
call s:AddBlockTag('<!--[', 6, '![endif]-->')
|
||||
"}}}
|
||||
|
||||
" Return non-zero when "tagname" is an opening tag, not being a block tag, for
|
||||
@@ -287,7 +294,7 @@ func! s:CountITags(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
let s:block = 0 " assume starting outside of a block
|
||||
let s:countonly = 1 " don't change state
|
||||
call substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let s:countonly = 0
|
||||
endfunc "}}}
|
||||
|
||||
@@ -299,7 +306,7 @@ func! s:CountTagsAndState(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
|
||||
let s:block = b:hi_newstate.block
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
if s:block == 3
|
||||
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
|
||||
endif
|
||||
@@ -311,6 +318,9 @@ func! s:CheckTag(itag)
|
||||
"{{{
|
||||
" Returns an empty string or "SCRIPT".
|
||||
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
if (s:CheckCustomTag(a:itag))
|
||||
return ""
|
||||
endif
|
||||
let ind = s:get_tag(a:itag)
|
||||
if ind == -1
|
||||
" closing tag
|
||||
@@ -365,6 +375,36 @@ func! s:CheckBlockTag(blocktag, ind)
|
||||
return ""
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag().
|
||||
func! s:CheckCustomTag(ctag)
|
||||
"{{{
|
||||
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
|
||||
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
let pattern = '\%\(\w\+-\)\+\w\+'
|
||||
if match(a:ctag, pattern) == -1
|
||||
return 0
|
||||
endif
|
||||
if matchstr(a:ctag, '\/\ze.\+') == "/"
|
||||
" closing tag
|
||||
if s:block != 0
|
||||
" ignore ctag within a block
|
||||
return 1
|
||||
endif
|
||||
if s:nextrel == 0
|
||||
let s:curind -= 1
|
||||
else
|
||||
let s:nextrel -= 1
|
||||
endif
|
||||
else
|
||||
" opening tag
|
||||
if s:block != 0
|
||||
return 1
|
||||
endif
|
||||
let s:nextrel += 1
|
||||
endif
|
||||
return 1
|
||||
endfunc "}}}
|
||||
|
||||
" Return the <script> type: either "javascript" or ""
|
||||
func! s:GetScriptType(str)
|
||||
"{{{
|
||||
@@ -388,7 +428,7 @@ func! s:FreshState(lnum)
|
||||
" State:
|
||||
" lnum last indented line == prevnonblank(a:lnum - 1)
|
||||
" block = 0 a:lnum located within special tag: 0:none, 2:<pre>,
|
||||
" 3:<script>, 4:<style>, 5:<!--
|
||||
" 3:<script>, 4:<style>, 5:<!--, 6:<!--[
|
||||
" baseindent use this indent for line a:lnum as a start - kind of
|
||||
" autoindent (if block==0)
|
||||
" scripttype = '' type attribute of a script tag (if block==3)
|
||||
@@ -427,10 +467,13 @@ func! s:FreshState(lnum)
|
||||
" FI
|
||||
|
||||
" look back for a blocktag
|
||||
call cursor(a:lnum, 1)
|
||||
let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bW")
|
||||
if stopline > 0
|
||||
" fugly ... why isn't there searchstr()
|
||||
let stopline2 = v:lnum + 1
|
||||
if has_key(b:hi_indent, 'block') && b:hi_indent.block > 5
|
||||
let [stopline2, stopcol2] = searchpos('<!--', 'bnW')
|
||||
endif
|
||||
let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bnW")
|
||||
if stopline > 0 && stopline < stopline2
|
||||
" ugly ... why isn't there searchstr()
|
||||
let tagline = tolower(getline(stopline))
|
||||
let blocktag = matchstr(tagline, '\/\=\%(pre\>\|script\>\|style\>\)', stopcol - 1)
|
||||
if blocktag[0] != "/"
|
||||
@@ -450,23 +493,29 @@ func! s:FreshState(lnum)
|
||||
" blocktag == "/..."
|
||||
let swendtag = match(tagline, '^\s*</') >= 0
|
||||
if !swendtag
|
||||
let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bW")
|
||||
let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bnW")
|
||||
call s:CountITags(tolower(getline(bline)[: bcol-2]))
|
||||
let state.baseindent = indent(bline) + (s:curind + s:nextrel) * s:ShiftWidth()
|
||||
return state
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if stopline > stopline2
|
||||
let stopline = stopline2
|
||||
let stopcol = stopcol2
|
||||
endif
|
||||
|
||||
" else look back for comment
|
||||
call cursor(a:lnum, 1)
|
||||
let [comlnum, comcol, found] = searchpos('\(<!--\)\|-->', 'bpW', stopline)
|
||||
if found == 2
|
||||
let [comlnum, comcol, found] = searchpos('\(<!--\[\)\|\(<!--\)\|-->', 'bpnW', stopline)
|
||||
if found == 2 || found == 3
|
||||
" comment opener found, assume a:lnum within comment
|
||||
let state.block = 5
|
||||
let state.block = (found == 3 ? 5 : 6)
|
||||
let state.blocklnr = comlnum
|
||||
" check preceding tags in the line:
|
||||
call s:CountITags(tolower(getline(comlnum)[: comcol-2]))
|
||||
if found == 2
|
||||
let state.baseindent = b:hi_indent.baseindent
|
||||
endif
|
||||
let state.blocktagind = indent(comlnum) + (s:curind + s:nextrel) * s:ShiftWidth()
|
||||
return state
|
||||
endif
|
||||
@@ -782,6 +831,20 @@ func! s:Alien5()
|
||||
return indent(prevlnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent for conditional comment: <!--[ ![endif]-->
|
||||
func! s:Alien6()
|
||||
"{{{
|
||||
let curtext = getline(v:lnum)
|
||||
if curtext =~ '\s*\zs<!\[endif\]-->'
|
||||
" current line starts with end of comment, line up with comment start.
|
||||
let lnum = search('<!--', 'bn')
|
||||
if lnum > 0
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
return b:hi_indent.baseindent + s:ShiftWidth()
|
||||
endfunc "}}}
|
||||
|
||||
" When the "lnum" line ends in ">" find the line containing the matching "<".
|
||||
func! HtmlIndent_FindTagStart(lnum)
|
||||
"{{{
|
||||
@@ -883,7 +946,7 @@ endfunc "}}}
|
||||
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
|
||||
func! HtmlIndent()
|
||||
"{{{
|
||||
if prevnonblank(v:lnum - 1) <= 1
|
||||
if prevnonblank(v:lnum - 1) < 1
|
||||
" First non-blank line has no indent.
|
||||
return 0
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2014-04-05
|
||||
" Last Change: 2015-01-11
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
@@ -26,25 +26,25 @@ if !exists('g:j_indent_definitions')
|
||||
endif
|
||||
|
||||
function GetJIndent() abort
|
||||
let prevlnum = prevnonblank(v:lnum-1)
|
||||
if prevlnum == 0
|
||||
let l:prevlnum = prevnonblank(v:lnum - 1)
|
||||
if l:prevlnum == 0
|
||||
return 0
|
||||
endif
|
||||
let indent = indent(prevlnum)
|
||||
let prevline = getline(prevlnum)
|
||||
if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
|
||||
let l:indent = indent(l:prevlnum)
|
||||
let l:prevline = getline(l:prevlnum)
|
||||
if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
|
||||
" Increase indentation after an initial control word that starts or
|
||||
" continues a block and is not terminated by "end."
|
||||
let indent += shiftwidth()
|
||||
elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$')
|
||||
let l:indent += shiftwidth()
|
||||
elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$')
|
||||
" Increase indentation in explicit definitions of adverbs, conjunctions,
|
||||
" and verbs
|
||||
let indent += shiftwidth()
|
||||
let l:indent += shiftwidth()
|
||||
endif
|
||||
" Decrease indentation in lines that start with either control words that
|
||||
" continue or end a block, or the special items ")" and ":"
|
||||
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
|
||||
let indent -= shiftwidth()
|
||||
let l:indent -= shiftwidth()
|
||||
endif
|
||||
return indent
|
||||
return l:indent
|
||||
endfunction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Javascript
|
||||
" Maintainer: None! Wanna improve this?
|
||||
" Last Change: 2007 Jan 22
|
||||
" Maintainer: Going to be Darrick Wiebe
|
||||
" Last Change: 2015 Jun 09
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -12,5 +12,7 @@ let b:did_indent = 1
|
||||
" C indenting is not too bad.
|
||||
setlocal cindent
|
||||
setlocal cinoptions+=j1,J1
|
||||
setlocal cinkeys-=0#
|
||||
setlocal cinkeys+=0]
|
||||
|
||||
let b:undo_indent = "setl cin<"
|
||||
|
||||
13
runtime/indent/less.vim
Normal file
13
runtime/indent/less.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim indent file
|
||||
" Language: less
|
||||
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
|
||||
" URL: https://github.com/genoma/vim-less
|
||||
" Last Change: 2014 November 24
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! indent/css.vim
|
||||
|
||||
" vim:set sw=2:
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Lua script
|
||||
" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br>
|
||||
" First Author: Max Ischenko <mfi 'at' ukr.net>
|
||||
" Last Change: 2007 Jul 23
|
||||
" Last Change: 2014 Nov 12
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -54,7 +54,7 @@ function! GetLuaIndent()
|
||||
|
||||
" Subtract a 'shiftwidth' on end, else (and elseif), until and '}'
|
||||
" This is the part that requires 'indentkeys'.
|
||||
let midx = match(getline(v:lnum), '^\s*\%(end\|else\|until\|}\)')
|
||||
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|until\>\|}\)')
|
||||
if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") != "luaComment"
|
||||
let ind = ind - &shiftwidth
|
||||
endif
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
|
||||
" URL: http://www.2072productions.com/vim/indent/php.vim
|
||||
" Home: https://github.com/2072/PHP-Indenting-for-VIm
|
||||
" Last Change: 2014 April 3rd
|
||||
" Version: 1.49
|
||||
" Last Change: 2014 November 26th
|
||||
" Version: 1.57
|
||||
"
|
||||
"
|
||||
" Type :help php-indent for available options
|
||||
@@ -48,7 +48,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
|
||||
let php_sync_method = 0
|
||||
let g:php_sync_method = 0
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ setlocal nocindent
|
||||
setlocal nolisp
|
||||
|
||||
setlocal indentexpr=GetPhpIndent()
|
||||
setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
|
||||
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
|
||||
|
||||
|
||||
|
||||
@@ -128,11 +128,14 @@ if exists("*GetPhpIndent")
|
||||
endif
|
||||
|
||||
|
||||
let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
|
||||
let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
|
||||
let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
|
||||
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
|
||||
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
|
||||
|
||||
|
||||
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
|
||||
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
|
||||
|
||||
|
||||
@@ -140,7 +143,7 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
|
||||
let s:escapeDebugStops = 0
|
||||
function! DebugPrintReturn(scriptLine)
|
||||
|
||||
if ! s:escapeDebugStops
|
||||
if ! s:escapeDebugStops
|
||||
echo "debug:" . a:scriptLine
|
||||
let c = getchar()
|
||||
if c == "\<Del>"
|
||||
@@ -158,8 +161,6 @@ function! GetLastRealCodeLNum(startline) " {{{
|
||||
let lnum = b:GetLastRealCodeLNum_ADD
|
||||
endif
|
||||
|
||||
let old_lnum = lnum
|
||||
|
||||
while lnum > 1
|
||||
let lnum = prevnonblank(lnum)
|
||||
let lastline = getline(lnum)
|
||||
@@ -217,7 +218,7 @@ function! GetLastRealCodeLNum(startline) " {{{
|
||||
let lnum=0
|
||||
endif
|
||||
|
||||
if b:InPHPcode_and_script && !b:InPHPcode
|
||||
if b:InPHPcode_and_script && 1 > b:InPHPcode
|
||||
let b:InPHPcode_and_script = 0
|
||||
endif
|
||||
|
||||
@@ -237,7 +238,7 @@ endfun
|
||||
|
||||
function! Skippmatch() " {{{
|
||||
let synname = synIDattr(synID(line("."), col("."), 0), "name")
|
||||
if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment
|
||||
if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -249,7 +250,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
|
||||
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
|
||||
|
||||
if a:blockStarter == 1
|
||||
while line > 1
|
||||
while line > 1
|
||||
let linec = getline(line)
|
||||
|
||||
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
@@ -310,7 +311,6 @@ let s:defaultORcase = '^\s*\%(default\|case\).*:'
|
||||
|
||||
function! FindTheSwitchIndent (lnum) " {{{
|
||||
|
||||
|
||||
let test = GetLastRealCodeLNum(a:lnum - 1)
|
||||
|
||||
if test <= 1
|
||||
@@ -353,7 +353,7 @@ function! IslinePHP (lnum, tofind) " {{{
|
||||
|
||||
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
|
||||
if cline !~ '^\s*[''"`]'
|
||||
return ""
|
||||
return "SpecStringEntrails"
|
||||
else
|
||||
return synname
|
||||
end
|
||||
@@ -372,7 +372,7 @@ if ! s:autoresetoptions
|
||||
endif
|
||||
|
||||
function! ResetPhpOptions()
|
||||
if ! b:optionsset && &filetype == "php"
|
||||
if ! b:optionsset && &filetype =~ "php"
|
||||
if b:PHP_autoformatcomment
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
|
||||
@@ -418,7 +418,7 @@ function! GetPhpIndent()
|
||||
let b:PHP_indentinghuge = 0
|
||||
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
|
||||
endif
|
||||
let b:PHP_lastindented = v:lnum
|
||||
let real_PHP_lastindented = v:lnum
|
||||
let b:PHP_LastIndentedWasComment=0
|
||||
let b:PHP_InsideMultilineComment=0
|
||||
let b:PHP_indentbeforelast = 0
|
||||
@@ -430,9 +430,12 @@ function! GetPhpIndent()
|
||||
|
||||
elseif v:lnum > b:PHP_lastindented
|
||||
let real_PHP_lastindented = b:PHP_lastindented
|
||||
let b:PHP_lastindented = v:lnum
|
||||
else
|
||||
let real_PHP_lastindented = v:lnum
|
||||
endif
|
||||
|
||||
let b:PHP_lastindented = v:lnum
|
||||
|
||||
|
||||
if !b:InPHPcode_checked " {{{ One time check
|
||||
let b:InPHPcode_checked = 1
|
||||
@@ -443,11 +446,15 @@ function! GetPhpIndent()
|
||||
endif
|
||||
|
||||
if synname!=""
|
||||
if synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
|
||||
if synname == "SpecStringEntrails"
|
||||
let b:InPHPcode = -1 " thumb down
|
||||
let b:UserIsTypingComment = 0
|
||||
let b:InPHPcode_tofind = ""
|
||||
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
|
||||
let b:InPHPcode = 1
|
||||
let b:InPHPcode_tofind = ""
|
||||
|
||||
if synname =~# "^phpComment"
|
||||
if synname =~# '^php\%(Doc\)\?Comment'
|
||||
let b:UserIsTypingComment = 1
|
||||
else
|
||||
let b:UserIsTypingComment = 0
|
||||
@@ -483,9 +490,16 @@ function! GetPhpIndent()
|
||||
|
||||
if b:InPHPcode_tofind!=""
|
||||
if cline =~? b:InPHPcode_tofind
|
||||
let b:InPHPcode = 1
|
||||
let b:InPHPcode_tofind = ""
|
||||
let b:UserIsTypingComment = 0
|
||||
|
||||
if b:InPHPcode == -1
|
||||
let b:InPHPcode = 1
|
||||
return -1
|
||||
end
|
||||
|
||||
let b:InPHPcode = 1
|
||||
|
||||
if cline =~ '\*/'
|
||||
call cursor(v:lnum, 1)
|
||||
if cline !~ '^\*/'
|
||||
@@ -510,7 +524,7 @@ function! GetPhpIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
if b:InPHPcode
|
||||
if 1 == b:InPHPcode
|
||||
|
||||
if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
|
||||
if cline !~? s:PHP_startindenttag
|
||||
@@ -520,8 +534,8 @@ function! GetPhpIndent()
|
||||
let b:InPHPcode_and_script = 1
|
||||
endif
|
||||
|
||||
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
|
||||
let b:InPHPcode = 0
|
||||
elseif last_line =~ '^[^''"`]\+[''"`]$'
|
||||
let b:InPHPcode = -1
|
||||
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
|
||||
elseif last_line =~? '<<<''\=\a\w*''\=$'
|
||||
let b:InPHPcode = 0
|
||||
@@ -538,7 +552,7 @@ function! GetPhpIndent()
|
||||
endif " }}}
|
||||
|
||||
|
||||
if !b:InPHPcode && !b:InPHPcode_and_script
|
||||
if 1 > b:InPHPcode && !b:InPHPcode_and_script
|
||||
return -1
|
||||
endif
|
||||
|
||||
@@ -568,7 +582,7 @@ function! GetPhpIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
|
||||
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!'
|
||||
if getline(v:lnum + 1) !~ '^\s*\*'
|
||||
return -1
|
||||
endif
|
||||
@@ -669,17 +683,17 @@ function! GetPhpIndent()
|
||||
endwhile
|
||||
|
||||
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
|
||||
let ind = ind + &sw " we indent one level further when the preceding line is not stated
|
||||
let ind = ind + &sw
|
||||
return ind + addSpecial
|
||||
|
||||
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things)
|
||||
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
|
||||
let previous_line = last_line
|
||||
let last_line_num = lnum
|
||||
let LastLineClosed = 1
|
||||
|
||||
let isSingleLineBlock = 0
|
||||
while 1
|
||||
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
|
||||
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
|
||||
|
||||
call cursor(last_line_num, 1)
|
||||
if previous_line !~ '^}'
|
||||
@@ -740,14 +754,19 @@ function! GetPhpIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
let plinnum = GetLastRealCodeLNum(lnum - 1)
|
||||
if (last_line !~ '^\s*}\%(}}\)\@!')
|
||||
let plinnum = GetLastRealCodeLNum(lnum - 1)
|
||||
else
|
||||
let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1)
|
||||
endif
|
||||
|
||||
let AntepenultimateLine = getline(plinnum)
|
||||
|
||||
let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
|
||||
|
||||
|
||||
if ind == b:PHP_default_indenting
|
||||
if last_line =~ terminated
|
||||
if last_line =~ terminated && last_line !~# s:defaultORcase
|
||||
let LastLineClosed = 1
|
||||
endif
|
||||
endif
|
||||
@@ -755,10 +774,10 @@ function! GetPhpIndent()
|
||||
if !LastLineClosed
|
||||
|
||||
|
||||
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
|
||||
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
|
||||
|
||||
let dontIndent = 0
|
||||
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
let dontIndent = 1
|
||||
endif
|
||||
|
||||
@@ -774,7 +793,7 @@ function! GetPhpIndent()
|
||||
|
||||
elseif last_line =~ '\S\+\s*),'.endline
|
||||
call cursor(lnum, 1)
|
||||
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
|
||||
call search('),'.endline, 'W')
|
||||
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
|
||||
if openedparent != lnum
|
||||
let ind = indent(openedparent)
|
||||
@@ -784,7 +803,7 @@ function! GetPhpIndent()
|
||||
let ind = ind + &sw
|
||||
|
||||
|
||||
elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
|
||||
elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Fri Feb 15, 2013 08:11PM
|
||||
" Last Change: Thu Mar 26, 2015 05:36PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
@@ -15,478 +15,501 @@ setlocal indentexpr=GetRIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRIndent")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
" Options to make the indentation more similar to Emacs/ESS:
|
||||
if !exists("g:r_indent_align_args")
|
||||
let g:r_indent_align_args = 1
|
||||
let g:r_indent_align_args = 1
|
||||
endif
|
||||
if !exists("g:r_indent_ess_comments")
|
||||
let g:r_indent_ess_comments = 0
|
||||
let g:r_indent_ess_comments = 0
|
||||
endif
|
||||
if !exists("g:r_indent_comment_column")
|
||||
let g:r_indent_comment_column = 40
|
||||
let g:r_indent_comment_column = 40
|
||||
endif
|
||||
if ! exists("g:r_indent_ess_compatible")
|
||||
let g:r_indent_ess_compatible = 0
|
||||
let g:r_indent_ess_compatible = 0
|
||||
endif
|
||||
if ! exists("g:r_indent_op_pattern")
|
||||
let g:r_indent_op_pattern = '\(+\|-\|\*\|/\|=\|\~\|%\)$'
|
||||
endif
|
||||
|
||||
function s:RDelete_quotes(line)
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while a:line[i] != "`" && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if i == llen
|
||||
break
|
||||
endif
|
||||
let line1 = line1 . a:line[i]
|
||||
let j += 1
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endwhile
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while a:line[i] != "`" && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if i == llen
|
||||
break
|
||||
endif
|
||||
let line1 = line1 . a:line[i]
|
||||
let j += 1
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
" Convert foo(bar()) int foo()
|
||||
function s:RDelete_parens(line)
|
||||
if s:Get_paren_balance(a:line, "(", ")") != 0
|
||||
return a:line
|
||||
endif
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
let line1 = line1 . a:line[i]
|
||||
if a:line[i] == '('
|
||||
let nop = 1
|
||||
while nop > 0 && i < llen
|
||||
let i += 1
|
||||
if a:line[i] == ')'
|
||||
let nop -= 1
|
||||
else
|
||||
if a:line[i] == '('
|
||||
let nop += 1
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
let line1 = line1 . a:line[i]
|
||||
endif
|
||||
if s:Get_paren_balance(a:line, "(", ")") != 0
|
||||
return a:line
|
||||
endif
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
let line1 = line1 . a:line[i]
|
||||
if a:line[i] == '('
|
||||
let nop = 1
|
||||
while nop > 0 && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
if a:line[i] == ')'
|
||||
let nop -= 1
|
||||
else
|
||||
if a:line[i] == '('
|
||||
let nop += 1
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
let line1 = line1 . a:line[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
function! s:Get_paren_balance(line, o, c)
|
||||
let line2 = substitute(a:line, a:o, "", "g")
|
||||
let openp = strlen(a:line) - strlen(line2)
|
||||
let line3 = substitute(line2, a:c, "", "g")
|
||||
let closep = strlen(line2) - strlen(line3)
|
||||
return openp - closep
|
||||
let line2 = substitute(a:line, a:o, "", "g")
|
||||
let openp = strlen(a:line) - strlen(line2)
|
||||
let line3 = substitute(line2, a:c, "", "g")
|
||||
let closep = strlen(line2) - strlen(line3)
|
||||
return openp - closep
|
||||
endfunction
|
||||
|
||||
function! s:Get_matching_brace(linenr, o, c, delbrace)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delbrace == 1
|
||||
let line = substitute(line, '{$', "", "")
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, a:o, a:c)
|
||||
let i = a:linenr
|
||||
while pb != 0 && i > 1
|
||||
let i -= 1
|
||||
let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c)
|
||||
endwhile
|
||||
return i
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delbrace == 1
|
||||
let line = substitute(line, '{$', "", "")
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, a:o, a:c)
|
||||
let i = a:linenr
|
||||
while pb != 0 && i > 1
|
||||
let i -= 1
|
||||
let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c)
|
||||
endwhile
|
||||
return i
|
||||
endfunction
|
||||
|
||||
" This function is buggy because there 'if's without 'else'
|
||||
" It must be rewritten relying more on indentation
|
||||
function! s:Get_matching_if(linenr, delif)
|
||||
" let filenm = expand("%")
|
||||
" call writefile([filenm], "/tmp/matching_if_" . a:linenr)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delif
|
||||
let line = substitute(line, "if", "", "g")
|
||||
endif
|
||||
let elsenr = 0
|
||||
let i = a:linenr
|
||||
let ifhere = 0
|
||||
while i > 0
|
||||
let line2 = substitute(line, '\<else\>', "xxx", "g")
|
||||
let elsenr += strlen(line) - strlen(line2)
|
||||
if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()'
|
||||
let elsenr -= 1
|
||||
if elsenr == 0
|
||||
let ifhere = i
|
||||
break
|
||||
endif
|
||||
endif
|
||||
let i -= 1
|
||||
let line = SanitizeRLine(getline(i))
|
||||
endwhile
|
||||
if ifhere
|
||||
return ifhere
|
||||
else
|
||||
return a:linenr
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delif
|
||||
let line = substitute(line, "if", "", "g")
|
||||
endif
|
||||
let elsenr = 0
|
||||
let i = a:linenr
|
||||
let ifhere = 0
|
||||
while i > 0
|
||||
let line2 = substitute(line, '\<else\>', "xxx", "g")
|
||||
let elsenr += strlen(line) - strlen(line2)
|
||||
if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()'
|
||||
let elsenr -= 1
|
||||
if elsenr == 0
|
||||
let ifhere = i
|
||||
break
|
||||
endif
|
||||
endif
|
||||
let i -= 1
|
||||
let line = SanitizeRLine(getline(i))
|
||||
endwhile
|
||||
if ifhere
|
||||
return ifhere
|
||||
else
|
||||
return a:linenr
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:Get_last_paren_idx(line, o, c, pb)
|
||||
let blc = a:pb
|
||||
let line = substitute(a:line, '\t', s:curtabstop, "g")
|
||||
let theidx = -1
|
||||
let llen = strlen(line)
|
||||
let idx = 0
|
||||
while idx < llen
|
||||
if line[idx] == a:o
|
||||
let blc -= 1
|
||||
if blc == 0
|
||||
let theidx = idx
|
||||
endif
|
||||
else
|
||||
if line[idx] == a:c
|
||||
let blc += 1
|
||||
endif
|
||||
endif
|
||||
let idx += 1
|
||||
endwhile
|
||||
return theidx + 1
|
||||
let blc = a:pb
|
||||
let line = substitute(a:line, '\t', s:curtabstop, "g")
|
||||
let theidx = -1
|
||||
let llen = strlen(line)
|
||||
let idx = 0
|
||||
while idx < llen
|
||||
if line[idx] == a:o
|
||||
let blc -= 1
|
||||
if blc == 0
|
||||
let theidx = idx
|
||||
endif
|
||||
else
|
||||
if line[idx] == a:c
|
||||
let blc += 1
|
||||
endif
|
||||
endif
|
||||
let idx += 1
|
||||
endwhile
|
||||
return theidx + 1
|
||||
endfunction
|
||||
|
||||
" Get previous relevant line. Search back until getting a line that isn't
|
||||
" comment or blank
|
||||
function s:Get_prev_line(lineno)
|
||||
let lnum = a:lineno - 1
|
||||
let lnum = a:lineno - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
endwhile
|
||||
return lnum
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" This function is also used by r-plugin/common_global.vim
|
||||
" Delete from '#' to the end of the line, unless the '#' is inside a string.
|
||||
function SanitizeRLine(line)
|
||||
let newline = s:RDelete_quotes(a:line)
|
||||
let newline = s:RDelete_parens(newline)
|
||||
let newline = substitute(newline, '#.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
return newline
|
||||
let newline = s:RDelete_quotes(a:line)
|
||||
let newline = s:RDelete_parens(newline)
|
||||
let newline = substitute(newline, '#.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
if &filetype == "rhelp" && newline =~ '^\\method{.*}{.*}(.*'
|
||||
let newline = substitute(newline, '^\\method{\(.*\)}{.*}', '\1', "")
|
||||
endif
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
function GetRIndent()
|
||||
|
||||
let clnum = line(".") " current line
|
||||
let clnum = line(".") " current line
|
||||
|
||||
let cline = getline(clnum)
|
||||
if cline =~ '^\s*#'
|
||||
if g:r_indent_ess_comments == 1
|
||||
if cline =~ '^\s*###'
|
||||
return 0
|
||||
endif
|
||||
if cline !~ '^\s*##'
|
||||
return g:r_indent_comment_column
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$'
|
||||
let indline = s:Get_matching_brace(clnum, '{', '}', 1)
|
||||
if indline > 0 && indline != clnum
|
||||
let iline = SanitizeRLine(getline(indline))
|
||||
if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$'
|
||||
return indent(indline)
|
||||
else
|
||||
let indline = s:Get_matching_brace(indline, '(', ')', 1)
|
||||
return indent(indline)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Find the first non blank line above the current line
|
||||
let lnum = s:Get_prev_line(clnum)
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
let cline = getline(clnum)
|
||||
if cline =~ '^\s*#'
|
||||
if g:r_indent_ess_comments == 1
|
||||
if cline =~ '^\s*###'
|
||||
return 0
|
||||
endif
|
||||
if cline !~ '^\s*##'
|
||||
return g:r_indent_comment_column
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
if &filetype == "rhelp"
|
||||
if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\method{.*}{.*}(.*'
|
||||
let line = substitute(line, '^\\method{\(.*\)}{.*}', '\1', "")
|
||||
endif
|
||||
if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$'
|
||||
let indline = s:Get_matching_brace(clnum, '{', '}', 1)
|
||||
if indline > 0 && indline != clnum
|
||||
let iline = SanitizeRLine(getline(indline))
|
||||
if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$'
|
||||
return indent(indline)
|
||||
else
|
||||
let indline = s:Get_matching_brace(indline, '(', ')', 1)
|
||||
return indent(indline)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*{'
|
||||
if g:r_indent_ess_compatible && line =~ ')$'
|
||||
let nlnum = lnum
|
||||
let nline = line
|
||||
while s:Get_paren_balance(nline, '(', ')') < 0
|
||||
let nlnum = s:Get_prev_line(nlnum)
|
||||
let nline = SanitizeRLine(getline(nlnum)) . nline
|
||||
endwhile
|
||||
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
if s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum)
|
||||
endif
|
||||
" Find the first non blank line above the current line
|
||||
let lnum = s:Get_prev_line(clnum)
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
|
||||
if &filetype == "rhelp"
|
||||
if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" line is an incomplete command:
|
||||
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" Deal with () and []
|
||||
if &filetype == "rnoweb" && line =~ "^<<.*>>="
|
||||
return 0
|
||||
endif
|
||||
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
if cline =~ '^\s*{'
|
||||
if g:r_indent_ess_compatible && line =~ ')$'
|
||||
let nlnum = lnum
|
||||
let nline = line
|
||||
while s:Get_paren_balance(nline, '(', ')') < 0
|
||||
let nlnum = s:Get_prev_line(nlnum)
|
||||
let nline = SanitizeRLine(getline(nlnum)) . nline
|
||||
endwhile
|
||||
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
if s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
|
||||
return indent(lnum) + &sw
|
||||
" line is an incomplete command:
|
||||
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Deal with () and []
|
||||
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
|
||||
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
let s:curtabstop = repeat(' ', &tabstop)
|
||||
|
||||
if g:r_indent_align_args == 1
|
||||
if pb > 0 && line =~ '{$'
|
||||
return s:Get_last_paren_idx(line, '(', ')', pb) + &sw
|
||||
endif
|
||||
|
||||
let bb = s:Get_paren_balance(line, '[', ']')
|
||||
|
||||
let s:curtabstop = repeat(' ', &tabstop)
|
||||
if g:r_indent_align_args == 1
|
||||
|
||||
if pb == 0 && bb == 0 && (line =~ '.*[,&|\-\*+<>]$' || cline =~ '^\s*[,&|\-\*+<>]')
|
||||
return indent(lnum)
|
||||
endif
|
||||
|
||||
if pb > 0
|
||||
if &filetype == "rhelp"
|
||||
let ind = s:Get_last_paren_idx(line, '(', ')', pb)
|
||||
else
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb)
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
if pb < 0 && line =~ '.*[,&|\-\*+<>]$'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
while pb < 1 && lnum > 0
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
let line = substitute(line, '\t', s:curtabstop, "g")
|
||||
let ind = strlen(line)
|
||||
while ind > 0
|
||||
if line[ind] == ')'
|
||||
let pb -= 1
|
||||
else
|
||||
if line[ind] == '('
|
||||
let pb += 1
|
||||
endif
|
||||
endif
|
||||
if pb == 1
|
||||
return ind + 1
|
||||
endif
|
||||
let ind -= 1
|
||||
endwhile
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
|
||||
if bb > 0
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb)
|
||||
return ind
|
||||
endif
|
||||
if pb > 0
|
||||
if &filetype == "rhelp"
|
||||
let ind = s:Get_last_paren_idx(line, '(', ')', pb)
|
||||
else
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb)
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
let post_block = 0
|
||||
if line =~ '}$'
|
||||
let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
|
||||
if pb < 0 && line =~ '.*[,&|\-\*+<>]$'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
while pb < 1 && lnum > 0
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
if lnum > 0 && line =~ '^\s*{'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
let post_block = 1
|
||||
endif
|
||||
|
||||
let post_fun = 0
|
||||
if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$'
|
||||
let post_fun = 1
|
||||
while pb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let pb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
if line =~ '{$' && post_block == 0
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Now we can do some tests again
|
||||
if cline =~ '^\s*{'
|
||||
return indent(lnum)
|
||||
endif
|
||||
if post_block == 0
|
||||
let newl = SanitizeRLine(line)
|
||||
if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
let line = substitute(line, '\t', s:curtabstop, "g")
|
||||
let ind = strlen(line)
|
||||
while ind > 0
|
||||
if line[ind] == ')'
|
||||
let pb -= 1
|
||||
else
|
||||
if line[ind] == '('
|
||||
let pb += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*else'
|
||||
if line =~ '<-\s*if\s*()'
|
||||
return indent(lnum) + &sw
|
||||
else
|
||||
if line =~ '\<if\s*()'
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if bb < 0 && line =~ '.*]'
|
||||
while bb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let bb += s:Get_paren_balance(linepiece, "[", "]")
|
||||
let line = linepiece . line
|
||||
endif
|
||||
if pb == 1
|
||||
return ind + 1
|
||||
endif
|
||||
let ind -= 1
|
||||
endwhile
|
||||
let line = s:RDelete_parens(line)
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
|
||||
let plnum = s:Get_prev_line(lnum)
|
||||
let ppost_else = 0
|
||||
if plnum > 0
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
let ppost_block = 0
|
||||
if pline =~ '}$'
|
||||
let ppost_block = 1
|
||||
let plnum = s:Get_matching_brace(plnum, '{', '}', 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
if pline =~ '^\s*{$' && plnum > 0
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
if pline =~ 'else$'
|
||||
let ppost_else = 1
|
||||
let plnum = s:Get_matching_if(plnum, 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
|
||||
if pline =~ '^\s*else\s*if\s*('
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\<else$' || ppline =~ '<-$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
if ppb < 0 && (pline =~ ')\s*{$' || pline =~ ')$')
|
||||
while ppb < 0 && plnum > 0
|
||||
let plnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(plnum))
|
||||
let ppb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let pline = linepiece . pline
|
||||
endwhile
|
||||
let pline = s:RDelete_parens(pline)
|
||||
endif
|
||||
if bb > 0
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb)
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
let pind = indent(plnum)
|
||||
|
||||
if g:r_indent_align_args == 0 && pb != 0
|
||||
let ind += pb * &sw
|
||||
return ind
|
||||
let post_block = 0
|
||||
if line =~ '}$'
|
||||
let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
if lnum > 0 && line =~ '^\s*{'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
let post_block = 1
|
||||
endif
|
||||
|
||||
if g:r_indent_align_args == 0 && bb != 0
|
||||
let ind += bb * &sw
|
||||
return ind
|
||||
" Indent after operator pattern
|
||||
let olnum = s:Get_prev_line(lnum)
|
||||
let oline = getline(olnum)
|
||||
if olnum > 0
|
||||
if line =~ g:r_indent_op_pattern
|
||||
if oline =~ g:r_indent_op_pattern
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
else
|
||||
if oline =~ g:r_indent_op_pattern
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
let pline = getline(plnum)
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0 && pbb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
while pline =~ '^\s*else'
|
||||
let plnum = s:Get_matching_if(plnum, 1)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
endwhile
|
||||
let pind = indent(plnum)
|
||||
if ind == (pind + &sw) && pline =~ '{$'
|
||||
return ind
|
||||
endif
|
||||
let post_fun = 0
|
||||
if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$'
|
||||
let post_fun = 1
|
||||
while pb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let pb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
if line =~ '{$' && post_block == 0
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Now we can do some tests again
|
||||
if cline =~ '^\s*{'
|
||||
return indent(lnum)
|
||||
endif
|
||||
if post_block == 0
|
||||
let newl = SanitizeRLine(line)
|
||||
if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*else'
|
||||
if line =~ '<-\s*if\s*()'
|
||||
return indent(lnum) + &sw
|
||||
else
|
||||
if line =~ '\<if\s*()'
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let bb = s:Get_paren_balance(line, '[', ']')
|
||||
if bb < 0 && line =~ '.*]'
|
||||
while bb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let bb += s:Get_paren_balance(linepiece, "[", "]")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
let line = s:RDelete_parens(line)
|
||||
endif
|
||||
|
||||
let plnum = s:Get_prev_line(lnum)
|
||||
let ppost_else = 0
|
||||
if plnum > 0
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
let ppost_block = 0
|
||||
if pline =~ '}$'
|
||||
let ppost_block = 1
|
||||
let plnum = s:Get_matching_brace(plnum, '{', '}', 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
if pline =~ '^\s*{$' && plnum > 0
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
if pline =~ 'else$'
|
||||
let ppost_else = 1
|
||||
let plnum = s:Get_matching_if(plnum, 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
|
||||
if pline =~ '^\s*else\s*if\s*('
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\<else$' || ppline =~ '<-$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
if ppb < 0 && (pline =~ ')\s*{$' || pline =~ ')$')
|
||||
while ppb < 0 && plnum > 0
|
||||
let plnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(plnum))
|
||||
let ppb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let pline = linepiece . pline
|
||||
endwhile
|
||||
let pline = s:RDelete_parens(pline)
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
let pind = indent(plnum)
|
||||
|
||||
if g:r_indent_align_args == 0 && pb != 0
|
||||
let ind += pb * &sw
|
||||
return ind
|
||||
endif
|
||||
|
||||
if g:r_indent_align_args == 0 && bb != 0
|
||||
let ind += bb * &sw
|
||||
return ind
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
let pline = getline(plnum)
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0 && pbb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
while pline =~ '^\s*else'
|
||||
let plnum = s:Get_matching_if(plnum, 1)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
endwhile
|
||||
let pind = indent(plnum)
|
||||
if ind == (pind + &sw) && pline =~ '{$'
|
||||
return ind
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return ind
|
||||
|
||||
endfunction
|
||||
|
||||
" vim: sw=4
|
||||
" vim: sw=2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: R Documentation (Help), *.Rd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:34PM
|
||||
" Last Change: Thu Oct 16, 2014 07:07AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -12,22 +12,18 @@ runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRHelpIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal noautoindent
|
||||
setlocal nocindent
|
||||
setlocal nosmartindent
|
||||
setlocal nolisp
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetCorrectRHelpIndent()
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function s:SanitizeRHelpLine(line)
|
||||
let newline = substitute(a:line, '\\\\', "x", "g")
|
||||
let newline = substitute(newline, '\\{', "x", "g")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:33PM
|
||||
" Last Change: Thu Jul 10, 2014 07:11PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -33,10 +33,10 @@ function GetMdIndent()
|
||||
endfunction
|
||||
|
||||
function GetRmdIndent()
|
||||
if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$'
|
||||
if getline(".") =~ '^[ \t]*```{r .*}$' || getline(".") =~ '^[ \t]*```$'
|
||||
return 0
|
||||
endif
|
||||
if search('^```{r', "bncW") > search('^```$', "bncW")
|
||||
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
||||
return s:RIndent()
|
||||
else
|
||||
return GetMdIndent()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Rnoweb
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:28PM
|
||||
" Last Change: Sun Mar 22, 2015 09:28AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -23,7 +23,8 @@ if exists("*GetRnowebIndent")
|
||||
endif
|
||||
|
||||
function GetRnowebIndent()
|
||||
if getline(".") =~ "^<<.*>>=$"
|
||||
let curline = getline(".")
|
||||
if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$'
|
||||
return 0
|
||||
endif
|
||||
if search("^<<", "bncW") > search("^@", "bncW")
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: Shell Script
|
||||
" Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2014-08-22
|
||||
" Language: Shell Script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-07-28
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -10,7 +13,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetShIndent()
|
||||
setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,),0=;;,0=;&
|
||||
setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;&
|
||||
setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix
|
||||
setlocal indentkeys-=:,0#
|
||||
setlocal nosmartindent
|
||||
@@ -54,8 +57,8 @@ function! GetShIndent()
|
||||
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\)\>'
|
||||
if line !~ '\<\%(fi\|esac\|done\)\>\s*\%(#.*\)\=$'
|
||||
if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>'
|
||||
if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
|
||||
let ind += s:indent_value('default')
|
||||
endif
|
||||
elseif s:is_case_label(line, pnum)
|
||||
@@ -76,7 +79,7 @@ function! GetShIndent()
|
||||
|
||||
let pine = line
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\)\>' || line =~ '^\s*}'
|
||||
if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || line =~ '^\s*}'
|
||||
let ind -= s:indent_value('default')
|
||||
elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1))
|
||||
let ind -= s:indent_value('default')
|
||||
|
||||
10
runtime/indent/systemd.vim
Normal file
10
runtime/indent/systemd.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" Vim indent file
|
||||
" Language: systemd.unit(5)
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Looks a lot like dosini files.
|
||||
runtime! indent/dosini.vim
|
||||
67
runtime/indent/teraterm.vim
Normal file
67
runtime/indent/teraterm.vim
Normal file
@@ -0,0 +1,67 @@
|
||||
" Vim indent file
|
||||
" Language: Tera Term Language (TTL)
|
||||
" Based on Tera Term Version 4.86
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-teraterm
|
||||
" Last Change: 2015 Jun 4
|
||||
" Filenames: *.ttl
|
||||
" License: VIM License
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
setlocal noautoindent
|
||||
setlocal indentexpr=GetTeraTermIndent(v:lnum)
|
||||
setlocal indentkeys=!^F,o,O,e
|
||||
setlocal indentkeys+==elseif,=endif,=loop,=next,=enduntil,=endwhile
|
||||
|
||||
if exists("*GetTeraTermIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" The shiftwidth() function is relatively new.
|
||||
" Don't require it to exist.
|
||||
if exists('*shiftwidth')
|
||||
function s:sw() abort
|
||||
return shiftwidth()
|
||||
endfunction
|
||||
else
|
||||
function s:sw() abort
|
||||
return &shiftwidth
|
||||
endfunction
|
||||
endif
|
||||
|
||||
function! GetTeraTermIndent(lnum)
|
||||
let l:prevlnum = prevnonblank(a:lnum-1)
|
||||
if l:prevlnum == 0
|
||||
" top of file
|
||||
return 0
|
||||
endif
|
||||
|
||||
" grab the previous and current line, stripping comments.
|
||||
let l:prevl = substitute(getline(l:prevlnum), ';.*$', '', '')
|
||||
let l:thisl = substitute(getline(a:lnum), ';.*$', '', '')
|
||||
let l:previ = indent(l:prevlnum)
|
||||
|
||||
let l:ind = l:previ
|
||||
|
||||
if l:prevl =~ '^\s*if\>.*\<then\s*$'
|
||||
" previous line opened a block
|
||||
let l:ind += s:sw()
|
||||
endif
|
||||
if l:prevl =~ '^\s*\%(elseif\|else\|do\|until\|while\|for\)\>'
|
||||
" previous line opened a block
|
||||
let l:ind += s:sw()
|
||||
endif
|
||||
if l:thisl =~ '^\s*\%(elseif\|else\|endif\|enduntil\|endwhile\|loop\|next\)\>'
|
||||
" this line closed a block
|
||||
let l:ind -= s:sw()
|
||||
endif
|
||||
|
||||
return l:ind
|
||||
endfunction
|
||||
|
||||
" vim: ts=8 sw=2 sts=2
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Sep 19
|
||||
" Last Change: 2014 Dec 12
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -89,7 +89,7 @@ function GetVimIndentIntern()
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)'
|
||||
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: YAML
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" Last Change: 2015 Sep 25
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -115,8 +116,13 @@ function GetYAMLIndent(lnum)
|
||||
\ s:liststartregex))
|
||||
elseif line =~# s:mapkeyregex
|
||||
" Same for line containing mapping key
|
||||
return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
|
||||
\ s:mapkeyregex))
|
||||
let prevmapline = s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
|
||||
\ s:mapkeyregex)
|
||||
if getline(prevmapline) =~# '^\s*- '
|
||||
return indent(prevmapline) + 2
|
||||
else
|
||||
return indent(prevmapline)
|
||||
endif
|
||||
elseif prevline =~# '^\s*- '
|
||||
" - List with
|
||||
" multiline scalar
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim indent file
|
||||
" Language: Zsh Shell Script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
|
||||
104
runtime/keymap/russian-jcukenwintype.vim
Normal file
104
runtime/keymap/russian-jcukenwintype.vim
Normal file
@@ -0,0 +1,104 @@
|
||||
" Vim Keymap file for russian characters, layout 'jcuken', MS Windows variant
|
||||
" (slightly incompatible with XFree86 'ru' keymap - makes use of NUMERO SIGN)
|
||||
" Useful mainly with utf-8 but may work with other encodings
|
||||
|
||||
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
|
||||
" Typewriter variant of standart russian layout
|
||||
" Maintainer: Denis Proskurin <danwerspb@gmail.com>
|
||||
" Last Changed: 2015 May 15
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "ru"
|
||||
|
||||
loadkeymap
|
||||
~ + CYRILLIC CAPITAL LETTER IO
|
||||
` | CYRILLIC SMALL LETTER IO
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
S Ы CYRILLIC CAPITAL LETTER YERU
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Э CYRILLIC CAPITAL LETTER E
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
] ъ CYRILLIC SMALL LETTER HARD SIGN
|
||||
s ы CYRILLIC SMALL LETTER YERU
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' э CYRILLIC SMALL LETTER E
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
@ "
|
||||
# № NUMERO SIGN
|
||||
$ ;
|
||||
^ :
|
||||
& ?
|
||||
/ ё
|
||||
? Ё
|
||||
1 №
|
||||
2 -
|
||||
3 /
|
||||
4 "
|
||||
5 :
|
||||
6 ,
|
||||
7 .
|
||||
8 _
|
||||
9 ?
|
||||
0 %
|
||||
- !
|
||||
= ;
|
||||
\\ )
|
||||
\| (
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim Plugin: Edit the file with an existing Vim if possible
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2013 Feb 24
|
||||
" Last Change: 2014 Dec 06
|
||||
|
||||
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
|
||||
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
|
||||
@@ -112,7 +112,7 @@ func! EditExisting(fname, command)
|
||||
endif
|
||||
|
||||
if a:command != ''
|
||||
exe "normal " . a:command
|
||||
exe "normal! " . a:command
|
||||
endif
|
||||
|
||||
redraw
|
||||
|
||||
@@ -303,7 +303,7 @@ fun! s:CleanUp(options, mode, startline, startcol, ...)
|
||||
let regexp = s:Wholematch(matchline, a:1, currcol-1)
|
||||
let endcol = matchend(matchline, regexp)
|
||||
if endcol > currcol " This is NOT off by one!
|
||||
execute "normal!" . (endcol - currcol) . "l"
|
||||
call cursor(0, endcol)
|
||||
endif
|
||||
endif " a:0
|
||||
endif " a:mode != "o" && etc.
|
||||
|
||||
@@ -177,6 +177,7 @@ SynMenu DE.Doxygen.C\ with\ doxygen:c.doxygen
|
||||
SynMenu DE.Doxygen.C++\ with\ doxygen:cpp.doxygen
|
||||
SynMenu DE.Doxygen.IDL\ with\ doxygen:idl.doxygen
|
||||
SynMenu DE.Doxygen.Java\ with\ doxygen:java.doxygen
|
||||
SynMenu DE.Doxygen.DataScript\ with\ doxygen:datascript.doxygen
|
||||
SynMenu DE.Dracula:dracula
|
||||
SynMenu DE.DSSSL:dsl
|
||||
SynMenu DE.DTD:dtd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Oct 09
|
||||
" Last Change: 2015 Jul 22
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -149,7 +149,7 @@ setlocal ts=15 tw=0 noro buftype=nofile
|
||||
call append(0, '" Each "set" line shows the current value of an option (on the left).')
|
||||
call append(1, '" Hit <CR> on a "set" line to execute it.')
|
||||
call append(2, '" A boolean option will be toggled.')
|
||||
call append(3, '" For other options you can edit the value.')
|
||||
call append(3, '" For other options you can edit the value before hitting <CR>.')
|
||||
call append(4, '" Hit <CR> on a help line to open a help window on this option.')
|
||||
call append(5, '" Hit <CR> on an index line to jump there.')
|
||||
call append(6, '" Hit <Space> on a "set" line to refresh it.')
|
||||
@@ -705,6 +705,8 @@ call append("$", "errorbells\tring the bell for error messages")
|
||||
call <SID>BinOptionG("eb", &eb)
|
||||
call append("$", "visualbell\tuse a visual bell instead of beeping")
|
||||
call <SID>BinOptionG("vb", &vb)
|
||||
call append("$", "belloff\tdo not ring the bell for these reasons")
|
||||
call <SID>OptionG("belloff", &belloff)
|
||||
if has("multi_lang")
|
||||
call append("$", "helplang\tlist of preferred languages for finding help")
|
||||
call <SID>OptionG("hlg", &hlg)
|
||||
@@ -954,6 +956,9 @@ call <SID>BinOptionL("bin")
|
||||
call append("$", "endofline\tlast line in the file has an end-of-line")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("eol")
|
||||
call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("fixeol")
|
||||
if has("multi_byte")
|
||||
call append("$", "bomb\tprepend a Byte Order Mark to the file")
|
||||
call append("$", "\t(local to buffer)")
|
||||
@@ -1194,8 +1199,10 @@ if has("keymap")
|
||||
call <SID>OptionL("kmp")
|
||||
endif
|
||||
if has("langmap")
|
||||
call append("$", "langmap\ttranslate characters for Normal mode")
|
||||
call append("$", "langmap\tlist of characters that are translated in Normal mode")
|
||||
call <SID>OptionG("lmap", &lmap)
|
||||
call append("$", "langnoremap\tdon't apply 'langmap' to mapped characters")
|
||||
call <SID>BinOptionG("lnr", &lnr)
|
||||
endif
|
||||
if has("xim")
|
||||
call append("$", "imdisable\twhen set never use IM; overrules following IM options")
|
||||
|
||||
@@ -5,6 +5,7 @@ Look in the file for hints on how it can be disabled without deleting it.
|
||||
|
||||
getscriptPlugin.vim get latest version of Vim scripts
|
||||
gzip.vim edit compressed files
|
||||
logiPat.vim logical operators on patterns
|
||||
matchparen.vim highlight paren matching the one under the cursor
|
||||
netrwPlugin.vim edit files over a network and browse (remote) directories
|
||||
rrhelper.vim used for --remote-wait editing
|
||||
|
||||
335
runtime/plugin/logiPat.vim
Normal file
335
runtime/plugin/logiPat.vim
Normal file
@@ -0,0 +1,335 @@
|
||||
" LogiPat:
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Mar 13, 2013
|
||||
" Version: 3
|
||||
" Purpose: to do Boolean-logic based regular expression pattern matching
|
||||
" Copyright: Copyright (C) 1999-2011 Charles E. Campbell {{{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 most anything else that's free,
|
||||
" LogiPat.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
"
|
||||
" Usage: {{{1
|
||||
" :LogiPat ...
|
||||
"
|
||||
" Boolean logic supported:
|
||||
" () grouping operators
|
||||
" ! not the following pattern
|
||||
" | logical or
|
||||
" & logical and
|
||||
" "..pattern.."
|
||||
" Example: {{{1
|
||||
" :LogiPat !("january"|"february")
|
||||
" would match all strings not containing the strings january
|
||||
" or february
|
||||
" GetLatestVimScripts: 1290 1 :AutoInstall: LogiPat.vim
|
||||
"
|
||||
" Behold, you will conceive in your womb, and bring forth a son, {{{1
|
||||
" and will call his name Jesus. He will be great, and will be
|
||||
" called the Son of the Most High. The Lord God will give him the
|
||||
" throne of his father, David, and he will reign over the house of
|
||||
" Jacob forever. There will be no end to his kingdom. (Luke 1:31-33 WEB)
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("loaded_logipat")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_LogiPat = "v3"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoRemOn
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=* LogiPat call LogiPat(<q-args>,1)
|
||||
silent! com -nargs=* LP call LogiPat(<q-args>,1)
|
||||
com! -nargs=+ ELP echomsg LogiPat(<q-args>)
|
||||
com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>"
|
||||
silent! com -nargs=+ LPF let s:LogiPatFlags="<args>"
|
||||
|
||||
" =====================================================================
|
||||
" Functions: {{{1
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LogiPat: this function interprets the boolean-logic pattern {{{2
|
||||
fun! LogiPat(pat,...)
|
||||
" call Dfunc("LogiPat(pat<".a:pat.">)")
|
||||
|
||||
" LogiPat(pat,dosearch)
|
||||
if a:0 > 0
|
||||
let dosearch= a:1
|
||||
else
|
||||
let dosearch= 0
|
||||
endif
|
||||
|
||||
let s:npatstack = 0
|
||||
let s:nopstack = 0
|
||||
let s:preclvl = 0
|
||||
let expr = a:pat
|
||||
|
||||
" Lexer/Parser
|
||||
while expr != ""
|
||||
" call Decho("expr<".expr.">")
|
||||
|
||||
if expr =~ '^"'
|
||||
" push a Pattern; accept "" as a single " in the pattern
|
||||
let expr = substitute(expr,'^\s*"','','')
|
||||
let pat = substitute(expr,'^\(\%([^"]\|\"\"\)\{-}\)"\([^"].*$\|$\)','\1','')
|
||||
let pat = substitute(pat,'""','"','g')
|
||||
let expr = substitute(expr,'^\(\%([^"]\|\"\"\)\{-}\)"\([^"].*$\|$\)','\2','')
|
||||
let expr = substitute(expr,'^\s*','','')
|
||||
" call Decho("pat<".pat."> expr<".expr.">")
|
||||
|
||||
call s:LP_PatPush('.*'.pat.'.*')
|
||||
|
||||
elseif expr =~ '^[!()|&]'
|
||||
" push an operator
|
||||
let op = strpart(expr,0,1)
|
||||
let expr = strpart(expr,strlen(op))
|
||||
" allow for those who can't resist doubling their and/or operators
|
||||
if op =~ '[|&]' && expr[0] == op
|
||||
let expr = strpart(expr,strlen(op))
|
||||
endif
|
||||
call s:LP_OpPush(op)
|
||||
|
||||
elseif expr =~ '^\s'
|
||||
" skip whitespace
|
||||
let expr= strpart(expr,1)
|
||||
|
||||
else
|
||||
echoerr "operator<".strpart(expr,0,1)."> not supported (yet)"
|
||||
let expr= strpart(expr,1)
|
||||
endif
|
||||
|
||||
endwhile
|
||||
|
||||
" Final Execution
|
||||
call s:LP_OpPush('Z')
|
||||
|
||||
let result= s:LP_PatPop(1)
|
||||
" call Decho("result=".result)
|
||||
|
||||
" sanity checks and cleanup
|
||||
if s:npatstack > 0
|
||||
echoerr s:npatstack." patterns left on stack!"
|
||||
let s:npatstack= 0
|
||||
endif
|
||||
if s:nopstack > 0
|
||||
echoerr s:nopstack." operators left on stack!"
|
||||
let s:nopstack= 0
|
||||
endif
|
||||
|
||||
" perform the indicated search
|
||||
if dosearch
|
||||
if exists("s:LogiPatFlags")
|
||||
" call Decho("search(result<".result."> LogiPatFlags<".s:LogiPatFlags.">)")
|
||||
call search(result,s:LogiPatFlags)
|
||||
else
|
||||
" call Decho("search(result<".result.">)")
|
||||
call search(result)
|
||||
endif
|
||||
let @/= result
|
||||
endif
|
||||
|
||||
" call Dret("LogiPat ".result)
|
||||
return result
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:String: Vim6.4 doesn't have string() {{{2
|
||||
func! s:String(str)
|
||||
return "'".escape(a:str, '"')."'"
|
||||
endfunc
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_PatPush: {{{2
|
||||
fun! s:LP_PatPush(pat)
|
||||
" call Dfunc("LP_PatPush(pat<".a:pat.">)")
|
||||
let s:npatstack = s:npatstack + 1
|
||||
let s:patstack_{s:npatstack} = a:pat
|
||||
" call s:StackLook("patpush") "Decho
|
||||
" call Dret("LP_PatPush : npatstack=".s:npatstack)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_PatPop: pop a number/variable from LogiPat's pattern stack {{{2
|
||||
fun! s:LP_PatPop(lookup)
|
||||
" call Dfunc("LP_PatPop(lookup=".a:lookup.")")
|
||||
if s:npatstack > 0
|
||||
let ret = s:patstack_{s:npatstack}
|
||||
let s:npatstack = s:npatstack - 1
|
||||
else
|
||||
let ret= "---error---"
|
||||
echoerr "(LogiPat) invalid expression"
|
||||
endif
|
||||
" call s:StackLook("patpop") "Decho
|
||||
" call Dret("LP_PatPop ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_OpPush: {{{2
|
||||
fun! s:LP_OpPush(op)
|
||||
" call Dfunc("LP_OpPush(op<".a:op.">)")
|
||||
|
||||
" determine new operator's precedence level
|
||||
if a:op == '('
|
||||
let s:preclvl= s:preclvl + 10
|
||||
let preclvl = s:preclvl
|
||||
elseif a:op == ')'
|
||||
let s:preclvl= s:preclvl - 10
|
||||
if s:preclvl < 0
|
||||
let s:preclvl= 0
|
||||
echoerr "too many )s"
|
||||
endif
|
||||
let preclvl= s:preclvl
|
||||
elseif a:op =~ '|'
|
||||
let preclvl= s:preclvl + 2
|
||||
elseif a:op =~ '&'
|
||||
let preclvl= s:preclvl + 4
|
||||
elseif a:op == '!'
|
||||
let preclvl= s:preclvl + 6
|
||||
elseif a:op == 'Z'
|
||||
let preclvl= -1
|
||||
else
|
||||
echoerr "expr<".expr."> not supported (yet)"
|
||||
let preclvl= s:preclvl
|
||||
endif
|
||||
" call Decho("new operator<".a:op."> preclvl=".preclvl)
|
||||
|
||||
" execute higher-precdence operators
|
||||
" call Decho("execute higher-precedence operators")
|
||||
call s:LP_Execute(preclvl)
|
||||
|
||||
" push new operator onto operator-stack
|
||||
" call Decho("push new operator<".a:op."> onto stack with preclvl=".preclvl." at nopstack=".(s:nopstack+1))
|
||||
if a:op =~ '!'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
elseif a:op =~ '|'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
elseif a:op == '&'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
endif
|
||||
|
||||
" call s:StackLook("oppush") "Decho
|
||||
" call Dret("LP_OpPush : s:preclvl=".s:preclvl)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Execute: execute operators from opstack using pattern stack {{{2
|
||||
fun! s:LP_Execute(preclvl)
|
||||
" call Dfunc("LP_Execute(preclvl=".a:preclvl.") npatstack=".s:npatstack." nopstack=".s:nopstack)
|
||||
|
||||
" execute all higher precedence operators
|
||||
while s:nopstack > 0 && a:preclvl < s:opprec_{s:nopstack}
|
||||
let op= s:opstack_{s:nopstack}
|
||||
" call Decho("op<".op."> nop=".s:nopstack." [preclvl=".a:preclvl."] < [opprec_".s:nopstack."=".s:opprec_{s:nopstack}."]")
|
||||
|
||||
let s:nopstack = s:nopstack - 1
|
||||
|
||||
if op == '!'
|
||||
let n1= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_Not(n1))
|
||||
|
||||
elseif op == '|'
|
||||
let n1= s:LP_PatPop(1)
|
||||
let n2= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_Or(n2,n1))
|
||||
|
||||
elseif op =~ '&'
|
||||
let n1= s:LP_PatPop(1)
|
||||
let n2= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_And(n2,n1))
|
||||
endif
|
||||
|
||||
" call s:StackLook("execute") "Decho
|
||||
endwhile
|
||||
|
||||
" call Dret("LP_Execute")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Not: writes a logical-not for a pattern {{{2
|
||||
fun! s:LP_Not(pat)
|
||||
" call Dfunc("LP_Not(pat<".a:pat.">)")
|
||||
if a:pat =~ '^\.\*' && a:pat =~ '\.\*$'
|
||||
let pat= substitute(a:pat,'^\.\*\(.*\)\.\*$','\1','')
|
||||
let ret= '^\%(\%('.pat.'\)\@!.\)*$'
|
||||
else
|
||||
let ret= '^\%(\%('.a:pat.'\)\@!.\)*$'
|
||||
endif
|
||||
" call Dret("LP_Not ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Or: writes a logical-or branch using two patterns {{{2
|
||||
fun! s:LP_Or(pat1,pat2)
|
||||
" call Dfunc("LP_Or(pat1<".a:pat1."> pat2<".a:pat2.">)")
|
||||
let ret= '\%('.a:pat1.'\|'.a:pat2.'\)'
|
||||
" call Dret("LP_Or ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_And: writes a logical-and concat using two patterns {{{2
|
||||
fun! s:LP_And(pat1,pat2)
|
||||
" call Dfunc("LP_And(pat1<".a:pat1."> pat2<".a:pat2.">)")
|
||||
let ret= '\%('.a:pat1.'\&'.a:pat2.'\)'
|
||||
" call Dret("LP_And ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" StackLook: {{{2
|
||||
fun! s:StackLook(description)
|
||||
" call Dfunc("StackLook(description<".a:description.">)")
|
||||
let iop = 1
|
||||
let ifp = 1
|
||||
" call Decho("Pattern Operator")
|
||||
|
||||
" print both pattern and operator
|
||||
while ifp <= s:npatstack && iop <= s:nopstack
|
||||
let fp = s:patstack_{ifp}
|
||||
let op = s:opstack_{iop}." (P".s:opprec_{s:nopstack}.')'
|
||||
let fplen= strlen(fp)
|
||||
if fplen < 30
|
||||
let fp= fp.strpart(" ",1,30-fplen)
|
||||
endif
|
||||
" call Decho(fp.op)
|
||||
let ifp = ifp + 1
|
||||
let iop = iop + 1
|
||||
endwhile
|
||||
|
||||
" print just pattern
|
||||
while ifp <= s:npatstack
|
||||
let fp = s:patstack_{ifp}
|
||||
" call Decho(fp)
|
||||
let ifp = ifp + 1
|
||||
endwhile
|
||||
|
||||
" print just operator
|
||||
while iop <= s:nopstack
|
||||
let op = s:opstack_{iop}." (P".s:opprec_{s:nopstack}.')'
|
||||
" call Decho(" ".op)
|
||||
let iop = iop + 1
|
||||
endwhile
|
||||
" call Dret("StackLook")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Cleanup And Modeline: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim: ts=4 fdm=marker
|
||||
@@ -1,6 +1,6 @@
|
||||
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
|
||||
" PLUGIN SECTION
|
||||
" Date: Jan 22, 2014
|
||||
" Date: Nov 07, 2014
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
|
||||
@@ -20,19 +20,7 @@
|
||||
if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v152"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** you need vim version 7.2 for this version of netrw"
|
||||
echohl None
|
||||
finish
|
||||
endif
|
||||
if v:version < 703 || (v:version == 703 && !has("patch465"))
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrw needs vim 7.3.465 or later"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v154"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoRemOn
|
||||
@@ -54,15 +42,15 @@ augroup END
|
||||
" Network Browsing Reading Writing: {{{2
|
||||
augroup Network
|
||||
au!
|
||||
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
|
||||
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
|
||||
try
|
||||
au SourceCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
|
||||
catch /^Vim\%((\a\+)\)\=:E216/
|
||||
au SourcePre ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
|
||||
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
|
||||
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
|
||||
try
|
||||
au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
|
||||
catch /^Vim\%((\a\+)\)\=:E216/
|
||||
au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
|
||||
endtry
|
||||
augroup END
|
||||
|
||||
@@ -81,18 +69,32 @@ com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<cou
|
||||
com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
|
||||
com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
|
||||
com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
|
||||
com! -nargs=* -bar -complete=dir Lexplore call netrw#Lexplore(<q-args>)
|
||||
com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
|
||||
|
||||
" Commands: NetrwSettings {{{2
|
||||
com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
|
||||
com! -bang NetrwClean call netrw#Clean(<bang>0)
|
||||
|
||||
" Maps:
|
||||
if !exists("g:netrw_nogx") && maparg('gx','n') == ""
|
||||
if !hasmapto('<Plug>NetrwBrowseX')
|
||||
nmap <unique> gx <Plug>NetrwBrowseX
|
||||
if !exists("g:netrw_nogx")
|
||||
if maparg('gx','n') == ""
|
||||
if !hasmapto('<Plug>NetrwBrowseX')
|
||||
nmap <unique> gx <Plug>NetrwBrowseX
|
||||
endif
|
||||
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
|
||||
endif
|
||||
nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cfile>"),0)<cr>
|
||||
if maparg('gx','v') == ""
|
||||
if !hasmapto('<Plug>NetrwBrowseXVis')
|
||||
vmap <unique> gx <Plug>NetrwBrowseXVis
|
||||
endif
|
||||
vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
|
||||
endif
|
||||
endif
|
||||
if exists("g:netrw_usetab") && g:netrw_usetab
|
||||
if maparg('<c-tab>','n') == ""
|
||||
nmap <unique> <c-tab> <Plug>NetrwShrink
|
||||
endif
|
||||
nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -119,7 +121,7 @@ fun! s:LocalBrowse(dirname)
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
|
||||
if a:dirname != '' && isdirectory(a:dirname)
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
if exists("w:netrw_bannercnt")
|
||||
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
|
||||
exe w:netrw_bannercnt
|
||||
endif
|
||||
endif
|
||||
@@ -127,15 +129,19 @@ fun! s:LocalBrowse(dirname)
|
||||
elseif isdirectory(a:dirname)
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
|
||||
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
|
||||
" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
if exists("w:netrw_bannercnt")
|
||||
" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
|
||||
exe w:netrw_bannercnt
|
||||
" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
endif
|
||||
|
||||
else
|
||||
" not a directory, ignore it
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
|
||||
endif
|
||||
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
|
||||
" call Dret("s:LocalBrowse")
|
||||
endfun
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for converting a syntax highlighted file to HTML.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2013 Jul 08
|
||||
" Last Change: 2015 Sep 08
|
||||
"
|
||||
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
||||
" $VIMRUNTIME/syntax/2html.vim
|
||||
@@ -67,20 +67,24 @@
|
||||
if exists('g:loaded_2html_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_2html_plugin = 'vim7.4_v1'
|
||||
let g:loaded_2html_plugin = 'vim7.4_v2'
|
||||
|
||||
"
|
||||
" Changelog: {{{
|
||||
" 7.4_v1 (this version): Fix modeline mangling for new "Vim:" format, and
|
||||
" 7.4_v2 (this version): Fix error raised when converting a diff containing
|
||||
" an empty buffer. Jan Stocker: allow g:html_font to
|
||||
" take a list so it is easier to specfiy fallback
|
||||
" fonts in the generated CSS.
|
||||
" 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
|
||||
" also for version-specific modelines like "vim>703:".
|
||||
"
|
||||
" 7.3 updates: {{{
|
||||
" 7.3_v14 (ad6996a23e3e): Allow suppressing line number anchors using
|
||||
" 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
|
||||
" g:html_line_ids=0. Allow customizing
|
||||
" important IDs (like line IDs and fold IDs) using
|
||||
" g:html_id_expr evalutated when the buffer conversion
|
||||
" is started.
|
||||
" 7.3_v13 (2eb30f341e8d): Keep foldmethod at manual in the generated file and
|
||||
" 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and
|
||||
" insert modeline to set it to manual.
|
||||
" Fix bug: diff mode with 2 unsaved buffers creates a
|
||||
" duplicate of one buffer instead of including both.
|
||||
@@ -91,7 +95,7 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
|
||||
" Fix XML validation error: &nsbp; not part of XML.
|
||||
" Allow TOhtml to chain together with other commands
|
||||
" using |.
|
||||
" 7.3_v12 (9910cbff5f16): Fix modeline mangling to also work for when multiple
|
||||
" 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple
|
||||
" highlight groups make up the start-of-modeline text.
|
||||
" Improve render time of page with uncopyable regions
|
||||
" by not using one-input-per-char. Change name of
|
||||
@@ -117,23 +121,23 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
|
||||
" http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
|
||||
" This patch has not yet been included in Vim, thus
|
||||
" these changes are removed in the next version.
|
||||
" 7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range wholly inside
|
||||
" 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside
|
||||
" multiple nested folds with dynamic folding on.
|
||||
" Also fix problem with foldtext in this situation.
|
||||
" 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with html_use_css
|
||||
" 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css
|
||||
" and without html_no_pre, default value same as
|
||||
" 'wrap' option, (Andy Spencer). Don't use
|
||||
" 'fileencoding' for converted document encoding if
|
||||
" 'buftype' indicates a special buffer which isn't
|
||||
" written.
|
||||
" 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow leaving tab
|
||||
" 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab
|
||||
" characters in generated output (Andy Spencer).
|
||||
" Escape text that looks like a modeline so Vim
|
||||
" doesn't use anything in the converted HTML as a
|
||||
" modeline. Bugfixes: Fix folding when a fold starts
|
||||
" before the conversion range. Remove fold column when
|
||||
" there are no folds.
|
||||
" 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
|
||||
" 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below:
|
||||
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
|
||||
" 7.3_v7b2: Remove automatic detection of encodings that are not
|
||||
" supported by all major browsers according to
|
||||
@@ -147,23 +151,22 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
|
||||
" charset, and make sure the 'fenc' of the generated
|
||||
" file matches its indicated charset. Add charsets for
|
||||
" all of Vim's natively supported encodings.
|
||||
" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
|
||||
" 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other
|
||||
" user settings interfering with diff mode generation,
|
||||
" trailing whitespace (e.g. line number column) when
|
||||
" using html_no_pre, and bugs when using
|
||||
" html_hover_unfold.
|
||||
" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
|
||||
" folds in diff mode when first line was folded.
|
||||
" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode
|
||||
" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css
|
||||
" 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode
|
||||
" 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css
|
||||
" default to true when not set to anything. Use strict
|
||||
" doctypes where possible. Rename use_xhtml option to
|
||||
" html_use_xhtml for consistency. Use .xhtml extension
|
||||
" when using this option. Add meta tag for settings.
|
||||
" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the
|
||||
" 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the
|
||||
" diff colors and the normal syntax colors
|
||||
" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output
|
||||
" Pre-v1 baseline: Mercurial changeset 3c9324c0800e
|
||||
" 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output
|
||||
"}}}
|
||||
"}}}
|
||||
|
||||
|
||||
@@ -25,16 +25,16 @@ $SPELLDIR/br.utf-8.spl : $FILES
|
||||
#
|
||||
# Fetching the files from OpenOffice.org.
|
||||
#
|
||||
OODIR = http://extensions.libreoffice.org/extension-center/an-drouizig-breton-spellchecker/releases/0.11/
|
||||
:attr {fetch = $OODIR/%file%} dict-br-0.11.oxt
|
||||
OODIR = http://extensions.libreoffice.org/extension-center/an-drouizig-breton-spellchecker/releases/0.13/
|
||||
:attr {fetch = $OODIR/%file%} difazier-an-drouizig-0_13.oxt
|
||||
|
||||
# The files don't depend on the .zip file so that we can delete it.
|
||||
# Only download the zip file if the targets don't exist.
|
||||
br_FR.aff br_FR.dic: {buildcheck=}
|
||||
:assertpkg unzip patch
|
||||
:fetch dict-br-0.11.oxt
|
||||
:sys $UNZIP dict-br-0.11.oxt
|
||||
:delete dict-br-0.11.oxt
|
||||
:fetch difazier-an-drouizig-0_13.oxt
|
||||
:sys $UNZIP difazier-an-drouizig-0_13.oxt
|
||||
:delete difazier-an-drouizig-0_13.oxt
|
||||
:copy dictionaries/br_FR.aff br_FR.aff
|
||||
:copy dictionaries/br_FR.dic br_FR.dic
|
||||
# The br_FR.aff file contains a BOM, remove it.
|
||||
@@ -65,12 +65,12 @@ diff:
|
||||
|
||||
check:
|
||||
:assertpkg unzip diff
|
||||
:fetch dict-br-0.11.oxt
|
||||
:fetch difazier-an-drouizig-0_13.oxt
|
||||
:mkdir tmp
|
||||
:cd tmp
|
||||
@try:
|
||||
@import stat
|
||||
:sys $UNZIP ../dict-br-0.11.oxt
|
||||
:sys $UNZIP ../difazier-an-drouizig-0_13.oxt
|
||||
:sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
|
||||
@if os.stat('d')[stat.ST_SIZE] > 0:
|
||||
:copy br_FR.aff ../br_FR.new.aff
|
||||
@@ -80,7 +80,7 @@ check:
|
||||
@finally:
|
||||
:cd ..
|
||||
:delete {r}{f}{q} tmp
|
||||
:delete dict-br-0.11.oxt
|
||||
:delete difazier-an-drouizig-0_13.oxt
|
||||
|
||||
|
||||
# vim: set sts=4 sw=4 :
|
||||
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user