mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
Compare commits
486 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b33c777493 | ||
![]() |
392964617a | ||
![]() |
f8f92a2360 | ||
![]() |
827e267800 | ||
![]() |
cc52060245 | ||
![]() |
bd3ea7227e | ||
![]() |
0ef0c17837 | ||
![]() |
5e876388e5 | ||
![]() |
1ecbfd19db | ||
![]() |
b12e5fa8bd | ||
![]() |
9b19335c6e | ||
![]() |
1ce80d8676 | ||
![]() |
1d1574e0ac | ||
![]() |
79e7c03f91 | ||
![]() |
2be51f5e85 | ||
![]() |
d9cada146f | ||
![]() |
7b955802b3 | ||
![]() |
46bd3c0f77 | ||
![]() |
3cf8ad6f48 | ||
![]() |
86c5696c27 | ||
![]() |
69e448d1d8 | ||
![]() |
add02b675d | ||
![]() |
863e1c91a6 | ||
![]() |
f5c112c949 | ||
![]() |
4cbe52b3a3 | ||
![]() |
7aaffb7001 | ||
![]() |
924cacd2fc | ||
![]() |
4f4b8ea448 | ||
![]() |
79a6983c0c | ||
![]() |
8e92b7f9fc | ||
![]() |
a4ea4dac45 | ||
![]() |
ac88c35d32 | ||
![]() |
f104ce2d15 | ||
![]() |
3d15cab29d | ||
![]() |
5308585adf | ||
![]() |
ad5cb87d7a | ||
![]() |
1a356e6439 | ||
![]() |
3f314d40be | ||
![]() |
64038bf4e2 | ||
![]() |
ef662498b1 | ||
![]() |
3e3d2d783c | ||
![]() |
830678d5f9 | ||
![]() |
208f9dd09d | ||
![]() |
76086b36b7 | ||
![]() |
be1d5a61be | ||
![]() |
1ac6601841 | ||
![]() |
59ef994f8f | ||
![]() |
99067b7e56 | ||
![]() |
fe1ba0487a | ||
![]() |
e2231bc372 | ||
![]() |
1d995bb357 | ||
![]() |
948361760c | ||
![]() |
5ee87c68b7 | ||
![]() |
ee5c4f8a2b | ||
![]() |
228d236bdf | ||
![]() |
fa924f4604 | ||
![]() |
2016365ffe | ||
![]() |
cb724182ff | ||
![]() |
8f212568aa | ||
![]() |
3a94e06abb | ||
![]() |
40149a9dbf | ||
![]() |
2f52ae18e7 | ||
![]() |
594e3a64de | ||
![]() |
63560c9c89 | ||
![]() |
ddba89c9b6 | ||
![]() |
a6e4271c15 | ||
![]() |
a5f361e470 | ||
![]() |
7fc996abf6 | ||
![]() |
1e94262efe | ||
![]() |
61a3b14726 | ||
![]() |
9664f513f4 | ||
![]() |
d21aaef456 | ||
![]() |
43fd126298 | ||
![]() |
b20b8f9f04 | ||
![]() |
d050d6390d | ||
![]() |
b3dbc9d90b | ||
![]() |
5ef1cb5c2e | ||
![]() |
6d1b948b6b | ||
![]() |
4d074e39ea | ||
![]() |
da4bf813da | ||
![]() |
515b7e3eff | ||
![]() |
a984203bd6 | ||
![]() |
7179f43666 | ||
![]() |
73234bfec6 | ||
![]() |
f8ad215d25 | ||
![]() |
8f22031708 | ||
![]() |
5ffe1425c9 | ||
![]() |
0e546d8b38 | ||
![]() |
4c960c3d78 | ||
![]() |
41f6a10a9b | ||
![]() |
d671dae58c | ||
![]() |
aa17b4b4bc | ||
![]() |
aa8b3b60ee | ||
![]() |
73e83e8566 | ||
![]() |
1574c4a115 | ||
![]() |
a31f9161b0 | ||
![]() |
33bc33274a | ||
![]() |
92f889dada | ||
![]() |
487609c075 | ||
![]() |
2e000a1acd | ||
![]() |
db51ff10f4 | ||
![]() |
8721e1fe08 | ||
![]() |
8771e84db7 | ||
![]() |
d25a59f4d0 | ||
![]() |
db77b7bc9e | ||
![]() |
50393ef178 | ||
![]() |
52f160f352 | ||
![]() |
069a220f32 | ||
![]() |
164fb2a688 | ||
![]() |
d459a0891c | ||
![]() |
894fcb778e | ||
![]() |
ccab78046c | ||
![]() |
71980676f0 | ||
![]() |
6c77ea1cb6 | ||
![]() |
e78fc534dd | ||
![]() |
4b13cbc76d | ||
![]() |
fb3a6b925b | ||
![]() |
c13dc2b762 | ||
![]() |
8cfef01193 | ||
![]() |
3571fdac6f | ||
![]() |
765d394f18 | ||
![]() |
c15e796211 | ||
![]() |
130611fca3 | ||
![]() |
18ca2035fe | ||
![]() |
9b0b3a0883 | ||
![]() |
1937c6e480 | ||
![]() |
299044d4ef | ||
![]() |
45b378259e | ||
![]() |
ce0e66260f | ||
![]() |
e74fa00c38 | ||
![]() |
1715b79d39 | ||
![]() |
2772144cbf | ||
![]() |
91a1680205 | ||
![]() |
66f89ae321 | ||
![]() |
63d0f6e94a | ||
![]() |
41434e6881 | ||
![]() |
291495a7b0 | ||
![]() |
e1d81178cc | ||
![]() |
31047607f8 | ||
![]() |
a15cfb4d52 | ||
![]() |
c5f37c0fc0 | ||
![]() |
7c94b2c343 | ||
![]() |
3915ac2409 | ||
![]() |
4d0c511354 | ||
![]() |
d22a821ce3 | ||
![]() |
ee56470157 | ||
![]() |
4172ce4eb0 | ||
![]() |
d4430dc3eb | ||
![]() |
c8b487ae40 | ||
![]() |
50c4c56967 | ||
![]() |
f583e51209 | ||
![]() |
0ccd1ef725 | ||
![]() |
feb70192a8 | ||
![]() |
ce17037e3e | ||
![]() |
8048699f7d | ||
![]() |
34904efd9d | ||
![]() |
b8ed507e3b | ||
![]() |
8b86f1103a | ||
![]() |
22230196cb | ||
![]() |
f1aec23c09 | ||
![]() |
bcbcf235f6 | ||
![]() |
5bfbf968dd | ||
![]() |
8887ccffa6 | ||
![]() |
542c79f20d | ||
![]() |
9eb6a44564 | ||
![]() |
5fa082fa85 | ||
![]() |
03d8adda8e | ||
![]() |
a2ec5a569b | ||
![]() |
d70b57264b | ||
![]() |
23a83d24a6 | ||
![]() |
297075bf47 | ||
![]() |
f6ecd127b9 | ||
![]() |
4618307a6c | ||
![]() |
f338ea7835 | ||
![]() |
49f0417988 | ||
![]() |
d0d5d17b69 | ||
![]() |
ac0f979501 | ||
![]() |
a480614cb0 | ||
![]() |
a118abca77 | ||
![]() |
1c91dc8a5e | ||
![]() |
21afabb9e8 | ||
![]() |
c90784836b | ||
![]() |
33321f2c85 | ||
![]() |
ee0e214427 | ||
![]() |
74d450aa7b | ||
![]() |
38435e8a05 | ||
![]() |
9c811c6ba6 | ||
![]() |
51d95d1438 | ||
![]() |
1eaa2227e9 | ||
![]() |
f5ae5fa799 | ||
![]() |
3875d0bdf6 | ||
![]() |
1a958345e2 | ||
![]() |
a119db78d7 | ||
![]() |
5f33f581a7 | ||
![]() |
92f7dc1c4b | ||
![]() |
9c2a156faa | ||
![]() |
d1aa549735 | ||
![]() |
9b550a8760 | ||
![]() |
a29b08ca5a | ||
![]() |
d858315e59 | ||
![]() |
8099275082 | ||
![]() |
55a345c3e7 | ||
![]() |
a3a7afded6 | ||
![]() |
4f18e0f678 | ||
![]() |
3b4d1ab180 | ||
![]() |
a7ade5c832 | ||
![]() |
0735b05c82 | ||
![]() |
e4fb777252 | ||
![]() |
ba3123c88f | ||
![]() |
704882e8dc | ||
![]() |
3920e7680d | ||
![]() |
5dfbe6685d | ||
![]() |
d38d6486f2 | ||
![]() |
f82e982bda | ||
![]() |
7ad3f077dc | ||
![]() |
dddbf9c5fa | ||
![]() |
fec466c72e | ||
![]() |
6f88dca92d | ||
![]() |
4eba134a55 | ||
![]() |
9d18492793 | ||
![]() |
1231f0b001 | ||
![]() |
85d06fef16 | ||
![]() |
8b173a1de5 | ||
![]() |
f433f569a3 | ||
![]() |
d4fb5920d3 | ||
![]() |
0b23dec35e | ||
![]() |
07265d221f | ||
![]() |
729064af5f | ||
![]() |
24fbb2c866 | ||
![]() |
4034670568 | ||
![]() |
65394777d5 | ||
![]() |
755e56ba66 | ||
![]() |
964e52e81f | ||
![]() |
68550b0d63 | ||
![]() |
7a7a758786 | ||
![]() |
62d137ce09 | ||
![]() |
cf0ff1dd0f | ||
![]() |
bf7bc4dcf0 | ||
![]() |
54a1fb77e7 | ||
![]() |
269f3ac779 | ||
![]() |
c2ab844133 | ||
![]() |
b1b8759fc3 | ||
![]() |
62f1aaedb1 | ||
![]() |
2c76651438 | ||
![]() |
59e1f8996d | ||
![]() |
da9e519ba1 | ||
![]() |
39ef219535 | ||
![]() |
573d65c738 | ||
![]() |
852aaa5d42 | ||
![]() |
7f3999ac80 | ||
![]() |
5c87d40acd | ||
![]() |
8bfb521417 | ||
![]() |
8eeda7169a | ||
![]() |
3dfbeabf35 | ||
![]() |
420fe1fe73 | ||
![]() |
7c79ea70ef | ||
![]() |
e8fab975f8 | ||
![]() |
5db511b6f1 | ||
![]() |
ddf3e27959 | ||
![]() |
f65d58907d | ||
![]() |
a1c770ca27 | ||
![]() |
970b5f2752 | ||
![]() |
7497dbee16 | ||
![]() |
7c0f6d2380 | ||
![]() |
879c668d14 | ||
![]() |
3b94756feb | ||
![]() |
317d5ca7b0 | ||
![]() |
223aafb1a7 | ||
![]() |
3b7c4093e2 | ||
![]() |
095320a67d | ||
![]() |
1ce329e7dd | ||
![]() |
4fc85e5c87 | ||
![]() |
dd8812c7cb | ||
![]() |
a641b74140 | ||
![]() |
73b8c89518 | ||
![]() |
72d03cc961 | ||
![]() |
5999749e07 | ||
![]() |
97ed0e8dd3 | ||
![]() |
fd10729bc8 | ||
![]() |
6bed244488 | ||
![]() |
57cfb95758 | ||
![]() |
c6e481cba5 | ||
![]() |
9bf694ff0b | ||
![]() |
f350655ddd | ||
![]() |
59b04d856b | ||
![]() |
feed81f45f | ||
![]() |
d37dc0b314 | ||
![]() |
9c5ab23ef2 | ||
![]() |
d8e07deff6 | ||
![]() |
6c8e572d09 | ||
![]() |
3a6cef9ee6 | ||
![]() |
2586459118 | ||
![]() |
47fac915f3 | ||
![]() |
588b09277b | ||
![]() |
008c014cbe | ||
![]() |
593df501b3 | ||
![]() |
50db0312f9 | ||
![]() |
c15446222b | ||
![]() |
665bd8de59 | ||
![]() |
36f17ce87e | ||
![]() |
3706701d9b | ||
![]() |
a42800ba45 | ||
![]() |
94fabe4d59 | ||
![]() |
4bc3bcab22 | ||
![]() |
d51a27b7e5 | ||
![]() |
3b23d733dd | ||
![]() |
af5c34f8a5 | ||
![]() |
b4b4536339 | ||
![]() |
7643245470 | ||
![]() |
fec35dc976 | ||
![]() |
e57e303c6b | ||
![]() |
23669bd7df | ||
![]() |
2d39eea9f0 | ||
![]() |
c6aa71605f | ||
![]() |
c6f6033482 | ||
![]() |
bd4ca22cf0 | ||
![]() |
efaf76e623 | ||
![]() |
ec580da5f4 | ||
![]() |
0298b004f8 | ||
![]() |
bd529ea3f3 | ||
![]() |
d26b01d4bd | ||
![]() |
074d3dc1f3 | ||
![]() |
3ce8de7c8f | ||
![]() |
59eaba2894 | ||
![]() |
70f6e2ce52 | ||
![]() |
5a6633bc34 | ||
![]() |
04bdeeb8b2 | ||
![]() |
49b06a8f2a | ||
![]() |
cb62594042 | ||
![]() |
c9df429887 | ||
![]() |
22a928aeac | ||
![]() |
6f25ba0550 | ||
![]() |
b2f9bfbff0 | ||
![]() |
4d27bd6bfe | ||
![]() |
adf11f3478 | ||
![]() |
f1344bc219 | ||
![]() |
3fd62f9612 | ||
![]() |
ff0253127e | ||
![]() |
df4ac79761 | ||
![]() |
a79ebeeea4 | ||
![]() |
303ac3f283 | ||
![]() |
648aebb8b6 | ||
![]() |
a48508de0d | ||
![]() |
04cd3eef24 | ||
![]() |
6d5a5b02f6 | ||
![]() |
568ee1e3c2 | ||
![]() |
091e885d44 | ||
![]() |
68fb815bf1 | ||
![]() |
8b3c399b6d | ||
![]() |
bd39e2354f | ||
![]() |
6a7535cd84 | ||
![]() |
76bf21de26 | ||
![]() |
d8a2007d47 | ||
![]() |
930ee40ad3 | ||
![]() |
541ba61ac9 | ||
![]() |
6ee58e67cb | ||
![]() |
9040d7aed7 | ||
![]() |
f4e3c13bcc | ||
![]() |
f0538639c0 | ||
![]() |
39555dc8c4 | ||
![]() |
7f99d210fd | ||
![]() |
25eaacd10f | ||
![]() |
91b8ab3d21 | ||
![]() |
b654a2b324 | ||
![]() |
9649537f4c | ||
![]() |
47b9ac9013 | ||
![]() |
b9d1a7f810 | ||
![]() |
944658e2e1 | ||
![]() |
fbfe564b3c | ||
![]() |
aa0af927da | ||
![]() |
5403924f7c | ||
![]() |
efb30a0068 | ||
![]() |
c5d0c280d3 | ||
![]() |
ee1f8eab0c | ||
![]() |
53a1db1a10 | ||
![]() |
eb53ec5ba2 | ||
![]() |
8373aaf44e | ||
![]() |
376b973a0a | ||
![]() |
e9161799bf | ||
![]() |
90537ae970 | ||
![]() |
884c124130 | ||
![]() |
e123675bcc | ||
![]() |
5c112c0cb9 | ||
![]() |
ea67bf808b | ||
![]() |
f638572164 | ||
![]() |
65f11d0a00 | ||
![]() |
1e7a553ed7 | ||
![]() |
ecdf18edbb | ||
![]() |
cb0b89f8ba | ||
![]() |
5b30ba7b99 | ||
![]() |
7581046b60 | ||
![]() |
1f27ccb77f | ||
![]() |
aa4cc17bb0 | ||
![]() |
9d64d75031 | ||
![]() |
b051f33814 | ||
![]() |
67f03f33a7 | ||
![]() |
f9647d99b4 | ||
![]() |
c42cb49a96 | ||
![]() |
aa36af214a | ||
![]() |
75cfd3c0ca | ||
![]() |
5cb01bafa8 | ||
![]() |
243b492c0d | ||
![]() |
e1abbe6b67 | ||
![]() |
4cc38e04c7 | ||
![]() |
8be2ab11de | ||
![]() |
1946f96a16 | ||
![]() |
e117544d72 | ||
![]() |
77c0f9a62b | ||
![]() |
ad34a376eb | ||
![]() |
c3ac16cfeb | ||
![]() |
3b472e55b3 | ||
![]() |
b079622716 | ||
![]() |
238a8d33fa | ||
![]() |
123361f187 | ||
![]() |
8a34d21b0d | ||
![]() |
7387816dcb | ||
![]() |
f406ae412e | ||
![]() |
c3e4e0e383 | ||
![]() |
cd1be8350d | ||
![]() |
0488fea0de | ||
![]() |
3c9d8ac99e | ||
![]() |
014d692013 | ||
![]() |
28821397f6 | ||
![]() |
1b6e7f9e39 | ||
![]() |
aca51f3d93 | ||
![]() |
a9b4cedb08 | ||
![]() |
815fe24604 | ||
![]() |
d1ec3f661a | ||
![]() |
ebdb802bf5 | ||
![]() |
f1b9a59ed6 | ||
![]() |
810d31a430 | ||
![]() |
f183cc14de | ||
![]() |
5c4a5d0677 | ||
![]() |
5b96d370df | ||
![]() |
1cf7de074b | ||
![]() |
cc203e4b93 | ||
![]() |
f37ad6af36 | ||
![]() |
a35c45732c | ||
![]() |
2b12406f2e | ||
![]() |
3b74ee1ce9 | ||
![]() |
158dc2b7a7 | ||
![]() |
5262cf2f19 | ||
![]() |
7f8365e302 | ||
![]() |
fe143ac439 | ||
![]() |
1b56425662 | ||
![]() |
74341ca5ca | ||
![]() |
8c684b2fdb | ||
![]() |
a3a8df8359 | ||
![]() |
e796632240 | ||
![]() |
81960df9f5 | ||
![]() |
fcf829963e | ||
![]() |
bf65b3ab45 | ||
![]() |
87abe073d9 | ||
![]() |
74c960007f | ||
![]() |
4c0ac1ca26 | ||
![]() |
f338fee482 | ||
![]() |
f40c8c4c23 | ||
![]() |
3abbdb2f41 | ||
![]() |
86c0bd14ec | ||
![]() |
77836ff01b | ||
![]() |
67a7b1785c | ||
![]() |
0ab4f2f18f | ||
![]() |
6d583f8587 | ||
![]() |
f838755fc0 | ||
![]() |
618c8d0e82 | ||
![]() |
b6b84cb94f | ||
![]() |
3a60f927b8 | ||
![]() |
7be12edd38 | ||
![]() |
655f1b7513 | ||
![]() |
07eaff7c26 | ||
![]() |
8c00c34b91 | ||
![]() |
597547e797 | ||
![]() |
972b43459b | ||
![]() |
cf673f60c6 | ||
![]() |
d9c0293824 | ||
![]() |
21956adb6e | ||
![]() |
fe9d91ceb6 | ||
![]() |
09f6066bb4 | ||
![]() |
789041c282 | ||
![]() |
119545190c | ||
![]() |
98f9ff730b | ||
![]() |
8d07058097 | ||
![]() |
b1d7b5294a | ||
![]() |
a86d4b323e | ||
![]() |
cfa2107e33 | ||
![]() |
36af4af27a |
@@ -7,4 +7,4 @@ if [[ -n "${CI_TARGET}" ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
||||
[ "$USE_GCOV" = on ] && { coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' ; }
|
||||
|
@@ -19,6 +19,10 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the
|
||||
echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${BUILD_32BIT}" = ON ] && [ "${BUILD_MINGW}" = ON ]; then
|
||||
>&2 echo "32-bit MinGW builds not supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
# Adds user to a dummy group.
|
||||
|
@@ -1,10 +1,5 @@
|
||||
build_deps() {
|
||||
if [[ "${BUILD_32BIT}" == ON ]]; then
|
||||
if [[ "${BUILD_MINGW}" == ON ]]; then
|
||||
>&2 echo "32-bit MinGW builds not supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
|
||||
fi
|
||||
if [[ "${BUILD_MINGW}" == ON ]]; then
|
||||
@@ -42,11 +37,6 @@ build_nvim() {
|
||||
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
|
||||
fi
|
||||
if [[ "${BUILD_32BIT}" == ON ]]; then
|
||||
if [[ "${BUILD_MINGW}" == ON ]]; then
|
||||
>&2 echo "32-bit MinGW builds not supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
|
||||
fi
|
||||
if [[ "${BUILD_MINGW}" == ON ]]; then
|
||||
|
@@ -14,7 +14,9 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then
|
||||
# binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools
|
||||
|
||||
echo "Downloading MinGW..."
|
||||
curl -sSL "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
|
||||
curl -sSL "https://github.com/neovim/deps/raw/master/opt/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" \
|
||||
| tar xJf - -C "${HOME}/.local"
|
||||
|
||||
fi
|
||||
|
||||
# Set CC to default to avoid compilation problems
|
||||
|
@@ -4,7 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
if [[ -n "${CI_TARGET}" ]]; then
|
||||
make lint
|
||||
make "${CI_TARGET}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -67,3 +67,5 @@ local.mk
|
||||
/runtime/doc/doctags
|
||||
/runtime/doc/errors.log
|
||||
|
||||
# clint errors, generated by `make lint`
|
||||
/errors.json
|
||||
|
19
.travis.yml
19
.travis.yml
@@ -12,8 +12,6 @@ env:
|
||||
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
|
||||
# LLVM symbolizer path.
|
||||
- LLVM_SYMBOLIZER="$(which llvm-symbolizer-3.6)"
|
||||
# Force verification of DLOG macros.
|
||||
- CFLAGS="-DMIN_LOG_LEVEL=0"
|
||||
# Build directory for Neovim.
|
||||
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
||||
# Build directory for third-party dependencies.
|
||||
@@ -28,9 +26,9 @@ env:
|
||||
- CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
|
||||
-DUSE_GCOV=ON
|
||||
-DBUSTED_OUTPUT_TYPE=gtest
|
||||
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr"
|
||||
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
|
||||
-DMIN_LOG_LEVEL=0"
|
||||
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR"
|
||||
# Additional CMake flags for 32-bit builds.
|
||||
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
|
||||
@@ -59,37 +57,34 @@ env:
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: CI_TARGET=clint
|
||||
env: CI_TARGET=lint
|
||||
- os: linux
|
||||
compiler: gcc-5
|
||||
env: GCOV=gcov-5
|
||||
- os: linux
|
||||
# Travis creates a cache per compiler.
|
||||
# Set a different value here to store 32-bit
|
||||
# dependencies in a separate cache.
|
||||
compiler: gcc-5 -m32
|
||||
env: GCOV=gcov-5 BUILD_32BIT=ON
|
||||
env: BUILD_32BIT=ON
|
||||
- os: linux
|
||||
compiler: clang-3.6
|
||||
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=ASAN_UBSAN
|
||||
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=ASAN_UBSAN CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- os: linux
|
||||
compiler: clang-3.6
|
||||
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=MSAN
|
||||
env: CLANG_SANITIZER=MSAN
|
||||
- os: linux
|
||||
compiler: clang-3.6
|
||||
env: CLANG_SANITIZER=TSAN
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: GCOV=gcov
|
||||
- os: osx
|
||||
compiler: gcc-4.9
|
||||
env: GCOV=gcov-4.9
|
||||
- os: linux
|
||||
env: BUILD_MINGW=ON
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
# TODO: Remove when all MSan errors have been fixed.
|
||||
- env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=MSAN
|
||||
- env: CLANG_SANITIZER=MSAN
|
||||
|
||||
before_install: .ci/before_install.sh
|
||||
install: .ci/install.sh
|
||||
|
@@ -6,8 +6,13 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
# Prefer our bundled versions of dependencies.
|
||||
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
|
||||
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
||||
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
|
||||
else()
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
|
||||
endif()
|
||||
|
||||
# used for check_c_compiler_flag
|
||||
include(CheckCCompilerFlag)
|
||||
@@ -35,37 +40,35 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(USE_FNAME_CASE TRUE)
|
||||
endif()
|
||||
|
||||
# Set available build types for CMake GUIs.
|
||||
# A different build type can still be set by -DCMAKE_BUILD_TYPE=...
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS "Debug" "Dev" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
|
||||
# Set default build type.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Dev'.")
|
||||
set(CMAKE_BUILD_TYPE "Dev" CACHE STRING "Choose the type of build." FORCE)
|
||||
endif()
|
||||
|
||||
# Version tokens
|
||||
# - In a git repo, these tokens are _ignored_.
|
||||
# - If the current HEAD is tagged, the tag name is used.
|
||||
# - Otherwise the result of `git describe` is used.
|
||||
# - If not in a git repo (e.g. a tarball) these tokens set the version string.
|
||||
# Set available build types for CMake GUIs.
|
||||
# A different build type can still be set by -DCMAKE_BUILD_TYPE=...
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS "Debug" "Dev" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
|
||||
# If not in a git repo (e.g., a tarball) these tokens define the complete
|
||||
# version string, else it is combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 1)
|
||||
set(NVIM_VERSION_PATCH 1)
|
||||
set(NVIM_VERSION_PATCH 2)
|
||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
||||
|
||||
file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR)
|
||||
include(GetGitRevisionDescription)
|
||||
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
|
||||
if(NVIM_VERSION_COMMIT) # is a git repo
|
||||
git_get_exact_tag(NVIM_VERSION_MEDIUM)
|
||||
if(NVIM_VERSION_MEDIUM) # is a tagged release
|
||||
unset(NVIM_VERSION_COMMIT)
|
||||
else() # is a dev build
|
||||
git_describe(NVIM_VERSION_MEDIUM)
|
||||
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
|
||||
endif()
|
||||
if(NVIM_VERSION_COMMIT) # is a git repo
|
||||
git_describe(NVIM_VERSION_MEDIUM)
|
||||
# `git describe` annotates the most recent tagged release; for pre-release
|
||||
# builds we must replace that with the unreleased version.
|
||||
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}"
|
||||
NVIM_VERSION_MEDIUM
|
||||
${NVIM_VERSION_MEDIUM})
|
||||
endif()
|
||||
|
||||
set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
|
||||
@@ -204,6 +207,7 @@ endif()
|
||||
if(MINGW)
|
||||
# Use POSIX compatible stdio in Mingw
|
||||
add_definitions(-D__USE_MINGW_ANSI_STDIO)
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
endif()
|
||||
|
||||
# OpenBSD's GCC (4.2.1) doesn't have -Wvla
|
||||
@@ -212,12 +216,16 @@ if(HAS_WVLA_FLAG)
|
||||
add_definitions(-Wvla)
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
|
||||
check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
|
||||
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
|
||||
add_definitions(-fstack-protector-strong)
|
||||
elseif(HAS_FSTACK_PROTECTOR_FLAG)
|
||||
add_definitions(-fstack-protector --param ssp-buffer-size=4)
|
||||
if(UNIX)
|
||||
# -fstack-protector breaks non Unix builds even in Mingw-w64
|
||||
check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
|
||||
check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
|
||||
|
||||
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
|
||||
add_definitions(-fstack-protector-strong)
|
||||
elseif(HAS_FSTACK_PROTECTOR_FLAG)
|
||||
add_definitions(-fstack-protector --param ssp-buffer-size=4)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
|
||||
@@ -271,7 +279,7 @@ include(CheckLibraryExists)
|
||||
find_package(LibUV REQUIRED)
|
||||
include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
|
||||
|
||||
find_package(Msgpack REQUIRED)
|
||||
find_package(Msgpack 1.0.0 REQUIRED)
|
||||
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
||||
|
||||
find_package(LuaJit REQUIRED)
|
||||
@@ -328,9 +336,16 @@ endif()
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Place targets in bin/ or lib/ for all build configurations
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES})
|
||||
string(TOUPPER ${CFGNAME} CFGNAME)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
|
||||
endforeach()
|
||||
|
||||
# Find Lua interpreter
|
||||
include(LuaHelpers)
|
||||
@@ -377,6 +392,16 @@ install_helper(
|
||||
FILES ${MANPAGES}
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
# MIN_LOG_LEVEL for log.h
|
||||
if(DEFINED MIN_LOG_LEVEL)
|
||||
if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$")
|
||||
message(FATAL_ERROR "MIN_LOG_LEVEL must be a number DEBUG (0), INFO (1), WARNING (2) or ERROR (3)")
|
||||
endif()
|
||||
message(STATUS "Log level set to ${MIN_LOG_LEVEL}")
|
||||
else()
|
||||
message(STATUS "Log level not specified, defaulting to INFO(1)")
|
||||
endif()
|
||||
|
||||
# Go down the tree.
|
||||
|
||||
add_subdirectory(src/nvim)
|
||||
@@ -401,7 +426,11 @@ if(BUSTED_PRG)
|
||||
if(POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif()
|
||||
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll)
|
||||
else()
|
||||
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
test/config/paths.lua.in
|
||||
@@ -465,3 +494,15 @@ if(LUACHECK_PRG)
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTestsLint.cmake)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "Neovim")
|
||||
set(CPACK_PACKAGE_VENDOR "neovim.io")
|
||||
set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim")
|
||||
# Set toplevel directory/installer name as Neovim
|
||||
set(CPACK_PACKAGE_FILE_NAME "Neovim")
|
||||
set(CPACK_TOPLEVEL_TAG "Neovim")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
include(CPack)
|
||||
|
@@ -23,15 +23,10 @@ If your issue isn't mentioned there:
|
||||
your problem persists.
|
||||
- If you're experiencing compile or runtime warnings/failures, try searching for
|
||||
the error message(s) you received (if any) on [Neovim's issue tracker][github-issues].
|
||||
- For build issues, see
|
||||
[Troubleshooting#build-issues][wiki-troubleshooting-build-issues].
|
||||
- For runtime issues, see
|
||||
[Troubleshooting#runtime-issues][wiki-troubleshooting-runtime-issues].
|
||||
If your issue isn't mentioned there, try reproducing it using `nvim`
|
||||
with the smallest possible `vimrc` (or none at all via `nvim -u NONE`),
|
||||
to rule out bugs in plugins you're using.
|
||||
If you're using a plugin manager, comment out your plugins, then add
|
||||
them back in one by one.
|
||||
- For runtime issues, try reproducing it using `nvim` with the smallest
|
||||
possible `vimrc` (or none at all via `nvim -u NONE`), to rule out bugs in
|
||||
plugins you're using. If you're using a plugin manager, comment out your
|
||||
plugins, then add them back in one by one.
|
||||
|
||||
Include as much detail as possible; we generally need to know:
|
||||
|
||||
@@ -112,10 +107,9 @@ happen to be modifying anyway. Fix anything that looks outright
|
||||
otherwise prefer to leave things as they are.
|
||||
|
||||
For new code, run `make lint` (which runs [clint.py][clint]) to detect style
|
||||
errors. Make sure that the file(s) you intend to be linted are not in
|
||||
`clint-ignored-files.txt`. It's not perfect, so some warnings may be false
|
||||
positives/negatives. To have `clint.py` ignore certain cases, put `// NOLINT`
|
||||
at the end of the line.
|
||||
errors. It's not perfect, so some warnings may be false positives/negatives.
|
||||
To have `clint.py` ignore certain cases, put `// NOLINT` at the end of the
|
||||
line.
|
||||
|
||||
We also provide a configuration file for [`clang-format`][clang-format], which
|
||||
can be used to format code according to the style guidelines. Be aware that
|
||||
@@ -196,6 +190,4 @@ such as [`tig`][tig].
|
||||
[wiki-contributing]: https://github.com/neovim/neovim/wiki/Contributing
|
||||
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
|
||||
[wiki-review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
|
||||
[wiki-troubleshooting-build-issues]: https://github.com/neovim/neovim/wiki/Troubleshooting#build-issues
|
||||
[wiki-troubleshooting-runtime-issues]: https://github.com/neovim/neovim/wiki/Troubleshooting#runtime-issues
|
||||
[wiki-troubleshooting]: https://github.com/neovim/neovim/wiki/Troubleshooting
|
||||
|
259
clint.py
259
clint.py
@@ -198,6 +198,8 @@ _ERROR_CATEGORIES = [
|
||||
'runtime/printf',
|
||||
'runtime/printf_format',
|
||||
'runtime/threadsafe_fn',
|
||||
'syntax/parenthesis',
|
||||
'whitespace/alignment',
|
||||
'whitespace/blank_line',
|
||||
'whitespace/braces',
|
||||
'whitespace/comma',
|
||||
@@ -213,7 +215,7 @@ _ERROR_CATEGORIES = [
|
||||
'whitespace/parens',
|
||||
'whitespace/semicolon',
|
||||
'whitespace/tab',
|
||||
'whitespace/todo'
|
||||
'whitespace/todo',
|
||||
]
|
||||
|
||||
# The default state of the category filter. This is overrided by the --filter=
|
||||
@@ -826,9 +828,9 @@ def Error(filename, linenum, category, confidence, message):
|
||||
_RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
|
||||
r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')
|
||||
# Matches strings. Escape codes should already be removed by ESCAPES.
|
||||
_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
|
||||
_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"([^"]*)"')
|
||||
# Matches characters. Escape codes should already be removed by ESCAPES.
|
||||
_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
|
||||
_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'(.)'")
|
||||
# Matches multi-line C++ comments.
|
||||
# This RE is a little bit more complicated than one might expect, because we
|
||||
# have to take care of space removals tools so we can handle comments inside
|
||||
@@ -923,39 +925,48 @@ def CleanseComments(line):
|
||||
|
||||
class CleansedLines(object):
|
||||
|
||||
"""Holds 3 copies of all lines with different preprocessing applied to them.
|
||||
"""Holds 5 copies of all lines with different preprocessing applied to them.
|
||||
|
||||
1) elided member contains lines without strings and comments,
|
||||
2) lines member contains lines without comments, and
|
||||
3) raw_lines member contains all the lines without processing.
|
||||
3) raw_lines member contains all the lines with multiline comments replaced.
|
||||
4) init_lines member contains all the lines without processing.
|
||||
5) elided_with_space_strings is like elided, but with string literals
|
||||
looking like `" "`.
|
||||
All these three members are of <type 'list'>, and of the same length.
|
||||
"""
|
||||
|
||||
def __init__(self, lines):
|
||||
def __init__(self, lines, init_lines):
|
||||
self.elided = []
|
||||
self.lines = []
|
||||
self.raw_lines = lines
|
||||
self.num_lines = len(lines)
|
||||
self.init_lines = init_lines
|
||||
self.lines_without_raw_strings = lines
|
||||
self.elided_with_space_strings = []
|
||||
for linenum in range(len(self.lines_without_raw_strings)):
|
||||
self.lines.append(CleanseComments(
|
||||
self.lines_without_raw_strings[linenum]))
|
||||
elided = self._CollapseStrings(
|
||||
self.lines_without_raw_strings[linenum])
|
||||
self.elided.append(CleanseComments(elided))
|
||||
elided = CleanseComments(self._CollapseStrings(
|
||||
self.lines_without_raw_strings[linenum], True))
|
||||
self.elided_with_space_strings.append(elided)
|
||||
|
||||
def NumLines(self):
|
||||
"""Returns the number of lines represented."""
|
||||
return self.num_lines
|
||||
|
||||
@staticmethod
|
||||
def _CollapseStrings(elided):
|
||||
def _CollapseStrings(elided, keep_spaces=False):
|
||||
"""Collapses strings and chars on a line to simple "" or '' blocks.
|
||||
|
||||
We nix strings first so we're not fooled by text like '"http://"'
|
||||
|
||||
Args:
|
||||
elided: The line being processed.
|
||||
keep_spaces: If true, collapse to
|
||||
|
||||
Returns:
|
||||
The line with collapsed strings.
|
||||
@@ -964,12 +975,75 @@ class CleansedLines(object):
|
||||
# Remove escaped characters first to make quote/single quote
|
||||
# collapsing basic. Things that look like escaped characters
|
||||
# shouldn't occur outside of strings and chars.
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided)
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided)
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided)
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub(
|
||||
'' if not keep_spaces else lambda m: ' ' * len(m.group(0)),
|
||||
elided)
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub(
|
||||
"''" if not keep_spaces
|
||||
else lambda m: "'" + (' ' * len(m.group(1))) + "'",
|
||||
elided)
|
||||
elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub(
|
||||
'""' if not keep_spaces
|
||||
else lambda m: '"' + (' ' * len(m.group(1))) + '"',
|
||||
elided)
|
||||
return elided
|
||||
|
||||
|
||||
BRACES = {
|
||||
'(': ')',
|
||||
'{': '}',
|
||||
'[': ']',
|
||||
# '<': '>', C++-specific pair removed
|
||||
}
|
||||
|
||||
|
||||
CLOSING_BRACES = dict(((v, k) for k, v in BRACES.items()))
|
||||
|
||||
|
||||
def GetExprBracesPosition(clean_lines, linenum, pos):
|
||||
"""List positions of all kinds of braces
|
||||
|
||||
If input points to ( or { or [ then function proceeds until finding the
|
||||
position which closes it.
|
||||
|
||||
Args:
|
||||
clean_lines: A CleansedLines instance containing the file.
|
||||
linenum: Current line number.
|
||||
pos: A position on the line.
|
||||
|
||||
Yields:
|
||||
A tuple (linenum, pos, brace, depth) that points to each brace.
|
||||
Additionally each new line (linenum, pos, 's', depth) is yielded, for each
|
||||
line end (linenum, pos, 'e', depth) is yielded and at the very end it
|
||||
yields (linenum, pos, None, None).
|
||||
"""
|
||||
depth = 0
|
||||
yielded_line_start = True
|
||||
startpos = pos
|
||||
while linenum < clean_lines.NumLines() - 1:
|
||||
line = clean_lines.elided_with_space_strings[linenum]
|
||||
if not line.startswith('#') or yielded_line_start:
|
||||
# Ignore #ifdefs, but not if it is macros that are checked
|
||||
for i, brace in enumerate(line[startpos:]):
|
||||
pos = i + startpos
|
||||
if brace != ' ' and not yielded_line_start:
|
||||
yield (linenum, pos, 's', depth)
|
||||
yielded_line_start = True
|
||||
if brace in BRACES:
|
||||
depth += 1
|
||||
yield (linenum, pos, brace, depth)
|
||||
elif brace in CLOSING_BRACES:
|
||||
yield (linenum, pos, brace, depth)
|
||||
depth -= 1
|
||||
if depth == 0:
|
||||
yield (linenum, pos, None, None)
|
||||
return
|
||||
yield (linenum, len(line) - 1, 'e', depth)
|
||||
yielded_line_start = False
|
||||
startpos = 0
|
||||
linenum += 1
|
||||
|
||||
|
||||
def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
|
||||
"""Find the position just after the matching endchar.
|
||||
|
||||
@@ -995,9 +1069,9 @@ def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
|
||||
|
||||
|
||||
def CloseExpression(clean_lines, linenum, pos):
|
||||
"""If input points to ( or { or [ or <, finds the position that closes it.
|
||||
"""If input points to ( or { or [, finds the position that closes it.
|
||||
|
||||
If lines[linenum][pos] points to a '(' or '{' or '[' or '<', finds the
|
||||
If lines[linenum][pos] points to a '(' or '{' or '[', finds the
|
||||
linenum/pos that correspond to the closing of the expression.
|
||||
|
||||
Args:
|
||||
@@ -1014,16 +1088,9 @@ def CloseExpression(clean_lines, linenum, pos):
|
||||
|
||||
line = clean_lines.elided[linenum]
|
||||
startchar = line[pos]
|
||||
if startchar not in '({[<':
|
||||
if startchar not in BRACES:
|
||||
return (line, clean_lines.NumLines(), -1)
|
||||
if startchar == '(':
|
||||
endchar = ')'
|
||||
if startchar == '[':
|
||||
endchar = ']'
|
||||
if startchar == '{':
|
||||
endchar = '}'
|
||||
if startchar == '<':
|
||||
endchar = '>'
|
||||
endchar = BRACES[startchar]
|
||||
|
||||
# Check first line
|
||||
(end_pos, num_open) = FindEndOfExpressionInLine(
|
||||
@@ -1300,6 +1367,23 @@ def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error):
|
||||
'Use C++11 raw strings or concatenation instead.')
|
||||
|
||||
|
||||
def CheckForOldStyleComments(filename, line, linenum, error):
|
||||
"""Logs an error if we see /*-style comment
|
||||
|
||||
Args:
|
||||
filename: The name of the current file.
|
||||
line: The text of the line to check.
|
||||
linenum: The number of the line to check.
|
||||
error: The function to call with any errors found.
|
||||
"""
|
||||
if line.find('/*') >= 0 and line[-1] != '\\':
|
||||
error(filename, linenum, 'readability/old_style_comment', 5,
|
||||
'/*-style comment found, it should be replaced with //-style. '
|
||||
'/*-style comments are only allowed inside macros. '
|
||||
'Note that you should not use /*-style comments to document '
|
||||
'macros itself, use doxygen-style comments for this.')
|
||||
|
||||
|
||||
threading_list = (
|
||||
('asctime(', 'os_asctime_r('),
|
||||
('ctime(', 'os_ctime_r('),
|
||||
@@ -1968,6 +2052,92 @@ def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix):
|
||||
return False
|
||||
|
||||
|
||||
def CheckExpressionAlignment(filename, clean_lines, linenum, error, startpos=0):
|
||||
"""Checks for the correctness of alignment inside expressions
|
||||
|
||||
Args:
|
||||
filename: The name of the current file.
|
||||
clean_lines: A CleansedLines instance containing the file.
|
||||
linenum: The number of the line to check.
|
||||
error: The function to call with any errors found.
|
||||
startpos: Position where to start searching for expression start.
|
||||
"""
|
||||
level_starts = {}
|
||||
line = clean_lines.elided_with_space_strings[linenum]
|
||||
prev_line_start = Search(r'\S', line).start()
|
||||
depth_line_starts = {}
|
||||
pos = min([
|
||||
idx
|
||||
for idx in (
|
||||
line.find(k, startpos)
|
||||
for k in BRACES
|
||||
if k != '{'
|
||||
)
|
||||
if idx >= 0
|
||||
] + [len(line) + 1])
|
||||
if pos == len(line) + 1:
|
||||
return
|
||||
ignore_error_levels = set()
|
||||
firstlinenum = linenum
|
||||
for linenum, pos, brace, depth in GetExprBracesPosition(
|
||||
clean_lines, linenum, pos
|
||||
):
|
||||
line = clean_lines.elided_with_space_strings[linenum]
|
||||
if depth is None:
|
||||
if pos < len(line) - 1:
|
||||
CheckExpressionAlignment(filename, clean_lines, linenum, error,
|
||||
pos + 1)
|
||||
return
|
||||
elif depth <= 0:
|
||||
error(filename, linenum, 'syntax/parenthesis', 4,
|
||||
'Unbalanced parenthesis')
|
||||
return
|
||||
if brace == 's':
|
||||
assert firstlinenum != linenum
|
||||
if level_starts[depth][1]:
|
||||
if line[pos] == BRACES[depth_line_starts[depth][1]]:
|
||||
if pos != depth_line_starts[depth][0]:
|
||||
if depth not in ignore_error_levels:
|
||||
error(filename, linenum, 'whitespace/indent', 2,
|
||||
'End of the inner expression should have '
|
||||
'the same indent as start')
|
||||
else:
|
||||
if (pos != depth_line_starts[depth][0] + 4
|
||||
and not (depth_line_starts[depth][1] == '{'
|
||||
and pos == depth_line_starts[depth][0] + 2)):
|
||||
if depth not in ignore_error_levels:
|
||||
error(filename, linenum, 'whitespace/indent', 2,
|
||||
'Inner expression indentation should be 4')
|
||||
else:
|
||||
if (pos != level_starts[depth][0] + 1
|
||||
+ (level_starts[depth][2] == '{')):
|
||||
if depth not in ignore_error_levels:
|
||||
error(filename, linenum, 'whitespace/alignment', 2,
|
||||
'Inner expression should be aligned '
|
||||
'as opening brace + 1 (+ 2 in case of {)')
|
||||
prev_line_start = pos
|
||||
elif brace == 'e':
|
||||
pass
|
||||
else:
|
||||
opening = brace in BRACES
|
||||
if opening:
|
||||
# Only treat {} as part of the expression if it is preceded by
|
||||
# "=" (brace initializer) or "(type)" (construct like (struct
|
||||
# foo) { ... }).
|
||||
if brace == '{' and not (Search(
|
||||
r'(?:= *|\((?:struct )?\w+(\s*\[\w*\])?\)) *$',
|
||||
line[:pos])
|
||||
):
|
||||
ignore_error_levels.add(depth)
|
||||
line_ended_with_opening = (
|
||||
pos == len(line) - 2 * (line.endswith(' \\')) - 1)
|
||||
level_starts[depth] = (pos, line_ended_with_opening, brace)
|
||||
if line_ended_with_opening:
|
||||
depth_line_starts[depth] = (prev_line_start, brace)
|
||||
else:
|
||||
del level_starts[depth]
|
||||
|
||||
|
||||
def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
"""Checks for the correctness of various spacing issues in the code.
|
||||
|
||||
@@ -1975,7 +2145,8 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
if/for/while/switch, no spaces around parens in function calls, two
|
||||
spaces between code and comment, don't start a block with a blank
|
||||
line, don't end a function with a blank line, don't add a blank line
|
||||
after public/protected/private, don't have too many blank lines in a row.
|
||||
after public/protected/private, don't have too many blank lines in a row,
|
||||
spaces after {, spaces before }.
|
||||
|
||||
Args:
|
||||
filename: The name of the current file.
|
||||
@@ -2236,6 +2407,10 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
# Next we will look for issues with function calls.
|
||||
CheckSpacingForFunctionCall(filename, line, linenum, error)
|
||||
|
||||
# Check whether everything inside expressions is aligned correctly
|
||||
if any((line.find(k) >= 0 for k in BRACES if k != '{')):
|
||||
CheckExpressionAlignment(filename, clean_lines, linenum, error)
|
||||
|
||||
# Except after an opening paren, or after another opening brace (in case of
|
||||
# an initializer list, for instance), you should have spaces before your
|
||||
# braces. And since you should never have braces at the beginning of a line,
|
||||
@@ -2292,8 +2467,6 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
'Extra space before [')
|
||||
|
||||
# You shouldn't have a space before a semicolon at the end of the line.
|
||||
# There's a special case for "for" since the style guide allows space before
|
||||
# the semicolon there.
|
||||
if Search(r':\s*;\s*$', line):
|
||||
error(filename, linenum, 'whitespace/semicolon', 5,
|
||||
'Semicolon defining empty statement. Use {} instead.')
|
||||
@@ -2301,12 +2474,18 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
error(filename, linenum, 'whitespace/semicolon', 5,
|
||||
'Line contains only semicolon. If this should be an empty'
|
||||
' statement, use {} instead.')
|
||||
elif (Search(r'\s+;\s*$', line) and
|
||||
not Search(r'\bfor\b', line)):
|
||||
elif Search(r'\s+;\s*$', line):
|
||||
error(filename, linenum, 'whitespace/semicolon', 5,
|
||||
'Extra space before last semicolon. If this should be an empty '
|
||||
'statement, use {} instead.')
|
||||
|
||||
if Search(r'\{(?!\})\S', line):
|
||||
error(filename, linenum, 'whitespace/braces', 5,
|
||||
'Missing space after {')
|
||||
if Search(r'\S(?<!\{)\}', line):
|
||||
error(filename, linenum, 'whitespace/braces', 5,
|
||||
'Missing space before }')
|
||||
|
||||
|
||||
def GetPreviousNonBlankLine(clean_lines, linenum):
|
||||
"""Return the most recent non-blank line and its line number.
|
||||
@@ -2361,11 +2540,27 @@ def CheckBraces(filename, clean_lines, linenum, error):
|
||||
' of the previous line')
|
||||
|
||||
# An else clause should be on the same line as the preceding closing brace.
|
||||
# If there is no preceding closing brace, there should be one.
|
||||
if Match(r'\s*else\s*', line):
|
||||
prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
|
||||
if Match(r'\s*}\s*$', prevline):
|
||||
error(filename, linenum, 'whitespace/newline', 4,
|
||||
'An else should appear on the same line as the preceding }')
|
||||
else:
|
||||
error(filename, linenum, 'readability/braces', 5,
|
||||
'An else should always have braces before it')
|
||||
|
||||
# If should always have a brace
|
||||
for blockstart in ('if', 'while', 'for'):
|
||||
if Match(r'\s*{0}[^{{]*$'.format(blockstart), line):
|
||||
pos = line.find(blockstart)
|
||||
pos = line.find('(', pos)
|
||||
if pos > 0:
|
||||
(endline, _, endpos) = CloseExpression(
|
||||
clean_lines, linenum, pos)
|
||||
if endline[endpos:].find('{') == -1:
|
||||
error(filename, linenum, 'readability/braces', 5,
|
||||
'{0} should always use braces'.format(blockstart))
|
||||
|
||||
# If braces come on one side of an else, they should be on both.
|
||||
# However, we have to worry about "else if" that spans multiple lines!
|
||||
@@ -3026,12 +3221,14 @@ def ProcessLine(filename, file_extension, clean_lines, line,
|
||||
arguments : filename, clean_lines, line, error
|
||||
"""
|
||||
raw_lines = clean_lines.raw_lines
|
||||
init_lines = clean_lines.init_lines
|
||||
ParseNolintSuppressions(filename, raw_lines[line], line, error)
|
||||
nesting_state.Update(filename, clean_lines, line, error)
|
||||
if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM:
|
||||
return
|
||||
CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
|
||||
CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
|
||||
CheckForOldStyleComments(filename, init_lines[line], line, error)
|
||||
CheckStyle(
|
||||
filename, clean_lines, line, file_extension, nesting_state, error)
|
||||
CheckLanguage(filename, clean_lines, line, file_extension, include_state,
|
||||
@@ -3072,12 +3269,12 @@ def ProcessFileData(filename, file_extension, lines, error,
|
||||
for line in range(1, len(lines)):
|
||||
ParseKnownErrorSuppressions(filename, lines, line)
|
||||
|
||||
if _cpplint_state.record_errors_file:
|
||||
raw_lines = lines[:]
|
||||
init_lines = lines[:]
|
||||
|
||||
if _cpplint_state.record_errors_file:
|
||||
def RecordedError(filename, linenum, category, confidence, message):
|
||||
if not IsErrorSuppressedByNolint(category, linenum):
|
||||
key = raw_lines[linenum - 1 if linenum else 0:linenum + 2]
|
||||
key = init_lines[linenum - 1 if linenum else 0:linenum + 2]
|
||||
err = [filename, key, category]
|
||||
json.dump(err, _cpplint_state.record_errors_file)
|
||||
_cpplint_state.record_errors_file.write('\n')
|
||||
@@ -3089,7 +3286,7 @@ def ProcessFileData(filename, file_extension, lines, error,
|
||||
CheckForHeaderGuard(filename, lines, error)
|
||||
|
||||
RemoveMultiLineComments(filename, lines, error)
|
||||
clean_lines = CleansedLines(lines)
|
||||
clean_lines = CleansedLines(lines, init_lines)
|
||||
for line in range(clean_lines.NumLines()):
|
||||
ProcessLine(filename, file_extension, clean_lines, line,
|
||||
include_state, function_state, nesting_state, error,
|
||||
@@ -3119,7 +3316,7 @@ def ProcessFile(filename, vlevel, extra_check_functions=[]):
|
||||
_SetVerboseLevel(vlevel)
|
||||
|
||||
try:
|
||||
# Support the UNIX convention of using "-" for stdin. Note that
|
||||
# Support the Unix convention of using "-" for stdin. Note that
|
||||
# we are not opening the file with universal newline support
|
||||
# (which codecs doesn't support anyway), so the resulting lines do
|
||||
# contain trailing '\r' characters if we are reading a file that
|
||||
|
@@ -34,7 +34,7 @@ endif()
|
||||
if(MSVC)
|
||||
list(APPEND LUAJIT_NAMES lua51)
|
||||
elseif(MINGW)
|
||||
list(APPEND LUAJIT_NAMES libluajit)
|
||||
list(APPEND LUAJIT_NAMES libluajit libluajit-5.1)
|
||||
else()
|
||||
list(APPEND LUAJIT_NAMES luajit-5.1)
|
||||
endif()
|
||||
|
@@ -7,7 +7,9 @@
|
||||
if(NOT MSGPACK_USE_BUNDLED)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_MSGPACK QUIET msgpack)
|
||||
pkg_search_module(PC_MSGPACK QUIET
|
||||
msgpackc>=${Msgpack_FIND_VERSION}
|
||||
msgpack>=${Msgpack_FIND_VERSION})
|
||||
endif()
|
||||
else()
|
||||
set(PC_MSGPACK_INCLUDEDIR)
|
||||
@@ -19,19 +21,33 @@ endif()
|
||||
|
||||
set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER})
|
||||
|
||||
find_path(MSGPACK_INCLUDE_DIR msgpack.h
|
||||
find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h
|
||||
HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libmsgpack.a as a preferred library name.
|
||||
if(MSGPACK_INCLUDE_DIR)
|
||||
file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h)
|
||||
string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}")
|
||||
string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}")
|
||||
string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}")
|
||||
set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}")
|
||||
else()
|
||||
set(MSGPACK_VERSION_STRING)
|
||||
endif()
|
||||
|
||||
# If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name.
|
||||
if(MSGPACK_USE_STATIC)
|
||||
list(APPEND MSGPACK_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND MSGPACK_NAMES msgpack)
|
||||
list(APPEND MSGPACK_NAMES msgpackc msgpack)
|
||||
|
||||
find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
|
||||
# Check each directory for all names to avoid using headers/libraries from
|
||||
# different places.
|
||||
NAMES_PER_DIR
|
||||
HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
@@ -43,6 +59,7 @@ set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(Msgpack DEFAULT_MSG
|
||||
MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(Msgpack
|
||||
REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR
|
||||
VERSION_VAR MSGPACK_VERSION_STRING)
|
||||
|
||||
|
@@ -8,7 +8,6 @@ include(CheckCSourceCompiles)
|
||||
check_type_size("int" SIZEOF_INT)
|
||||
check_type_size("long" SIZEOF_LONG)
|
||||
check_type_size("intmax_t" SIZEOF_INTMAX_T)
|
||||
check_type_size("off_t" SIZEOF_OFF_T)
|
||||
check_type_size("size_t" SIZEOF_SIZE_T)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size("void *" SIZEOF_VOID_PTR)
|
||||
@@ -16,29 +15,21 @@ check_type_size("void *" SIZEOF_VOID_PTR)
|
||||
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
|
||||
|
||||
# Headers
|
||||
check_include_files(dirent.h HAVE_DIRENT_H)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(iconv.h HAVE_ICONV_H)
|
||||
check_include_files(langinfo.h HAVE_LANGINFO_H)
|
||||
check_include_files(libgen.h HAVE_LIBGEN_H)
|
||||
check_include_files(locale.h HAVE_LOCALE_H)
|
||||
check_include_files(pwd.h HAVE_PWD_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(stropts.h HAVE_STROPTS_H)
|
||||
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
if(NOT HAVE_SYS_WAIT_H AND UNIX)
|
||||
# See if_cscope.c
|
||||
message(SEND_ERROR "header sys/wait.h is required for UNIX")
|
||||
message(SEND_ERROR "header sys/wait.h is required for Unix")
|
||||
endif()
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(utime.h HAVE_UTIME_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(utime.h HAVE_UTIME_H)
|
||||
|
||||
# Functions
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
check_function_exists(fsync HAVE_FSYNC)
|
||||
check_function_exists(getpwent HAVE_GETPWENT)
|
||||
check_function_exists(getpwnam HAVE_GETPWNAM)
|
||||
check_function_exists(getpwuid HAVE_GETPWUID)
|
||||
@@ -51,7 +42,10 @@ if(JEMALLOC_FOUND)
|
||||
set(HAVE_JEMALLOC 1)
|
||||
endif()
|
||||
|
||||
check_function_exists(putenv HAVE_PUTENV)
|
||||
check_function_exists(_putenv_s HAVE_PUTENV_S)
|
||||
if(WIN32 AND NOT HAVE_PUTENV_S)
|
||||
message(SEND_ERROR "_putenv_s() function not found on your system.")
|
||||
endif()
|
||||
check_function_exists(opendir HAVE_OPENDIR)
|
||||
check_function_exists(readlink HAVE_READLINK)
|
||||
check_function_exists(setenv HAVE_SETENV)
|
||||
|
@@ -5,7 +5,6 @@
|
||||
|
||||
#define SIZEOF_INT @SIZEOF_INT@
|
||||
#define SIZEOF_LONG @SIZEOF_LONG@
|
||||
#define SIZEOF_OFF_T @SIZEOF_OFF_T@
|
||||
|
||||
#if @SIZEOF_VOID_PTR@ == 8
|
||||
#define ARCH_64
|
||||
@@ -14,22 +13,18 @@
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE__NSGETENVIRON
|
||||
#cmakedefine HAVE_CRT_EXTERNS_H
|
||||
#cmakedefine HAVE_FCNTL_H
|
||||
#cmakedefine HAVE_FD_CLOEXEC
|
||||
#cmakedefine HAVE_FSEEKO
|
||||
#cmakedefine HAVE_FSYNC
|
||||
#cmakedefine HAVE_GETPWENT
|
||||
#cmakedefine HAVE_GETPWNAM
|
||||
#cmakedefine HAVE_GETPWUID
|
||||
#cmakedefine HAVE_ICONV
|
||||
#cmakedefine HAVE_ICONV_H
|
||||
#cmakedefine HAVE_LANGINFO_H
|
||||
#cmakedefine HAVE_LIBGEN_H
|
||||
#cmakedefine HAVE_LOCALE_H
|
||||
#cmakedefine HAVE_NL_LANGINFO_CODESET
|
||||
#cmakedefine HAVE_NL_MSG_CAT_CNTR
|
||||
#cmakedefine HAVE_PUTENV
|
||||
#cmakedefine HAVE_PUTENV_S
|
||||
#cmakedefine HAVE_PWD_H
|
||||
#cmakedefine HAVE_READLINK
|
||||
// TODO: add proper cmake check
|
||||
@@ -42,11 +37,8 @@
|
||||
#cmakedefine HAVE_STRCASECMP
|
||||
#cmakedefine HAVE_STRINGS_H
|
||||
#cmakedefine HAVE_STRNCASECMP
|
||||
#cmakedefine HAVE_STROPTS_H
|
||||
#cmakedefine HAVE_SYS_PARAM_H
|
||||
#cmakedefine HAVE_SYS_UTSNAME_H
|
||||
#cmakedefine HAVE_SYS_WAIT_H
|
||||
#cmakedefine HAVE_UNISTD_H
|
||||
#cmakedefine HAVE_UTIME
|
||||
#cmakedefine HAVE_UTIME_H
|
||||
#cmakedefine HAVE_UTIMES
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@
|
||||
#define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@
|
||||
#define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@"
|
||||
#cmakedefine NVIM_VERSION_COMMIT "@NVIM_VERSION_COMMIT@"
|
||||
#cmakedefine NVIM_VERSION_MEDIUM "@NVIM_VERSION_MEDIUM@"
|
||||
|
||||
#define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@"
|
||||
|
@@ -9,7 +9,7 @@ def DirectoryOfThisScript():
|
||||
|
||||
def GetDatabase():
|
||||
compilation_database_folder = os.path.join(DirectoryOfThisScript(),
|
||||
'..', '..', 'build')
|
||||
'..', 'build')
|
||||
if os.path.exists(compilation_database_folder):
|
||||
return ycm_core.CompilationDatabase(compilation_database_folder)
|
||||
return None
|
||||
|
@@ -31,6 +31,11 @@
|
||||
#
|
||||
# CMAKE_BUILD_TYPE := Debug
|
||||
|
||||
# By default, nvim's log level is INFO (1) (unless CMAKE_BUILD_TYPE is
|
||||
# "Release", in which case logging is disabled).
|
||||
# The log level must be a number DEBUG (0), INFO (1), WARNING (2) or ERROR (3).
|
||||
# CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1
|
||||
|
||||
# By default, nvim uses bundled versions of its required third-party
|
||||
# dependencies.
|
||||
# Uncomment these entries to instead use system-wide installations of
|
||||
|
22
man/nvim.1
22
man/nvim.1
@@ -1,4 +1,4 @@
|
||||
.Dd November 11, 2015
|
||||
.Dd January 28, 2016
|
||||
.Dt NVIM 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -75,7 +75,7 @@ Can be used to edit files starting with a hyphen
|
||||
.Pq Sq - .
|
||||
.It Fl -literal
|
||||
Interpret filenames literally, that is, do not expand wildcards.
|
||||
Has no effect on UNIX-like systems, where the shell expands wildcards.
|
||||
Has no effect on Unix-like systems, where the shell expands wildcards.
|
||||
.It Fl e
|
||||
Ex mode.
|
||||
See
|
||||
@@ -373,8 +373,24 @@ Used to set the 'shell' option, which determines the shell used by the
|
||||
command.
|
||||
.It Ev NVIM_TUI_ENABLE_CURSOR_SHAPE
|
||||
If defined, change the cursor shape to a vertical bar while in insert mode.
|
||||
Requires that the host terminal support the DECSCUSR CSI escape sequence.
|
||||
Requires that the host terminal supports the DECSCUSR CSI escape sequence.
|
||||
Has no effect in GUIs.
|
||||
.Pp
|
||||
Depending on the terminal emulator, using this option with
|
||||
.Nm
|
||||
under
|
||||
.Xr tmux 1
|
||||
might require adding the following to
|
||||
.Pa ~/.tmux.conf :
|
||||
.Bd -literal -offset indent
|
||||
set -ga terminal-overrides ',*:Ss=\eE[%p1%d q:Se=\eE[2 q'
|
||||
.Ed
|
||||
.Pp
|
||||
See
|
||||
.Ic terminal-overrides
|
||||
in the
|
||||
.Xr tmux 1
|
||||
manual page for more information.
|
||||
.It Ev NVIM_TUI_ENABLE_TRUE_COLOR
|
||||
If defined, assume the host terminal supports 24 bit colors.
|
||||
Has no effect in GUIs.
|
||||
|
@@ -26,15 +26,12 @@ foreach(DF ${DOCFILES})
|
||||
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${BUILDDOCFILES}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
add_custom_command(OUTPUT copy_docfiles
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
|
||||
DEPENDS
|
||||
${DOCFILES})
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
|
||||
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
|
||||
-u NONE
|
||||
-i NONE
|
||||
@@ -43,7 +40,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||
-c "helptags ++t ."
|
||||
-c quit
|
||||
DEPENDS
|
||||
${BUILDDOCFILES}
|
||||
copy_docfiles
|
||||
nvim
|
||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
|
||||
)
|
||||
|
@@ -1,667 +0,0 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscript.vim
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Jan 21, 2014
|
||||
" Version: 36
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" if you're sourcing this file, surely you can't be
|
||||
" expecting vim to be in its vi-compatible mode!
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscript= "v36"
|
||||
if &cp
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
endif
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of getscript needs vim 7.2"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
|
||||
" ---------------------------
|
||||
" Global Variables: {{{1
|
||||
" ---------------------------
|
||||
" Cygwin Detection ------- {{{2
|
||||
if !exists("g:getscript_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:getscript_cygwin= 1
|
||||
else
|
||||
let g:getscript_cygwin= 0
|
||||
endif
|
||||
else
|
||||
let g:getscript_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" wget vs curl {{{2
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
if executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
elseif executable("curl")
|
||||
let g:GetLatestVimScripts_wget= "curl"
|
||||
else
|
||||
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
|
||||
let g:GetLatestVimScripts_options = ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" options that wget and curl require:
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
if g:GetLatestVimScripts_wget == "wget"
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
elseif g:GetLatestVimScripts_wget == "curl"
|
||||
let g:GetLatestVimScripts_options= "-s -O"
|
||||
else
|
||||
let g:GetLatestVimScripts_options= ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" by default, allow autoinstall lines to work
|
||||
if !exists("g:GetLatestVimScripts_allowautoinstall")
|
||||
let g:GetLatestVimScripts_allowautoinstall= 1
|
||||
endif
|
||||
|
||||
" set up default scriptaddr address
|
||||
if !exists("g:GetLatestVimScripts_scriptaddr")
|
||||
let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
|
||||
endif
|
||||
|
||||
"" For debugging:
|
||||
"let g:GetLatestVimScripts_wget = "echo"
|
||||
"let g:GetLatestVimScripts_options = "options"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Check If AutoInstall Capable: {{{1
|
||||
let s:autoinstall= ""
|
||||
if g:GetLatestVimScripts_allowautoinstall
|
||||
|
||||
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
|
||||
" windows (but not cygwin/bash)
|
||||
let s:dotvim= "vimfiles"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "ren"
|
||||
endif
|
||||
|
||||
else
|
||||
" unix
|
||||
let s:dotvim= ".vim"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "mv"
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir)
|
||||
let s:autoinstall= g:GetLatestVimScripts_autoinstalldir"
|
||||
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
|
||||
let s:autoinstall= $HOME."/".s:dotvim
|
||||
endif
|
||||
" call Decho("s:autoinstall<".s:autoinstall.">")
|
||||
"else "Decho
|
||||
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
|
||||
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
||||
" scripts based on the list in
|
||||
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
fun! getscript#GetLatestVimScripts()
|
||||
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
|
||||
|
||||
" insure that wget is executable
|
||||
if executable(g:GetLatestVimScripts_wget) != 1
|
||||
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
|
||||
" call Dret("GetLatestVimScripts : wget not executable/availble")
|
||||
return
|
||||
endif
|
||||
|
||||
" insure that fnameescape() is available
|
||||
if !exists("*fnameescape")
|
||||
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
|
||||
return
|
||||
endif
|
||||
|
||||
" Find the .../GetLatest subdirectory under the runtimepath
|
||||
for datadir in split(&rtp,',') + ['']
|
||||
if isdirectory(datadir."/GetLatest")
|
||||
" call Decho("found directory<".datadir.">")
|
||||
let datadir= datadir . "/GetLatest"
|
||||
break
|
||||
endif
|
||||
if filereadable(datadir."GetLatestVimScripts.dat")
|
||||
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Sanity checks: readability and writability
|
||||
if datadir == ""
|
||||
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
|
||||
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
||||
return
|
||||
endif
|
||||
if filewritable(datadir) != 2
|
||||
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
||||
return
|
||||
endif
|
||||
let datafile= datadir."/GetLatestVimScripts.dat"
|
||||
if !filereadable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't readable"
|
||||
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
if !filewritable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
" --------------------
|
||||
" Passed sanity checks
|
||||
" --------------------
|
||||
|
||||
" call Decho("datadir <".datadir.">")
|
||||
" call Decho("datafile <".datafile.">")
|
||||
|
||||
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
|
||||
let eikeep = &ei
|
||||
let hlskeep = &hls
|
||||
let acdkeep = &acd
|
||||
set ei=all hls&vim noacd
|
||||
|
||||
" Edit the datafile (ie. GetLatestVimScripts.dat):
|
||||
" 1. record current directory (origdir),
|
||||
" 2. change directory to datadir,
|
||||
" 3. split window
|
||||
" 4. edit datafile
|
||||
let origdir= getcwd()
|
||||
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
|
||||
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
|
||||
split
|
||||
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
|
||||
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
|
||||
res 1000
|
||||
let s:downloads = 0
|
||||
let s:downerrors= 0
|
||||
|
||||
" Check on dependencies mentioned in plugins
|
||||
" call Decho(" ")
|
||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||
let lastline = line("$")
|
||||
" call Decho("lastline#".lastline)
|
||||
let firstdir = substitute(&rtp,',.*$','','')
|
||||
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
|
||||
let plugins = plugins + split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
|
||||
let foundscript = 0
|
||||
|
||||
" this loop updates the GetLatestVimScripts.dat file
|
||||
" with dependencies explicitly mentioned in the plugins
|
||||
" via GetLatestVimScripts: ... lines
|
||||
" It reads the plugin script at the end of the GetLatestVimScripts.dat
|
||||
" file, examines it, and then removes it.
|
||||
for plugin in plugins
|
||||
" call Decho(" ")
|
||||
" call Decho("plugin<".plugin.">")
|
||||
|
||||
" read plugin in
|
||||
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
|
||||
$
|
||||
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
||||
" call Decho("..exe silent r ".fnameescape(plugin))
|
||||
exe "silent r ".fnameescape(plugin)
|
||||
exe "silent bwipe ".bufnr("#")
|
||||
|
||||
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
|
||||
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
||||
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
|
||||
let llp1 = lastline+1
|
||||
" call Decho("..depscript<".depscript.">")
|
||||
|
||||
" found a "GetLatestVimScripts: # #" line in the script;
|
||||
" check if its already in the datafile by searching backwards from llp1,
|
||||
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
|
||||
" for the script-id with no wrapping allowed.
|
||||
let curline = line(".")
|
||||
let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
|
||||
exe llp1
|
||||
let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
|
||||
if srchline == 0
|
||||
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
|
||||
let srchline= search('\<'.noai_script.'\>','bW')
|
||||
endif
|
||||
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
|
||||
|
||||
if srchline == 0
|
||||
" found a new script to permanently include in the datafile
|
||||
let keep_rega = @a
|
||||
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
||||
echomsg "Appending <".@a."> to ".datafile." for ".depscript
|
||||
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
|
||||
exe lastline."put a"
|
||||
let @a = keep_rega
|
||||
let lastline = llp1
|
||||
let curline = curline + 1
|
||||
let foundscript = foundscript + 1
|
||||
" else " Decho
|
||||
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
||||
endif
|
||||
|
||||
let curline = curline + 1
|
||||
exe curline
|
||||
endwhile
|
||||
|
||||
" llp1: last line plus one
|
||||
let llp1= lastline + 1
|
||||
" call Decho(".deleting lines: ".llp1.",$d")
|
||||
exe "silent! ".llp1.",$d"
|
||||
endfor
|
||||
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
|
||||
" call Decho(" ")
|
||||
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
|
||||
|
||||
if foundscript == 0
|
||||
setlocal nomod
|
||||
endif
|
||||
|
||||
" --------------------------------------------------------------------
|
||||
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
||||
" --------------------------------------------------------------------
|
||||
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
|
||||
setlocal lz
|
||||
1
|
||||
" /^-----/,$g/^\s*\d/call Decho(getline("."))
|
||||
1
|
||||
/^-----/,$g/^\s*\d/call s:GetOneScript()
|
||||
" call Decho("--- end out-of-date checking --- ")
|
||||
|
||||
" Final report (an echomsg)
|
||||
try
|
||||
silent! ?^-------?
|
||||
catch /^Vim\%((\a\+)\)\=:E114/
|
||||
" call Dret("GetLatestVimScripts : nothing done!")
|
||||
return
|
||||
endtry
|
||||
exe "norm! kz\<CR>"
|
||||
redraw!
|
||||
let s:msg = ""
|
||||
if s:downloads == 1
|
||||
let s:msg = "Downloaded one updated script to <".datadir.">"
|
||||
elseif s:downloads == 2
|
||||
let s:msg= "Downloaded two updated scripts to <".datadir.">"
|
||||
elseif s:downloads > 1
|
||||
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
|
||||
else
|
||||
let s:msg= "Everything was already current"
|
||||
endif
|
||||
if s:downerrors > 0
|
||||
let s:msg= s:msg." (".s:downerrors." downloading errors)"
|
||||
endif
|
||||
echomsg s:msg
|
||||
" save the file
|
||||
if &mod
|
||||
silent! w!
|
||||
endif
|
||||
q!
|
||||
|
||||
" restore events and current directory
|
||||
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
|
||||
let &ei = eikeep
|
||||
let &hls = hlskeep
|
||||
let &acd = acdkeep
|
||||
setlocal nolz
|
||||
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
|
||||
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
|
||||
" on the current line, interpreting two numbers and text as
|
||||
" ScriptID, SourceID, and Filename.
|
||||
" It downloads any scripts that have newer versions from vim.sourceforge.net.
|
||||
fun! s:GetOneScript(...)
|
||||
" call Dfunc("GetOneScript()")
|
||||
|
||||
" set options to allow progress to be shown on screen
|
||||
let rega= @a
|
||||
let t_ti= &t_ti
|
||||
let t_te= &t_te
|
||||
let rs = &rs
|
||||
set t_ti= t_te= nors
|
||||
|
||||
" put current line on top-of-screen and interpret it into
|
||||
" a script identifer : used to obtain webpage
|
||||
" source identifier : used to identify current version
|
||||
" and an associated comment: used to report on what's being considered
|
||||
if a:0 >= 3
|
||||
let scriptid = a:1
|
||||
let srcid = a:2
|
||||
let fname = a:3
|
||||
let cmmnt = ""
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
else
|
||||
let curline = getline(".")
|
||||
if curline =~ '^\s*#'
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : skipping a pure comment line")
|
||||
return
|
||||
endif
|
||||
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
|
||||
try
|
||||
let scriptid = substitute(curline,parsepat,'\1','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let scriptid= 0
|
||||
endtry
|
||||
try
|
||||
let srcid = substitute(curline,parsepat,'\2','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let srcid= 0
|
||||
endtry
|
||||
try
|
||||
let fname= substitute(curline,parsepat,'\3','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let fname= ""
|
||||
endtry
|
||||
try
|
||||
let cmmnt= substitute(curline,parsepat,'\4','e')
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
let cmmnt= ""
|
||||
endtry
|
||||
" call Decho("curline <".curline.">")
|
||||
" call Decho("parsepat<".parsepat.">")
|
||||
" call Decho("scriptid<".scriptid.">")
|
||||
" call Decho("srcid <".srcid.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
endif
|
||||
|
||||
" plugin author protection from downloading his/her own scripts atop their latest work
|
||||
if scriptid == 0 || srcid == 0
|
||||
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
|
||||
return
|
||||
endif
|
||||
|
||||
let doautoinstall= 0
|
||||
if fname =~ ":AutoInstall:"
|
||||
" call Decho("case AutoInstall: fname<".fname.">")
|
||||
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
|
||||
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
|
||||
if s:autoinstall != ""
|
||||
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
|
||||
endif
|
||||
else
|
||||
let aicmmnt= fname
|
||||
endif
|
||||
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
|
||||
|
||||
exe "norm z\<CR>"
|
||||
redraw!
|
||||
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
|
||||
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
|
||||
|
||||
" grab a copy of the plugin's vim.sourceforge.net webpage
|
||||
let scriptaddr = g:GetLatestVimScripts_scriptaddr.scriptid
|
||||
let tmpfile = tempname()
|
||||
let v:errmsg = ""
|
||||
|
||||
" make up to three tries at downloading the description
|
||||
let itry= 1
|
||||
while itry <= 3
|
||||
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
|
||||
if has("win32") || has("win16") || has("win95")
|
||||
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
|
||||
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
|
||||
else
|
||||
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
|
||||
endif
|
||||
if itry == 1
|
||||
exe "silent vsplit ".fnameescape(tmpfile)
|
||||
else
|
||||
silent! e %
|
||||
endif
|
||||
setlocal bh=wipe
|
||||
|
||||
" find the latest source-id in the plugin's webpage
|
||||
silent! 1
|
||||
let findpkg= search('Click on the package to download','W')
|
||||
if findpkg > 0
|
||||
break
|
||||
endif
|
||||
let itry= itry + 1
|
||||
endwhile
|
||||
" call Decho(" --- end downloading tries while loop --- itry=".itry)
|
||||
|
||||
" testing: did finding "Click on the package..." fail?
|
||||
if findpkg == 0 || itry >= 4
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /Click on the package/ failed")
|
||||
let @a= rega
|
||||
return
|
||||
endif
|
||||
" call Decho('found "Click on the package to download"')
|
||||
|
||||
let findsrcid= search('src_id=','W')
|
||||
if findsrcid == 0
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : srch for /src_id/ failed")
|
||||
return
|
||||
endif
|
||||
" call Decho('found "src_id=" in description page')
|
||||
|
||||
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
|
||||
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
|
||||
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
|
||||
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
|
||||
silent q!
|
||||
call delete(tmpfile)
|
||||
|
||||
" convert the strings-of-numbers into numbers
|
||||
let srcid = srcid + 0
|
||||
let latestsrcid = latestsrcid + 0
|
||||
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
|
||||
|
||||
" has the plugin's most-recent srcid increased, which indicates that it has been updated
|
||||
if latestsrcid > srcid
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
|
||||
|
||||
let s:downloads= s:downloads + 1
|
||||
if sname == bufname("%")
|
||||
" GetLatestVimScript has to be careful about downloading itself
|
||||
let sname= "NEW_".sname
|
||||
endif
|
||||
|
||||
" -----------------------------------------------------------------------------
|
||||
" the plugin has been updated since we last obtained it, so download a new copy
|
||||
" -----------------------------------------------------------------------------
|
||||
" call Decho(".downloading new <".sname.">")
|
||||
echomsg ".downloading new <".sname.">"
|
||||
if has("win32") || has("win16") || has("win95")
|
||||
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
|
||||
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
|
||||
else
|
||||
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
|
||||
endif
|
||||
|
||||
" --------------------------------------------------------------------------
|
||||
" AutoInstall: only if doautoinstall has been requested by the plugin itself
|
||||
" --------------------------------------------------------------------------
|
||||
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
|
||||
if doautoinstall
|
||||
" call Decho(" ")
|
||||
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
||||
if filereadable(sname)
|
||||
" call Decho("<".sname."> is readable")
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
|
||||
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
|
||||
let installdir= curdir."/Installed"
|
||||
if !isdirectory(installdir)
|
||||
call mkdir(installdir)
|
||||
endif
|
||||
" call Decho("curdir<".curdir."> installdir<".installdir.">")
|
||||
" call Decho("exe cd ".fnameescape(s:autoinstall))
|
||||
exe "cd ".fnameescape(s:autoinstall)
|
||||
|
||||
" determine target directory for moves
|
||||
let firstdir= substitute(&rtp,',.*$','','')
|
||||
let pname = substitute(sname,'\..*','.vim','')
|
||||
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
|
||||
if filereadable(firstdir.'/AsNeeded/'.pname)
|
||||
let tgtdir= "AsNeeded"
|
||||
else
|
||||
let tgtdir= "plugin"
|
||||
endif
|
||||
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
|
||||
|
||||
" decompress
|
||||
if sname =~ '\.bz2$'
|
||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||
exe "sil !bunzip2 ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.bz2$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after bunzip2")
|
||||
elseif sname =~ '\.gz$'
|
||||
" call Decho("decompress: attempt to gunzip ".sname)
|
||||
exe "sil !gunzip ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
elseif sname =~ '\.xz$'
|
||||
" call Decho("decompress: attempt to unxz ".sname)
|
||||
exe "sil !unxz ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.xz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after unxz")
|
||||
else
|
||||
" call Decho("no decompression needed")
|
||||
endif
|
||||
|
||||
" distribute archive(.zip, .tar, .vba, ...) contents
|
||||
if sname =~ '\.zip$'
|
||||
" call Decho("dearchive: attempt to unzip ".sname)
|
||||
exe "silent !unzip -o ".shellescape(sname)
|
||||
elseif sname =~ '\.tar$'
|
||||
" call Decho("dearchive: attempt to untar ".sname)
|
||||
exe "silent !tar -xvf ".shellescape(sname)
|
||||
elseif sname =~ '\.tgz$'
|
||||
" call Decho("dearchive: attempt to untar+gunzip ".sname)
|
||||
exe "silent !tar -zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.taz$'
|
||||
" call Decho("dearchive: attempt to untar+uncompress ".sname)
|
||||
exe "silent !tar -Zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.tbz$'
|
||||
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
|
||||
exe "silent !tar -jxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.txz$'
|
||||
" call Decho("dearchive: attempt to untar+xz ".sname)
|
||||
exe "silent !tar -Jxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.vba$'
|
||||
" call Decho("dearchive: attempt to handle a vimball: ".sname)
|
||||
silent 1split
|
||||
if exists("g:vimball_home")
|
||||
let oldvimballhome= g:vimball_home
|
||||
endif
|
||||
let g:vimball_home= s:autoinstall
|
||||
exe "silent e ".fnameescape(sname)
|
||||
silent so %
|
||||
silent q
|
||||
if exists("oldvimballhome")
|
||||
let g:vimball_home= oldvimballhome
|
||||
else
|
||||
unlet g:vimball_home
|
||||
endif
|
||||
else
|
||||
" call Decho("no dearchiving needed")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------
|
||||
" move plugin to plugin/ or AsNeeded/ directory
|
||||
" ---------------------------------------------
|
||||
if sname =~ '.vim$'
|
||||
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
|
||||
else
|
||||
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
|
||||
endif
|
||||
if tgtdir != "plugin"
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
|
||||
endif
|
||||
|
||||
" helptags step
|
||||
let docdir= substitute(&rtp,',.*','','e')."/doc"
|
||||
" call Decho("helptags: docdir<".docdir.">")
|
||||
exe "helptags ".fnameescape(docdir)
|
||||
exe "cd ".fnameescape(curdir)
|
||||
endif
|
||||
if fname !~ ':AutoInstall:'
|
||||
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
|
||||
else
|
||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||
endif
|
||||
else
|
||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||
endif
|
||||
|
||||
" update the data in the <GetLatestVimScripts.dat> file
|
||||
call setline(line("."),modline)
|
||||
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
|
||||
" else " Decho
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
|
||||
endif
|
||||
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let @a = rega
|
||||
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
|
||||
|
||||
" call Dret("GetOneScript")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Restore Options: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
@@ -75,7 +75,9 @@ function man#get_page(...) abort
|
||||
|
||||
setlocal modifiable
|
||||
silent keepjumps norm! 1G"_dG
|
||||
let $MANWIDTH = winwidth(0)
|
||||
if empty($MANWIDTH)
|
||||
let $MANWIDTH = winwidth(0)
|
||||
endif
|
||||
silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b'
|
||||
" Remove blank lines from top and bottom.
|
||||
while getline(1) =~ '^\s*$'
|
||||
|
@@ -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 Dec 01
|
||||
" Last Change: 2015 Apr 02
|
||||
"
|
||||
" 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
|
||||
" }}}
|
||||
@@ -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}]
|
||||
@@ -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
|
||||
@@ -1475,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')
|
||||
@@ -1602,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(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)
|
||||
@@ -1641,13 +1696,14 @@ 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
|
||||
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*'.variable_name_pattern)
|
||||
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
|
||||
let filelines = reverse(lines)
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
@@ -1689,6 +1745,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let filelines = reverse(lines)
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
@@ -1819,7 +1876,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
|
||||
@@ -1831,7 +1888,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
|
||||
@@ -1981,7 +2040,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('.')
|
||||
@@ -1994,8 +2053,48 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
let extends_class = ''
|
||||
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'
|
||||
@@ -2008,21 +2107,27 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
\ 'mtime': getftime(full_file_path),
|
||||
\ })
|
||||
|
||||
let all_extends = used_traits
|
||||
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
|
||||
call add(all_extends, extends_class)
|
||||
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"
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(class)])]
|
||||
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)
|
||||
" 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
|
||||
@@ -2270,19 +2375,40 @@ 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"')
|
||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d'
|
||||
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')
|
||||
let current_namespace = matchstr(line, '\c^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||
break
|
||||
endif
|
||||
|
||||
@@ -2303,11 +2429,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
|
||||
@@ -2343,7 +2469,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
|
||||
@@ -2386,7 +2512,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
|
||||
|
@@ -37,16 +37,16 @@ if executable('pbcopy')
|
||||
let s:copy['*'] = s:copy['+']
|
||||
let s:paste['*'] = s:paste['+']
|
||||
let s:cache_enabled = 0
|
||||
elseif executable('xclip')
|
||||
let s:copy['+'] = 'xclip -quiet -i -selection clipboard'
|
||||
let s:paste['+'] = 'xclip -o -selection clipboard'
|
||||
let s:copy['*'] = 'xclip -quiet -i -selection primary'
|
||||
let s:paste['*'] = 'xclip -o -selection primary'
|
||||
elseif executable('xsel')
|
||||
elseif exists('$DISPLAY') && executable('xsel')
|
||||
let s:copy['+'] = 'xsel --nodetach -i -b'
|
||||
let s:paste['+'] = 'xsel -o -b'
|
||||
let s:copy['*'] = 'xsel --nodetach -i -p'
|
||||
let s:paste['*'] = 'xsel -o -p'
|
||||
elseif exists('$DISPLAY') && executable('xclip')
|
||||
let s:copy['+'] = 'xclip -quiet -i -selection clipboard'
|
||||
let s:paste['+'] = 'xclip -o -selection clipboard'
|
||||
let s:copy['*'] = 'xclip -quiet -i -selection primary'
|
||||
let s:paste['*'] = 'xclip -o -selection primary'
|
||||
else
|
||||
echom 'clipboard: No clipboard tool available. See :help nvim-clipboard'
|
||||
finish
|
||||
@@ -83,6 +83,7 @@ function! s:clipboard.set(lines, regtype, reg)
|
||||
end
|
||||
let selection.data = [a:lines, a:regtype]
|
||||
let argv = split(s:copy[a:reg], " ")
|
||||
let selection.detach = s:cache_enabled
|
||||
let jobid = jobstart(argv, selection)
|
||||
if jobid <= 0
|
||||
echohl WarningMsg
|
||||
|
@@ -1,5 +1,6 @@
|
||||
"""Legacy python/python3-vim emulation."""
|
||||
import imp
|
||||
import io
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
@@ -151,7 +152,7 @@ class ScriptHost(object):
|
||||
current.range = current.buffer.range(start, stop)
|
||||
|
||||
|
||||
class RedirectStream(object):
|
||||
class RedirectStream(io.IOBase):
|
||||
def __init__(self, redirect_handler):
|
||||
self.redirect_handler = redirect_handler
|
||||
|
||||
@@ -161,9 +162,6 @@ class RedirectStream(object):
|
||||
def writelines(self, seq):
|
||||
self.redirect_handler('\n'.join(seq))
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
|
||||
|
||||
class LegacyEvalHook(neovim.SessionHook):
|
||||
|
||||
|
@@ -168,10 +168,15 @@ function! s:UpdateRemotePlugins()
|
||||
let hosts = keys(s:hosts)
|
||||
for host in hosts
|
||||
if has_key(s:plugin_patterns, host)
|
||||
let commands = commands
|
||||
\ + ['" '.host.' plugins']
|
||||
\ + s:RegistrationCommands(host)
|
||||
\ + ['', '']
|
||||
try
|
||||
let commands +=
|
||||
\ ['" '.host.' plugins']
|
||||
\ + s:RegistrationCommands(host)
|
||||
\ + ['', '']
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
endtry
|
||||
endif
|
||||
endfor
|
||||
call writefile(commands, s:remote_plugins_manifest)
|
||||
@@ -212,9 +217,11 @@ function! s:RequirePythonHost(host)
|
||||
return channel_id
|
||||
endif
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
endtry
|
||||
throw 'Failed to load Python host. You can try to see what happened '.
|
||||
throw 'Failed to load '. a:host.orig_name . ' host. '.
|
||||
\ 'You can try to see what happened '.
|
||||
\ 'by starting Neovim with the environment variable '.
|
||||
\ '$NVIM_PYTHON_LOG_FILE set to a file and opening '.
|
||||
\ 'the generated log file. Also, the host stderr will be available '.
|
||||
|
@@ -251,13 +251,14 @@ endfunction
|
||||
" Tutor Cmd: {{{1
|
||||
|
||||
function! s:Locale()
|
||||
let l:lang = ""
|
||||
if exists('v:lang') && v:lang =~ '\a\a'
|
||||
let l:lang = v:lang
|
||||
elseif $LC_ALL =~ '\a\a'
|
||||
let l:lang = $LC_ALL
|
||||
elseif $LANG =~ '\a\a'
|
||||
let l:lang = $LANG
|
||||
else
|
||||
let l:lang = 'en_US'
|
||||
endif
|
||||
return split(l:lang, '_')
|
||||
endfunction
|
||||
|
@@ -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 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -258,6 +258,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
|
||||
@@ -745,6 +746,24 @@ 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.
|
||||
|
||||
Note: It's a bad idea, to reset an option
|
||||
during this autocommand, since this will
|
||||
probably break plugins. You can always use
|
||||
|:noa| to prevent triggering this autocommand.
|
||||
Could be used, to check for existence of the
|
||||
'backupdir' and 'undodir' options and create
|
||||
directories, if they don't exist yet.
|
||||
|
||||
*QuickFixCmdPre*
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||
@@ -954,6 +973,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
|
||||
@@ -1022,7 +1048,7 @@ The pattern is interpreted like mostly used in file names:
|
||||
[^ch] match any character but 'c' and 'h'
|
||||
|
||||
Note that for all systems the '/' character is used for path separator (even
|
||||
MS-DOS). This was done because the backslash is difficult to use in a pattern
|
||||
Windows). This was done because the backslash is difficult to use in a pattern
|
||||
and to make the autocommands portable across different systems.
|
||||
|
||||
*autocmd-changes*
|
||||
|
@@ -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 Feb 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -370,9 +370,14 @@ CTRL-A Add [count] to the number or alphabetic character at
|
||||
CTRL-X Subtract [count] from the number or alphabetic
|
||||
character at or after the cursor.
|
||||
|
||||
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.
|
||||
The CTRL-A and CTRL-X commands can work for:
|
||||
- signed and unsigned decimal numbers
|
||||
- unsigned binary, octal and hexadecimal numbers
|
||||
- alphabetic characters
|
||||
|
||||
This depends on the 'nrformats' option:
|
||||
- When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or
|
||||
'0B' are binary.
|
||||
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
|
||||
to be octal, unless the number includes a '8' or '9'. Other numbers are
|
||||
decimal and may have a preceding minus sign.
|
||||
@@ -386,6 +391,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 or
|
||||
decrementing, for binary and 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".
|
||||
@@ -397,6 +406,10 @@ octal number.
|
||||
Note that when 'nrformats' includes "octal", decimal numbers with leading
|
||||
zeros cause mistakes, because they can be confused with octal numbers.
|
||||
|
||||
Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
|
||||
'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b'
|
||||
are valid hexadecimal digits.
|
||||
|
||||
The CTRL-A command is very useful in a macro. Example: Use the following
|
||||
steps to make a numbered list.
|
||||
|
||||
@@ -832,13 +845,13 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
|
||||
:promptf[ind] [string]
|
||||
Put up a Search dialog. When [string] is given, it is
|
||||
used as the initial search string.
|
||||
{only for Win32, Motif and GTK GUI}
|
||||
{only for Win32 GUI}
|
||||
|
||||
*:promptr* *:promptrepl*
|
||||
:promptr[epl] [string]
|
||||
Put up a Search/Replace dialog. When [string] is
|
||||
given, it is used as the initial search string.
|
||||
{only for Win32, Motif and GTK GUI}
|
||||
{only for Win32 GUI}
|
||||
|
||||
|
||||
4.4 Changing tabs *change-tabs*
|
||||
@@ -1063,11 +1076,12 @@ There are nine types of registers: *registers* *E354*
|
||||
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
|
||||
@@ -1109,7 +1123,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.
|
||||
*quote_.* *quote.* *E29*
|
||||
@@ -1120,8 +1134,6 @@ and ":put" commands and with CTRL-R.
|
||||
('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.
|
||||
@@ -1129,15 +1141,33 @@ and ":put" commands and with CTRL-R.
|
||||
one character of it was typed. Thus it remains unchanged if
|
||||
the command was completely from a mapping.
|
||||
|
||||
6. Expression register "= *quote_=* *quote=* *@=*
|
||||
*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.
|
||||
|
||||
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
|
||||
@@ -1150,35 +1180,23 @@ 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.
|
||||
|
||||
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 and Mac OS X,
|
||||
see |nvim-clipboard|.
|
||||
|
||||
*quote_~* *quote~* *<Drop>*
|
||||
The read-only "~ register stores the dropped text from the last drag'n'drop
|
||||
operation. When something has been dropped onto Vim, the "~ register is
|
||||
filled in and the <Drop> pseudo key is sent for notification. You can remap
|
||||
this key if you want; the default action (for all modes) is to insert the
|
||||
contents of the "~ register at the cursor position.
|
||||
{only available when compiled with the |+dnd| feature, currently only with the
|
||||
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.
|
||||
|
||||
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|.
|
||||
|
||||
*@/*
|
||||
@@ -1390,10 +1408,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
|
||||
@@ -1597,7 +1615,7 @@ Vim has a sorting function and a sorting command. The sorting function can be
|
||||
found here: |sort()|, |uniq()|.
|
||||
|
||||
*:sor* *:sort*
|
||||
:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
|
||||
:[range]sor[t][!] [i][u][r][n][x][o][b] [/{pattern}/]
|
||||
Sort lines in [range]. When no range is given all
|
||||
lines are sorted.
|
||||
|
||||
@@ -1617,6 +1635,9 @@ found here: |sort()|, |uniq()|.
|
||||
With [o] sorting is done on the first octal number in
|
||||
the line (after or inside a {pattern} match).
|
||||
|
||||
With [b] sorting is done on the first binary number in
|
||||
the line (after or inside a {pattern} match).
|
||||
|
||||
With [u] only keep the first of a sequence of
|
||||
identical lines (ignoring case when [i] is used).
|
||||
Without this flag, a sequence of identical lines
|
||||
|
@@ -379,7 +379,7 @@ CTRL-N After using 'wildchar' which got multiple matches, go to next
|
||||
<S-Tab> *c_CTRL-P* *c_<S-Tab>*
|
||||
CTRL-P After using 'wildchar' which got multiple matches, go to
|
||||
previous match. Otherwise recall older command-line from
|
||||
history. <S-Tab> only works with the GUI and with MS-DOS.
|
||||
history. <S-Tab> only works with the GUI.
|
||||
*c_CTRL-A*
|
||||
CTRL-A All names that match the pattern in front of the cursor are
|
||||
inserted.
|
||||
@@ -482,6 +482,8 @@ followed by another Vim command:
|
||||
:argdo
|
||||
:autocmd
|
||||
:bufdo
|
||||
:cdo
|
||||
:cfdo
|
||||
:command
|
||||
:cscope
|
||||
:debug
|
||||
@@ -490,8 +492,9 @@ followed by another Vim command:
|
||||
:function
|
||||
:global
|
||||
:help
|
||||
:helpfind
|
||||
:lcscope
|
||||
:ldo
|
||||
:lfdo
|
||||
:make
|
||||
:normal
|
||||
:promptfind
|
||||
@@ -816,7 +819,7 @@ These modifiers can be given, in this order:
|
||||
separator is removed. Thus ":p:h" on a directory name results
|
||||
on the directory name itself (without trailing slash).
|
||||
When the file name is an absolute path (starts with "/" for
|
||||
Unix; "x:\" for MS-DOS and WIN32), that part is not removed.
|
||||
Unix; "x:\" for Windows), that part is not removed.
|
||||
When there is no head (path is relative to current directory)
|
||||
the result is empty.
|
||||
:t Tail of the file name (last component of the name). Must
|
||||
@@ -915,8 +918,8 @@ option contains "sh", this is done twice, to avoid the shell trying to expand
|
||||
the "!".
|
||||
|
||||
*filename-backslash*
|
||||
For filesystems that use a backslash as directory separator (MS-DOS and
|
||||
Windows), it's a bit difficult to recognize a backslash that is used
|
||||
For filesystems that use a backslash as directory separator (Windows
|
||||
filesystems), it's a bit difficult to recognize a backslash that is used
|
||||
to escape the special meaning of the next character. The general rule is: If
|
||||
the backslash is followed by a normal file name character, it does not have a
|
||||
special meaning. Therefore "\file\foo" is a valid file name, you don't have
|
||||
|
@@ -1,107 +0,0 @@
|
||||
*debugger.txt* For Vim version 7.4. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
|
||||
|
||||
Debugger Support Features *debugger-support*
|
||||
|
||||
1. Debugger Features |debugger-features|
|
||||
|
||||
==============================================================================
|
||||
1. Debugger Features *debugger-features*
|
||||
|
||||
The following features are available for an integration with a debugger or
|
||||
an Integrated Programming Environment (IPE) or Integrated Development
|
||||
Environment (IDE):
|
||||
|
||||
Alternate Command Input |alt-input|
|
||||
Debug Signs |debug-signs|
|
||||
Debug Source Highlight |debug-highlight|
|
||||
Message Footer |gui-footer|
|
||||
Balloon Evaluation |balloon-eval|
|
||||
|
||||
These features were added specifically for use in the Motif version of gvim.
|
||||
However, the |alt-input| and |debug-highlight| were written to be usable in
|
||||
both vim and gvim. Some of the other features could be used in the non-GUI
|
||||
vim with slight modifications. However, I did not do this nor did I test the
|
||||
reliability of building for vim or non Motif GUI versions.
|
||||
|
||||
|
||||
1.1 Alternate Command Input *alt-input*
|
||||
|
||||
For Vim to work with a debugger there must be at least an input connection
|
||||
with a debugger or external tool. In many cases there will also be an output
|
||||
connection but this isn't absolutely necessary.
|
||||
|
||||
The purpose of the input connection is to let the external debugger send
|
||||
commands to Vim. The commands sent by the debugger should give the debugger
|
||||
enough control to display the current debug environment and state.
|
||||
|
||||
The current implementation is based on the X Toolkit dispatch loop and the
|
||||
XtAddInput() function call.
|
||||
|
||||
|
||||
1.2 Debug Signs *debug-signs*
|
||||
|
||||
Many debuggers mark specific lines by placing a small sign or color highlight
|
||||
on the line. The |:sign| command lets the debugger set this graphic mark. Some
|
||||
examples where this feature would be used would be a debugger showing an arrow
|
||||
representing the Program Counter (PC) of the program being debugged. Another
|
||||
example would be a small stop sign for a line with a breakpoint. These visible
|
||||
highlights let the user keep track of certain parts of the state of the
|
||||
debugger.
|
||||
|
||||
This feature can be used with more than debuggers, too. An IPE can use a sign
|
||||
to highlight build errors, searched text, or other things. The sign feature
|
||||
can also work together with the |debug-highlight| to ensure the mark is
|
||||
highly visible.
|
||||
|
||||
Debug signs are defined and placed using the |:sign| command.
|
||||
|
||||
|
||||
1.3 Debug Source Highlight *debug-highlight*
|
||||
|
||||
This feature allows a line to have a predominant highlight. The highlight is
|
||||
intended to make a specific line stand out. The highlight could be made to
|
||||
work for both vim and gvim, whereas the debug sign is, in most cases, limited
|
||||
to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
|
||||
from Sun has a "sign gutter" for showing signs.
|
||||
|
||||
|
||||
1.4 Message Footer *gui-footer*
|
||||
|
||||
The message footer can be used to display messages from a debugger or IPE. It
|
||||
can also be used to display menu and toolbar tips. The footer area is at the
|
||||
bottom of the GUI window, below the line used to display colon commands.
|
||||
|
||||
The display of the footer is controlled by the 'guioptions' letter 'F'.
|
||||
|
||||
|
||||
1.5 Balloon Evaluation *balloon-eval*
|
||||
|
||||
This feature allows a debugger, or other external tool, to display dynamic
|
||||
information based on where the mouse is pointing. The purpose of this feature
|
||||
was to allow Sun's Visual WorkShop debugger to display expression evaluations.
|
||||
However, the feature was implemented in as general a manner as possible and
|
||||
could be used for displaying other information as well.
|
||||
|
||||
The Balloon Evaluation has some settable parameters too. For Motif the font
|
||||
list and colors can be set via X resources (XmNballoonEvalFontList,
|
||||
XmNballoonEvalBackground, and XmNballoonEvalForeground).
|
||||
The 'balloondelay' option sets the delay before an attempt is made to show a
|
||||
balloon.
|
||||
The 'ballooneval' option needs to be set to switch it on.
|
||||
|
||||
Balloon evaluation is only available when compiled with the |+balloon_eval|
|
||||
feature.
|
||||
|
||||
The Balloon evaluation functions are also used to show a tooltip for the
|
||||
toolbar. The 'ballooneval' option does not need to be set for this. But the
|
||||
other settings apply.
|
||||
|
||||
Another way to use the balloon is with the 'balloonexpr' option. This is
|
||||
completely user definable.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Jan 19
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Feb 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -306,6 +306,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*
|
||||
|
||||
|
@@ -130,9 +130,7 @@ You can use this file if you discover that you need the original file. See
|
||||
also the 'patchmode' option. The name of the backup file is normally the same
|
||||
as the original file with 'backupext' appended. The default "~" is a bit
|
||||
strange to avoid accidentally overwriting existing files. If you prefer ".bak"
|
||||
change the 'backupext' option. Extra dots are replaced with '_' on MS-DOS
|
||||
machines, when Vim has detected that an MS-DOS-like filesystem is being used
|
||||
(e.g., messydos or crossdos). The backup file can be placed in another
|
||||
change the 'backupext' option. The backup file can be placed in another
|
||||
directory by setting 'backupdir'.
|
||||
|
||||
When you started editing without giving a file name, "No File" is displayed in
|
||||
@@ -276,7 +274,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.
|
||||
@@ -470,9 +469,9 @@ The 'fileformat' option sets the <EOL> style for a file:
|
||||
"mac" <CR> Mac format *Mac-format*
|
||||
|
||||
When reading a file, the mentioned characters are interpreted as the <EOL>.
|
||||
In DOS format (default for MS-DOS and Win32), <CR><NL> and <NL> are both
|
||||
interpreted as the <EOL>. Note that when writing the file in DOS format,
|
||||
<CR> characters will be added for each single <NL>. Also see |file-read|.
|
||||
In DOS format (default for Windows), <CR><NL> and <NL> are both interpreted as
|
||||
the <EOL>. Note that when writing the file in DOS format, <CR> characters will
|
||||
be added for each single <NL>. Also see |file-read|.
|
||||
|
||||
When writing a file, the mentioned characters are used for <EOL>. For DOS
|
||||
format <CR><NL> is used. Also see |DOS-format-write|.
|
||||
@@ -493,13 +492,13 @@ If you start editing a new file and the 'fileformats' option is not empty
|
||||
(which is the default), Vim will try to detect whether the lines in the file
|
||||
are separated by the specified formats. When set to "unix,dos", Vim will
|
||||
check for lines with a single <NL> (as used on Unix) or by a <CR><NL> pair
|
||||
(MS-DOS). Only when ALL lines end in <CR><NL>, 'fileformat' is set to "dos",
|
||||
(Windows). Only when ALL lines end in <CR><NL>, 'fileformat' is set to "dos",
|
||||
otherwise it is set to "unix". When 'fileformats' includes "mac", and no <NL>
|
||||
characters are found in the file, 'fileformat' is set to "mac".
|
||||
|
||||
If the 'fileformat' option is set to "dos" on non-MS-DOS systems the message
|
||||
If the 'fileformat' option is set to "dos" on non-Windows systems the message
|
||||
"[dos format]" is shown to remind you that something unusual is happening. On
|
||||
MS-DOS systems you get the message "[unix format]" if 'fileformat' is set to
|
||||
Windows systems you get the message "[unix format]" if 'fileformat' is set to
|
||||
"unix". On all systems but the Macintosh you get the message "[mac format]"
|
||||
if 'fileformat' is set to "mac".
|
||||
|
||||
@@ -795,7 +794,8 @@ USING THE ARGUMENT LIST
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each file.
|
||||
Also see |:windo|, |:tabdo| and |:bufdo|.
|
||||
Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|.
|
||||
|
||||
Example: >
|
||||
:args *.c
|
||||
@@ -964,10 +964,10 @@ lost the original file.
|
||||
|
||||
*DOS-format-write*
|
||||
If the 'fileformat' is "dos", <CR> <NL> is used for <EOL>. This is default
|
||||
for MS-DOS and Win32. On other systems the message "[dos format]" is shown to
|
||||
for Windows. On other systems the message "[dos format]" is shown to
|
||||
remind you that an unusual <EOL> was used.
|
||||
*Unix-format-write*
|
||||
If the 'fileformat' is "unix", <NL> is used for <EOL>. On MS-DOS and Win32
|
||||
If the 'fileformat' is "unix", <NL> is used for <EOL>. On Windows
|
||||
the message "[unix format]" is shown.
|
||||
*Mac-format-write*
|
||||
If the 'fileformat' is "mac", <CR> is used for <EOL>. On non-Mac systems the
|
||||
@@ -997,11 +997,11 @@ When the file name is actually a device name, Vim will not make a backup (that
|
||||
would be impossible). You need to use "!", since the device already exists.
|
||||
Example for Unix: >
|
||||
:w! /dev/lpt0
|
||||
and for MS-DOS or MS-Windows: >
|
||||
and Windows: >
|
||||
:w! lpt0
|
||||
For Unix a device is detected when the name doesn't refer to a normal file or
|
||||
a directory. A fifo or named pipe also looks like a device to Vim.
|
||||
For MS-DOS and MS-Windows the device is detected by its name:
|
||||
For Windows the device is detected by its name:
|
||||
CON
|
||||
CLOCK$
|
||||
NUL
|
||||
@@ -1144,7 +1144,7 @@ If you want to always use ":confirm", set the 'confirm' option.
|
||||
|:diffsplit|, |:diffpatch|, |:pedit|, |:redir|,
|
||||
|:source|, |:update|, |:visual|, |:vsplit|,
|
||||
and |:qall| if 'confirm' is set.
|
||||
{only in Win32, Athena, Motif, GTK and Mac GUI}
|
||||
{only in Win32 GUI}
|
||||
When ":browse" is not possible you get an error
|
||||
message. If the |+browse| feature is missing or the
|
||||
{command} doesn't support browsing, the {command} is
|
||||
@@ -1172,16 +1172,13 @@ For versions of Vim where browsing is not supported, the command is executed
|
||||
unmodified.
|
||||
|
||||
*browsefilter*
|
||||
For MS Windows and GTK, you can modify the filters that are used in the browse
|
||||
dialog. By setting the g:browsefilter or b:browsefilter variables, you can
|
||||
change the filters globally or locally to the buffer. The variable is set to
|
||||
a string in the format "{filter label}\t{pattern};{pattern}\n" where {filter
|
||||
label} is the text that appears in the "Files of Type" comboBox, and {pattern}
|
||||
is the pattern which filters the filenames. Several patterns can be given,
|
||||
separated by ';'.
|
||||
|
||||
For Motif the same format is used, but only the very first pattern is actually
|
||||
used (Motif only offers one pattern, but you can edit it).
|
||||
For Windows you can modify the filters that are used in the browse dialog. By
|
||||
setting the g:browsefilter or b:browsefilter variables, you can change the
|
||||
filters globally or locally to the buffer. The variable is set to a string in
|
||||
the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the
|
||||
text that appears in the "Files of Type" comboBox, and {pattern} is the
|
||||
pattern which filters the filenames. Several patterns can be given, separated
|
||||
by ';'.
|
||||
|
||||
For example, to have only Vim files in the dialog, you could use the following
|
||||
command: >
|
||||
@@ -1225,7 +1222,7 @@ present in 'cpoptions' and "!" is not used in the command.
|
||||
Does not change the meaning of an already opened file,
|
||||
because its full path name is remembered. Files from
|
||||
the |arglist| may change though!
|
||||
On MS-DOS this also changes the active drive.
|
||||
On Windows this also changes the active drive.
|
||||
To change to the directory of the current file: >
|
||||
:cd %:h
|
||||
<
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2014 Nov 27
|
||||
*eval.txt* For Vim version 7.4. Last change: 2015 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -65,14 +65,16 @@ the Number. Examples:
|
||||
Number 0 --> String "0" ~
|
||||
Number -1 --> String "-1" ~
|
||||
*octal*
|
||||
Conversion from a String to a Number is done by converting the first digits
|
||||
to a number. Hexadecimal "0xf9" and Octal "017" numbers are recognized. If
|
||||
the String doesn't start with digits, the result is zero. Examples:
|
||||
Conversion from a String to a Number is done by converting the first digits to
|
||||
a number. Hexadecimal "0xf9", Octal "017", and Binary "0b10" numbers are
|
||||
recognized. If the String doesn't start with digits, the result is zero.
|
||||
Examples:
|
||||
String "456" --> Number 456 ~
|
||||
String "6bar" --> Number 6 ~
|
||||
String "foo" --> Number 0 ~
|
||||
String "0xf1" --> Number 241 ~
|
||||
String "0100" --> Number 64 ~
|
||||
String "0b101" --> Number 5 ~
|
||||
String "-8" --> Number -8 ~
|
||||
String "+8" --> Number 0 ~
|
||||
|
||||
@@ -522,7 +524,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()
|
||||
@@ -953,7 +955,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.
|
||||
@@ -1017,7 +1019,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>
|
||||
@@ -1375,6 +1377,15 @@ v:errmsg Last given error message. It's allowed to set this variable.
|
||||
: ... handle error
|
||||
< "errmsg" also works, for backwards compatibility.
|
||||
|
||||
*v:errors* *errors-variable*
|
||||
v:errors Errors found by assert functions, such as |assert_true()|.
|
||||
This is a list of strings.
|
||||
The assert functions append an item when an assert fails.
|
||||
To remove old results make it empty: >
|
||||
:let v:errors = []
|
||||
< If v:errors is set to anything but a list it is made an empty
|
||||
list by the assert function.
|
||||
|
||||
*v:exception* *exception-variable*
|
||||
v:exception The value of the exception most recently caught and not
|
||||
finished. See also |v:throwpoint| and |throw-variables|.
|
||||
@@ -1535,6 +1546,15 @@ v:oldfiles List of file names that is loaded from the |shada| file on
|
||||
than String this will cause trouble.
|
||||
{only when compiled with the |+shada| 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>,
|
||||
@@ -1719,10 +1739,13 @@ append( {lnum}, {string}) Number append {string} below line {lnum}
|
||||
append( {lnum}, {list}) Number append lines {list} below line {lnum}
|
||||
argc() Number number of files in the argument list
|
||||
argidx() Number current index in the argument list
|
||||
arglistid( [{winnr}, [ {tabnr}]])
|
||||
arglistid( [{winnr} [, {tabnr}]])
|
||||
Number argument list id
|
||||
argv( {nr}) String {nr} entry of the argument list
|
||||
argv( ) List the argument list
|
||||
assert_equal( {exp}, {act} [, {msg}]) none assert that {exp} equals {act}
|
||||
assert_false( {actual} [, {msg}]) none assert that {actual} is false
|
||||
assert_true( {actual} [, {msg}]) none assert that {actual} is true
|
||||
asin( {expr}) Float arc sine of {expr}
|
||||
atan( {expr}) Float arc tangent of {expr}
|
||||
atan2( {expr}, {expr}) Float arc tangent of {expr1} / {expr2}
|
||||
@@ -1839,10 +1862,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}
|
||||
glob2regpat( {expr}) String convert a glob pat into a search pat
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list}]])
|
||||
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}
|
||||
@@ -1873,6 +1896,7 @@ isdirectory( {directory}) Number TRUE if {directory} is a directory
|
||||
islocked( {expr}) Number TRUE if {expr} is locked
|
||||
items( {dict}) List key-value pairs in {dict}
|
||||
jobclose({job}[, {stream}]) Number Closes a job stream(s)
|
||||
jobpid({job}) Number Returns pid of a job.
|
||||
jobresize({job}, {width}, {height})
|
||||
Number Resize {job}'s pseudo terminal window
|
||||
jobsend({job}, {data}) Number Writes {data} to {job}'s stdin
|
||||
@@ -2152,6 +2176,37 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
|
||||
< Without the {nr} argument a |List| with the whole |arglist| is
|
||||
returned.
|
||||
|
||||
*assert_equal()*
|
||||
assert_equal({expected}, {actual}, [, {msg}])
|
||||
When {expected} and {actual} are not equal an error message is
|
||||
added to |v:errors|.
|
||||
There is no automatic conversion, the String "4" is different
|
||||
from the Number 4. And the number 4 is different from the
|
||||
Float 4.0. The value of 'ignorecase' is not used here, case
|
||||
always matters.
|
||||
When {msg} is omitted an error in the form "Expected
|
||||
{expected} but got {actual}" is produced.
|
||||
Example: >
|
||||
assert_equal('foo', 'bar')
|
||||
< Will result in a string to be added to |v:errors|:
|
||||
test.vim line 12: Expected 'foo' but got 'bar' ~
|
||||
|
||||
assert_false({actual}, [, {msg}]) *assert_false()*
|
||||
When {actual} is not false an error message is added to
|
||||
|v:errors|, like with |assert_equal()|..
|
||||
A value is false when it is zero. When "{actual}" is not a
|
||||
number the assert fails.
|
||||
When {msg} is omitted an error in the form "Expected False but
|
||||
got {actual}" is produced.
|
||||
|
||||
assert_true({actual}, [, {msg}]) *assert_true()*
|
||||
When {actual} is not true an error message is added to
|
||||
|v:errors|, like with |assert_equal()|..
|
||||
A value is true when it is a non-zeron number. When {actual}
|
||||
is not a number the assert fails.
|
||||
When {msg} is omitted an error in the form "Expected True but
|
||||
got {actual}" is produced.
|
||||
|
||||
asin({expr}) *asin()*
|
||||
Return the arc sine of {expr} measured in radians, as a |Float|
|
||||
in the range of [-pi/2, pi/2].
|
||||
@@ -2406,6 +2461,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
|
||||
@@ -2507,10 +2566,10 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
{default} is omitted, 1 is used.
|
||||
|
||||
The optional {type} argument gives the type of dialog. This
|
||||
is only used for the icon of the GTK, Mac, Motif and Win32
|
||||
GUI. It can be one of these values: "Error", "Question",
|
||||
"Info", "Warning" or "Generic". Only the first character is
|
||||
relevant. When {type} is omitted, "Generic" is used.
|
||||
is only used for the icon of the Win32 GUI. It can be one of
|
||||
these values: "Error", "Question", "Info", "Warning" or
|
||||
"Generic". Only the first character is relevant.
|
||||
When {type} is omitted, "Generic" is used.
|
||||
|
||||
If the user aborts the dialog by pressing <Esc>, CTRL-C,
|
||||
or another valid interrupt key, confirm() returns 0.
|
||||
@@ -2769,7 +2828,7 @@ executable({expr}) *executable()*
|
||||
arguments.
|
||||
executable() uses the value of $PATH and/or the normal
|
||||
searchpath for programs. *PATHEXT*
|
||||
On MS-DOS and MS-Windows the ".exe", ".bat", etc. can
|
||||
On Windows the ".exe", ".bat", etc. can
|
||||
optionally be included. Then the extensions in $PATHEXT are
|
||||
tried. Thus if "foo.exe" does not exist, "foo.exe.bat" can be
|
||||
found. If $PATHEXT is not set then ".exe;.com;.bat;.cmd" is
|
||||
@@ -2777,9 +2836,9 @@ executable({expr}) *executable()*
|
||||
the name without an extension. When 'shell' looks like a
|
||||
Unix shell, then the name is also tried without adding an
|
||||
extension.
|
||||
On MS-DOS and MS-Windows it only checks if the file exists and
|
||||
On Windows it only checks if the file exists and
|
||||
is not a directory, not if it's really executable.
|
||||
On MS-Windows an executable in the same directory as Vim is
|
||||
On Windows an executable in the same directory as Vim is
|
||||
always found. Since this directory is added to $PATH it
|
||||
should also work to execute it |win32-PATH|.
|
||||
The result is a Number:
|
||||
@@ -3223,8 +3282,7 @@ foreground() Move the Vim window to the foreground. Useful when sent from
|
||||
On Win32 systems this might not work, the OS does not always
|
||||
allow a window to bring itself to the foreground. Use
|
||||
|remote_foreground()| instead.
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
{only in the Win32 GUI and console version}
|
||||
|
||||
|
||||
function({name}) *function()* *E700*
|
||||
@@ -3355,7 +3413,7 @@ getchar([expr]) *getchar()*
|
||||
: endwhile
|
||||
:endfunction
|
||||
<
|
||||
You may also receive syntetic characters, such as
|
||||
You may also receive synthetic characters, such as
|
||||
|<CursorHold>|. Often you will want to ignore this and get
|
||||
another character: >
|
||||
:function GetKey()
|
||||
@@ -3472,8 +3530,6 @@ getfontname([{name}]) *getfontname()*
|
||||
Only works when the GUI is running, thus not in your vimrc or
|
||||
gvimrc file. Use the |GUIEnter| autocommand to use this
|
||||
function just after the GUI has started.
|
||||
Note that the GTK 2 GUI accepts any font name, thus checking
|
||||
for a valid name does not work.
|
||||
|
||||
getfperm({fname}) *getfperm()*
|
||||
The result is a String, which is the read, write, and execute
|
||||
@@ -3572,8 +3628,7 @@ getmatches() *getmatches()*
|
||||
<
|
||||
*getpid()*
|
||||
getpid() Return a Number which is the process ID of the Vim process.
|
||||
On Unix and MS-Windows this is a unique number, until Vim
|
||||
exits. On MS-DOS it's always zero.
|
||||
This is a unique number, until Vim exits.
|
||||
|
||||
*getpos()*
|
||||
getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
@@ -3699,7 +3754,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.
|
||||
|
||||
@@ -3716,8 +3771,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: >
|
||||
@@ -3736,8 +3794,11 @@ glob2regpat({expr}) *glob2regpat()*
|
||||
if filename =~ glob2regpat('Make*.mak')
|
||||
< This is equivalent to: >
|
||||
if filename =~ '^Make.*\.mak$'
|
||||
<
|
||||
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
< When {expr} is an empty string the result is "^$", match an
|
||||
empty string.
|
||||
|
||||
*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")
|
||||
@@ -3763,6 +3824,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: >
|
||||
@@ -4105,6 +4168,9 @@ jobclose({job}[, {stream}]) {Nvim} *jobclose()*
|
||||
Close {job}'s {stream}, which can be one "stdin", "stdout" or
|
||||
"stderr". If {stream} is omitted, all streams are closed.
|
||||
|
||||
jobpid({job}) {Nvim} *jobpid()*
|
||||
Return the pid (process id) of {job}.
|
||||
|
||||
jobresize({job}, {width}, {height}) {Nvim} *jobresize()*
|
||||
Resize {job}'s pseudo terminal window to {width} and {height}.
|
||||
This function will fail if used on jobs started without the
|
||||
@@ -4124,9 +4190,14 @@ jobsend({job}, {data}) {Nvim} *jobsend()*
|
||||
|
||||
jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
|
||||
Spawns {cmd} as a job. If {cmd} is a |List|, it will be run
|
||||
directly. If {cmd} is a |string|, it will be equivalent to >
|
||||
:call jobstart([&shell, &shellcmdflag, '{cmd}'])
|
||||
< If passed, {opts} must be a dictionary with any of the
|
||||
directly. If {cmd} is a |string|, it will be roughly
|
||||
equivalent to >
|
||||
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
||||
< NOTE: read |shell-unquoting| before constructing any lists
|
||||
with 'shell' or 'shellcmdflag' options. The above call is
|
||||
only written to show the idea, one needs to perform unquoting
|
||||
and do split taking quotes into account.
|
||||
If passed, {opts} must be a dictionary with any of the
|
||||
following keys:
|
||||
- on_stdout: stdout event handler
|
||||
- on_stderr: stderr event handler
|
||||
@@ -4137,6 +4208,10 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
|
||||
- width: Width of the terminal screen(only if pty is set)
|
||||
- height: Height of the terminal screen(only if pty is set)
|
||||
- TERM: $TERM environment variable(only if pty is set)
|
||||
- detach: Detach the job process from the nvim process. The
|
||||
process won't get killed when nvim exists. If the process
|
||||
dies before nvim exits, on_exit will still be invoked.
|
||||
This option is only allowed for non-pty jobs.
|
||||
Either funcrefs or function names can be passed as event
|
||||
handlers. The {opts} object is also used as the "self"
|
||||
argument for the callback, so the caller may pass arbitrary
|
||||
@@ -4703,7 +4778,7 @@ msgpackdump({list}) {Nvim} *msgpackdump()*
|
||||
(dictionary with zero items is represented by 0x80 byte in
|
||||
messagepack).
|
||||
|
||||
Limitations:
|
||||
Limitations: *E951* *E952*
|
||||
1. |Funcref|s cannot be dumped.
|
||||
2. Containers that reference themselves cannot be dumped.
|
||||
3. Dictionary keys are always dumped as STR strings.
|
||||
@@ -4854,6 +4929,9 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
%c single byte
|
||||
%d decimal number
|
||||
%5d decimal number padded with spaces to 5 characters
|
||||
%b binary number
|
||||
%08b binary number padded with zeros to at least 8 characters
|
||||
%B binary number using upper case letters
|
||||
%x hex number
|
||||
%04x hex number padded with zeros to at least 4 characters
|
||||
%X hex number using upper case letters
|
||||
@@ -4940,20 +5018,19 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
|
||||
The conversion specifiers and their meanings are:
|
||||
|
||||
*printf-d* *printf-o* *printf-x* *printf-X*
|
||||
doxX The Number argument is converted to signed decimal
|
||||
(d), unsigned octal (o), or unsigned hexadecimal (x
|
||||
and X) notation. The letters "abcdef" are used for
|
||||
x conversions; the letters "ABCDEF" are used for X
|
||||
conversions.
|
||||
The precision, if any, gives the minimum number of
|
||||
digits that must appear; if the converted value
|
||||
requires fewer digits, it is padded on the left with
|
||||
zeros.
|
||||
In no case does a non-existent or small field width
|
||||
cause truncation of a numeric field; if the result of
|
||||
a conversion is wider than the field width, the field
|
||||
is expanded to contain the conversion result.
|
||||
*printf-d* *printf-b* *printf-B* *printf-o* *printf-x* *printf-X*
|
||||
dbBoxX The Number argument is converted to signed decimal (d),
|
||||
unsigned binary (b and B), unsigned octal (o), or
|
||||
unsigned hexadecimal (x and X) notation. The letters
|
||||
"abcdef" are used for x conversions; the letters
|
||||
"ABCDEF" are used for X conversions. The precision, if
|
||||
any, gives the minimum number of digits that must
|
||||
appear; if the converted value requires fewer digits, it
|
||||
is padded on the left with zeros. In no case does a
|
||||
non-existent or small field width cause truncation of a
|
||||
numeric field; if the result of a conversion is wider
|
||||
than the field width, the field is expanded to contain
|
||||
the conversion result.
|
||||
|
||||
*printf-c*
|
||||
c The Number argument is converted to a byte, and the
|
||||
@@ -4963,6 +5040,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|
|
||||
@@ -5024,7 +5102,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
|
||||
@@ -5151,8 +5229,7 @@ remote_foreground({server}) *remote_foreground()*
|
||||
Note: This does not restore the window if it was minimized,
|
||||
like foreground() does.
|
||||
This function is not available in the |sandbox|.
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
{only in the Win32 GUI and the Win32 console version}
|
||||
|
||||
|
||||
remote_peek({serverid} [, {retvar}]) *remote_peek()*
|
||||
@@ -5828,12 +5905,12 @@ 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}.
|
||||
|
||||
shellescape({string} [, {special}]) *shellescape()*
|
||||
Escape {string} for use as a shell command argument.
|
||||
On MS-Windows and MS-DOS, when 'shellslash' is not set, it
|
||||
On Windows when 'shellslash' is not set, it
|
||||
will enclose {string} in double quotes and double all double
|
||||
quotes within {string}.
|
||||
For other systems, it will enclose {string} in single quotes
|
||||
@@ -6069,12 +6146,14 @@ str2float( {expr}) *str2float()*
|
||||
|
||||
str2nr( {expr} [, {base}]) *str2nr()*
|
||||
Convert string {expr} to a number.
|
||||
{base} is the conversion base, it can be 8, 10 or 16.
|
||||
{base} is the conversion base, it can be 2, 8, 10 or 16.
|
||||
When {base} is omitted base 10 is used. This also means that
|
||||
a leading zero doesn't cause octal conversion to be used, as
|
||||
with the default String to Number conversion.
|
||||
When {base} is 16 a leading "0x" or "0X" is ignored. With a
|
||||
different base the result will be zero.
|
||||
different base the result will be zero. Similarly, when {base}
|
||||
is 8 a leading "0" is ignored, and when {base} is 2 a leading
|
||||
"0b" or "0B" is ignored.
|
||||
Text after the number is silently ignored.
|
||||
|
||||
|
||||
@@ -6685,6 +6764,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
|
||||
@@ -6897,8 +6980,6 @@ There are four types of features:
|
||||
acl Compiled with |ACL| support.
|
||||
arabic Compiled with Arabic support |Arabic|.
|
||||
autocmd Compiled with autocommand support. |autocommand|
|
||||
balloon_eval Compiled with |balloon-eval| support.
|
||||
balloon_multiline GUI supports multiline balloons.
|
||||
browse Compiled with |:browse| support, and browse() will
|
||||
work.
|
||||
browsefilter Compiled with support for |browsefilter|.
|
||||
@@ -6916,7 +6997,6 @@ debug Compiled with "DEBUG" defined.
|
||||
dialog_con Compiled with console dialog support.
|
||||
dialog_gui Compiled with GUI dialog support.
|
||||
digraphs Compiled with support for digraphs.
|
||||
dnd Compiled with support for the "~ register |quote_~|.
|
||||
eval Compiled with expression evaluation support. Always
|
||||
true, of course!
|
||||
ex_extra Compiled with extra Ex commands |+ex_extra|.
|
||||
@@ -6929,21 +7009,13 @@ filterpipe When 'shelltemp' is off pipes are used for shell
|
||||
find_in_path Compiled with support for include file searches
|
||||
|+find_in_path|.
|
||||
float Compiled with support for |Float|.
|
||||
fname_case Case in file names matters (for MS-DOS and Windows
|
||||
this is not present).
|
||||
fname_case Case in file names matters (for Windows this is not
|
||||
present).
|
||||
folding Compiled with |folding| support.
|
||||
footer Compiled with GUI footer support. |gui-footer|
|
||||
gettext Compiled with message translation |multi-lang|
|
||||
gui Compiled with GUI enabled.
|
||||
gui_athena Compiled with Athena GUI.
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
gui_mac Compiled with Macintosh GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
iconv Can use iconv() for conversion.
|
||||
insert_expand Compiled with support for CTRL-X expansion commands in
|
||||
Insert mode.
|
||||
@@ -6991,6 +7063,7 @@ statusline Compiled with support for 'statusline', 'rulerformat'
|
||||
syntax Compiled with syntax highlighting support |syntax|.
|
||||
syntax_items There are active syntax highlighting items for the
|
||||
current buffer.
|
||||
tablineat 'tabline' option accepts %@Func@ items.
|
||||
tag_binary Compiled with binary searching in tags files
|
||||
|tag-binary-search|.
|
||||
tag_old_static Compiled with support for old static tags
|
||||
@@ -7015,10 +7088,9 @@ visualextra Compiled with extra Visual mode commands.
|
||||
vreplace Compiled with |gR| and |gr| commands.
|
||||
wildignore Compiled with 'wildignore' option.
|
||||
wildmenu Compiled with 'wildmenu' option.
|
||||
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
|
||||
64 bits)
|
||||
win32unix Win32 version of Vim, using Unix files (Cygwin)
|
||||
win64 Win64 version of Vim (MS-Windows 64 bit).
|
||||
win32 Windows version of Vim (32 or 64 bit).
|
||||
win32unix Windows version of Vim, using Unix files (Cygwin).
|
||||
win64 Windows version of Vim (64 bit).
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
windows Compiled with support for more than one window.
|
||||
writebackup Compiled with 'writebackup' default on.
|
||||
@@ -7587,7 +7659,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:
|
||||
@@ -8504,7 +8576,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
|
||||
|
@@ -53,60 +53,6 @@ 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*
|
||||
-----------
|
||||
|
||||
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
|
||||
directory:
|
||||
|
||||
+ far-a01.pcf X Windows fonts for Unix including Linux systems
|
||||
+ far-a01.bf X Windows fonts for SunOS
|
||||
+ far-a01.f16 a screen fonts for Unix including Linux systems
|
||||
+ far-a01.fon a monospaced fonts for Windows NT/95/98
|
||||
+ far-a01.com a screen fonts for DOS
|
||||
|
||||
|
||||
Font Installation
|
||||
-----------------
|
||||
|
||||
o Installation of fonts for MS Window systems (NT/95/98)
|
||||
|
||||
From 'Control Panel' folder, start the 'Fonts' program. Then from 'file'
|
||||
menu item select 'Install New Fonts ...'. Browse and select the
|
||||
'far-a01.fon', then follow the installation guide.
|
||||
NOTE: several people have reported that this does not work. The solution
|
||||
is unknown.
|
||||
|
||||
o Installation of fonts for X Window systems (Unix/Linux)
|
||||
|
||||
Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a
|
||||
directory of your choice. Change to the directory containing the Farsi
|
||||
fonts and execute the following commands:
|
||||
|
||||
> mkfontdir
|
||||
> xset +fp path_name_of_farsi_fonts_directory
|
||||
|
||||
o Installation of fonts for X Window systems (SunOS)
|
||||
|
||||
Copy far-a01.bf font into a directory of your choice.
|
||||
Change to the directory containing the far-a01.fb fonts and
|
||||
execute the following commands:
|
||||
|
||||
> fldfamily
|
||||
> xset +fp path_name_of_fonts_directory
|
||||
|
||||
o Installation of ASCII screen fonts (Unix/Linux)
|
||||
|
||||
For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts
|
||||
directory and execute the setfont program as "setfont far-a01.f16". For
|
||||
other systems (e.g. SCO Unix), please refer to the fonts installation
|
||||
section of your system administration manuals.
|
||||
|
||||
o Installation of ASCII screen fonts (DOS)
|
||||
|
||||
After system power on, prior to the first use of Vim, upload the Farsi
|
||||
fonts by executing the far-a01.com font uploading program.
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -165,7 +111,7 @@ The letter encoding used is the Vim extended ISIR-3342 standard with a built
|
||||
in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.
|
||||
|
||||
For document portability reasons, the letter encoding is kept the same across
|
||||
different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).
|
||||
different platforms (i.e. Unix, Windows, ...).
|
||||
|
||||
|
||||
o Keyboard
|
||||
@@ -215,7 +161,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
|
||||
------------
|
||||
|
@@ -595,7 +595,7 @@ Format description:
|
||||
ignored.
|
||||
2. Each entry starts with line that has format "{type} with timestamp
|
||||
{timestamp}:". {timestamp} is |strftime()|-formatted string representing
|
||||
actual UNIX timestamp value. First strftime() argument is equal to
|
||||
actual Unix timestamp value. First strftime() argument is equal to
|
||||
`%Y-%m-%dT%H:%M:%S`. When writing this timestamp is parsed using
|
||||
|msgpack#strptime()|, with caching (it remembers which timestamp produced
|
||||
particular strftime() output and uses this value if you did not change
|
||||
|
@@ -208,18 +208,6 @@ takes too much time or you don't like the cursor jumping to another line,
|
||||
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
|
||||
text of the current cursor line.
|
||||
|
||||
*athena-intellimouse*
|
||||
If you have an Intellimouse and an X server that supports using the wheel,
|
||||
then you can use the wheel to scroll the text up and down in gvim. This works
|
||||
with XFree86 4.0 and later, and with some older versions when you add patches.
|
||||
See |scroll-mouse-wheel|.
|
||||
|
||||
For older versions of XFree86 you must patch your X server. The following
|
||||
page has a bit of information about using the Intellimouse on Linux as well as
|
||||
links to the patches and X server binaries (may not have the one you need
|
||||
though):
|
||||
http://www.inria.fr/koala/colas/mouse-wheel-scroll/
|
||||
|
||||
==============================================================================
|
||||
3. Mouse Control *gui-mouse*
|
||||
|
||||
@@ -605,10 +593,6 @@ The default menus have these priorities:
|
||||
When no or zero priority is given, 500 is used.
|
||||
The priority for the PopUp menu is not used.
|
||||
|
||||
The Help menu will be placed on the far right side of the menu bar on systems
|
||||
which support this (Motif and GTK+). For GTK+ 2, this is not done anymore
|
||||
because right-aligning the Help menu is now discouraged UI design.
|
||||
|
||||
You can use a priority higher than 9999, to make it go after the Help menu,
|
||||
but that is non-standard and is discouraged. The highest possible priority is
|
||||
about 32000. The lowest is 1.
|
||||
@@ -677,10 +661,8 @@ level. Vim interprets the items in this menu as follows:
|
||||
toolbar button image. Note that the exact filename is OS-specific: For
|
||||
example, under Win32 the command >
|
||||
:amenu ToolBar.Hello :echo "hello"<CR>
|
||||
< would find the file 'hello.bmp'. Under GTK+/X11 it is 'Hello.xpm'. With
|
||||
GTK+ 2 the files 'Hello.png', 'Hello.xpm' and 'Hello.bmp' are checked for
|
||||
existence, and the first one found would be used.
|
||||
For MS-Windows and GTK+ 2 the bitmap is scaled to fit the button. For
|
||||
< would find the file 'hello.bmp'. Under X11 it is 'Hello.xpm'.
|
||||
For MS-Windows and the bitmap is scaled to fit the button. For
|
||||
MS-Windows a size of 18 by 18 pixels works best.
|
||||
For MS-Windows the bitmap should have 16 colors with the standard palette.
|
||||
The light grey pixels will be changed to the Window frame color and the
|
||||
@@ -729,8 +711,8 @@ nr Name Normal action ~
|
||||
30 WinMinWidth make current window use few columns
|
||||
|
||||
*hidden-menus* *win32-hidden-menus*
|
||||
In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu
|
||||
from the main menu bar. You must then use the |:popup| command to display it.
|
||||
In the Win32 GUI, starting a menu name with ']' excludes that menu from the
|
||||
main menu bar. You must then use the |:popup| command to display it.
|
||||
|
||||
*popup-menu*
|
||||
You can define the special menu "PopUp". This is the menu that is displayed
|
||||
@@ -883,9 +865,8 @@ a menu item - you don't need to do a :tunmenu as well.
|
||||
|
||||
5.9 Popup Menus
|
||||
|
||||
In the Win32 and GTK+ GUI, you can cause a menu to popup at the cursor.
|
||||
This behaves similarly to the PopUp menus except that any menu tree can
|
||||
be popped up.
|
||||
In the Win32 GUI, you can cause a menu to popup at the cursor. This behaves
|
||||
similarly to the PopUp menus except that any menu tree can be popped up.
|
||||
|
||||
This command is for backwards compatibility, using it is discouraged, because
|
||||
it behaves in a strange way.
|
||||
@@ -894,7 +875,7 @@ it behaves in a strange way.
|
||||
:popu[p] {name} Popup the menu {name}. The menu named must
|
||||
have at least one subentry, but need not
|
||||
appear on the menu-bar (see |hidden-menus|).
|
||||
{only available for Win32 and GTK GUI}
|
||||
{only available for Win32 GUI}
|
||||
|
||||
:popu[p]! {name} Like above, but use the position of the mouse
|
||||
pointer instead of the cursor.
|
||||
|
@@ -47,10 +47,6 @@ If you want Vim to start with a maximized window, add this command to your
|
||||
vimrc or gvimrc file: >
|
||||
au GUIEnter * simalt ~x
|
||||
<
|
||||
*gui-w32s*
|
||||
There is a specific version of gvim.exe that runs under the Win32s subsystem
|
||||
of Windows 3.1 or 3.11. See |win32s|.
|
||||
|
||||
==============================================================================
|
||||
2. Vim as default editor *vim-default-editor*
|
||||
|
||||
@@ -88,7 +84,6 @@ when you have got a new version):
|
||||
You can also install Vim in the "Send To" menu:
|
||||
1. Start a Windows Explorer
|
||||
2. Navigate to your sendto directory:
|
||||
Windows 95: %windir%\sendto (e.g. "c:\windows\sendto")
|
||||
Windows NT: %windir%\profiles\%user%\sendto (e.g.
|
||||
"c:\winnt\profiles\mattha\sendto").
|
||||
3. Right-click in the file pane and select New->Shortcut
|
||||
@@ -262,17 +257,6 @@ WARNING: If you close this window with the "X" button, and confirm the
|
||||
question if you really want to kill the application, Vim may be killed too!
|
||||
(This does not apply to commands run asynchronously with ":!start".)
|
||||
|
||||
*msdos-mode*
|
||||
If you get a dialog that says "This program is set to run in MS-DOS mode..."
|
||||
when you run an external program, you can solve this by changing the
|
||||
properties of the associated shortcut:
|
||||
- Use a Windows Explorer to find the command.com that is used. It can be
|
||||
c:\command.com, c:\dos\command.com, c:\windows\command.com, etc.
|
||||
- With the right mouse button, select properties of this command.com.
|
||||
- In the Program tab select "Advanced".
|
||||
- Unselect "MS-DOS mode".
|
||||
- Click "OK" twice.
|
||||
|
||||
*win32-!start*
|
||||
Normally, Vim waits for a command to complete before continuing (this makes
|
||||
sense for most shell commands which produce output for Vim to use). If you
|
||||
@@ -281,10 +265,6 @@ syntax on W95 & NT: >
|
||||
:!start [/min] {command}
|
||||
The optional "/min" causes the window to be minimized.
|
||||
|
||||
On Win32s, you will have to go to another window instead. Don't forget that
|
||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||
while you switch back to Vim.
|
||||
|
||||
==============================================================================
|
||||
5. Special colors *win32-colors*
|
||||
|
||||
@@ -293,7 +273,7 @@ On Win32, the normal DOS colors can be used. See |dos-colors|.
|
||||
Additionally the system configured colors can also be used. These are known
|
||||
by the names Sys_XXX, where XXX is the appropriate system color name, from the
|
||||
following list (see the Win32 documentation for full descriptions). Case is
|
||||
ignored. Note: On Win32s not all of these colors are supported.
|
||||
ignored.
|
||||
|
||||
Sys_3DDKShadow Sys_3DFace Sys_BTNFace
|
||||
Sys_3DHilight Sys_3DHighlight Sys_BTNHilight
|
||||
|
@@ -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 Apr 15
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -23,6 +23,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|
|
||||
@@ -162,7 +163,6 @@ Remarks about specific systems ~
|
||||
|os_win32.txt| MS-Windows
|
||||
*standard-plugin-list*
|
||||
Standard plugins ~
|
||||
|pi_getscript.txt| Downloading latest version of Vim scripts
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|
@@ -184,12 +184,6 @@ command: >
|
||||
:!xterm -e vim +help &
|
||||
<
|
||||
|
||||
*:helpfind* *:helpf*
|
||||
:helpf[ind] Like |:help|, but use a dialog to enter the argument.
|
||||
Only for backwards compatibility. It now executes the
|
||||
ToolBar.FindHelp menu entry instead of using a builtin
|
||||
dialog. {only when compiled with |+GUI_GTK|}
|
||||
|
||||
*:helpt* *:helptags*
|
||||
*E154* *E150* *E151* *E152* *E153* *E670*
|
||||
:helpt[ags] [++t] {dir}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2015 Jan 07
|
||||
*index.txt* For Vim version 7.4. Last change: 2015 Feb 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -700,12 +700,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
|
||||
@@ -734,6 +738,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
|
||||
@@ -1128,6 +1133,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| :cfdo 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
|
||||
@@ -1239,7 +1246,6 @@ tag command action ~
|
||||
|:hardcopy| :ha[rdcopy] send text to the printer
|
||||
|:help| :h[elp] open a help window
|
||||
|:helpclose| :helpc[lose] close one help window
|
||||
|:helpfind| :helpf[ind] dialog to open a help window
|
||||
|:helpgrep| :helpg[rep] like ":grep" but searches help files
|
||||
|:helptags| :helpt[ags] generate help tags for a directory
|
||||
|:highlight| :hi[ghlight] specify highlighting methods
|
||||
@@ -1285,6 +1291,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
|
||||
|
@@ -1941,9 +1941,9 @@ If the 'fileformats' option is not empty Vim tries to recognize the type of
|
||||
changed, the detected format is only used while reading the file.
|
||||
A similar thing happens with 'fileencodings'.
|
||||
|
||||
On non-MS-DOS and Win32 systems the message "[dos format]" is shown if
|
||||
On non-Windows systems the message "[dos format]" is shown if
|
||||
a file is read in DOS format, to remind you that something unusual is done.
|
||||
On Macintosh, MS-DOS, and Win32 the message "[unix format]" is shown if
|
||||
On Macintosh and Windows the message "[unix format]" is shown if
|
||||
a file is read in Unix format.
|
||||
On non-Macintosh systems, the message "[Mac format]" is shown if a file is
|
||||
read in Mac format.
|
||||
|
@@ -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
|
||||
@@ -131,7 +131,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).
|
||||
@@ -251,7 +251,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
lots of patches
|
||||
Ingo Wilken Tcl interface
|
||||
Mike Williams PostScript printing
|
||||
Juergen Weigert Lattice version, AUX improvements, UNIX and
|
||||
Juergen Weigert Lattice version, AUX improvements, Unix and
|
||||
MS-DOS ports, autoconf
|
||||
Stefan 'Sec' Zehl Maintainer of vim.org
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -43,16 +43,6 @@ features. Unfortunately, every system has its own way to deal with multibyte
|
||||
languages and it is quite complicated.
|
||||
|
||||
|
||||
COMPILING
|
||||
|
||||
If you already have a compiled Vim program, check if the |+multi_byte| feature
|
||||
is included. The |:version| command can be used for this.
|
||||
|
||||
If +multi_byte is not included, you should compile Vim with "normal", "big" or
|
||||
"huge" features. You can further tune what features are included. See the
|
||||
INSTALL files in the source directory.
|
||||
|
||||
|
||||
LOCALE
|
||||
|
||||
First of all, you must make sure your current locale is set correctly. If
|
||||
@@ -107,14 +97,6 @@ is the difficult part. It depends on the system you are using, the locale and
|
||||
a few other things. See the chapters on fonts: |mbyte-fonts-X11| for
|
||||
X-Windows and |mbyte-fonts-MSwin| for MS-Windows.
|
||||
|
||||
For GTK+ 2, you can skip most of this section. The option 'guifontset' does
|
||||
no longer exist. You only need to set 'guifont' and everything should "just
|
||||
work". If your system comes with Xft2 and fontconfig and the current font
|
||||
does not contain a certain glyph, a different font will be used automatically
|
||||
if available. The 'guifontwide' option is still supported but usually you do
|
||||
not need to set it. It is only necessary if the automatic font selection does
|
||||
not suit your needs.
|
||||
|
||||
For X11 you can set the 'guifontset' option to a list of fonts that together
|
||||
cover the characters that are used. Example for Korean: >
|
||||
|
||||
@@ -494,11 +476,6 @@ For Vim you may need to set 'encoding' to "utf-8".
|
||||
Unfortunately, using fonts in X11 is complicated. The name of a single-byte
|
||||
font is a long string. For multi-byte fonts we need several of these...
|
||||
|
||||
Note: Most of this is no longer relevant for GTK+ 2. Selecting a font via
|
||||
its XLFD is not supported; see 'guifont' for an example of how to
|
||||
set the font. Do yourself a favor and ignore the |XLFD| and |xfontset|
|
||||
sections below.
|
||||
|
||||
First of all, Vim only accepts fixed-width fonts for displaying text. You
|
||||
cannot use proportionally spaced fonts. This excludes many of the available
|
||||
(and nicer looking) fonts. However, for menus and tooltips any font can be
|
||||
@@ -629,52 +606,6 @@ If you use a wrong "font" argument you will get an error message.
|
||||
Also make sure that you set 'guifontset' before setting fonts for highlight
|
||||
groups.
|
||||
|
||||
|
||||
USING RESOURCE FILES
|
||||
|
||||
Instead of specifying 'guifontset', you can set X11 resources and Vim will
|
||||
pick them up. This is only for people who know how X resource files work.
|
||||
|
||||
For Motif and Athena insert these three lines in your $HOME/.Xdefaults file:
|
||||
|
||||
Vim.font: |base_font_name_list|
|
||||
Vim*fontSet: |base_font_name_list|
|
||||
Vim*fontList: your_language_font
|
||||
|
||||
Note: Vim.font is for text area.
|
||||
Vim*fontSet is for menu.
|
||||
Vim*fontList is for menu (for Motif GUI)
|
||||
|
||||
For example, when you are using Japanese and a 14 dots font, >
|
||||
|
||||
Vim.font: -misc-fixed-medium-r-normal--14-*
|
||||
Vim*fontSet: -misc-fixed-medium-r-normal--14-*
|
||||
Vim*fontList: -misc-fixed-medium-r-normal--14-*
|
||||
<
|
||||
or: >
|
||||
|
||||
Vim*font: k14,r14
|
||||
Vim*fontSet: k14,r14
|
||||
Vim*fontList: k14,r14
|
||||
<
|
||||
To have them take effect immediately you will have to do >
|
||||
|
||||
xrdb -merge ~/.Xdefaults
|
||||
|
||||
Otherwise you will have to stop and restart the X server before the changes
|
||||
take effect.
|
||||
|
||||
|
||||
The GTK+ version of GUI Vim does not use .Xdefaults, use ~/.gtkrc instead.
|
||||
The default mostly works OK. But for the menus you might have to change
|
||||
it. Example: >
|
||||
|
||||
style "default"
|
||||
{
|
||||
fontset="-*-*-medium-r-normal--14-*-*-*-c-*-*-*"
|
||||
}
|
||||
widget_class "*" style "default"
|
||||
|
||||
==============================================================================
|
||||
6. Fonts on MS-Windows *mbyte-fonts-MSwin*
|
||||
|
||||
@@ -847,20 +778,6 @@ For example, when you are using kinput2 as |IM-server| and sh, >
|
||||
export XMODIFIERS="@im=kinput2"
|
||||
<
|
||||
|
||||
FULLY CONTROLLED XIM
|
||||
|
||||
You can fully control XIM, like with IME of MS-Windows (see |multibyte-ime|).
|
||||
This is currently only available for the GTK GUI.
|
||||
|
||||
Before using fully controlled XIM, one setting is required. Set the
|
||||
'imactivatekey' option to the key that is used for the activation of the input
|
||||
method. For example, when you are using kinput2 + canna as IM Server, the
|
||||
activation key is probably Shift+Space: >
|
||||
|
||||
:set imactivatekey=S-space
|
||||
|
||||
See 'imactivatekey' for the format.
|
||||
|
||||
==============================================================================
|
||||
8. Input on MS-Windows *mbyte-IME*
|
||||
|
||||
@@ -893,14 +810,11 @@ WHAT IS IME
|
||||
URL.
|
||||
|
||||
WHAT IS GLOBAL IME *global-ime*
|
||||
Global IME makes capability to input Chinese, Japanese, and Korean text
|
||||
into Vim buffer on any language version of Windows 98, Windows 95, and
|
||||
Windows NT 4.0.
|
||||
On Windows 2000 and XP it should work as well (without downloading). On
|
||||
Windows 2000 Professional, Global IME is built in, and the Input Locales
|
||||
can be added through Control Panel/Regional Options/Input Locales.
|
||||
Please see below URL for detail of Global IME. You can also find various
|
||||
language version of Global IME at same place.
|
||||
Global IME enables input of Chinese, Japanese, and Korean text into Vim
|
||||
buffer on any language version of Windows. Global IME is built in, and
|
||||
the Input Locales can be added through Control Panel/Regional
|
||||
Options/Input Locales. Please see below URL for detail of Global IME.
|
||||
You can also find various language version of Global IME at same place.
|
||||
|
||||
- Global IME detailed information.
|
||||
http://search.microsoft.com/results.aspx?q=global+ime
|
||||
@@ -1201,14 +1115,12 @@ internally.
|
||||
|
||||
Vim has comprehensive UTF-8 support. It works well in:
|
||||
- xterm with utf-8 support enabled
|
||||
- Athena, Motif and GTK GUI
|
||||
- MS-Windows GUI
|
||||
- several other platforms
|
||||
|
||||
Double-width characters are supported. This works best with 'guifontwide' or
|
||||
'guifontset'. When using only 'guifont' the wide characters are drawn in the
|
||||
normal width and a space to fill the gap. Note that the 'guifontset' option
|
||||
is no longer relevant in the GTK+ 2 GUI.
|
||||
normal width and a space to fill the gap.
|
||||
|
||||
*bom-bytes*
|
||||
When reading a file a BOM (Byte Order Mark) can be used to recognize the
|
||||
@@ -1278,8 +1190,6 @@ doesn't always work. See the system specific remarks below, and 'langmenu'.
|
||||
|
||||
USING UTF-8 IN X-Windows *utf-8-in-xwindows*
|
||||
|
||||
Note: This section does not apply to the GTK+ 2 GUI.
|
||||
|
||||
You need to specify a font to be used. For double-wide characters another
|
||||
font is required, which is exactly twice as wide. There are three ways to do
|
||||
this:
|
||||
|
@@ -401,12 +401,6 @@ You have used an ":unabbreviate" command with an argument which is not an
|
||||
existing abbreviation. All variations of this command give the same message:
|
||||
":cunabbrev", ":iunabbrev", etc. Check for trailing white space.
|
||||
|
||||
>
|
||||
/dev/dsp: No such file or directory
|
||||
|
||||
Only given for GTK GUI with Gnome support. Gnome tries to use the audio
|
||||
device and it isn't present. You can ignore this error.
|
||||
|
||||
*E31* >
|
||||
No such mapping
|
||||
|
||||
|
@@ -26,7 +26,7 @@ are now decoupled from Nvim core as providers:
|
||||
|
||||
The first example is clipboard integration: in the original Vim source code,
|
||||
clipboard functions account for more than 1k lines of C source code (and that
|
||||
is just on ui.c), all to peform two tasks that are now accomplished with
|
||||
is just on ui.c), all to perform two tasks that are now accomplished with
|
||||
simple shell commands such as xclip or pbcopy/pbpaste.
|
||||
|
||||
The other example is Python scripting support: Vim has three files dedicated to
|
||||
|
@@ -49,6 +49,9 @@ To use Vim Python 2/3 plugins with Nvim, do the following:
|
||||
>
|
||||
$ pip3 install --user neovim
|
||||
<
|
||||
Note: If you previously installed the package, get the latest version by
|
||||
appending the `--upgrade` flag to the commands above.
|
||||
|
||||
==============================================================================
|
||||
*g:python_host_prog*
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2014 Dec 17
|
||||
*options.txt* For Vim version 7.4. Last change: 2015 Oct 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -183,7 +183,7 @@ the option value, use '\"' instead. This example sets the 'titlestring'
|
||||
option to 'hi "there"': >
|
||||
:set titlestring=hi\ \"there\"
|
||||
|
||||
For MS-DOS and WIN32 backslashes in file names are mostly not removed. More
|
||||
For Windows backslashes in file names are mostly not removed. More
|
||||
precise: For options that expect a file name (those where environment
|
||||
variables are expanded) a backslash before a normal file name character is not
|
||||
removed. But a backslash before a special character (space, backslash, comma,
|
||||
@@ -488,11 +488,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 ":".
|
||||
|
||||
|
||||
@@ -635,9 +635,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
(or Vim is run inside an xterm invoked with "-cjkwidth" option.),
|
||||
this option should be set to "double" to match the width perceived
|
||||
by Vim with the width of glyphs in the font. Perhaps it also has
|
||||
to be set to "double" under CJK Windows 9x/ME or Windows 2k/XP
|
||||
when the system locale is set to one of CJK locales. See Unicode
|
||||
Standard Annex #11 (http://www.unicode.org/reports/tr11).
|
||||
to be set to "double" under CJK Windows XP when the system locale is
|
||||
set to one of CJK locales.
|
||||
See Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11).
|
||||
|
||||
Vim may set this option automatically at startup time when Vim is
|
||||
compiled with the |+termresponse| feature and if |t_u7| is set to the
|
||||
@@ -772,14 +772,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
putting a ":gui" command in the gvimrc file, before where the value
|
||||
of 'background' is used (e.g., before ":syntax on").
|
||||
|
||||
For MS-DOS and Windows the default is "dark".
|
||||
For Windows the default is "dark".
|
||||
For other systems "dark" is used when 'term' is "linux",
|
||||
"screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
|
||||
background. Otherwise the default is "light".
|
||||
|
||||
Normally this option would be set in the vimrc file. Possibly
|
||||
depending on the terminal name. Example: >
|
||||
:if &term == "pcterm"
|
||||
:if &term == "xterm"
|
||||
: set background=dark
|
||||
:endif
|
||||
< When this option is set, the default settings for the highlight groups
|
||||
@@ -900,7 +900,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
impossible!). Writing may fail because of this.
|
||||
- A directory "." means to put the backup file in the same directory
|
||||
as the edited file.
|
||||
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
|
||||
- A directory starting with "./" (or ".\" for Windows) means to
|
||||
put the backup file relative to where the edited file is. The
|
||||
leading "." is replaced with the path name of the edited file.
|
||||
("." inside a directory name has no special meaning).
|
||||
@@ -1110,8 +1110,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'browsedir'* *'bsdir'*
|
||||
'browsedir' 'bsdir' string (default: "last")
|
||||
global
|
||||
{only for Motif, Athena, GTK, Mac and
|
||||
Win32 GUI}
|
||||
{only for Mac and Win32 GUI}
|
||||
Which directory to use for the file browser:
|
||||
last Use same directory as with last file browser, where a
|
||||
file was opened or saved.
|
||||
@@ -1194,6 +1193,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
|
||||
@@ -2073,7 +2075,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the edited file. On Unix, a dot is prepended to the file name, so
|
||||
it doesn't show in a directory listing. On MS-Windows the "hidden"
|
||||
attribute is set and a dot prepended if possible.
|
||||
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
|
||||
- A directory starting with "./" (or ".\" for Windows) means to
|
||||
put the swap file relative to where the edited file is. The leading
|
||||
"." is replaced with the path name of the edited file.
|
||||
- For Unix and Win32, if a directory ends in two path separators "//"
|
||||
@@ -2129,7 +2131,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'edcompatible' 'ed' Removed. |vim-differences| {Nvim}
|
||||
|
||||
*'encoding'* *'enc'* *E543*
|
||||
'encoding' 'enc' string (default: "utf-8" or value from $LANG)
|
||||
'encoding' 'enc' string (default: "utf-8")
|
||||
global
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
@@ -2151,10 +2153,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
can use: >
|
||||
if has("multi_byte_encoding")
|
||||
<
|
||||
Normally 'encoding' will be equal to your current locale. This will
|
||||
be the default if Vim recognizes your environment settings, otherwise
|
||||
"utf-8" is used.
|
||||
|
||||
When you set this option, it fires the |EncodingChanged| autocommand
|
||||
event so that you can set up fonts if necessary.
|
||||
|
||||
@@ -2171,22 +2169,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
setting 'encoding' to one of these values instead of utf-8 only has
|
||||
effect for encoding used for files when 'fileencoding' is empty.
|
||||
|
||||
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
|
||||
not set yet, the default for 'fileencodings' is changed.
|
||||
|
||||
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
|
||||
'endofline' 'eol' boolean (default on)
|
||||
local to buffer
|
||||
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)
|
||||
@@ -2343,9 +2339,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
old short name was 'fe', which is no longer used.
|
||||
|
||||
*'fileencodings'* *'fencs'*
|
||||
'fileencodings' 'fencs' string (default: "ucs-bom",
|
||||
"ucs-bom,utf-8,default,latin1" when
|
||||
'encoding' is set to a Unicode value)
|
||||
'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1")
|
||||
global
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
@@ -2385,9 +2379,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
because Vim cannot detect an error, thus the encoding is always
|
||||
accepted.
|
||||
The special value "default" can be used for the encoding from the
|
||||
environment. This is the default value for 'encoding'. It is useful
|
||||
when 'encoding' is set to "utf-8" and your environment uses a
|
||||
non-latin1 encoding, such as Russian.
|
||||
environment. It is useful when 'encoding' is set to "utf-8" and
|
||||
your environment uses a non-latin1 encoding, such as Russian.
|
||||
When 'encoding' is "utf-8" and a file contains an illegal byte
|
||||
sequence it won't be recognized as UTF-8. You can use the |8g8|
|
||||
command to find the illegal byte sequence.
|
||||
@@ -2402,7 +2395,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
is read.
|
||||
|
||||
*'fileformat'* *'ff'*
|
||||
'fileformat' 'ff' string (MS-DOS and MS-Windows default: "dos",
|
||||
'fileformat' 'ff' string (Windows default: "dos",
|
||||
Unix default: "unix",
|
||||
Macintosh default: "mac")
|
||||
local to buffer
|
||||
@@ -2446,8 +2439,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.
|
||||
@@ -2541,6 +2534,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
|
||||
@@ -2808,10 +2812,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
written even on filesystems which do metadata-only journaling. This
|
||||
will force the harddrive to spin up on Linux systems running in laptop
|
||||
mode, so it may be undesirable in some situations. Be warned that
|
||||
turning this off increases the chances of data loss after a crash. On
|
||||
systems without an fsync() implementation, this variable is always
|
||||
off.
|
||||
Also see 'swapsync' for controlling fsync() on swap files.
|
||||
turning this off increases the chances of data loss after a crash.
|
||||
|
||||
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
|
||||
'gdefault' 'gd' boolean (default off)
|
||||
@@ -2864,14 +2865,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
r-cr:hor20-Cursor/lCursor,
|
||||
sm:block-Cursor
|
||||
-blinkwait175-blinkoff150-blinkon175",
|
||||
for MS-DOS and Win32 console:
|
||||
for Windows console:
|
||||
"n-v-c:block,o:hor50,i-ci:hor15,
|
||||
r-cr:hor30,sm:block")
|
||||
global
|
||||
{only available when compiled with GUI enabled, and
|
||||
for MS-DOS and Win32 console}
|
||||
for Windows console}
|
||||
This option tells Vim what the cursor should look like in different
|
||||
modes. It fully works in the GUI. In an MSDOS or Win32 console, only
|
||||
modes. It fully works in the GUI. In a Windows console, only
|
||||
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.
|
||||
@@ -2970,28 +2971,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the case of X). The font names given should be "normal" fonts. Vim
|
||||
will try to find the related bold and italic fonts.
|
||||
|
||||
For Win32, GTK, Motif, and Mac OS: >
|
||||
For Win32 and Mac OS: >
|
||||
:set guifont=*
|
||||
< will bring up a font requester, where you can pick the font you want.
|
||||
|
||||
The font name depends on the GUI used. See |setting-guifont| for a
|
||||
way to set 'guifont' for various systems.
|
||||
|
||||
For the GTK+ 2 GUI the font name looks like this: >
|
||||
:set guifont=Andale\ Mono\ 11
|
||||
< That's all. XLFDs are not used. For Chinese this is reported to work
|
||||
well: >
|
||||
if has("gui_gtk2")
|
||||
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
|
||||
set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
|
||||
endif
|
||||
<
|
||||
For Mac OSX you can use something like this: >
|
||||
:set guifont=Monaco:h10
|
||||
< *E236*
|
||||
Note that the fonts must be mono-spaced (all characters have the same
|
||||
width). An exception is GTK 2: all fonts are accepted, but
|
||||
mono-spaced fonts look best.
|
||||
width).
|
||||
|
||||
To preview a font on X11, you might be able to use the "xfontsel"
|
||||
program. The "xlsfonts" program gives a list of all available fonts.
|
||||
@@ -3024,7 +3015,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{only available when compiled with GUI enabled and
|
||||
with the |+xfontset| feature}
|
||||
{not available in the GTK+ 2 GUI}
|
||||
When not empty, specifies two (or more) fonts to be used. The first
|
||||
one for normal English, the second one for your special language. See
|
||||
|xfontset|.
|
||||
@@ -3052,24 +3042,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note: The size of these fonts must be exactly twice as wide as the one
|
||||
specified with 'guifont' and the same height.
|
||||
|
||||
All GUI versions but GTK+ 2:
|
||||
|
||||
'guifontwide' is only used when 'encoding' is set to "utf-8" and
|
||||
'guifontset' is empty or invalid.
|
||||
When 'guifont' is set and a valid font is found in it and
|
||||
'guifontwide' is empty Vim will attempt to find a matching
|
||||
double-width font and set 'guifontwide' to it.
|
||||
|
||||
GTK+ 2 GUI only: *guifontwide_gtk2*
|
||||
|
||||
If set and valid, 'guifontwide' is always used for double width
|
||||
characters, even if 'encoding' is not set to "utf-8".
|
||||
Vim does not attempt to find an appropriate value for 'guifontwide'
|
||||
automatically. If 'guifontwide' is empty Pango/Xft will choose the
|
||||
font for characters not available in 'guifont'. Thus you do not need
|
||||
to set 'guifontwide' at all unless you want to override the choice
|
||||
made by Pango/Xft.
|
||||
|
||||
Windows +multibyte only: *guifontwide_win_mbyte*
|
||||
|
||||
If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
|
||||
@@ -3077,7 +3055,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'guiheadroom'* *'ghr'*
|
||||
'guiheadroom' 'ghr' number (default 50)
|
||||
global
|
||||
{only for GTK and X11 GUI}
|
||||
{only for X11 GUI}
|
||||
The number of pixels subtracted from the screen height when fitting
|
||||
the GUI window on the screen. Set this before the GUI is started,
|
||||
e.g., in your |gvimrc| file. When zero, the whole screen height will
|
||||
@@ -3087,8 +3065,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
screen.
|
||||
|
||||
*'guioptions'* *'go'*
|
||||
'guioptions' 'go' string (default "egmrLT" (MS-Windows),
|
||||
"aegimrLT" (GTK, Motif and Athena))
|
||||
'guioptions' 'go' string (default "egmrLT" (MS-Windows))
|
||||
global
|
||||
{only available when compiled with GUI enabled}
|
||||
This option only has an effect in the GUI version of Vim. It is a
|
||||
@@ -3134,10 +3111,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'guitablabel' can be used to change the text in the labels.
|
||||
When 'e' is missing a non-GUI tab pages line may be used.
|
||||
The GUI tabs are only supported on some systems, currently
|
||||
GTK, Motif, Mac OS/X and MS-Windows.
|
||||
Mac OS/X and MS-Windows.
|
||||
*'go-i'*
|
||||
'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
|
||||
corner of the window.
|
||||
'i' Use a Vim icon.
|
||||
*'go-m'*
|
||||
'm' Menu bar is present.
|
||||
*'go-M'*
|
||||
@@ -3149,10 +3125,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'go-g'*
|
||||
'g' Grey menu items: Make menu items that are not active grey. If
|
||||
'g' is not included inactive menu items are not shown at all.
|
||||
Exception: Athena will always use grey menu items.
|
||||
*'go-T'*
|
||||
'T' Include Toolbar. Currently only in Win32, GTK+, Motif,
|
||||
and Athena GUIs.
|
||||
'T' Include Toolbar. Currently only in Win32 GUI.
|
||||
*'go-r'*
|
||||
'r' Right-hand scrollbar is always present.
|
||||
*'go-R'*
|
||||
@@ -3184,8 +3158,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the right moment, try adding this flag. This must be done
|
||||
before starting the GUI. Set it in your |gvimrc|. Adding or
|
||||
removing it after the GUI has started has no effect.
|
||||
*'go-F'*
|
||||
'F' Add a footer. Only for Motif. See |gui-footer|.
|
||||
|
||||
|
||||
*'guipty'* *'noguipty'*
|
||||
@@ -3438,54 +3410,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|/ignorecase|.
|
||||
|
||||
*'imactivatefunc'* *'imaf'*
|
||||
'imactivatefunc' 'imaf' string (default "")
|
||||
global
|
||||
{only available when compiled with |+xim| and
|
||||
|+GUI_GTK|}
|
||||
This option specifies a function that will be called to
|
||||
activate/inactivate Input Method.
|
||||
'imactivatefunc' 'imaf' Removed. |vim-differences| {Nvim}
|
||||
|
||||
Example: >
|
||||
function ImActivateFunc(active)
|
||||
if a:active
|
||||
... do something
|
||||
else
|
||||
... do something
|
||||
endif
|
||||
" return value is not used
|
||||
endfunction
|
||||
set imactivatefunc=ImActivateFunc
|
||||
<
|
||||
*'imactivatekey'* *'imak'*
|
||||
'imactivatekey' 'imak' string (default "")
|
||||
global
|
||||
{only available when compiled with |+xim| and
|
||||
|+GUI_GTK|} *E599*
|
||||
Specifies the key that your Input Method in X-Windows uses for
|
||||
activation. When this is specified correctly, vim can fully control
|
||||
IM with 'imcmdline', 'iminsert' and 'imsearch'.
|
||||
You can't use this option to change the activation key, the option
|
||||
tells Vim what the key is.
|
||||
Format:
|
||||
[MODIFIER_FLAG-]KEY_STRING
|
||||
|
||||
These characters can be used for MODIFIER_FLAG (case is ignored):
|
||||
S Shift key
|
||||
L Lock key
|
||||
C Control key
|
||||
1 Mod1 key
|
||||
2 Mod2 key
|
||||
3 Mod3 key
|
||||
4 Mod4 key
|
||||
5 Mod5 key
|
||||
Combinations are allowed, for example "S-C-space" or "SC-space" are
|
||||
both shift+ctrl+space.
|
||||
See <X11/keysymdef.h> and XStringToKeysym for KEY_STRING.
|
||||
|
||||
Example: >
|
||||
:set imactivatekey=S-space
|
||||
< "S-space" means shift+space. This is the activation key for kinput2 +
|
||||
canna (Japanese), and ami (Korean).
|
||||
'imactivatekey' 'imak' Removed. |vim-differences| {Nvim}
|
||||
|
||||
*'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
|
||||
'imcmdline' 'imc' boolean (default off)
|
||||
@@ -3527,8 +3455,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|i_CTRL-^|.
|
||||
The value is set to 1 when setting 'keymap' to a valid keymap name.
|
||||
It is also used for the argument of commands like "r" and "f".
|
||||
The value 0 may not work correctly with Athena and Motif with some XIM
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
*'imsearch'* *'ims'*
|
||||
'imsearch' 'ims' number (default 0, 2 when an input method is supported)
|
||||
@@ -3544,25 +3470,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|c_CTRL-^|.
|
||||
The value is set to 1 when it is not -1 and setting the 'keymap'
|
||||
option to a valid keymap name.
|
||||
The value 0 may not work correctly with Athena and Motif with some XIM
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
*'imstatusfunc'* *'imsf'*
|
||||
'imstatusfunc' 'imsf' string (default "")
|
||||
global
|
||||
{only available when compiled with |+xim| and
|
||||
|+GUI_GTK|}
|
||||
This option specifies a function that is called to obtain the status
|
||||
of Input Method. It must return a positive number when IME is active.
|
||||
|
||||
Example: >
|
||||
function ImStatusFunc()
|
||||
let is_active = ...do something
|
||||
return is_active ? 1 : 0
|
||||
endfunction
|
||||
set imstatusfunc=ImStatusFunc
|
||||
<
|
||||
NOTE: This function is invoked very often. Keep it fast.
|
||||
'imstatusfunc' 'imsf' Removed. |vim-differences| {Nvim}
|
||||
|
||||
*'include'* *'inc'*
|
||||
'include' 'inc' string (default "^\s*#\s*include")
|
||||
@@ -3704,7 +3614,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When executing commands with |:normal| 'insertmode' is not used.
|
||||
|
||||
*'isfname'* *'isf'*
|
||||
'isfname' 'isf' string (default for MS-DOS and Win32:
|
||||
'isfname' 'isf' string (default for Windows:
|
||||
"@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
|
||||
otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
|
||||
global
|
||||
@@ -3755,7 +3665,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
|
||||
*'isident'* *'isi'*
|
||||
'isident' 'isi' string (default for MS-DOS and Win32:
|
||||
'isident' 'isi' string (default for Windows:
|
||||
"@,48-57,_,128-167,224-235"
|
||||
otherwise: "@,48-57,_,192-255")
|
||||
global
|
||||
@@ -3770,10 +3680,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
change 'iskeyword' instead.
|
||||
|
||||
*'iskeyword'* *'isk'*
|
||||
'iskeyword' 'isk' string (Vim default for
|
||||
Win32: @,48-57,_,128-167,224-235
|
||||
otherwise: @,48-57,_,192-255
|
||||
Vi default: @,48-57,_)
|
||||
'iskeyword' 'isk' string (default: @,48-57,_,192-255
|
||||
Vi default: @,48-57,_)
|
||||
local to buffer
|
||||
Keywords are used in searching and recognizing with many commands:
|
||||
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
|
||||
@@ -3785,8 +3693,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When the 'lisp' option is on the '-' character is always included.
|
||||
|
||||
*'isprint'* *'isp'*
|
||||
'isprint' 'isp' string (default for MS-DOS, Win32, and Macintosh:
|
||||
"@,~-255"; otherwise: "@,161-255")
|
||||
'isprint' 'isp' string (default: "@,161-255")
|
||||
global
|
||||
The characters given by this option are displayed directly on the
|
||||
screen. It is also used for "\p" in a |pattern|. The characters from
|
||||
@@ -4077,8 +3984,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
conceal:c Character to show in place of concealed text, when
|
||||
'conceallevel' is set to 1. A space when omitted.
|
||||
*lcs-nbsp*
|
||||
nbsp:c Character to show for a non-breakable space (character
|
||||
0xA0, 160). Left blank when omitted.
|
||||
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
|
||||
@@ -4381,7 +4289,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The mouse pointer is restored when the mouse is moved.
|
||||
|
||||
*'mousemodel'* *'mousem'*
|
||||
'mousemodel' 'mousem' string (default "extend", "popup" for MS-DOS and Win32)
|
||||
'mousemodel' 'mousem' string (default "extend", "popup" for Windows)
|
||||
global
|
||||
Sets the model to use for the mouse. The name mostly specifies what
|
||||
the right mouse button is used for:
|
||||
@@ -4483,12 +4391,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'mousetime'* *'mouset'*
|
||||
'mousetime' 'mouset' number (default 500)
|
||||
global
|
||||
Only for GUI, MS-DOS, Win32 and Unix with xterm. Defines the maximum
|
||||
Only for GUI, Windows and Unix with xterm. Defines the maximum
|
||||
time in msec between two mouse clicks for the second click to be
|
||||
recognized as a multi click.
|
||||
|
||||
*'nrformats'* *'nf'*
|
||||
'nrformats' 'nf' string (default "hex")
|
||||
'nrformats' 'nf' string (default "bin,hex")
|
||||
local to buffer
|
||||
This defines what bases Vim will consider for numbers when using the
|
||||
CTRL-A and CTRL-X commands for adding to and subtracting from a number
|
||||
@@ -4501,6 +4409,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
hex If included, numbers starting with "0x" or "0X" will be
|
||||
considered to be hexadecimal. Example: Using CTRL-X on
|
||||
"0x100" results in "0x0ff".
|
||||
bin If included, numbers starting with "0b" or "0B" will be
|
||||
considered to be binary. Example: Using CTRL-X on
|
||||
"0b1000" subtracts one, resulting in "0b0111".
|
||||
Numbers which simply begin with a digit in the range 1-9 are always
|
||||
considered decimal. This also happens for numbers that are not
|
||||
recognized as octal or hex.
|
||||
@@ -4564,11 +4475,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
|
||||
'opendevice' 'odev' boolean (default off)
|
||||
global
|
||||
{only for MS-DOS and MS-Windows}
|
||||
{only for Windows}
|
||||
Enable reading and writing from devices. This may get Vim stuck on a
|
||||
device that can be opened but doesn't actually do the I/O. Therefore
|
||||
it is off by default.
|
||||
Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also
|
||||
Note that on Windows editing "aux.h", "lpt1.txt" and the like also
|
||||
result in editing a device.
|
||||
|
||||
|
||||
@@ -4934,18 +4845,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
instead of the number of lines.
|
||||
|
||||
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
|
||||
'restorescreen' 'rs' boolean (default on)
|
||||
global
|
||||
{only in Windows 95/NT console version}
|
||||
When set, the screen contents is restored when exiting Vim. This also
|
||||
happens when executing external commands.
|
||||
|
||||
For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
|
||||
options in your vimrc. To disable restoring:
|
||||
set t_ti= t_te=
|
||||
To enable restoring (for an xterm):
|
||||
set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
|
||||
(Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
|
||||
'restorescreen' 'rs' Removed. |vim-differences| {Nvim}
|
||||
|
||||
*'revins'* *'ri'* *'norevins'* *'nori'*
|
||||
'revins' 'ri' boolean (default off)
|
||||
@@ -5353,7 +5253,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
r Removable media. The argument is a string (up to the next
|
||||
','). This parameter can be given several times. Each
|
||||
specifies the start of a path for which no marks will be
|
||||
stored. This is to avoid removable media. For MS-DOS you
|
||||
stored. This is to avoid removable media. For Windows you
|
||||
could use "ra:,rb:". You can also use it for temp files,
|
||||
e.g., for Unix: "r/tmp". Case is ignored.
|
||||
*shada-s*
|
||||
@@ -5391,8 +5291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'shell'* *'sh'* *E91*
|
||||
'shell' 'sh' string (default $SHELL or "sh",
|
||||
MS-DOS and Win32: "command.com" or
|
||||
"cmd.exe")
|
||||
Windows: "cmd.exe")
|
||||
global
|
||||
Name of the shell to use for ! and :! commands. When changing the
|
||||
value also check these options: 'shellpipe', 'shellslash'
|
||||
@@ -5404,26 +5303,49 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
it in quotes. Example: >
|
||||
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f
|
||||
< Note the backslash before each quote (to avoid starting a comment) and
|
||||
each space (to avoid ending the option value). Also note that the
|
||||
"-f" is not inside the quotes, because it is not part of the command
|
||||
name. And Vim automagically recognizes the backslashes that are path
|
||||
separators.
|
||||
each space (to avoid ending the option value), so better use |:let-&|
|
||||
like this: >
|
||||
:let &shell='"C:\Program Files\unix\sh.exe" -f'
|
||||
< Also note that the "-f" is not inside the quotes, because it is not
|
||||
part of the command name.
|
||||
*shell-unquoting*
|
||||
Rules regarding quotes:
|
||||
1. Option is split on space and tab characters that are not inside
|
||||
quotes: "abc def" runs shell named "abc" with additional argument
|
||||
"def", '"abc def"' runs shell named "abc def" with no additional
|
||||
arguments (here and below: additional means “additional to
|
||||
'shellcmdflag'”).
|
||||
2. Quotes in option may be present in any position and any number:
|
||||
'"abc"', '"a"bc', 'a"b"c', 'ab"c"' and '"a"b"c"' are all equivalent
|
||||
to just "abc".
|
||||
3. Inside quotes backslash preceding backslash means one backslash.
|
||||
Backslash preceding quote means one quote. Backslash preceding
|
||||
anything else means backslash and next character literally:
|
||||
'"a\\b"' is the same as "a\b", '"a\\"b"' runs shell named literally
|
||||
'a"b', '"a\b"' is the same as "a\b" again.
|
||||
4. Outside of quotes backslash always means itself, it cannot be used
|
||||
to escape quote: 'a\"b"' is the same as "a\b".
|
||||
Note that such processing is done after |:set| did its own round of
|
||||
unescaping, so to keep yourself sane use |:let-&| like shown above.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellcmdflag'* *'shcf'*
|
||||
'shellcmdflag' 'shcf' string (default: "-c";
|
||||
MS-DOS and Win32, when 'shell' does not
|
||||
Windows, when 'shell' does not
|
||||
contain "sh" somewhere: "/c")
|
||||
global
|
||||
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
|
||||
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
|
||||
"bash.exe -c ls" or "cmd.exe /c dir". For Windows
|
||||
systems, the default is set according to the value of 'shell', to
|
||||
reduce the need to set this option by the user.
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
Also see |dos-shell| for MS-DOS and MS-Windows.
|
||||
See |shell-unquoting| which talks about separating this option into
|
||||
multiple arguments.
|
||||
Also see |dos-shell| for Windows.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -5438,7 +5360,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The name of the temporary file can be represented by "%s" if necessary
|
||||
(the file name is appended automatically if no %s appears in the value
|
||||
of this option).
|
||||
For MS-DOS the default is ">". The output is directly saved in a file
|
||||
For Windows the default is ">". The output is directly saved in a file
|
||||
and not echoed to the screen.
|
||||
For Unix the default it "| tee". The stdout of the compiler is saved
|
||||
in a file and echoed to the screen. If the 'shell' option is "csh" or
|
||||
@@ -5462,7 +5384,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'shellquote'* *'shq'*
|
||||
'shellquote' 'shq' string (default: ""; MS-DOS and Win32, when 'shell'
|
||||
'shellquote' 'shq' string (default: ""; Windows, when 'shell'
|
||||
contains "sh" somewhere: "\"")
|
||||
global
|
||||
Quoting character(s), put around the command passed to the shell, for
|
||||
@@ -5470,7 +5392,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
quoting. See 'shellxquote' to include the redirection. It's
|
||||
probably not useful to set both options.
|
||||
This is an empty string by default. Only known to be useful for
|
||||
third-party shells on MS-DOS-like systems, such as the MKS Korn Shell
|
||||
third-party shells on Windows systems, such as the MKS Korn Shell
|
||||
or bash, where it should be "\"". The default is adjusted according
|
||||
the value of 'shell', to reduce the need to set this option by the
|
||||
user. See |dos-shell|.
|
||||
@@ -5535,7 +5457,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'shellxescape'* *'sxe'*
|
||||
'shellxescape' 'sxe' string (default: "";
|
||||
for MS-DOS and MS-Windows: "\"&|<>()@^")
|
||||
for Windows: "\"&|<>()@^")
|
||||
global
|
||||
When 'shellxquote' is set to "(" then the characters listed in this
|
||||
option will be escaped with a '^' character. This makes it possible
|
||||
@@ -5704,8 +5626,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Use the 'M' flag in 'highlight' to set the type of highlighting for
|
||||
this message.
|
||||
When |XIM| may be used the message will include "XIM". But this
|
||||
doesn't mean XIM is really active, especially when 'imactivatekey' is
|
||||
not set.
|
||||
doesn't mean XIM is really active.
|
||||
|
||||
*'showtabline'* *'stal'*
|
||||
'showtabline' 'stal' number (default 1)
|
||||
@@ -6090,11 +6011,39 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
( - Start of item group. Can be used for setting the width and
|
||||
alignment of a section. Must be followed by %) somewhere.
|
||||
) - End of item group. No width fields allowed.
|
||||
T N For 'tabline': start of tab page N label. Use %T after the last
|
||||
label. This information is used for mouse clicks.
|
||||
X N For 'tabline': start of close tab N label. Use %X after the
|
||||
label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
|
||||
mark. This information is used for mouse clicks.
|
||||
T N For 'tabline': start of tab page N label. Use %T or %X to end
|
||||
the label. Clicking this label with left mouse button switches
|
||||
to the specified tab page.
|
||||
X N For 'tabline': start of close tab N label. Use %X or %T to end
|
||||
the label, e.g.: %3Xclose%X. Use %999X for a "close current
|
||||
tab" label. Clicking this label with left mouse button closes
|
||||
specified tab page.
|
||||
@ N For 'tabline': start of execute function label. Use %X or %T to
|
||||
end the label, e.g.: %10@SwitchBuffer@foo.c%X. Clicking this
|
||||
label runs specified function: in the example when clicking once
|
||||
using left mouse button on "foo.c" "SwitchBuffer(10, 1, 'l',
|
||||
' ')" expression will be run. Function receives the
|
||||
following arguments in order:
|
||||
1. minwid field value or zero if no N was specified
|
||||
2. number of mouse clicks to detect multiple clicks
|
||||
3. mouse button used: "l", "r" or "m" for left, right or middle
|
||||
button respectively; one should not rely on third argument
|
||||
being only "l", "r" or "m": any other non-empty string value
|
||||
that contains only ASCII lower case letters may be expected
|
||||
for other mouse buttons
|
||||
4. modifiers pressed: string which contains "s" if shift
|
||||
modifier was pressed, "c" for control, "a" for alt and "m"
|
||||
for meta; currently if modifier is not pressed string
|
||||
contains space instead, but one should not rely on presence
|
||||
of spaces or specific order of modifiers: use |stridx()| to
|
||||
test whether some modifier is present; string is guaranteed
|
||||
to contain only ASCII letters and spaces, one letter per
|
||||
modifier; "?" modifier may also be present, but its presence
|
||||
is a bug that denotes that new mouse button recognition was
|
||||
added without modifying code that reacts on mouse clicks on
|
||||
this label.
|
||||
Note: to test whether your version of Neovim contains this
|
||||
feature use `has('tablineat')`.
|
||||
< - Where to truncate line if too long. Default is at the start.
|
||||
No width fields allowed.
|
||||
= - Separation point between left and right aligned items.
|
||||
@@ -6201,7 +6150,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When 'swapfile' is reset, the swap file for the current buffer is
|
||||
immediately deleted. When 'swapfile' is set, and 'updatecount' is
|
||||
non-zero, a swap file is immediately created.
|
||||
Also see |swap-file| and |'swapsync'|.
|
||||
Also see |swap-file|.
|
||||
If you want to open a new buffer without creating a swap file for it,
|
||||
use the |:noswapfile| modifier.
|
||||
|
||||
@@ -6209,18 +6158,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
specify special kinds of buffers. See |special-buffers|.
|
||||
|
||||
*'swapsync'* *'sws'*
|
||||
'swapsync' 'sws' string (default "fsync")
|
||||
global
|
||||
When this option is not empty a swap file is synced to disk after
|
||||
writing to it. This takes some time, especially on busy unix systems.
|
||||
When this option is empty parts of the swap file may be in memory and
|
||||
not written to disk. When the system crashes you may lose more work.
|
||||
On Unix the system does a sync now and then without Vim asking for it,
|
||||
so the disadvantage of setting this option off is small. On some
|
||||
systems the swap file will not be written at all. For a unix system
|
||||
setting it to "sync" will use the sync() call instead of the default
|
||||
fsync(), which may work better on some systems.
|
||||
The 'fsync' option is used for the actual file.
|
||||
'swapsync' 'sws' Removed. |vim-differences| {Nvim}
|
||||
|
||||
*'switchbuf'* *'swb'*
|
||||
'switchbuf' 'swb' string (default "")
|
||||
@@ -6435,9 +6373,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'term' string (default is $TERM, if that fails:
|
||||
in the GUI: "builtin_gui"
|
||||
on Mac: "mac-ansi"
|
||||
on MS-DOS: "pcterm"
|
||||
on Unix: "ansi"
|
||||
on Win 32: "win32")
|
||||
on Windows: "win32")
|
||||
global
|
||||
Name of the terminal. Used for choosing the terminal control
|
||||
characters. Environment variables are expanded |:set_env|.
|
||||
@@ -6707,7 +6644,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When 'updatecount' is set from zero to non-zero, swap files are
|
||||
created for all buffers that have 'swapfile' set. When 'updatecount'
|
||||
is set to zero, existing swap files are not deleted.
|
||||
Also see |'swapsync'|.
|
||||
This option has no meaning in buffers where |'buftype'| is "nofile"
|
||||
or "nowrite".
|
||||
|
||||
@@ -7011,7 +6947,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'winaltkeys'* *'wak'*
|
||||
'winaltkeys' 'wak' string (default "menu")
|
||||
global
|
||||
{only used in Win32, Motif, and GTK}
|
||||
{only used in Win32}
|
||||
Some GUI versions allow the access to menu entries by using the ALT
|
||||
key in combination with a character that appears underlined in the
|
||||
menu. This conflicts with the use of the ALT key for mappings and
|
||||
@@ -7026,8 +6962,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
keys can be mapped.
|
||||
If the menu is disabled by excluding 'm' from 'guioptions', the ALT
|
||||
key is never used for the menu.
|
||||
This option is not used for <F10>; on Win32 and with GTK <F10> will
|
||||
select the menu, unless it has been mapped.
|
||||
This option is not used for <F10>; on Win32.
|
||||
|
||||
*'window'* *'wi'*
|
||||
'window' 'wi' number (default screen height - 1)
|
||||
@@ -7195,6 +7130,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
The number of microseconds to wait for each character sent to the
|
||||
screen. When non-zero, characters are sent to the terminal one by
|
||||
one. For MS-DOS pcterm this does not work. For debugging purposes.
|
||||
one. For debugging purposes.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:noet:norl:
|
||||
|
@@ -52,12 +52,9 @@ Will find "c:\user\piet\_vimrc" and the runtime files in "e:\vim\vim54".
|
||||
|
||||
See |$VIM| and |$VIMRUNTIME| for more information.
|
||||
|
||||
Under Windows 95, you can set $VIM in your C:\autoexec.bat file. For
|
||||
example: >
|
||||
set VIM=D:\vim
|
||||
Under Windows NT, you can set environment variables for each user separately
|
||||
under "Start/Settings/Control Panel->System", or through the properties in the
|
||||
menu of "My Computer", under the Environment Tab.
|
||||
You can set environment variables for each user separately under
|
||||
"Start/Settings/Control Panel->System", or through the properties in the menu
|
||||
of "My Computer", under the Environment Tab.
|
||||
|
||||
==============================================================================
|
||||
2. Using backslashes *dos-backslash*
|
||||
@@ -246,16 +243,6 @@ the CTRL-C until it tries to read a key.
|
||||
==============================================================================
|
||||
8. Temp files *dos-temp-files*
|
||||
|
||||
Only for the 16 bit and 32 bit DOS version:
|
||||
Vim puts temporary files (for filtering) in the first of these directories
|
||||
that exists and in which Vim can create a file:
|
||||
$TMP
|
||||
$TEMP
|
||||
C:\TMP
|
||||
C:\TEMP
|
||||
current directory
|
||||
|
||||
For the Win32 version (both console and GUI):
|
||||
Vim uses standard Windows functions to obtain a temporary file name (for
|
||||
filtering). The first of these directories that exists and in which Vim can
|
||||
create a file is used:
|
||||
@@ -266,10 +253,10 @@ create a file is used:
|
||||
==============================================================================
|
||||
9. Shell option default *dos-shell*
|
||||
|
||||
The default for the 'sh' ('shell') option is "command.com" on Windows 95 and
|
||||
"cmd.exe" on Windows NT. If SHELL is defined, Vim uses SHELL instead, and if
|
||||
SHELL is not defined but COMSPEC is, Vim uses COMSPEC. Vim starts external
|
||||
commands with "<shell> /c <command_name>". Typing CTRL-Z starts a new command
|
||||
The default for the 'sh' ('shell') option is "cmd.exe" on Windows.
|
||||
If SHELL is defined, Vim uses SHELL instead, and if SHELL is not defined
|
||||
but COMSPEC is, Vim uses COMSPEC. Vim starts external commands with
|
||||
"<shell> /c <command_name>". Typing CTRL-Z starts a new command
|
||||
subshell. Return to Vim with "exit". |'shell'| |CTRL-Z|
|
||||
|
||||
If you are running a third-party shell, you may need to set the
|
||||
|
@@ -7,17 +7,15 @@
|
||||
*win32* *Win32* *MS-Windows*
|
||||
This file documents the idiosyncrasies of the Win32 version of Vim.
|
||||
|
||||
The Win32 version of Vim works on Windows NT, XP, Vista and Windows 7.
|
||||
The Win32 version of Vim works on Windows XP, Vista and Windows 7.
|
||||
There are both console and GUI versions.
|
||||
|
||||
The 32 bit version also runs on 64 bit MS-Windows systems.
|
||||
|
||||
1. Known problems |win32-problems|
|
||||
2. Startup |win32-startup|
|
||||
3. Restore screen contents |win32-restore|
|
||||
4. Using the mouse |win32-mouse|
|
||||
5. Running under Windows 3.1 |win32-win3.1|
|
||||
6. Win32 mini FAQ |win32-faq|
|
||||
3. Using the mouse |win32-mouse|
|
||||
4. Win32 mini FAQ |win32-faq|
|
||||
|
||||
Additionally, there are a number of common Win32 and DOS items:
|
||||
File locations |dos-locations|
|
||||
@@ -34,7 +32,6 @@ Win32 GUI |gui-w32|
|
||||
|
||||
Credits:
|
||||
The Win32 version was written by George V. Reilly <george@reilly.org>.
|
||||
The original Windows NT port was done by Roger Knobbe <RogerK@wonderware.com>.
|
||||
The GUI version was made by George V. Reilly and Robert Webb.
|
||||
|
||||
==============================================================================
|
||||
@@ -79,14 +76,7 @@ make "!xxd" work, as it is in the Tools menu. And it also means that when
|
||||
executable() returns 1 the executable can actually be executed.
|
||||
|
||||
==============================================================================
|
||||
3. Restore screen contents *win32-restore*
|
||||
|
||||
When 'restorescreen' is set (which is the default), Vim will restore the
|
||||
original contents of the console when exiting or when executing external
|
||||
commands. If you don't want this, use ":set nors". |'restorescreen'|
|
||||
|
||||
==============================================================================
|
||||
4. Using the mouse *win32-mouse*
|
||||
3. Using the mouse *win32-mouse*
|
||||
|
||||
The Win32 version of Vim supports using the mouse. If you have a two-button
|
||||
mouse, the middle button can be emulated by pressing both left and right
|
||||
@@ -98,35 +88,7 @@ When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of
|
||||
the console.
|
||||
|
||||
==============================================================================
|
||||
5. Running under Windows 3.1 *win32-win3.1*
|
||||
|
||||
*win32s* *windows-3.1*
|
||||
There is a special version of Gvim that runs under Windows 3.1 and 3.11. You
|
||||
need the gvim.exe that was compiled with Visual C++ 4.1.
|
||||
|
||||
To run the Win32 version under Windows 3.1, you need to install Win32s. You
|
||||
might have it already from another Win32 application which you have installed.
|
||||
If Vim doesn't seem to be running properly, get the latest version: 1.30c.
|
||||
You can find it at:
|
||||
|
||||
http://support.microsoft.com/download/support/mslfiles/pw1118.exe
|
||||
|
||||
(Microsoft moved it again, we don't know where it is now :-( ).
|
||||
|
||||
The reason for having two versions of gvim.exe is that the Win32s version was
|
||||
compiled with VC++ 4.1. This is the last version of VC++ that supports Win32s
|
||||
programs. VC++ 5.0 is better, so that one was used for the Win32 version.
|
||||
Apart from that, there is no difference between the programs. If you are in a
|
||||
mixed environment, you can use the gvim.exe for Win32s on both.
|
||||
|
||||
The Win32s version works the same way as the Win32 version under 95/NT. When
|
||||
running under Win32s the following differences apply:
|
||||
- You cannot use long file names, because Windows 3.1 doesn't support them!
|
||||
- When executing an external command, it doesn't return an exit code. After
|
||||
doing ":make" you have to do ":cn" yourself.
|
||||
|
||||
==============================================================================
|
||||
6. Win32 mini FAQ *win32-faq*
|
||||
4. Win32 mini FAQ *win32-faq*
|
||||
|
||||
Q. How do I change the font?
|
||||
A. In the GUI version, you can use the 'guifont' option. Example: >
|
||||
@@ -134,14 +96,6 @@ A. In the GUI version, you can use the 'guifont' option. Example: >
|
||||
< In the console version, you need to set the font of the console itself.
|
||||
You cannot do this from within Vim.
|
||||
|
||||
Q. How do I type dead keys on Windows NT?
|
||||
A. Dead keys work on NT 3.51. Just type them as you would in any other
|
||||
application.
|
||||
On NT 4.0, you need to make sure that the default locale (set in the
|
||||
Keyboard part of the Control Panel) is the same as the currently active
|
||||
locale. Otherwise the NT code will get confused and crash! This is a NT
|
||||
4.0 problem, not really a Vim problem.
|
||||
|
||||
Q. I'm using Vim to edit a symbolically linked file on a Unix NFS file server.
|
||||
When I write the file, Vim does not "write through" the symlink. Instead,
|
||||
it deletes the symbolic link and creates a new file in its place. Why?
|
||||
@@ -176,28 +130,6 @@ A. Basically what you need is to put a tee program that will copy its input
|
||||
:set shellpipe=\|\ tee
|
||||
< to your _vimrc.
|
||||
|
||||
Q. I'm storing files on a remote machine that works with VisionFS, and files
|
||||
disappear!
|
||||
A. VisionFS can't handle certain dot (.) three letter extension file names.
|
||||
SCO declares this behavior required for backwards compatibility with 16bit
|
||||
DOS/Windows environments. The two commands below demonstrate the behavior:
|
||||
>
|
||||
echo Hello > file.bat~
|
||||
dir > file.bat
|
||||
<
|
||||
The result is that the "dir" command updates the "file.bat~" file, instead
|
||||
of creating a new "file.bat" file. This same behavior is exhibited in Vim
|
||||
when editing an existing file named "foo.bat" because the default behavior
|
||||
of Vim is to create a temporary file with a '~' character appended to the
|
||||
name. When the file is written, it winds up being deleted.
|
||||
|
||||
Solution: Add this command to your _vimrc file: >
|
||||
:set backupext=.temporary
|
||||
|
||||
Q. How do I change the blink rate of the cursor?
|
||||
A. You can't! This is a limitation of the NT console. NT 5.0 is reported to
|
||||
be able to set the blink rate for all console windows at the same time.
|
||||
|
||||
*:!start*
|
||||
Q. How can I run an external command or program asynchronously?
|
||||
A. When using :! to run an external command, you can run it with "start": >
|
||||
@@ -240,28 +172,6 @@ A. You have two possible solutions depending on what you want:
|
||||
< The first command runs notepad minimized and the second one runs it
|
||||
normally.
|
||||
|
||||
Q. I'm using Win32s, and when I try to run an external command like "make",
|
||||
Vim doesn't wait for it to finish! Help!
|
||||
A. The problem is that a 32-bit application (Vim) can't get notification from
|
||||
Windows that a 16-bit application (your DOS session) has finished. Vim
|
||||
includes a work-around for this, but you must set up your DOS commands to
|
||||
run in a window, not full-screen. Unfortunately the default when you
|
||||
install Windows is full-screen. To change this:
|
||||
1) Start PIF editor (in the Main program group).
|
||||
2) Open the file "_DEFAULT.PIF" in your Windows directory.
|
||||
3) Changes the display option from "Full Screen" to "Windowed".
|
||||
4) Save and exit.
|
||||
|
||||
To test, start Vim and type >
|
||||
:!dir C:\<CR>".
|
||||
< You should see a DOS box window appear briefly with the directory listing.
|
||||
|
||||
Q. I use Vim under Win32s and NT. In NT, I can define the console to default to
|
||||
50 lines, so that I get a 80x50 shell when I ':sh'. Can I do the same in
|
||||
W3.1x, or am I stuck with 80x25?
|
||||
A. Edit SYSTEM.INI and add 'ScreenLines=50' to the [NonWindowsApp] section. DOS
|
||||
prompts and external DOS commands will now run in a 50-line window.
|
||||
|
||||
*windows-icon*
|
||||
Q. I don't like the Vim icon, can I change it?
|
||||
A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
|
||||
|
@@ -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|
|
||||
|
||||
*N*
|
||||
@@ -129,7 +131,7 @@ gD Goto global Declaration. When the cursor is on a
|
||||
|
||||
*CTRL-C*
|
||||
CTRL-C Interrupt current (search) command. Use CTRL-Break on
|
||||
MS-DOS |dos-CTRL-Break|.
|
||||
Windows |dos-CTRL-Break|.
|
||||
In Normal mode, any pending command is aborted.
|
||||
|
||||
*:noh* *:nohlsearch*
|
||||
@@ -1050,7 +1052,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'.
|
||||
@@ -1082,7 +1087,7 @@ x A single character, with no special meaning, matches itself
|
||||
*[:backspace:]* [:backspace:] the <BS> character
|
||||
The brackets in character class expressions are additional to the
|
||||
brackets delimiting a collection. For example, the following is a
|
||||
plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
|
||||
plausible pattern for a Unix filename: "[-./[:alnum:]_~]\+" That is,
|
||||
a list of at least one character, each of which is either '-', '.',
|
||||
'/', alphabetic, numeric, '_' or '~'.
|
||||
These items only work for 8-bit characters.
|
||||
|
@@ -1,482 +0,0 @@
|
||||
*pi_getscript.txt* For Vim version 7.0. Last change: 2013 Nov 29
|
||||
>
|
||||
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
|
||||
<
|
||||
Authors: Charles E. Campbell <NdrOchip@ScampbellPfamilyA.Mbiz>
|
||||
(remove NOSPAM from the email address)
|
||||
*GetLatestVimScripts-copyright*
|
||||
Copyright: (c) 2004-2012 by Charles E. Campbell *glvs-copyright*
|
||||
The VIM LICENSE (see |copyright|) applies to the files in this
|
||||
package, including getscriptPlugin.vim, getscript.vim,
|
||||
GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript"
|
||||
instead of "VIM". Like anything else that's free, getscript and its
|
||||
associated files are provided *as is* and comes with no warranty of
|
||||
any kind, either expressed or implied. No guarantees of
|
||||
merchantability. No guarantees of suitability for any purpose. 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. Use at your own risk!
|
||||
|
||||
Getscript is a plugin that simplifies retrieval of the latest versions of the
|
||||
scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will
|
||||
then use the <GetLatestVimScripts.dat> (see |GetLatestVimScripts_dat|) file to
|
||||
get the latest versions of scripts listed therein from http://vim.sf.net/.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *glvs-contents* *glvs* *getscript*
|
||||
*GetLatestVimScripts*
|
||||
|
||||
1. Contents........................................: |glvs-contents|
|
||||
2. GetLatestVimScripts -- Getting Started..........: |glvs-install|
|
||||
3. GetLatestVimScripts Usage.......................: |glvs-usage|
|
||||
4. GetLatestVimScripts Data File...................: |glvs-data|
|
||||
5. GetLatestVimScripts Friendly Plugins............: |glvs-plugins|
|
||||
6. GetLatestVimScripts AutoInstall.................: |glvs-autoinstall|
|
||||
7. GetLatestViMScripts Options.....................: |glvs-options|
|
||||
8. GetLatestVimScripts Algorithm...................: |glvs-alg|
|
||||
9. GetLatestVimScripts History.....................: |glvs-hist|
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. GetLatestVimScripts -- Getting Started *getscript-start*
|
||||
*getlatestvimscripts-install*
|
||||
|
||||
VERSION FROM VIM DISTRIBUTION *glvs-dist-install*
|
||||
|
||||
Vim 7.0 does not include the GetLatestVimScripts.dist file which
|
||||
serves as an example and a template. So, you'll need to create
|
||||
your own! See |GetLatestVimScripts_dat|.
|
||||
|
||||
VERSION FROM VIM SF NET *glvs-install*
|
||||
|
||||
NOTE: The last step, that of renaming/moving the GetLatestVimScripts.dist
|
||||
file, is for those who have just downloaded GetLatestVimScripts.tar.bz2 for
|
||||
the first time.
|
||||
|
||||
The GetLatestVimScripts.dist file serves as an example and a template for your
|
||||
own personal list. Feel free to remove all the scripts mentioned within it;
|
||||
the "important" part of it is the first two lines.
|
||||
|
||||
Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
|
||||
|
||||
1. if compressed: gunzip getscript.vba.gz
|
||||
2. Unix:
|
||||
vim getscript.vba
|
||||
:so %
|
||||
:q
|
||||
cd ~/.vim/GetLatest
|
||||
mv GetLatestVimScripts.dist GetLatestVimScripts.dat
|
||||
(edit GetLatestVimScripts.dat to install your own personal
|
||||
list of desired plugins -- see |GetLatestVimScripts_dat|)
|
||||
|
||||
3. Windows:
|
||||
vim getscript.vba
|
||||
:so %
|
||||
:q
|
||||
cd **path-to-vimfiles**/GetLatest
|
||||
mv GetLatestVimScripts.dist GetLatestVimScripts.dat
|
||||
(edit GetLatestVimScripts.dat to install your own personal
|
||||
list of desired plugins -- see |GetLatestVimScripts_dat|)
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. GetLatestVimScripts Usage *glvs-usage* *:GLVS*
|
||||
|
||||
Unless it has been defined elsewhere, >
|
||||
|
||||
:GLVS
|
||||
|
||||
will invoke GetLatestVimScripts(). If some other plugin has defined that
|
||||
command, then you may type
|
||||
>
|
||||
:GetLatestVimScripts
|
||||
<
|
||||
The script will attempt to update and, if permitted, will automatically
|
||||
install scripts from http://vim.sourceforge.net/. To do so it will peruse a
|
||||
file,
|
||||
>
|
||||
.vim/GetLatest/GetLatestVimScripts.dat (unix)
|
||||
<
|
||||
or >
|
||||
..wherever..\vimfiles\GetLatest\GetLatestVimScripts.dat (windows)
|
||||
(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
|
||||
directory (see |glvs-plugins|).
|
||||
|
||||
Scripts which have been downloaded will appear in the
|
||||
~/.vim/GetLatest (unix) or ..wherever..\vimfiles\GetLatest (windows)
|
||||
subdirectory. GetLatestVimScripts will attempt to automatically
|
||||
install them if you have the following line in your <.vimrc>: >
|
||||
|
||||
let g:GetLatestVimScripts_allowautoinstall=1
|
||||
|
||||
The <GetLatestVimScripts.dat> file will be automatically be updated to
|
||||
reflect the latest version of script(s) so downloaded.
|
||||
(also see |glvs-options|)
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. GetLatestVimScripts Data File *getscript-data* *glvs-data*
|
||||
*:GetLatestVimScripts_dat*
|
||||
The data file <GetLatestVimScripts.dat> must have for its first two lines
|
||||
the following text:
|
||||
>
|
||||
ScriptID SourceID Filename
|
||||
--------------------------
|
||||
<
|
||||
Following those two lines are three columns; the first two are numeric
|
||||
followed by a text column. The GetLatest/GetLatestVimScripts.dist file
|
||||
contains an example of such a data file. Anything following a #... is
|
||||
ignored, so you may embed comments in the file.
|
||||
|
||||
The first number on each line gives the script's ScriptID. When you're about
|
||||
to use a web browser to look at scripts on http://vim.sf.net/, just before you
|
||||
click on the script's link, you'll see a line resembling
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
|
||||
download the associated page, and is assigned by vim.sf.net itself
|
||||
during initial uploading of the plugin.
|
||||
|
||||
The second number on each line gives the script's SourceID. The SourceID
|
||||
records the count of uploaded scripts as determined by vim.sf.net; hence it
|
||||
serves to indicate "when" a script was uploaded. Setting the SourceID to 1
|
||||
insures that GetLatestVimScripts will assume that the script it has is
|
||||
out-of-date.
|
||||
|
||||
The SourceID is extracted by GetLatestVimScripts from the script's page on
|
||||
vim.sf.net; whenever it is greater than the one stored in the
|
||||
GetLatestVimScripts.dat file, the script will be downloaded
|
||||
(see |GetLatestVimScripts_dat|).
|
||||
|
||||
If your script's author has included a special comment line in his/her plugin,
|
||||
the plugin itself will be used by GetLatestVimScripts to build your
|
||||
<GetLatestVimScripts.dat> file, including any dependencies on other scripts it
|
||||
may have. As an example, consider: >
|
||||
|
||||
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
|
||||
|
||||
This comment line tells getscript.vim to check vimscript #884 and that the
|
||||
script is automatically installable. Getscript will also use this line to
|
||||
help build the GetLatestVimScripts.dat file, by including a line such as: >
|
||||
|
||||
884 1 :AutoInstall: AutoAlign.vim
|
||||
<
|
||||
assuming that such a line isn't already in GetLatestVimScripts.dat file.
|
||||
See |glvs-plugins| for more. Thus, GetLatestVimScripts thus provides a
|
||||
comprehensive ability to keep your plugins up-to-date!
|
||||
|
||||
In summary:
|
||||
|
||||
* Optionally tell getscript that it is allowed to build/append a
|
||||
GetLatestVimScripts.dat file based upon already installed plugins: >
|
||||
let g:GetLatestVimScripts_allowautoinstall=1
|
||||
<
|
||||
* A line such as >
|
||||
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
|
||||
< in an already-downloaded plugin constitutes the concurrence of the
|
||||
plugin author that getscript may do AutoInstall. Not all plugins
|
||||
may be AutoInstall-able, and the plugin's author is best situated
|
||||
to know whether or not his/her plugin will AutoInstall properly.
|
||||
|
||||
* A line such as >
|
||||
884 1 :AutoInstall: AutoAlign.vim
|
||||
< in your GetLatestVimScripts.dat file constitutes your permission
|
||||
to getscript to do AutoInstall. AutoInstall requires both your
|
||||
and the plugin author's permission. See |GetLatestVimScripts_dat|.
|
||||
|
||||
|
||||
*GetLatestVimScripts_dat*
|
||||
As an example of a <GetLatestVimScripts.dat> file:
|
||||
>
|
||||
ScriptID SourceID Filename
|
||||
--------------------------
|
||||
294 1 :AutoInstall: Align.vim
|
||||
120 2 Decho.vim
|
||||
40 3 DrawIt.tar.gz
|
||||
451 4 EasyAccents.vim
|
||||
195 5 engspchk.vim
|
||||
642 6 GetLatestVimScripts.vim
|
||||
489 7 Manpageview.vim
|
||||
<
|
||||
Note: the first two lines are required, but essentially act as comments.
|
||||
|
||||
|
||||
==============================================================================
|
||||
5. GetLatestVimScripts Friendly Plugins *getscript-plugins* *glvs-plugins*
|
||||
|
||||
(this section is for plugin authors)~
|
||||
|
||||
If a plugin author includes the following comment anywhere in their plugin,
|
||||
GetLatestVimScripts will find it and use it to automatically build the user's
|
||||
GetLatestVimScripts.dat files:
|
||||
>
|
||||
src_id
|
||||
v
|
||||
" GetLatestVimScripts: ### ### yourscriptname
|
||||
^
|
||||
scriptid
|
||||
<
|
||||
As an author, you should include such a line in to refer to your own script
|
||||
plus any additional lines describing any plugin dependencies it may have.
|
||||
Same format, of course!
|
||||
|
||||
If your command is auto-installable (see |glvs-autoinstall|), and most scripts
|
||||
are, then you may include :AutoInstall: just before "yourscriptname":
|
||||
>
|
||||
src_id
|
||||
v
|
||||
" GetLatestVimScripts: ### ### :AutoInstall: yourscriptname
|
||||
^
|
||||
scriptid
|
||||
<
|
||||
NOTE: The :AutoInstall: feature requires both the plugin author's and~
|
||||
the user's permission to operate!~
|
||||
|
||||
GetLatestVimScripts commands for those scripts are then appended, if not
|
||||
already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is
|
||||
a relatively painless way to automate the acquisition of any scripts your
|
||||
plugins depend upon.
|
||||
|
||||
Now, as an author, you probably don't want GetLatestVimScripts to download
|
||||
your own scripts atop your own copy, thereby overwriting your not-yet-released
|
||||
hard work. GetLatestVimScripts provides a solution for this: put
|
||||
>
|
||||
0 0 yourscriptname
|
||||
<
|
||||
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will skip
|
||||
examining the "yourscriptname" scripts for those GetLatestVimScripts comment
|
||||
lines. As a result, those lines won't be inadvertently installed into your
|
||||
<GetLatestVimScripts.dat> file and subsequently used to download your own
|
||||
scripts. This is especially important to do if you've included the
|
||||
:AutoInstall: option.
|
||||
|
||||
Be certain to use the same "yourscriptname" in the "0 0 yourscriptname" line
|
||||
as you've used in your GetLatestVimScripts comment!
|
||||
|
||||
|
||||
==============================================================================
|
||||
6. GetLatestVimScripts AutoInstall *getscript-autoinstall*
|
||||
*glvs-autoinstall*
|
||||
|
||||
GetLatestVimScripts now supports "AutoInstall". Not all scripts are
|
||||
supportive of auto-install, as they may have special things you need to do to
|
||||
install them (please refer to the script's "install" directions). On the
|
||||
other hand, most scripts will be auto-installable.
|
||||
|
||||
To let GetLatestVimScripts do an autoinstall, the data file's comment field
|
||||
should begin with (surrounding blanks are ignored): >
|
||||
|
||||
:AutoInstall:
|
||||
<
|
||||
Both colons are needed, and it should begin the comment (yourscriptname)
|
||||
field.
|
||||
|
||||
One may prevent any autoinstalling by putting the following line in your
|
||||
<.vimrc>: >
|
||||
|
||||
let g:GetLatestVimScripts_allowautoinstall= 0
|
||||
<
|
||||
With :AutoInstall: enabled, as it is by default, files which end with
|
||||
|
||||
---.tar.bz2 : decompressed & untarred in .vim/ directory
|
||||
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vim.bz2 : decompressed & moved into .vim/plugin directory
|
||||
---.tar.gz : decompressed & untarred in .vim/ directory
|
||||
---.vba.gz : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vim.gz : decompressed & moved into .vim/plugin directory
|
||||
---.vba : unzipped in .vim/ directory
|
||||
---.vim : moved to .vim/plugin directory
|
||||
---.zip : unzipped in .vim/ directory
|
||||
|
||||
and which merely need to have their components placed by the untar/gunzip or
|
||||
move-to-plugin-directory process should be auto-installable. Vimballs, of
|
||||
course, should always be auto-installable.
|
||||
|
||||
When is a script not auto-installable? Let me give an example:
|
||||
|
||||
.vim/after/syntax/blockhl.vim
|
||||
|
||||
The <blockhl.vim> script provides block highlighting for C/C++ programs; it is
|
||||
available at:
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=104
|
||||
|
||||
Currently, vim's after/syntax only supports by-filetype scripts (in
|
||||
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install would
|
||||
possibly overwrite the current user's after/syntax/c.vim file.
|
||||
|
||||
In my own case, I use <aftersyntax.vim> (renamed to after/syntax/c.vim) to
|
||||
allow a after/syntax/c/ directory:
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=1023
|
||||
|
||||
The script allows multiple syntax files to exist separately in the
|
||||
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and build an
|
||||
appropriate tarball for auto-install because of the potential for the
|
||||
after/syntax/c.vim contained in it to overwrite a user's c.vim.
|
||||
|
||||
|
||||
==============================================================================
|
||||
7. GetLatestVimScripts Options *glvs-options*
|
||||
>
|
||||
g:GetLatestVimScripts_wget
|
||||
< default= "wget"
|
||||
This variable holds the name of the command for obtaining
|
||||
scripts.
|
||||
>
|
||||
g:GetLatestVimScripts_options
|
||||
< default= "-q -O"
|
||||
This variable holds the options to be used with the
|
||||
g:GetLatestVimScripts_wget command.
|
||||
>
|
||||
g:GetLatestVimScripts_allowautoinstall
|
||||
< default= 1
|
||||
This variable indicates whether GetLatestVimScripts is allowed
|
||||
to attempt to automatically install scripts. Furthermore, the
|
||||
plugin author has to have explicitly indicated that his/her
|
||||
plugin is automatically installable (via the :AutoInstall:
|
||||
keyword in the GetLatestVimScripts comment line).
|
||||
>
|
||||
g:GetLatestVimScripts_autoinstalldir
|
||||
< default= $HOME/.vim (linux)
|
||||
default= $HOME/vimfiles (windows)
|
||||
Override where :AutoInstall: scripts will be installed.
|
||||
Doesn't override vimball installation.
|
||||
>
|
||||
g:GetLatestVimScripts_scriptaddr
|
||||
< default='http://vim.sourceforge.net/script.php?script_id='
|
||||
Override this if your system needs
|
||||
... ='http://vim.sourceforge.net/script/script.php?script_id='
|
||||
|
||||
==============================================================================
|
||||
8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg*
|
||||
|
||||
The Vim sourceforge page dynamically creates a page by keying off of the
|
||||
so-called script-id. Within the webpage of
|
||||
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
is a line specifying the latest source-id (src_id). The source identifier
|
||||
numbers are always increasing, hence if the src_id is greater than the one
|
||||
recorded for the script in GetLatestVimScripts then it's time to download a
|
||||
newer copy of that script.
|
||||
|
||||
GetLatestVimScripts will then download the script and update its internal
|
||||
database of script ids, source ids, and scriptnames.
|
||||
|
||||
The AutoInstall process will:
|
||||
|
||||
Move the file from GetLatest/ to the following directory
|
||||
Unix : $HOME/.vim
|
||||
Windows: $HOME\vimfiles
|
||||
if the downloaded file ends with ".bz2"
|
||||
bunzip2 it
|
||||
else if the downloaded file ends with ".gz"
|
||||
gunzip it
|
||||
if the resulting file ends with ".zip"
|
||||
unzip it
|
||||
else if the resulting file ends with ".tar"
|
||||
tar -oxvf it
|
||||
else if the resulting file ends with ".vim"
|
||||
move it to the plugin subdirectory
|
||||
|
||||
|
||||
==============================================================================
|
||||
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
|
||||
|
||||
v36 Apr 22, 2013 : * (glts) suggested use of plugin/**/*.vim instead of
|
||||
plugin/*.vim in globpath() call.
|
||||
* (Andy Wokula) got warning message when setting
|
||||
g:loaded_getscriptPlugin
|
||||
v35 Apr 07, 2012 : * (MengHuan Yu) pointed out that the script url has
|
||||
changed (somewhat). However, it doesn't work, and
|
||||
the original one does (under Linux). I'll make it
|
||||
yet-another-option.
|
||||
v34 Jun 23, 2011 : * handles additional decompression options for tarballs
|
||||
(tgz taz tbz txz)
|
||||
v33 May 31, 2011 : * using fnameescape() instead of escape()
|
||||
* *.xz support
|
||||
v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression
|
||||
v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript
|
||||
* (David Schaefer) the acd option interferes with vimballs
|
||||
Solution: bypass the acd option
|
||||
v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will
|
||||
issue an error message if it is not supported
|
||||
v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that
|
||||
getscriptPlugin.vim was setting it but not restoring it.
|
||||
v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin
|
||||
interface, register-a bypass
|
||||
Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids
|
||||
creating pop-up windows
|
||||
v24 Apr 16, 2007 : * removed save&restore of the fo option during script
|
||||
loading
|
||||
v23 Nov 03, 2006 : * ignores comments (#...)
|
||||
* handles vimballs
|
||||
v22 Oct 13, 2006 : * supports automatic use of curl if wget is not
|
||||
available
|
||||
v21 May 01, 2006 : * now takes advantage of autoloading.
|
||||
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
|
||||
unzip needs the -o flag to overwrite.
|
||||
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
|
||||
script! Fixed.
|
||||
v18 Mar 21, 2005 : * bugfix to automatic database construction
|
||||
* bugfix - nowrapscan caused an error
|
||||
(tnx to David Green for the fix)
|
||||
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in
|
||||
:AutoInstall:s, even though its o/s is windows
|
||||
Apr 01, 2005 * when downloading errors occurred, GLVS was
|
||||
terminating early. It now just goes on to trying
|
||||
the next script (after trying three times to
|
||||
download a script description page)
|
||||
Apr 20, 2005 * bugfix - when a failure to download occurred,
|
||||
GetLatestVimScripts would stop early and claim that
|
||||
everything was current. Fixed.
|
||||
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
|
||||
defaults to 1, can be used to prevent all
|
||||
:AutoInstall:
|
||||
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
|
||||
* fixed bug with :AutoInstall: use of helptags
|
||||
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
|
||||
always preventing downloads (just usually). Fixed.
|
||||
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
|
||||
s:dotvim. Fixed.
|
||||
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
|
||||
is zero. Useful for script authors; that way their
|
||||
own GetLatestVimScripts activity won't overwrite
|
||||
their scripts.
|
||||
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
|
||||
was intended only for testing. Removed, now works.
|
||||
* :AutoInstall: implemented
|
||||
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
|
||||
* :GetLatestVimScripts command
|
||||
* (runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
now holds scripts that need updating
|
||||
v10 Apr 19, 2004 : * moved history from script to doc
|
||||
v9 Jan 23, 2004 : windows (win32/win16/win95) will use
|
||||
double quotes ("") whereas other systems will use
|
||||
single quotes ('') around the urls in calls via wget
|
||||
v8 Dec 01, 2003 : makes three tries at downloading
|
||||
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="
|
||||
not found in downloaded webpage
|
||||
Uses t_ti, t_te, and rs to make progress visible
|
||||
v6 Aug 06, 2003 : final status messages now display summary of work
|
||||
( "Downloaded someqty scripts" or
|
||||
"Everything was current")
|
||||
Now GetLatestVimScripts is careful about downloading
|
||||
GetLatestVimScripts.vim itself!
|
||||
(goes to <NEW_GetLatestVimScripts.vim>)
|
||||
v5 Aug 04, 2003 : missing an endif near bottom
|
||||
v4 Jun 17, 2003 : redraw! just before each "considering" message
|
||||
v3 May 27, 2003 : Protects downloaded files from errant shell
|
||||
expansions with single quotes: '...'
|
||||
v2 May 14, 2003 : extracts name of item to be obtained from the
|
||||
script file. Uses it instead of comment field
|
||||
for output filename; comment is used in the
|
||||
"considering..." line and is now just a comment!
|
||||
* Fixed a bug: a string-of-numbers is not the
|
||||
same as a number, so I added zero to them
|
||||
and they became numbers. Fixes comparison.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:fdm=marker
|
@@ -677,7 +677,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
|
||||
|
@@ -291,6 +291,100 @@ 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 on one buffer, further
|
||||
buffers will not be visited.
|
||||
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.
|
||||
Note: While this command is executing, the Syntax
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
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.
|
||||
< When the current file can't be |abandon|ed and the [!]
|
||||
is not present, the command fails.
|
||||
When an error is detected on one buffer, further
|
||||
buffers will not be visited.
|
||||
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.
|
||||
Note: While this command is executing, the Syntax
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|
||||
|:cdo|, |:ldo| and |:lfdo|.
|
||||
|
||||
*: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.
|
||||
< When the current file can't be |abandon|ed and the [!]
|
||||
is not present, the command fails.
|
||||
When an error is detected on one buffer, further
|
||||
buffers will not be visited.
|
||||
The last buffer (or where an error occurred) becomes
|
||||
the current buffer.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
Only valid entries in the location list are used.
|
||||
Note: While this command is executing, the Syntax
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|
||||
|:cdo|, |:cfdo| and |:lfdo|.
|
||||
|
||||
*: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.
|
||||
< When the current file can't be |abandon|ed and the [!]
|
||||
is not present, the command fails.
|
||||
When an error is detected on one buffer, further
|
||||
buffers will not be visited.
|
||||
The last buffer (or where an error occurred) becomes
|
||||
the current buffer.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
Only valid entries in the location list are used.
|
||||
Note: While this command is executing, the Syntax
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|
||||
|:cdo|, |:ldo| and |:cfdo|.
|
||||
|
||||
=============================================================================
|
||||
2. The error window *quickfix-window*
|
||||
@@ -493,11 +587,11 @@ or simpler >
|
||||
"$*" can be given multiple times, for example: >
|
||||
:set makeprg=gcc\ -o\ $*\ $*
|
||||
|
||||
The 'shellpipe' option defaults to ">" for MS-DOS and Win32. This means that
|
||||
the output of the compiler is saved in a file and not shown on the screen
|
||||
directly. For Unix "| tee" is used. The compiler output is shown on the
|
||||
screen and saved in a file the same time. Depending on the shell used "|&
|
||||
tee" or "2>&1| tee" is the default, so stderr output will be included.
|
||||
The 'shellpipe' option defaults to ">" on Windows. This means that the output
|
||||
of the compiler is saved in a file and not shown on the screen directly. For
|
||||
Unix "| tee" is used. The compiler output is shown on the screen and saved in
|
||||
a file the same time. Depending on the shell used "|& tee" or "2>&1| tee" is
|
||||
the default, so stderr output will be included.
|
||||
|
||||
If 'shellpipe' is empty, the {errorfile} part will be omitted. This is useful
|
||||
for compilers that write to an errorfile themselves.
|
||||
@@ -905,9 +999,9 @@ normally happens by matching following characters and items. When nothing is
|
||||
following the rest of the line is matched. If "%f" is followed by a '%' or a
|
||||
backslash, it will look for a sequence of 'isfname' characters.
|
||||
|
||||
On MS-DOS and MS-Windows a leading "C:" will be included in "%f", even when
|
||||
using "%f:". This means that a file name which is a single alphabetical
|
||||
letter will not be detected.
|
||||
On Windows a leading "C:" will be included in "%f", even when using "%f:".
|
||||
This means that a file name which is a single alphabetical letter will not be
|
||||
detected.
|
||||
|
||||
The "%p" conversion is normally followed by a "^". It's used for compilers
|
||||
that output a line like: >
|
||||
|
@@ -730,13 +730,10 @@ Short explanation of each option: *option-list*
|
||||
'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
|
||||
'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
|
||||
'imsearch' 'ims' use :lmap or IM when typing a search pattern
|
||||
'imstatusfunc' 'imsf' function to obtain X input method status
|
||||
'include' 'inc' pattern to be used to find an include file
|
||||
'includeexpr' 'inex' expression used to process an include line
|
||||
'incsearch' 'is' highlight match while typing search pattern
|
||||
@@ -820,7 +817,6 @@ Short explanation of each option: *option-list*
|
||||
'relativenumber' 'rnu' show relative line number in front of each line
|
||||
'remap' allow mappings to work recursively
|
||||
'report' threshold for reporting nr. of lines changed
|
||||
'restorescreen' 'rs' Win32: restore screen when exiting
|
||||
'revins' 'ri' inserting characters will work backwards
|
||||
'rightleft' 'rl' window is right-to-left oriented
|
||||
'rightleftcmd' 'rlc' commands for which editing works right-to-left
|
||||
@@ -874,7 +870,6 @@ Short explanation of each option: *option-list*
|
||||
'suffixes' 'su' suffixes that are ignored with multiple match
|
||||
'suffixesadd' 'sua' suffixes added when searching for a file
|
||||
'swapfile' 'swf' whether to use a swapfile for a buffer
|
||||
'swapsync' 'sws' how to sync the swap file
|
||||
'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
|
||||
@@ -985,11 +980,9 @@ Short explanation of each option: *option-list*
|
||||
|g_CTRL-G| g CTRL-G show cursor column, line, and character
|
||||
position
|
||||
|CTRL-C| CTRL-C during searches: Interrupt the search
|
||||
|dos-CTRL-Break| CTRL-Break MS-DOS: during searches: Interrupt the search
|
||||
|dos-CTRL-Break| CTRL-Break Windows: during searches: Interrupt the search
|
||||
|<Del>| <Del> while entering a count: delete last character
|
||||
|:version| :ve[rsion] show version information
|
||||
|:mode| :mode N MS-DOS: set screen mode to N (number, C80,
|
||||
C4350, etc.)
|
||||
|:normal| :norm[al][!] {commands}
|
||||
execute Normal mode commands
|
||||
|Q| Q switch to "Ex" mode
|
||||
|
@@ -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
|
||||
|
@@ -60,7 +60,7 @@ Disadvantages:
|
||||
If you want to put swap files in a fixed place, put a command resembling the
|
||||
following ones in your vimrc:
|
||||
:set dir=~/tmp (for Unix)
|
||||
:set dir=c:\\tmp (for MS-DOS and Win32)
|
||||
:set dir=c:\\tmp (for Windows)
|
||||
This is also very handy when editing files on floppy. Of course you will have
|
||||
to create that "tmp" directory for this to work!
|
||||
|
||||
@@ -92,10 +92,7 @@ changed, not when you only moved around. The reason why it is not kept up to
|
||||
date all the time is that this would slow down normal work too much. You can
|
||||
change the 200 character count with the 'updatecount' option. You can set
|
||||
the time with the 'updatetime' option. The time is given in milliseconds.
|
||||
After writing to the swap file Vim syncs the file to disk. This takes some
|
||||
time, especially on busy Unix systems. If you don't want this you can set the
|
||||
'swapsync' option to an empty string. The risk of losing work becomes bigger
|
||||
though.
|
||||
After writing to the swap file Vim syncs the file to disk.
|
||||
|
||||
If the writing to the swap file is not wanted, it can be switched off by
|
||||
setting the 'updatecount' option to 0. The same is done when starting Vim
|
||||
|
@@ -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
|
||||
@@ -34,7 +34,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: 2015 Jan 07
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2015 Apr 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -287,13 +287,13 @@ with CTRL-V followed by the three digit decimal code. This does NOT work for
|
||||
the <t_xx> termcap codes, these can only be used in mappings.
|
||||
|
||||
*:source_crnl* *W15*
|
||||
MS-DOS and Win32: Files that are read with ":source" normally have
|
||||
<CR><NL> <EOL>s. These always work. If you are using a file with <NL> <EOL>s
|
||||
(for example, a file made on Unix), this will be recognized if 'fileformats'
|
||||
is not empty and the first line does not end in a <CR>. This fails if the
|
||||
first line has something like ":map <F1> :help^M", where "^M" is a <CR>. If
|
||||
the first line ends in a <CR>, but following ones don't, you will get an error
|
||||
message, because the <CR> from the first lines will be lost.
|
||||
Windows: Files that are read with ":source" normally have <CR><NL> <EOL>s.
|
||||
These always work. If you are using a file with <NL> <EOL>s (for example, a
|
||||
file made on Unix), this will be recognized if 'fileformats' is not empty and
|
||||
the first line does not end in a <CR>. This fails if the first line has
|
||||
something like ":map <F1> :help^M", where "^M" is a <CR>. If the first line
|
||||
ends in a <CR>, but following ones don't, you will get an error message,
|
||||
because the <CR> from the first lines will be lost.
|
||||
|
||||
Mac Classic: Files that are read with ":source" normally have <CR> <EOL>s.
|
||||
These always work. If you are using a file with <NL> <EOL>s (for example, a
|
||||
@@ -303,7 +303,7 @@ linebreaks which has a <CR> in first line.
|
||||
|
||||
On other systems, Vim expects ":source"ed files to end in a <NL>. These
|
||||
always work. If you are using a file with <CR><NL> <EOL>s (for example, a
|
||||
file made on MS-DOS), all lines will have a trailing <CR>. This may cause
|
||||
file made on Windows), all lines will have a trailing <CR>. This may cause
|
||||
problems for some commands (e.g., mappings). There is no automatic <EOL>
|
||||
detection, because it's common to start with a line that defines a mapping
|
||||
that ends in a <CR>, which will confuse the automaton.
|
||||
@@ -390,7 +390,7 @@ To enter debugging mode use one of these methods:
|
||||
useful to find out what is happening when Vim is starting up. A side
|
||||
effect is that Vim will switch the terminal mode before initialisations
|
||||
have finished, with unpredictable results.
|
||||
For a GUI-only version (Windows, Macintosh) the debugging will start as
|
||||
For a GUI-only version (Windows) the debugging will start as
|
||||
soon as the GUI window has been opened. To make this happen early, add a
|
||||
":gui" command in the vimrc file.
|
||||
*:debug*
|
||||
@@ -583,6 +583,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.
|
||||
|
||||
@@ -658,10 +659,6 @@ long you take to respond to the input() prompt is irrelevant.
|
||||
Profiling should give a good indication of where time is spent, but keep in
|
||||
mind there are various things that may clobber the results:
|
||||
|
||||
- The accuracy of the time measured depends on the gettimeofday() system
|
||||
function. It may only be as accurate as 1/100 second, even though the times
|
||||
are displayed in micro seconds.
|
||||
|
||||
- Real elapsed time is measured, if other processes are busy they may cause
|
||||
delays at unpredictable moments. You may want to run the profiling several
|
||||
times and use the lowest results.
|
||||
|
@@ -106,9 +106,6 @@ o Does not support reverse insert and rightleft modes on the command-line.
|
||||
o Somewhat slower in right-to-left mode, because right-to-left motion is
|
||||
emulated inside Vim, not by the controlling terminal.
|
||||
|
||||
o When the Athena GUI is used, the bottom scrollbar works in the wrong
|
||||
direction. This is difficult to fix.
|
||||
|
||||
o When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
|
||||
Lines do not wrap at all; you just get a single, long line.
|
||||
|
||||
|
@@ -245,26 +245,6 @@ dragging the scrollbar of the current window. How many lines are scrolled
|
||||
depends on your mouse driver. If the scroll action causes input focus
|
||||
problems, see |intellimouse-wheel-problems|.
|
||||
|
||||
For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
|
||||
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
|
||||
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a
|
||||
<ScrollWheelUp> key press is generated causing the window to scroll upwards
|
||||
(while the text is actually moving downwards). The default action for these
|
||||
keys are:
|
||||
<ScrollWheelUp> scroll three lines up *<ScrollWheelUp>*
|
||||
<S-ScrollWheelUp> scroll one page up *<S-ScrollWheelUp>*
|
||||
<C-ScrollWheelUp> scroll one page up *<C-ScrollWheelUp>*
|
||||
<ScrollWheelDown> scroll three lines down *<ScrollWheelDown>*
|
||||
<S-ScrollWheelDown> scroll one page down *<S-ScrollWheelDown>*
|
||||
<C-ScrollWheelDown> scroll one page down *<C-ScrollWheelDown>*
|
||||
<ScrollWheelLeft> scroll six columns left *<ScrollWheelLeft>*
|
||||
<S-ScrollWheelLeft> scroll one page left *<S-ScrollWheelLeft>*
|
||||
<C-ScrollWheelLeft> scroll one page left *<C-ScrollWheelLeft>*
|
||||
<ScrollWheelRight> scroll six columns right *<ScrollWheelRight>*
|
||||
<S-ScrollWheelRight> scroll one page right *<S-ScrollWheelRight>*
|
||||
<C-ScrollWheelRight> scroll one page right *<C-ScrollWheelRight>*
|
||||
This should work in all modes, except when editing the command line.
|
||||
|
||||
Note that horizontal scrolling only works if 'nowrap' is set. Also, unless
|
||||
the "h" flag in 'guioptions' is set, the cursor moves to the longest visible
|
||||
line if the cursor line is about to be scrolled off the screen (similarly to
|
||||
@@ -281,13 +261,6 @@ You can also use Alt and Ctrl modifiers.
|
||||
This only works when Vim gets the scroll wheel events, of course. You can
|
||||
check if this works with the "xev" program.
|
||||
|
||||
When using XFree86, the /etc/XF86Config file should have the correct entry for
|
||||
your mouse. For FreeBSD, this entry works for a Logitech scrollmouse: >
|
||||
Protocol "MouseMan"
|
||||
Device "/dev/psm0"
|
||||
ZAxisMapping 4 5
|
||||
See the XFree86 documentation for information.
|
||||
|
||||
*<MouseDown>* *<MouseUp>*
|
||||
The keys <MouseDown> and <MouseUp> have been deprecated. Use <ScrollWheelUp>
|
||||
instead of <MouseDown> and use <ScrollWheelDown> instead of <MouseUp>.
|
||||
|
@@ -75,12 +75,8 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
|
||||
Define the file name where the bitmap can be found. Should be
|
||||
a full path. The bitmap should fit in the place of two
|
||||
characters. This is not checked. If the bitmap is too big it
|
||||
will cause redraw problems. Only GTK 2 can scale the bitmap
|
||||
to fit the space available.
|
||||
will cause redraw problems.
|
||||
toolkit supports ~
|
||||
GTK 1 pixmap (.xpm)
|
||||
GTK 2 many
|
||||
Motif pixmap (.xpm)
|
||||
Win32 .bmp, .ico, .cur
|
||||
pixmap (.xpm) |+xpm_w32|
|
||||
|
||||
|
@@ -35,9 +35,7 @@ Vim only checks words for spelling, there is no grammar check.
|
||||
If the 'mousemodel' option is set to "popup" and the cursor is on a badly
|
||||
spelled word or it is "popup_setpos" and the mouse pointer is on a badly
|
||||
spelled word, then the popup menu will contain a submenu to replace the bad
|
||||
word. Note: this slows down the appearance of the popup menu. Note for GTK:
|
||||
don't release the right mouse button until the menu appears, otherwise it
|
||||
won't work.
|
||||
word. Note: this slows down the appearance of the popup menu.
|
||||
|
||||
To search for the next misspelled word:
|
||||
|
||||
|
@@ -356,7 +356,7 @@ accordingly. Vim proceeds in this order:
|
||||
|
||||
1. Set the 'shell' and 'term' option *SHELL* *COMSPEC* *TERM*
|
||||
The environment variable SHELL, if it exists, is used to set the
|
||||
'shell' option. On MS-DOS and Win32, the COMSPEC variable is used
|
||||
'shell' option. On Windows, the COMSPEC variable is used
|
||||
if SHELL is not set.
|
||||
The environment variable TERM, if it exists, is used to set the 'term'
|
||||
option. However, 'term' will change later when starting the GUI (step
|
||||
@@ -494,7 +494,7 @@ sessions. Put it in a place so that it will be found by 3b:
|
||||
Local setup:
|
||||
Put all commands that you need for editing a specific directory only into a
|
||||
vimrc file and place it in that directory under the name ".nvimrc" ("_nvimrc"
|
||||
for MS-DOS and Win32). NOTE: To make Vim look for these special files you
|
||||
for Windows). NOTE: To make Vim look for these special files you
|
||||
have to turn on the option 'exrc'. See |trojan-horse| too.
|
||||
|
||||
System setup:
|
||||
@@ -516,10 +516,9 @@ interfere with Vi, then use the variable VIMINIT and the file init.vim
|
||||
instead.
|
||||
|
||||
MS-DOS line separators:
|
||||
On MS-DOS-like systems (MS-DOS itself and Win32), Vim assumes that all
|
||||
the vimrc files have <CR> <NL> pairs as line separators. This will give
|
||||
problems if you have a file with only <NL>s and have a line like
|
||||
":map xx yy^M". The trailing ^M will be ignored.
|
||||
On Windows systems Vim assumes that all the vimrc files have <CR> <NL> pairs
|
||||
as line separators. This will give problems if you have a file with only
|
||||
<NL>s and have a line like ":map xx yy^M". The trailing ^M will be ignored.
|
||||
|
||||
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
|
||||
gvimrc file.
|
||||
@@ -947,7 +946,7 @@ about to abandon with ":bdel", use ":wsh". The '[' and ']' marks are not
|
||||
stored, but the '"' mark is. The '"' mark is very useful for jumping to the
|
||||
cursor position when the file was last exited. No marks are saved for files
|
||||
that start with any string given with the "r" flag in 'shada'. This can be
|
||||
used to avoid saving marks for files on removable media (for MS-DOS you would
|
||||
used to avoid saving marks for files on removable media (for Windows you would
|
||||
use "ra:,rb:".
|
||||
The |v:oldfiles| variable is filled with the file names that the ShaDa file
|
||||
has marks for.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Jan 07
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -71,10 +71,10 @@ with: >
|
||||
For a color terminal see |:hi-normal-cterm|.
|
||||
For setting up your own colors syntax highlighting see |syncolor|.
|
||||
|
||||
NOTE: The syntax files on MS-DOS and Windows have lines that end in <CR><NL>.
|
||||
The files for Unix end in <NL>. This means you should use the right type of
|
||||
file for your system. Although on MS-DOS and Windows the right format is
|
||||
automatically selected if the 'fileformats' option is not empty.
|
||||
NOTE: The syntax files on Windows have lines that end in <CR><NL>. The files
|
||||
for Unix end in <NL>. This means you should use the right type of file for
|
||||
your system. Although on Windows the right format is automatically selected
|
||||
if the 'fileformats' option is not empty.
|
||||
|
||||
NOTE: When using reverse video ("gvim -fg white -bg black"), the default value
|
||||
of 'background' will not be set until the GUI window is opened, which is after
|
||||
@@ -206,7 +206,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.
|
||||
@@ -1130,6 +1131,8 @@ 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*
|
||||
|
||||
@@ -3304,6 +3307,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*
|
||||
|
||||
@@ -4236,7 +4265,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
|
||||
@@ -4504,7 +4533,7 @@ mentioned for the default values. See |:verbose-cmd| for more information.
|
||||
*highlight-args* *E416* *E417* *E423*
|
||||
There are three types of terminals for highlighting:
|
||||
term a normal terminal (vt100, xterm)
|
||||
cterm a color terminal (MS-DOS console, color-xterm, these have the "Co"
|
||||
cterm a color terminal (Windows console, color-xterm, these have the "Co"
|
||||
termcap entry)
|
||||
gui the GUI
|
||||
|
||||
@@ -4629,6 +4658,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.
|
||||
@@ -4650,7 +4681,7 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
*E419* *E420*
|
||||
When Vim knows the normal foreground and background colors, "fg" and
|
||||
"bg" can be used as color names. This only works after setting the
|
||||
colors for the Normal group and for the MS-DOS console. Example, for
|
||||
colors for the Normal group and for the Windows console. Example, for
|
||||
reverse video: >
|
||||
:highlight Visual ctermfg=bg ctermbg=fg
|
||||
< Note that the colors are used that are valid at the moment this
|
||||
@@ -4676,7 +4707,7 @@ font={font-name} *highlight-font*
|
||||
When setting the font for the "Normal" group, this becomes the default
|
||||
font (until the 'guifont' option is changed; the last one set is
|
||||
used).
|
||||
The following only works with Motif and Athena, not with other GUIs:
|
||||
The following only works with Motif not with other GUIs:
|
||||
When setting the font for the "Menu" group, the menus will be changed.
|
||||
When setting the font for the "Tooltip" group, the tooltips will be
|
||||
changed.
|
||||
@@ -4864,11 +4895,6 @@ Menu Current font, background and foreground colors of the menus.
|
||||
Also used for the toolbar.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif and Athena the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
|
||||
*hl-Scrollbar*
|
||||
Scrollbar Current background and foreground of the main window's
|
||||
scrollbars.
|
||||
@@ -4878,11 +4904,6 @@ Scrollbar Current background and foreground of the main window's
|
||||
Tooltip Current font, background and foreground of the tooltips.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif and Athena the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
|
||||
==============================================================================
|
||||
13. Linking groups *:hi-link* *:highlight-link* *E412* *E413*
|
||||
|
||||
|
@@ -48,8 +48,8 @@ A double click with the mouse in the non-GUI tab pages line opens a new, empty
|
||||
tab page. It is placed left of the position of the click. The first click
|
||||
may select another tab page first, causing an extra screen update.
|
||||
|
||||
This also works in a few GUI versions, esp. Win32 and Motif. But only when
|
||||
clicking right of the labels.
|
||||
This also works in a few GUI versions, esp. Win32. But only when clicking
|
||||
right of the labels.
|
||||
|
||||
In the GUI tab pages line you can use the right mouse button to open menu.
|
||||
|tabline-menu|.
|
||||
@@ -197,22 +197,29 @@ REORDERING TAB PAGES:
|
||||
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. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
:tabmove " move the tab page to the right
|
||||
:.tabmove " as above
|
||||
:+tabmove " as above
|
||||
:+tabmove " move the tab page to the right
|
||||
:0tabmove " move the tab page to the beginning of the tab
|
||||
" list
|
||||
:$tabmove " move the tab page to the end 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:
|
||||
@@ -234,7 +241,8 @@ LOOPING OVER TAB PAGES:
|
||||
current tab page.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
{cmd} must not open or close tab pages or reorder them.
|
||||
Also see |:windo|, |:argdo| and |:bufdo|.
|
||||
Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
|
||||
and |:lfdo|.
|
||||
|
||||
==============================================================================
|
||||
3. Other items *tab-page-other*
|
||||
|
@@ -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 Feb 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -357,7 +357,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
|
||||
@@ -425,11 +425,9 @@ cleared when scrolling).
|
||||
Unfortunately it is not possible to deduce from the termcap how cursor
|
||||
positioning should be done when using a scrolling region: Relative to the
|
||||
beginning of the screen or relative to the beginning of the scrolling region.
|
||||
Most terminals use the first method. A known exception is the MS-DOS console
|
||||
(pcterm). The 't_CS' option should be set to any string when cursor
|
||||
positioning is relative to the start of the scrolling region. It should be
|
||||
set to an empty string otherwise. It defaults to "yes" when 'term' is
|
||||
"pcterm".
|
||||
Most terminals use the first method. The 't_CS' option should be set to any
|
||||
string when cursor positioning is relative to the start of the scrolling
|
||||
region. It should be set to an empty string otherwise.
|
||||
|
||||
Note for xterm users: The shifted cursor keys normally don't work. You can
|
||||
make them work with the xmodmap command and some mappings in Vim.
|
||||
@@ -672,10 +670,9 @@ border, the text is scrolled.
|
||||
A selection can be started by pressing the left mouse button on the first
|
||||
character, moving the mouse to the last character, then releasing the mouse
|
||||
button. You will not always see the selection until you release the button,
|
||||
only in some versions (GUI, MS-DOS, WIN32) will the dragging be shown
|
||||
immediately. Note that you can make the text scroll by moving the mouse at
|
||||
least one character in the first/last line in the window when 'scrolloff' is
|
||||
non-zero.
|
||||
only in some versions (GUI, Windows) will the dragging be shown immediately.
|
||||
Note that you can make the text scroll by moving the mouse at least one
|
||||
character in the first/last line in the window when 'scrolloff' is non-zero.
|
||||
|
||||
In Normal, Visual and Select mode clicking the right mouse button causes the
|
||||
Visual area to be extended. When 'mousemodel' is "popup", the left button has
|
||||
@@ -689,9 +686,9 @@ work on systems where the window manager consumes the mouse events when the
|
||||
alt key is pressed (it may move the window).
|
||||
|
||||
*double-click*
|
||||
Double, triple and quadruple clicks are supported when the GUI is active,
|
||||
for MS-DOS and Win32, and for an xterm (if the gettimeofday() function is
|
||||
available). For selecting text, extra clicks extend the selection:
|
||||
Double, triple and quadruple clicks are supported when the GUI is active, for
|
||||
Windows and for an xterm. For selecting text, extra clicks extend the
|
||||
selection:
|
||||
click select ~
|
||||
double word or % match *<2-LeftMouse>*
|
||||
triple line *<3-LeftMouse>*
|
||||
|
@@ -190,7 +190,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
|
||||
|
||||
@@ -29,11 +29,10 @@ To start Vim, enter this command: >
|
||||
|
||||
gvim file.txt
|
||||
|
||||
In UNIX you can type this at any command prompt. If you are running Microsoft
|
||||
Windows, open an MS-DOS prompt window and enter the command.
|
||||
In either case, Vim starts editing a file called file.txt. Because this
|
||||
is a new file, you get a blank window. This is what your screen will look
|
||||
like:
|
||||
On Unix you can type this at any command prompt. If you are running Windows,
|
||||
open a command prompt window and enter the command. In either case, Vim
|
||||
starts editing a file called file.txt. Because this is a new file, you get a
|
||||
blank window. This is what your screen will look like:
|
||||
|
||||
+---------------------------------------+
|
||||
|# |
|
||||
@@ -61,10 +60,9 @@ use this command: >
|
||||
|
||||
the editing occurs inside your command window. In other words, if you are
|
||||
running inside an xterm, the editor uses your xterm window. If you are using
|
||||
an MS-DOS command prompt window under Microsoft Windows, the editing occurs
|
||||
inside this window. The text in the window will look the same for both
|
||||
versions, but with gvim you have extra features, like a menu bar. More about
|
||||
that later.
|
||||
the command prompt under Microsoft Windows, the editing occurs inside this
|
||||
window. The text in the window will look the same for both versions, but with
|
||||
gvim you have extra features, like a menu bar. More about that later.
|
||||
|
||||
==============================================================================
|
||||
*02.2* Inserting text
|
||||
@@ -80,7 +78,7 @@ mistakes; you can correct them later. To enter the following programmer's
|
||||
limerick, this is what you type: >
|
||||
|
||||
iA very intelligent turtle
|
||||
Found programming UNIX a hurdle
|
||||
Found programming Unix a hurdle
|
||||
|
||||
After typing "turtle" you press the <Enter> key to start a new line. Finally
|
||||
you press the <Esc> key to stop Insert mode and go back to Normal mode. You
|
||||
@@ -88,7 +86,7 @@ now have two lines of text in your Vim window:
|
||||
|
||||
+---------------------------------------+
|
||||
|A very intelligent turtle |
|
||||
|Found programming UNIX a hurdle |
|
||||
|Found programming Unix a hurdle |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
@@ -110,7 +108,7 @@ of the window. This indicates you are in Insert mode.
|
||||
|
||||
+---------------------------------------+
|
||||
|A very intelligent turtle |
|
||||
|Found programming UNIX a hurdle |
|
||||
|Found programming Unix a hurdle |
|
||||
|~ |
|
||||
|~ |
|
||||
|-- INSERT -- |
|
||||
@@ -187,7 +185,7 @@ look like this:
|
||||
|
||||
+---------------------------------------+
|
||||
|intelligent turtle |
|
||||
|Found programming UNIX a hurdle |
|
||||
|Found programming Unix a hurdle |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
@@ -202,7 +200,7 @@ insert mode (the final <Esc>). The result:
|
||||
|
||||
+---------------------------------------+
|
||||
|A young intelligent turtle |
|
||||
|Found programming UNIX a hurdle |
|
||||
|Found programming Unix a hurdle |
|
||||
|~ |
|
||||
|~ |
|
||||
| |
|
||||
@@ -215,7 +213,7 @@ To delete a whole line use the "dd" command. The following line will
|
||||
then move up to fill the gap:
|
||||
|
||||
+---------------------------------------+
|
||||
|Found programming UNIX a hurdle |
|
||||
|Found programming Unix a hurdle |
|
||||
|~ |
|
||||
|~ |
|
||||
|~ |
|
||||
@@ -332,7 +330,7 @@ Insert mode. Then you can type the text for the new line.
|
||||
Suppose the cursor is somewhere in the first of these two lines:
|
||||
|
||||
A very intelligent turtle ~
|
||||
Found programming UNIX a hurdle ~
|
||||
Found programming Unix a hurdle ~
|
||||
|
||||
If you now use the "o" command and type new text: >
|
||||
|
||||
@@ -342,7 +340,7 @@ The result is:
|
||||
|
||||
A very intelligent turtle ~
|
||||
That liked using Vim ~
|
||||
Found programming UNIX a hurdle ~
|
||||
Found programming Unix a hurdle ~
|
||||
|
||||
The "O" command (uppercase) opens a line above the cursor.
|
||||
|
||||
@@ -518,9 +516,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
|
||||
|
@@ -528,7 +528,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
|
||||
|
@@ -285,7 +285,6 @@ Where can you find plugins?
|
||||
- You could write one yourself, see |write-plugin|.
|
||||
|
||||
Some plugins come as a vimball archive, see |vimball|.
|
||||
Some plugins can be updated automatically, see |getscript|.
|
||||
|
||||
|
||||
USING A GLOBAL PLUGIN
|
||||
|
@@ -134,10 +134,10 @@ The following command makes the mouse work like a Microsoft Windows mouse: >
|
||||
|
||||
:behave mswin
|
||||
|
||||
The default behavior of the mouse on UNIX systems is xterm. The default
|
||||
behavior on a Microsoft Windows system is selected during the installation
|
||||
process. For details about what the two behaviors are, see |:behave|. Here
|
||||
follows a summary.
|
||||
The default behavior of the mouse on Unix systems is xterm. The default
|
||||
behavior on Windows systems is selected during the installation process. For
|
||||
details about what the two behaviors are, see |:behave|. Here follows a
|
||||
summary.
|
||||
|
||||
|
||||
XTERM MOUSE BEHAVIOR
|
||||
|
@@ -698,10 +698,10 @@ still be something that an external command can do better or faster.
|
||||
through an external program. In other words, it runs the system command
|
||||
represented by {program}, giving it the block of text represented by {motion}
|
||||
as input. The output of this command then replaces the selected block.
|
||||
Because this summarizes badly if you are unfamiliar with UNIX filters, take
|
||||
Because this summarizes badly if you are unfamiliar with Unix filters, take
|
||||
a look at an example. The sort command sorts a file. If you execute the
|
||||
following command, the unsorted file input.txt will be sorted and written to
|
||||
output.txt. (This works on both UNIX and Microsoft Windows.) >
|
||||
output.txt. This works on both Unix and Windows. >
|
||||
|
||||
sort <input.txt >output.txt
|
||||
|
||||
|
@@ -293,7 +293,6 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
||||
'updatecount' Number of key strokes after which the swap file is flushed to
|
||||
disk.
|
||||
'updatetime' Timeout after which the swap file is flushed to disk.
|
||||
'swapsync' Whether the disk is synced when the swap file is flushed.
|
||||
'directory' List of directory names where to store the swap file.
|
||||
'maxmem' Limit for memory usage before writing text to the swap file.
|
||||
'maxmemtot' Same, but for all files in total.
|
||||
|
@@ -309,7 +309,7 @@ matches can be found.
|
||||
==============================================================================
|
||||
*12.8* Find where a word is used
|
||||
|
||||
If you are a UNIX user, you can use a combination of Vim and the grep command
|
||||
If you are a Unix user, you can use a combination of Vim and the grep command
|
||||
to edit all the files that contain a given word. This is extremely useful if
|
||||
you are working on a program and want to view or edit all the files that
|
||||
contain a specific variable.
|
||||
@@ -324,7 +324,7 @@ will only list the files containing the word and not print the matching lines.
|
||||
The word it is searching for is "frame_counter". Actually, this can be any
|
||||
regular expression. (Note: What grep uses for regular expressions is not
|
||||
exactly the same as what Vim uses.)
|
||||
The entire command is enclosed in backticks (`). This tells the UNIX shell
|
||||
The entire command is enclosed in backticks (`). This tells the Unix shell
|
||||
to run this command and pretend that the results were typed on the command
|
||||
line. So what happens is that the grep command is run and produces a list of
|
||||
files, these files are put on the Vim command line. This results in Vim
|
||||
|
@@ -70,9 +70,7 @@ difference. Without it executes the program normally, with the range a number
|
||||
of text lines is filtered through the program.
|
||||
|
||||
Executing a whole row of programs this way is possible. But a shell is much
|
||||
better at it. You can start a new shell this way: >
|
||||
|
||||
:shell
|
||||
better at it. You can start a new shell with |:terminal|.
|
||||
|
||||
This is similar to using CTRL-Z to suspend Vim. The difference is that a new
|
||||
shell is started.
|
||||
|
@@ -25,7 +25,7 @@ Back in the early days, the old Teletype machines used two characters to
|
||||
start a new line. One to move the carriage back to the first position
|
||||
(carriage return, <CR>), another to move the paper up (line feed, <LF>).
|
||||
When computers came out, storage was expensive. Some people decided that
|
||||
they did not need two characters for end-of-line. The UNIX people decided
|
||||
they did not need two characters for end-of-line. The Unix people decided
|
||||
they could use <Line Feed> only for end-of-line. The Apple people
|
||||
standardized on <CR>. The MS-DOS (and Microsoft Windows) folks decided to
|
||||
keep the old <CR><LF>.
|
||||
@@ -34,7 +34,7 @@ have line-break problems. The Vim editor automatically recognizes the
|
||||
different file formats and handles things properly behind your back.
|
||||
The option 'fileformats' contains the various formats that will be tried
|
||||
when a new file is edited. The following command, for example, tells Vim to
|
||||
try UNIX format first and MS-DOS format second: >
|
||||
try Unix format first and MS-DOS format second: >
|
||||
|
||||
:set fileformats=unix,dos
|
||||
|
||||
@@ -97,12 +97,12 @@ CONVERSION
|
||||
|
||||
You can use the 'fileformat' option to convert from one file format to
|
||||
another. Suppose, for example, that you have an MS-DOS file named README.TXT
|
||||
that you want to convert to UNIX format. Start by editing the MS-DOS format
|
||||
that you want to convert to Unix format. Start by editing the MS-DOS format
|
||||
file: >
|
||||
vim README.TXT
|
||||
|
||||
Vim will recognize this as a dos format file. Now change the file format to
|
||||
UNIX: >
|
||||
Unix: >
|
||||
|
||||
:set fileformat=unix
|
||||
:write
|
||||
|
@@ -563,9 +563,9 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for
|
||||
"dP" Vim will also search for a "Pd" digraph.
|
||||
|
||||
Note:
|
||||
The digraphs depend on the character set that Vim assumes you are
|
||||
using. On MS-DOS they are different from MS-Windows. Always use
|
||||
":digraphs" to find out which digraphs are currently available.
|
||||
The digraphs depend on the character set that Vim assumes you
|
||||
are using. Always use ":digraphs" to find out which digraphs are
|
||||
currently available.
|
||||
|
||||
You can define your own digraphs. Example: >
|
||||
|
||||
|
@@ -83,7 +83,7 @@ matter if 'ignorecase' or 'smartcase' was changed.
|
||||
|
||||
Note:
|
||||
If your search takes much longer than you expected, you can interrupt
|
||||
it with CTRL-C on Unix and CTRL-Break on MS-DOS and MS-Windows.
|
||||
it with CTRL-C on Unix and CTRL-Break on Windows.
|
||||
|
||||
==============================================================================
|
||||
*27.2* Wrapping around the file end
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2014 Aug 16
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2015 Nov 30
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -888,6 +888,11 @@ Mappings: *mapping-functions*
|
||||
maparg() get rhs of a mapping
|
||||
wildmenumode() check if the wildmode is active
|
||||
|
||||
Testing: *test-functions*
|
||||
assert_equal() assert that two expressions values are equal
|
||||
assert_false() assert that an expression is false
|
||||
assert_true() assert that an expression is true
|
||||
|
||||
Various: *various-functions*
|
||||
mode() get current editing mode
|
||||
visualmode() last visual mode used
|
||||
@@ -1494,8 +1499,8 @@ Here is a summary of items that apply to Vim scripts. They are also mentioned
|
||||
elsewhere, but form a nice checklist.
|
||||
|
||||
The end-of-line character depends on the system. For Unix a single <NL>
|
||||
character is used. For MS-DOS, Windows and the like, <CR><LF> is used.
|
||||
This is important when using mappings that end in a <CR>. See |:source_crnl|.
|
||||
character is used. For Windows <CR><LF> is used. This is important when
|
||||
using mappings that end in a <CR>. See |:source_crnl|.
|
||||
|
||||
|
||||
WHITE SPACE
|
||||
@@ -2465,8 +2470,6 @@ utility is recommended.
|
||||
For utmost portability use Vim itself to pack scripts together. This can be
|
||||
done with the Vimball utility. See |vimball|.
|
||||
|
||||
It's good if you add a line to allow automatic updating. See |glvs-plugins|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Next chapter: |usr_42.txt| Add new menus
|
||||
|
@@ -272,19 +272,15 @@ g8 Print the hex values of the bytes used in the
|
||||
:!! Repeat last ":!{cmd}".
|
||||
|
||||
*:ve* *:version*
|
||||
:ve[rsion] Print the version number of the editor. If the
|
||||
compiler used understands "__DATE__" the compilation
|
||||
date is mentioned. Otherwise a fixed release-date is
|
||||
shown.
|
||||
The following lines contain information about which
|
||||
features were enabled when Vim was compiled. When
|
||||
there is a preceding '+', the feature is included,
|
||||
when there is a '-' it is excluded. To change this,
|
||||
you have to edit feature.h and recompile Vim.
|
||||
To check for this in an expression, see |has()|.
|
||||
Here is an overview of the features.
|
||||
The first column shows the smallest version in which
|
||||
they are included:
|
||||
:ve[rsion] Print the version number of the editor. The following
|
||||
lines contain information about which features were
|
||||
enabled when Vim was compiled. When there is a
|
||||
preceding '+', the feature is included, when there is
|
||||
a '-' it is excluded. To change this, you have to
|
||||
edit feature.h and recompile Vim. To check for this
|
||||
in an expression, see |has()|. Here is an overview of
|
||||
the features. The first column shows the smallest
|
||||
version in which they are included:
|
||||
T tiny
|
||||
S small
|
||||
N normal
|
||||
@@ -299,9 +295,6 @@ g8 Print the hex values of the bytes used in the
|
||||
*+acl* |ACL| support included
|
||||
B *+arabic* |Arabic| language support
|
||||
N *+autocmd* |:autocmd|, automatic commands
|
||||
m *+balloon_eval* |balloon-eval| support. Included when compiling with
|
||||
supported GUI (Motif, GTK, GUI) and either
|
||||
Netbeans/Sun Workshop integration or |+eval| feature.
|
||||
N *+browse* |:browse| command
|
||||
N *+byte_offset* support for 'o' flag in 'statusline' option, "go"
|
||||
and ":goto" commands.
|
||||
@@ -321,7 +314,6 @@ N *+dialog_gui* Support for |:confirm| with GUI dialog.
|
||||
N *+dialog_con* Support for |:confirm| with console dialog.
|
||||
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
|
||||
N *+digraphs* |digraphs| *E196*
|
||||
*+dnd* Support for DnD into the "~ register |quote_~|.
|
||||
N *+eval* expression evaluation |eval.txt|
|
||||
N *+ex_extra* Vim's extra Ex commands: |:center|, |:left|,
|
||||
|:normal|, |:retab| and |:right|
|
||||
@@ -331,12 +323,7 @@ N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
|
||||
N *+find_in_path* include file searches: |[I|, |:isearch|,
|
||||
|CTRL-W_CTRL-I|, |:checkpath|, etc.
|
||||
N *+folding* |folding|
|
||||
*+footer* |gui-footer|
|
||||
N *+gettext* message translations |multi-lang|
|
||||
*+GUI_Athena* Unix only: Athena |GUI|
|
||||
*+GUI_neXtaw* Unix only: neXtaw |GUI|
|
||||
*+GUI_GTK* Unix only: GTK+ |GUI|
|
||||
*+GUI_Motif* Unix only: Motif |GUI|
|
||||
*+iconv* Compiled with the |iconv()| function
|
||||
*+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
|
||||
N *+insert_expand* |insert_expand| Insert mode completion
|
||||
@@ -376,6 +363,7 @@ N *+startuptime* |--startuptime| argument
|
||||
N *+statusline* Options 'statusline', 'rulerformat' and special
|
||||
formats of 'titlestring' and 'iconstring'
|
||||
N *+syntax* Syntax highlighting |syntax|
|
||||
N *+tablineat* 'tabline' option recognizing %@Func@ items.
|
||||
N *+tag_binary* binary searching in tags file |tag-binary-search|
|
||||
N *+tag_old_static* old method for static tags |tag-old-static|
|
||||
m *+tag_any_white* any white space allowed in tags file |tag-any-white|
|
||||
@@ -576,17 +564,11 @@ which it was defined is reported.
|
||||
:5sleep "sleep for five seconds
|
||||
:sleep 100m "sleep for a hundred milliseconds
|
||||
10gs "sleep for ten seconds
|
||||
< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
|
||||
< Can be interrupted with CTRL-C (CTRL-Break on Windows).
|
||||
"gs" stands for "goto sleep".
|
||||
While sleeping the cursor is positioned in the text,
|
||||
if at a visible position.
|
||||
|
||||
|
||||
*g_CTRL-A*
|
||||
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
|
||||
(which is very rare): print memory usage statistics.
|
||||
Only useful for debugging Vim.
|
||||
|
||||
==============================================================================
|
||||
2. Using Vim like less or more *less*
|
||||
|
||||
|
@@ -44,8 +44,7 @@ Memory usage limits
|
||||
|
||||
The option 'maxmem' ('mm') is used to set the maximum memory used for one
|
||||
buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for
|
||||
all buffers (in kilobytes). The defaults depend on the system used. For
|
||||
MS-DOS, 'maxmemtot' is set depending on the amount of memory available.
|
||||
all buffers (in kilobytes). The defaults depend on the system used.
|
||||
These are not hard limits, but tell Vim when to move text into a swap file.
|
||||
If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a
|
||||
very large value. The swap file will then only be used for recovery. If you
|
||||
@@ -57,15 +56,9 @@ argument when starting Vim.
|
||||
|
||||
Support for different systems.
|
||||
Vim can be used on:
|
||||
- All Unix systems (it works on all systems it was tested on, although
|
||||
the GUI and Perl interface may not work everywhere).
|
||||
- MS-DOS in real-mode (no additional drivers required).
|
||||
- In protected mode on Windows 3.1 and MS-DOS (DPMI driver required).
|
||||
- Windows 95 and Windows NT, with support for long file names.
|
||||
- Macintosh
|
||||
Note that on some systems features need to be disabled to reduce
|
||||
resource usage, esp. on MS-DOS. For some outdated systems you need to
|
||||
use an older Vim version.
|
||||
- Modern Unix systems (*BSD, Linux, etc.)
|
||||
- Windows (XP SP 2 or greater)
|
||||
- OS X
|
||||
|
||||
Multi level undo. |undo|
|
||||
'u' goes backward in time, 'CTRL-R' goes forward again. Set option
|
||||
@@ -83,8 +76,7 @@ Graphical User Interface (GUI). |gui|
|
||||
Included support for GUI: menu's, mouse, scrollbars, etc. You can
|
||||
define your own menus. Better support for CTRL/SHIFT/ALT keys in
|
||||
combination with special keys and mouse. Supported for various
|
||||
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32
|
||||
(Windows 95 and later), and Macintosh.
|
||||
platforms such as Win32.
|
||||
|
||||
Multiple windows and buffers. |windows.txt|
|
||||
Vim can split the screen into several windows, each editing a
|
||||
@@ -347,9 +339,8 @@ Printing. |printing|
|
||||
|
||||
Mouse support. |mouse-using|
|
||||
The mouse is supported in the GUI version, in an xterm for Unix, for
|
||||
BSDs with sysmouse, for Linux with gpm, for MS-DOS, and Win32. It
|
||||
can be used to position the cursor, select the visual area, paste a
|
||||
register, etc.
|
||||
BSDs with sysmouse, for Linux with gpm, and for Win32. It can be used
|
||||
to position the cursor, select the visual area, paste a register, etc.
|
||||
|
||||
Usage of key names. |<>| |key-notation|
|
||||
Special keys now all have a name like <Up>, <End>, etc.
|
||||
|
@@ -199,9 +199,14 @@ Other options:
|
||||
'cpoptions' ('g', 'w', 'H', '*', '-', 'j', and all POSIX flags were removed)
|
||||
'guioptions' (only the 't' flag was removed)
|
||||
'guipty'
|
||||
'imactivatefunc'
|
||||
'imactivatekey'
|
||||
'imstatusfunc'
|
||||
'macatsui'
|
||||
'restorescreen'
|
||||
'shelltype'
|
||||
'shortname'
|
||||
'swapsync'
|
||||
'termencoding' (Vim 7.4.852 also removed this for Windows)
|
||||
'textauto'
|
||||
'textmode'
|
||||
@@ -214,6 +219,7 @@ Other options:
|
||||
Other commands:
|
||||
:Print
|
||||
:fixdel
|
||||
:helpfind
|
||||
:mode (no longer accepts an argument)
|
||||
:open
|
||||
:shell
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.4. Last change: 2014 Dec 05
|
||||
*windows.txt* For Vim version 7.4. Last change: 2015 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -681,7 +681,6 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
When using the |:tab| modifier each argument is opened in a
|
||||
tab page. The last window is used if it's empty.
|
||||
Also see |++opt| and |+cmd|.
|
||||
{only available when compiled with a GUI}
|
||||
|
||||
==============================================================================
|
||||
8. Do a command in all buffers or windows *list-repeat*
|
||||
@@ -702,7 +701,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
the current window.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
{cmd} must not open or close windows or reorder them.
|
||||
Also see |:tabdo|, |:argdo| and |:bufdo|.
|
||||
Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|.
|
||||
|
||||
*:bufdo*
|
||||
:[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if
|
||||
@@ -728,7 +728,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
autocommand event is disabled by adding it to
|
||||
'eventignore'. This considerably speeds up editing
|
||||
each buffer.
|
||||
Also see |:tabdo|, |:argdo| and |:windo|.
|
||||
Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
|
||||
|:cfdo| and |:lfdo|.
|
||||
|
||||
Examples: >
|
||||
|
||||
@@ -984,8 +985,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)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2015 Jan 07
|
||||
" Last Change: 2015 Apr 06
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -1262,8 +1262,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
|
||||
@@ -1290,7 +1290,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
|
||||
@@ -1393,7 +1393,7 @@ else
|
||||
au BufNewFile,BufRead *.pl call s:FTpl()
|
||||
endif
|
||||
au BufNewFile,BufRead *.plx,*.al setf perl
|
||||
au BufNewFile,BufRead *.p6,*.pm6 setf perl6
|
||||
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
||||
|
||||
func! s:FTpl()
|
||||
if exists("g:filetype_pl")
|
||||
@@ -1422,6 +1422,7 @@ au BufNewFile,BufRead *.pm
|
||||
|
||||
" Perl POD
|
||||
au BufNewFile,BufRead *.pod setf pod
|
||||
au BufNewFile,BufRead *.pod6 setf pod6
|
||||
|
||||
" Php, php3, php4, etc.
|
||||
" Also Phtml (was used for PHP 2 in the past)
|
||||
@@ -2032,6 +2033,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/
|
||||
|
@@ -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-03-27
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -16,39 +16,38 @@ 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=(:)
|
||||
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword<'
|
||||
|
||||
" 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 +65,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
|
||||
|
@@ -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: Fri Feb 20 16:01 MSK 2014 Igor Gnatenko
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -18,7 +18,9 @@ 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()
|
||||
|
@@ -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 Jun 12
|
||||
" 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
|
||||
|
||||
@@ -245,6 +245,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
|
||||
@@ -287,7 +291,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\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let s:countonly = 0
|
||||
endfunc "}}}
|
||||
|
||||
@@ -299,7 +303,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\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
if s:block == 3
|
||||
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
|
||||
endif
|
||||
@@ -311,6 +315,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 +372,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)
|
||||
"{{{
|
||||
@@ -883,7 +920,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: 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
|
||||
|
||||
|
@@ -540,10 +540,6 @@ if has("title")
|
||||
call append("$", "iconstring\twhen not empty, text for the icon of this window")
|
||||
call <SID>OptionG("iconstring", &iconstring)
|
||||
endif
|
||||
if has("win32")
|
||||
call append("$", "restorescreen\trestore the screen contents when exiting Vim")
|
||||
call <SID>BinOptionG("rs", &rs)
|
||||
endif
|
||||
|
||||
|
||||
call <SID>Header("using the mouse")
|
||||
@@ -926,6 +922,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("$", "fixeol\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)")
|
||||
@@ -973,8 +972,6 @@ call <SID>OptionG("dir", &dir)
|
||||
call append("$", "swapfile\tuse a swap file for this buffer")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("swf")
|
||||
call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
|
||||
call <SID>OptionG("sws", &sws)
|
||||
call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
|
||||
call append("$", " \tset uc=" . &uc)
|
||||
call append("$", "updatetime\ttime in msec after which the swap file will be updated")
|
||||
|
@@ -1,41 +0,0 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscriptPlugin.vim
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Nov 29, 2013
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
"
|
||||
" (Rom 15:11 WEB) Again, "Praise the Lord, all you Gentiles! Let
|
||||
" all the peoples praise Him."
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" if you're sourcing this file, surely you can't be
|
||||
" expecting vim to be in its vi-compatible mode
|
||||
if exists("g:loaded_getscriptPlugin")
|
||||
finish
|
||||
endif
|
||||
if &cp
|
||||
if &verbose
|
||||
echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
endif
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscriptPlugin = "v36"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
|
||||
com! -nargs=0 GetScripts call getscript#GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Restore Options: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: AmigaDos
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Sep 11, 2006
|
||||
" Version: 6
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Oct 23, 2014
|
||||
" Version: 7
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
@@ -1,8 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Asterisk config file
|
||||
" Maintainer: brc007
|
||||
" Maintainer: Jean Aunis <jean.aunis@yahoo.fr>
|
||||
" Previous Maintainer: brc007
|
||||
" Updated for 1.2 by Tilghman Lesher (Corydon76)
|
||||
" Last Change: 2006 Mar 20
|
||||
" Last Change: 2015 Feb 27
|
||||
" version 0.4
|
||||
"
|
||||
if version < 600
|
||||
@@ -17,18 +18,19 @@ syn sync fromstart
|
||||
syn keyword asteriskTodo TODO contained
|
||||
syn match asteriskComment ";.*" contains=asteriskTodo
|
||||
syn match asteriskContext "\[.\{-}\]"
|
||||
syn match asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern
|
||||
syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
|
||||
syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
|
||||
syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
|
||||
syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
|
||||
syn match asteriskApp ",\zs[a-zA-Z]\+\ze("
|
||||
" Digits plus oldlabel (newlabel)
|
||||
syn match asteriskPriority ",\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
" oldlabel plus digits (newlabel)
|
||||
syn match asteriskPriority ",\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
" s or n plus digits (newlabel)
|
||||
syn match asteriskPriority ",\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskLabel "(\zs[[:alpha:]][[:alnum:]]*\ze)" contained
|
||||
syn match asteriskError "^\s*#\s*[[:alnum:]]*"
|
||||
syn match asteriskInclude "^\s*#\s*\(include\|exec\)\s.*"
|
||||
|
@@ -1,13 +1,15 @@
|
||||
" Vim syntax file
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2014 Oct 21
|
||||
|
||||
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
|
||||
" The AWK Programming Language, Addison-Wesley, 1988
|
||||
|
||||
" GAWK ref. is: Arnold D. Robbins
|
||||
" Effective AWK Programming, Third Edition, O'Reilly, 2001
|
||||
" Effective AWK Programming, Fourth Edition, O'Reilly, 2015
|
||||
" (also available with the gawk source distribution)
|
||||
|
||||
" MAWK is a "new awk" meaning it implements AWK ref.
|
||||
" mawk conforms to the Posix 1003.2 (draft 11.3)
|
||||
@@ -33,17 +35,27 @@ set cpo&vim
|
||||
syn keyword awkStatement break continue delete exit
|
||||
syn keyword awkStatement function getline next
|
||||
syn keyword awkStatement print printf return
|
||||
" GAWK ref. p. 117
|
||||
" GAWK ref. Chapter 7
|
||||
syn keyword awkStatement nextfile
|
||||
" AWK ref. p. 42, GAWK ref. p. 142-166
|
||||
syn keyword awkFunction atan2 close cos exp fflush int log rand sin sqrt srand
|
||||
syn keyword awkFunction gsub index length match split sprintf sub
|
||||
syn keyword awkFunction substr system
|
||||
" GAWK ref. p. 142-166
|
||||
syn keyword awkFunction asort gensub mktime strftime strtonum systime
|
||||
"
|
||||
" GAWK ref. Chapter 9, Functions
|
||||
"
|
||||
" Numeric Functions
|
||||
syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
|
||||
" String Manipulation Functions
|
||||
syn keyword awkFunction asort asort1 gensub gsub index length match
|
||||
syn keyword awkFunction patsplit split sprintf strtonum sub substr
|
||||
syn keyword awkFunction tolower toupper
|
||||
syn keyword awkFunction and or xor compl lshift rshift
|
||||
syn keyword awkFunction dcgettext bindtextdomain
|
||||
" Input Output Functions
|
||||
syn keyword awkFunction close fflush system
|
||||
" Time Functions
|
||||
syn keyword awkFunction mktime strftime systime
|
||||
" Bit Manipulation Functions
|
||||
syn keyword awkFunction and compl lshift or rshift xor
|
||||
" Getting Type Function
|
||||
syn keyword awkFunction isarray
|
||||
" String-Translation Functions
|
||||
syn keyword awkFunction bindtextdomain dcgettext dcngetext
|
||||
|
||||
syn keyword awkConditional if else
|
||||
syn keyword awkRepeat while for
|
||||
@@ -51,13 +63,16 @@ syn keyword awkRepeat while for
|
||||
syn keyword awkTodo contained TODO
|
||||
|
||||
syn keyword awkPatterns BEGIN END
|
||||
" AWK ref. p. 36
|
||||
syn keyword awkVariables ARGC ARGV FILENAME FNR FS NF NR
|
||||
syn keyword awkVariables OFMT OFS ORS RLENGTH RS RSTART SUBSEP
|
||||
" GAWK ref. p. 120-126
|
||||
syn keyword awkVariables ARGIND BINMODE CONVFMT ENVIRON ERRNO
|
||||
syn keyword awkVariables FIELDWIDTHS IGNORECASE LINT PROCINFO
|
||||
syn keyword awkVariables RT RLENGTH TEXTDOMAIN
|
||||
|
||||
" GAWK ref. Chapter 7
|
||||
" Built-in Variables That Control awk
|
||||
syn keyword awkVariables BINMODE CONVFMT FIELDWIDTHS FPAT FS
|
||||
syn keyword awkVariables IGNORECASE LINT OFMT OFS ORS PREC
|
||||
syn keyword awkVariables ROUNDMODE RS SUBSEP TEXTDOMAIN
|
||||
" Built-in Variables That Convey Information
|
||||
syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME
|
||||
syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART
|
||||
syn keyword awkVariables RT SYMTAB
|
||||
|
||||
syn keyword awkRepeat do
|
||||
|
||||
@@ -115,15 +130,15 @@ syn case match
|
||||
"syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
|
||||
|
||||
" Arithmetic operators: +, and - take care of ++, and --
|
||||
"syn match awkOperator "+\|-\|\*\|/\|%\|="
|
||||
"syn match awkOperator "+=\|-=\|\*=\|/=\|%="
|
||||
"syn match awkOperator "^\|^="
|
||||
syn match awkOperator "+\|-\|\*\|/\|%\|="
|
||||
syn match awkOperator "+=\|-=\|\*=\|/=\|%="
|
||||
syn match awkOperator "^\|^="
|
||||
|
||||
" Comparison expressions.
|
||||
"syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
|
||||
"syn match awkExpression "\~\|\!\~"
|
||||
"syn match awkExpression "?\|:"
|
||||
"syn keyword awkExpression in
|
||||
syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
|
||||
syn match awkExpression "\~\|\!\~"
|
||||
syn match awkExpression "?\|:"
|
||||
syn keyword awkExpression in
|
||||
|
||||
" Boolean Logic (OR, AND, NOT)
|
||||
"syn match awkBoolLogic "||\|&&\|\!"
|
||||
@@ -187,8 +202,8 @@ if version >= 508 || !exists("did_awk_syn_inits")
|
||||
HiLink awkFloat Float
|
||||
|
||||
HiLink awkFileIO Special
|
||||
"HiLink awkOperator Special
|
||||
"HiLink awkExpression Special
|
||||
HiLink awkOperator Special
|
||||
HiLink awkExpression Special
|
||||
HiLink awkBoolLogic Special
|
||||
|
||||
HiLink awkPatterns Special
|
||||
|
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Nov 13
|
||||
" Last Change: 2015 Mar 05
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -47,16 +47,17 @@ if !exists("c_no_cformat")
|
||||
endif
|
||||
|
||||
" cCppString: same as cString, but ends at end of line
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11")
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
" ISO C++11
|
||||
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11")
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
|
||||
" ISO C99
|
||||
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
else
|
||||
" older C or C++
|
||||
syn match cFormat display "%%" contained
|
||||
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
@@ -80,7 +81,11 @@ syn match cSpecialCharacter display "L'\\x\x\+'"
|
||||
|
||||
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
|
||||
" ISO C11 or ISO C++ 11
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
if exists("c_no_cformat")
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
||||
else
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
endif
|
||||
syn match cCharacter "[Uu]'[^\\]'"
|
||||
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
|
||||
if exists("c_gnu")
|
||||
@@ -330,6 +335,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
" POSIX 2001
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
||||
" non-POSIX signals
|
||||
syn keyword cConstant SIGWINCH SIGINFO
|
||||
" Add POSIX errors as well
|
||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
||||
@@ -387,8 +394,13 @@ endif
|
||||
syn cluster cLabelGroup contains=cUserLabel
|
||||
syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
if s:ft ==# 'cpp'
|
||||
syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
else
|
||||
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
endif
|
||||
|
||||
syn match cUserLabel display "\I\i*" contained
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: COBOL
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Language: COBOL
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" (formerly Davyd Ondrejko <vondraco@columbus.rr.com>)
|
||||
" (formerly Sitaram Chamarty <sitaram@diac.com> and
|
||||
" James Mitchell <james_mitchell@acm.org>)
|
||||
" $Id: cobol.vim,v 1.2 2007/05/05 18:23:43 vimboss Exp $
|
||||
" James Mitchell <james_mitchell@acm.org>)
|
||||
" Last Change: 2015 Feb 13
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -145,7 +145,7 @@ syn match cobolString /'[^']*\('\|$\)/
|
||||
syn match cobolIndicator "\%7c[D-]" contained
|
||||
|
||||
if exists("cobol_legacy_code")
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine,cobolBadLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
endif
|
||||
|
||||
" many legacy sources have junk in columns 1-6: must be before others
|
||||
|
@@ -1,11 +1,13 @@
|
||||
" Vim syntax file
|
||||
" Language: configure.in script: M4 with sh
|
||||
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
|
||||
" Last Change: 2008 Sep 03
|
||||
" Last Change: 2015 Jan 14
|
||||
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
|
||||
" (patch from Khym Chanur to add @Spell)
|
||||
|
||||
" Well, I actually even do not know much about m4. This explains why there
|
||||
" is probably very much missing here, yet !
|
||||
" But I missed a good hilighting when editing my GNU autoconf/automake
|
||||
" But I missed good highlighting when editing my GNU autoconf/automake
|
||||
" script, so I wrote this quick and dirty patch.
|
||||
|
||||
|
||||
@@ -20,14 +22,19 @@ endif
|
||||
" define the config syntax
|
||||
syn match configdelimiter "[()\[\];,]"
|
||||
syn match configoperator "[=|&\*\+\<\>]"
|
||||
syn match configcomment "\(dnl.*\)\|\(#.*\)"
|
||||
syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
|
||||
syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
|
||||
syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
|
||||
syn keyword configDnl dnl contained
|
||||
syn keyword configkeyword if then else fi test for in do done
|
||||
syn keyword configspecial cat rm eval
|
||||
syn region configstring start=+"+ skip=+\\"+ end=+"+
|
||||
syn region configstring start=+'+ skip=+\\'+ end=+'+
|
||||
syn region configstring start=+`+ skip=+\\'+ end=+`+
|
||||
|
||||
" This shortens the script, see syn-ext-match..
|
||||
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
|
||||
|
||||
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
|
||||
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
|
||||
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@@ -43,6 +50,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
|
||||
HiLink configdelimiter Delimiter
|
||||
HiLink configoperator Operator
|
||||
HiLink configcomment Comment
|
||||
HiLink configDnl Comment
|
||||
HiLink configfunction Function
|
||||
HiLink confignumber Number
|
||||
HiLink configkeyword Keyword
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user