mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
Compare commits
1670 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cd94dd6bb2 | ||
![]() |
44b4f8c6e9 | ||
![]() |
0615450688 | ||
![]() |
1999919c31 | ||
![]() |
cd6e7e8cf3 | ||
![]() |
dfe79b67a5 | ||
![]() |
c230ef24a2 | ||
![]() |
099718ae6d | ||
![]() |
c180741189 | ||
![]() |
dee2bf7b52 | ||
![]() |
ed02278e42 | ||
![]() |
4874214139 | ||
![]() |
fe913d7838 | ||
![]() |
392817c2da | ||
![]() |
fc45c97829 | ||
![]() |
eaf54132f9 | ||
![]() |
175297a23a | ||
![]() |
01570f1ff3 | ||
![]() |
56065bbdc6 | ||
![]() |
e51bffefa5 | ||
![]() |
798f05876c | ||
![]() |
671b244e6c | ||
![]() |
07499a842b | ||
![]() |
9adb6ed74a | ||
![]() |
38f0ac07b5 | ||
![]() |
9f8bd77d7b | ||
![]() |
ba7704ab4e | ||
![]() |
0fb695df8a | ||
![]() |
ec6e78e77c | ||
![]() |
35b269f51f | ||
![]() |
a315026dc2 | ||
![]() |
0ed8b12a07 | ||
![]() |
627cc1b3d8 | ||
![]() |
2574f299e5 | ||
![]() |
d241f278d3 | ||
![]() |
13bdc21faf | ||
![]() |
7b2f6a7e5f | ||
![]() |
44a284d71c | ||
![]() |
56af2f8c5f | ||
![]() |
9afed40ea6 | ||
![]() |
07f82ad1be | ||
![]() |
813563365c | ||
![]() |
21879247e7 | ||
![]() |
9836283c49 | ||
![]() |
57fafcea23 | ||
![]() |
378d5f0fa3 | ||
![]() |
a5ed460241 | ||
![]() |
0ac67853b9 | ||
![]() |
b5c0031d4e | ||
![]() |
37757b4f09 | ||
![]() |
41ccdb1ef2 | ||
![]() |
336ce02a6e | ||
![]() |
2bfabd5bf8 | ||
![]() |
e889640048 | ||
![]() |
297dc3f997 | ||
![]() |
a8071354e1 | ||
![]() |
bd51a0cd04 | ||
![]() |
4a83b64777 | ||
![]() |
f65a751d82 | ||
![]() |
b4fcf02316 | ||
![]() |
60ef7889a2 | ||
![]() |
ef9ef75a7b | ||
![]() |
22d95e462e | ||
![]() |
3e4a058b01 | ||
![]() |
6ff892165a | ||
![]() |
40911e435e | ||
![]() |
70626e6a1e | ||
![]() |
d088331ea3 | ||
![]() |
85d5bf81b9 | ||
![]() |
a98a1d10e3 | ||
![]() |
5efab06198 | ||
![]() |
12481781a0 | ||
![]() |
166aaf178c | ||
![]() |
b40f87cdf5 | ||
![]() |
363a232cb4 | ||
![]() |
9946a5ebd9 | ||
![]() |
33eb5833b2 | ||
![]() |
bfe029a11d | ||
![]() |
da6874a7b2 | ||
![]() |
cafb92487b | ||
![]() |
b79523681d | ||
![]() |
fee4e39ca3 | ||
![]() |
b00211a551 | ||
![]() |
cc0d50a2c2 | ||
![]() |
1cbc830189 | ||
![]() |
e475476d10 | ||
![]() |
7892192751 | ||
![]() |
14b3741ec5 | ||
![]() |
47b26e8716 | ||
![]() |
39e284772d | ||
![]() |
38fb835854 | ||
![]() |
83be7cec98 | ||
![]() |
89cb304ea0 | ||
![]() |
15bd936b96 | ||
![]() |
3d688cc25d | ||
![]() |
bf6048e81d | ||
![]() |
ddde747644 | ||
![]() |
7f7802e643 | ||
![]() |
bf2460e2f9 | ||
![]() |
e1c6109e62 | ||
![]() |
b7514493a0 | ||
![]() |
eaf2a25f12 | ||
![]() |
cf659a1926 | ||
![]() |
8917e0c301 | ||
![]() |
10083ec4cc | ||
![]() |
bf61885cb4 | ||
![]() |
7ae7da8fb9 | ||
![]() |
b92d6f490d | ||
![]() |
52ebe34eeb | ||
![]() |
8794a551bd | ||
![]() |
b454d24e04 | ||
![]() |
6e55c5997e | ||
![]() |
6294a807d3 | ||
![]() |
18710e7720 | ||
![]() |
b36aba9840 | ||
![]() |
f389fea8fa | ||
![]() |
141df73930 | ||
![]() |
14e70878c5 | ||
![]() |
3cc7462a0c | ||
![]() |
c1d7a28093 | ||
![]() |
b479f89979 | ||
![]() |
6d4d271694 | ||
![]() |
74d19f685f | ||
![]() |
a10938ae31 | ||
![]() |
943e607442 | ||
![]() |
c8af12d0fa | ||
![]() |
63b5f05d47 | ||
![]() |
3c24a6c317 | ||
![]() |
b148213366 | ||
![]() |
9500448220 | ||
![]() |
9625e9da75 | ||
![]() |
37675c6a87 | ||
![]() |
09cd4d0a43 | ||
![]() |
d44ed79ccc | ||
![]() |
84970bafd4 | ||
![]() |
5d8594f636 | ||
![]() |
a26fd8a888 | ||
![]() |
863a87d5f3 | ||
![]() |
23c9e3ec1e | ||
![]() |
25435a4bad | ||
![]() |
33952c48bc | ||
![]() |
4938ee08e8 | ||
![]() |
66a39fce6c | ||
![]() |
c1c14faad9 | ||
![]() |
7097aba6be | ||
![]() |
487cf98c0b | ||
![]() |
9c2099d585 | ||
![]() |
3cc3506965 | ||
![]() |
8192267dea | ||
![]() |
367343ae6e | ||
![]() |
b006771cba | ||
![]() |
a503349e20 | ||
![]() |
26dc628ab3 | ||
![]() |
de022d2570 | ||
![]() |
0d3557ad72 | ||
![]() |
440c33343d | ||
![]() |
dd2e1e9445 | ||
![]() |
2add88eedc | ||
![]() |
33596d5d07 | ||
![]() |
bbf00120f7 | ||
![]() |
3ff1907593 | ||
![]() |
264725c25f | ||
![]() |
9a1234e57f | ||
![]() |
ebc7f69d92 | ||
![]() |
eeeaf04c5e | ||
![]() |
4bb039e225 | ||
![]() |
4c3c04d03c | ||
![]() |
f4dffe7181 | ||
![]() |
9ab6fe4fed | ||
![]() |
1cc3b32f4c | ||
![]() |
2a274cbe30 | ||
![]() |
c990d65c37 | ||
![]() |
c46997aa87 | ||
![]() |
f39a0f5dd0 | ||
![]() |
f27a665e05 | ||
![]() |
5442f0b622 | ||
![]() |
6c0f1903e6 | ||
![]() |
a7bb63c55d | ||
![]() |
3462acbbff | ||
![]() |
463da84806 | ||
![]() |
f4ba20d1c0 | ||
![]() |
050f3975f6 | ||
![]() |
d8e18c96a9 | ||
![]() |
3e0188e92d | ||
![]() |
315b7f8632 | ||
![]() |
40a257e11f | ||
![]() |
f419f914fc | ||
![]() |
f52ace459a | ||
![]() |
3c7ea8d619 | ||
![]() |
fa2ad305e3 | ||
![]() |
44c6deb91a | ||
![]() |
fe5675ba0a | ||
![]() |
feaefdfba2 | ||
![]() |
51961da511 | ||
![]() |
f72f638f97 | ||
![]() |
c69ea3b4b8 | ||
![]() |
61890382eb | ||
![]() |
dc5fdbc758 | ||
![]() |
0191061e34 | ||
![]() |
b8363283fa | ||
![]() |
23d172a948 | ||
![]() |
3fddd04565 | ||
![]() |
7cc9d2b2b2 | ||
![]() |
bbb88607c9 | ||
![]() |
e17728a632 | ||
![]() |
d87e5d7016 | ||
![]() |
b94b59e4e8 | ||
![]() |
392b3396fd | ||
![]() |
3bcbf802ce | ||
![]() |
aaece78492 | ||
![]() |
cca29112d5 | ||
![]() |
77192889f0 | ||
![]() |
c7e6bb2467 | ||
![]() |
f85cbea725 | ||
![]() |
c500f22f3c | ||
![]() |
be68f218ff | ||
![]() |
4871f26c22 | ||
![]() |
bd736a98e3 | ||
![]() |
231539cf3c | ||
![]() |
451c48a092 | ||
![]() |
34c0688790 | ||
![]() |
db68d1d638 | ||
![]() |
e0d39d8e53 | ||
![]() |
3abf17ae88 | ||
![]() |
5a82afa17a | ||
![]() |
7f6c1d256f | ||
![]() |
2d456f84d1 | ||
![]() |
36ac80d5dd | ||
![]() |
f795c3ce7c | ||
![]() |
ec29eeef43 | ||
![]() |
b7032cf1e3 | ||
![]() |
90e3dd9220 | ||
![]() |
7303dd3e54 | ||
![]() |
420379330e | ||
![]() |
21c9db1861 | ||
![]() |
5861dc5966 | ||
![]() |
078202d6f8 | ||
![]() |
d9d91bbfef | ||
![]() |
6ffcc2b800 | ||
![]() |
ae927a49f7 | ||
![]() |
b2633bba73 | ||
![]() |
f274b84e1e | ||
![]() |
2ab7165214 | ||
![]() |
21aa4bc428 | ||
![]() |
fe5c891fe0 | ||
![]() |
d8c7ff1335 | ||
![]() |
1f300e08b8 | ||
![]() |
4211255c75 | ||
![]() |
63058fb5b0 | ||
![]() |
787ae1b38b | ||
![]() |
d00ef758c3 | ||
![]() |
4b70ebe013 | ||
![]() |
905d4d78fc | ||
![]() |
51e817dc1b | ||
![]() |
fad748dffa | ||
![]() |
488f6ecdda | ||
![]() |
a1f562b044 | ||
![]() |
cf92a76285 | ||
![]() |
7795829767 | ||
![]() |
807a16dbc1 | ||
![]() |
32935c8612 | ||
![]() |
a80f73f043 | ||
![]() |
90f9f8af6c | ||
![]() |
f8eb5c83ed | ||
![]() |
611e379685 | ||
![]() |
a93690bceb | ||
![]() |
54f72efa70 | ||
![]() |
513804ed91 | ||
![]() |
3818a47211 | ||
![]() |
8652458184 | ||
![]() |
402a797d08 | ||
![]() |
7b53b5380a | ||
![]() |
1ef585d6dc | ||
![]() |
803baf3631 | ||
![]() |
b8331e1a1c | ||
![]() |
dad7882cac | ||
![]() |
9cd75ce73e | ||
![]() |
37e00c6e65 | ||
![]() |
1efe65a155 | ||
![]() |
245b1ad7fa | ||
![]() |
39a03c0fe7 | ||
![]() |
49a497a67c | ||
![]() |
5be3865ce7 | ||
![]() |
c7350f542a | ||
![]() |
4339fdd802 | ||
![]() |
2a30a71596 | ||
![]() |
27694577c3 | ||
![]() |
3585df3f0b | ||
![]() |
77a2eaf08b | ||
![]() |
6a0c727a0b | ||
![]() |
bce3e95691 | ||
![]() |
f711b63513 | ||
![]() |
2bfdceba37 | ||
![]() |
5b2cee03c8 | ||
![]() |
47fa9de580 | ||
![]() |
438f2b6474 | ||
![]() |
e21f454e11 | ||
![]() |
05282069db | ||
![]() |
51db8ebf67 | ||
![]() |
64177e3e98 | ||
![]() |
209f05b487 | ||
![]() |
d2c460638c | ||
![]() |
c67139f8aa | ||
![]() |
2ca6223967 | ||
![]() |
333679ad0e | ||
![]() |
65e7f6f0b9 | ||
![]() |
0bee3925ab | ||
![]() |
ad151847f1 | ||
![]() |
8ef3fb4e73 | ||
![]() |
491efc89d2 | ||
![]() |
3866137eed | ||
![]() |
e7451f8a91 | ||
![]() |
de5d1e863c | ||
![]() |
5aa8af7cdb | ||
![]() |
2106bada5b | ||
![]() |
6bdcbef2f5 | ||
![]() |
a1d831a49c | ||
![]() |
995a2fad8c | ||
![]() |
ec215a1962 | ||
![]() |
61f467499b | ||
![]() |
0476e0aef3 | ||
![]() |
37b8e95fd6 | ||
![]() |
8bcc011959 | ||
![]() |
71816e584c | ||
![]() |
bafae1c427 | ||
![]() |
9e97f14de2 | ||
![]() |
79184809bb | ||
![]() |
db15a3b8f7 | ||
![]() |
edcc73e766 | ||
![]() |
418abfc9d0 | ||
![]() |
6da4548f0e | ||
![]() |
7f0095cc94 | ||
![]() |
d337965e09 | ||
![]() |
655e3167ee | ||
![]() |
fefb67fa88 | ||
![]() |
f1bc152fa0 | ||
![]() |
fdf17e33d5 | ||
![]() |
5000c9dc1f | ||
![]() |
828c9baad2 | ||
![]() |
1642917f9b | ||
![]() |
a93658502c | ||
![]() |
35cc15e157 | ||
![]() |
ff0350d2ed | ||
![]() |
efa10881e5 | ||
![]() |
5284b85d07 | ||
![]() |
e24d338194 | ||
![]() |
8e20b77bd1 | ||
![]() |
7e9afca990 | ||
![]() |
fd5cc7dd0a | ||
![]() |
4dd614e51a | ||
![]() |
3046f4499b | ||
![]() |
d0e07c043b | ||
![]() |
9af2e144a6 | ||
![]() |
725400d75d | ||
![]() |
fdd59ef901 | ||
![]() |
39f16a0fee | ||
![]() |
a5de6770c5 | ||
![]() |
0ea685ed9e | ||
![]() |
fb28b0c734 | ||
![]() |
d995825c66 | ||
![]() |
a82ac8accb | ||
![]() |
e3707c312a | ||
![]() |
50ec030b26 | ||
![]() |
3de81ea351 | ||
![]() |
2ed2939597 | ||
![]() |
91c4de83c9 | ||
![]() |
23f052edac | ||
![]() |
26d5a981eb | ||
![]() |
0ed297bdb4 | ||
![]() |
a676c658cc | ||
![]() |
e121b1dbe7 | ||
![]() |
d2944e6a29 | ||
![]() |
c2d1684e05 | ||
![]() |
189a5f2b95 | ||
![]() |
aea70b4404 | ||
![]() |
32df42549a | ||
![]() |
b44b533ada | ||
![]() |
2aa308c685 | ||
![]() |
de7a0bdc35 | ||
![]() |
efb6caa39b | ||
![]() |
021c5875c1 | ||
![]() |
11b55aa004 | ||
![]() |
36b2e3f743 | ||
![]() |
137eedb4ed | ||
![]() |
cb6672853a | ||
![]() |
738bffea2c | ||
![]() |
9fa7727ce0 | ||
![]() |
25b6304840 | ||
![]() |
273d2cd5d5 | ||
![]() |
e31d8ed36a | ||
![]() |
8d40b3617c | ||
![]() |
1cd8517344 | ||
![]() |
966e7abc49 | ||
![]() |
3a6b80f2f4 | ||
![]() |
f1a3075553 | ||
![]() |
cb8ea55d71 | ||
![]() |
79a0d82755 | ||
![]() |
2326a4ac3a | ||
![]() |
32b0470b03 | ||
![]() |
c9f3174075 | ||
![]() |
33bfea31b0 | ||
![]() |
34b6a3d944 | ||
![]() |
ebb1acb3c0 | ||
![]() |
cabffb0182 | ||
![]() |
fe7ab60af7 | ||
![]() |
19c2ce1901 | ||
![]() |
124275dd58 | ||
![]() |
f46f138fb6 | ||
![]() |
8abd677d82 | ||
![]() |
f8575fd1e4 | ||
![]() |
8ce6393048 | ||
![]() |
bcc9a74e48 | ||
![]() |
5009317525 | ||
![]() |
ec1a7791b0 | ||
![]() |
16ce2e006b | ||
![]() |
0a349fd77d | ||
![]() |
0d037ad978 | ||
![]() |
7170de1971 | ||
![]() |
e46534b423 | ||
![]() |
c9e340b7be | ||
![]() |
d5da357925 | ||
![]() |
58b210e114 | ||
![]() |
5d6732ff09 | ||
![]() |
1f2301eacf | ||
![]() |
7d8327fd30 | ||
![]() |
87d3f265bc | ||
![]() |
4744142fad | ||
![]() |
6208c7fb98 | ||
![]() |
7e7c3111b6 | ||
![]() |
bd17ef75b3 | ||
![]() |
d6a1640260 | ||
![]() |
34f29ac858 | ||
![]() |
53f11dcfc7 | ||
![]() |
009ccfe170 | ||
![]() |
a369385009 | ||
![]() |
ad60927d09 | ||
![]() |
77cb14cc6d | ||
![]() |
32f3937477 | ||
![]() |
4ce8521ee4 | ||
![]() |
a37819dbb1 | ||
![]() |
953d167015 | ||
![]() |
76c2a60ff3 | ||
![]() |
03c2844b53 | ||
![]() |
4bab9d34e6 | ||
![]() |
ffb8904913 | ||
![]() |
4b41680828 | ||
![]() |
c8648daab3 | ||
![]() |
d9c010e45d | ||
![]() |
a90672fc3d | ||
![]() |
43df2edd20 | ||
![]() |
6c2b442ee0 | ||
![]() |
f50670aeff | ||
![]() |
f9b728e2f8 | ||
![]() |
9da2e7b021 | ||
![]() |
3f4ec1aed2 | ||
![]() |
e724667ef4 | ||
![]() |
2a951d16a4 | ||
![]() |
5ba267722c | ||
![]() |
0eaecbaf47 | ||
![]() |
b9b17a58da | ||
![]() |
fb0c35105f | ||
![]() |
f45df71081 | ||
![]() |
0ba2ec0bae | ||
![]() |
60577eeaf5 | ||
![]() |
9f3e67a814 | ||
![]() |
2cdf9d1388 | ||
![]() |
db1c9b625c | ||
![]() |
b144a77f38 | ||
![]() |
3c7cc03f34 | ||
![]() |
4ff4e66fd7 | ||
![]() |
9c981f5a19 | ||
![]() |
e3bffa47a6 | ||
![]() |
d42f934bcb | ||
![]() |
adfc1212b5 | ||
![]() |
190cc43cf3 | ||
![]() |
3ee187b770 | ||
![]() |
4d43ce85f1 | ||
![]() |
d05712fbe7 | ||
![]() |
51af911a27 | ||
![]() |
b71697bc67 | ||
![]() |
9139bf81cf | ||
![]() |
498731615c | ||
![]() |
a02d22cca8 | ||
![]() |
fe5f38d8bd | ||
![]() |
be2a3ddd58 | ||
![]() |
c10a207a20 | ||
![]() |
d29c243bef | ||
![]() |
b7a46f2299 | ||
![]() |
be1448213c | ||
![]() |
a1530ece87 | ||
![]() |
522443d6bf | ||
![]() |
1dc497398e | ||
![]() |
c8189096e8 | ||
![]() |
7a13611ba2 | ||
![]() |
8cdaac0d80 | ||
![]() |
cb3bb0becb | ||
![]() |
57c66bc168 | ||
![]() |
eba61fbc97 | ||
![]() |
4a1251206a | ||
![]() |
48967695c4 | ||
![]() |
0cec184cd6 | ||
![]() |
84359a467f | ||
![]() |
9a1f57b488 | ||
![]() |
fab09ea0d6 | ||
![]() |
d0850586df | ||
![]() |
6a5b9de546 | ||
![]() |
61b6eb926d | ||
![]() |
d66217ab6d | ||
![]() |
0eb1d7ca4c | ||
![]() |
95cc2507c9 | ||
![]() |
ed6a113804 | ||
![]() |
fc1ebb060e | ||
![]() |
dae1975394 | ||
![]() |
2b7a8ceeb6 | ||
![]() |
4a145f2036 | ||
![]() |
3b32e717d9 | ||
![]() |
cb3230776e | ||
![]() |
2940af8321 | ||
![]() |
a2f9188418 | ||
![]() |
24ee261317 | ||
![]() |
b8f69b6b9a | ||
![]() |
3189841984 | ||
![]() |
cd27198526 | ||
![]() |
1fb4282f1c | ||
![]() |
11f6411771 | ||
![]() |
d084628c4b | ||
![]() |
a20261fae7 | ||
![]() |
bc235bf1f6 | ||
![]() |
6196738a3b | ||
![]() |
17e21eae24 | ||
![]() |
092b4d9774 | ||
![]() |
469ba2fb49 | ||
![]() |
c90e9df5b5 | ||
![]() |
cad616c94e | ||
![]() |
d7e4449adb | ||
![]() |
103be37f42 | ||
![]() |
b2c066409d | ||
![]() |
142ac021ac | ||
![]() |
8fa0b8051d | ||
![]() |
c8f409c2f2 | ||
![]() |
7598e6cf17 | ||
![]() |
aa5008c1f0 | ||
![]() |
db7f80302b | ||
![]() |
1df9ac1c03 | ||
![]() |
f8d574225b | ||
![]() |
1e71978cf0 | ||
![]() |
1e7d5e8cdf | ||
![]() |
5abfa94ed2 | ||
![]() |
a7e7f7bd83 | ||
![]() |
ee4e1fd8ec | ||
![]() |
387fbcd95c | ||
![]() |
ad999eaa77 | ||
![]() |
ef4feab0e7 | ||
![]() |
51b9d85bb4 | ||
![]() |
ad30907814 | ||
![]() |
8e87d89a99 | ||
![]() |
27e26b10a2 | ||
![]() |
1c3a849881 | ||
![]() |
5e18550ddd | ||
![]() |
0865adbbc2 | ||
![]() |
aea079a25d | ||
![]() |
2cbeb7ca56 | ||
![]() |
f44fb5b1a5 | ||
![]() |
d48df146d1 | ||
![]() |
714e0f8bf0 | ||
![]() |
bc43d2559f | ||
![]() |
7c8122f36d | ||
![]() |
49e86cebf0 | ||
![]() |
4bbe51b79e | ||
![]() |
6245b4873d | ||
![]() |
fa0e32fba2 | ||
![]() |
e3687165a7 | ||
![]() |
979569356f | ||
![]() |
79a8d905ab | ||
![]() |
87f4d2592c | ||
![]() |
f96d99ad11 | ||
![]() |
777d34ec37 | ||
![]() |
704ba4151e | ||
![]() |
507bda1c95 | ||
![]() |
7362ca4430 | ||
![]() |
9f598e5765 | ||
![]() |
b11b681289 | ||
![]() |
f19db1b9ba | ||
![]() |
6f19b9f4e1 | ||
![]() |
4d1b3bf317 | ||
![]() |
07b67f9eff | ||
![]() |
536d9a6168 | ||
![]() |
ef57cd81fe | ||
![]() |
84bac9f507 | ||
![]() |
d4688add96 | ||
![]() |
c28dbede27 | ||
![]() |
5acda03576 | ||
![]() |
db29fa8164 | ||
![]() |
1edb4894dc | ||
![]() |
f8a44b73f0 | ||
![]() |
92759ef34f | ||
![]() |
840027c7f5 | ||
![]() |
93be2ba542 | ||
![]() |
58a5699a44 | ||
![]() |
2a6491cdf8 | ||
![]() |
0d7daaad98 | ||
![]() |
e670756676 | ||
![]() |
414ef75ee6 | ||
![]() |
fa6415f13f | ||
![]() |
929a732d00 | ||
![]() |
1ca138f236 | ||
![]() |
2ec94eb23f | ||
![]() |
7034feb666 | ||
![]() |
de0d1a0d2a | ||
![]() |
d49c1dda8b | ||
![]() |
1fd54f29c1 | ||
![]() |
e8c39f72fd | ||
![]() |
224ebc0078 | ||
![]() |
8b8a75b2cf | ||
![]() |
e40e300c16 | ||
![]() |
e25e552a3d | ||
![]() |
eb00fc0cf0 | ||
![]() |
b982f0e654 | ||
![]() |
411d578137 | ||
![]() |
04f5062978 | ||
![]() |
60e96a45b4 | ||
![]() |
cb5cde6e2b | ||
![]() |
0c59ac1a2c | ||
![]() |
4b26e365ae | ||
![]() |
9b7ce00486 | ||
![]() |
5d9bb16d66 | ||
![]() |
ec459965f5 | ||
![]() |
1b898d7af5 | ||
![]() |
57fef8b49b | ||
![]() |
1fc09b5b98 | ||
![]() |
5660482406 | ||
![]() |
bf160dd668 | ||
![]() |
6b84f7813c | ||
![]() |
65d0b8ed32 | ||
![]() |
7eceac218e | ||
![]() |
bdf5f57989 | ||
![]() |
dd1b493f75 | ||
![]() |
f5373e2cdc | ||
![]() |
200898546e | ||
![]() |
1ac1f520f0 | ||
![]() |
98e7112390 | ||
![]() |
362346f563 | ||
![]() |
c8fd7ce08b | ||
![]() |
30f6ff7021 | ||
![]() |
f21867a15c | ||
![]() |
868b84199e | ||
![]() |
e54ff10d44 | ||
![]() |
b5a47f4907 | ||
![]() |
e9cf40f2b6 | ||
![]() |
bbca3142e8 | ||
![]() |
79f9c2d9c6 | ||
![]() |
3f3de9b1a9 | ||
![]() |
8d5a46e77b | ||
![]() |
3df11cfbca | ||
![]() |
920c582320 | ||
![]() |
aa728798b4 | ||
![]() |
30e7fb2e32 | ||
![]() |
7941aaa3bf | ||
![]() |
0bfc91be96 | ||
![]() |
17ea0f2214 | ||
![]() |
393935c32d | ||
![]() |
c7caca60b9 | ||
![]() |
cffdc1da02 | ||
![]() |
ab6051331c | ||
![]() |
afe6b4881f | ||
![]() |
afd46b78c5 | ||
![]() |
51f5cfc16e | ||
![]() |
ad6d577314 | ||
![]() |
e6ee06ee11 | ||
![]() |
03e69a5d9c | ||
![]() |
3bd555f1e6 | ||
![]() |
cf4fbb6f04 | ||
![]() |
607e0d2202 | ||
![]() |
a9c94f7bb0 | ||
![]() |
ce5c2030bf | ||
![]() |
9ebe2ad331 | ||
![]() |
201a4ef11c | ||
![]() |
79b4b6fc86 | ||
![]() |
f8d2aef4f2 | ||
![]() |
5fecd59c26 | ||
![]() |
8d64a2fb1d | ||
![]() |
29395fd304 | ||
![]() |
f50ce7d510 | ||
![]() |
131aad953c | ||
![]() |
be67d926c5 | ||
![]() |
6a7c904648 | ||
![]() |
1b61167373 | ||
![]() |
0ecf7e3a2d | ||
![]() |
7ae4144208 | ||
![]() |
998a16c926 | ||
![]() |
84a25770ac | ||
![]() |
82cd0be2ea | ||
![]() |
189c5abeba | ||
![]() |
d407a48665 | ||
![]() |
9627325684 | ||
![]() |
ce3bc12e25 | ||
![]() |
535bf89597 | ||
![]() |
519ff2ad42 | ||
![]() |
10008f7d49 | ||
![]() |
739fb93a90 | ||
![]() |
1fb44676cd | ||
![]() |
1c0a2a39b6 | ||
![]() |
3bf57c1171 | ||
![]() |
c49dac7cd3 | ||
![]() |
feee814b30 | ||
![]() |
229604213e | ||
![]() |
15c53a44d3 | ||
![]() |
bf789b04f3 | ||
![]() |
4e02f1ab87 | ||
![]() |
0848add488 | ||
![]() |
ae409b5042 | ||
![]() |
167898a517 | ||
![]() |
72e4c9d8e7 | ||
![]() |
65b66bc332 | ||
![]() |
26b84a8b3e | ||
![]() |
960f093625 | ||
![]() |
66a8b593e7 | ||
![]() |
8f82f95c1c | ||
![]() |
a034d4b69d | ||
![]() |
b0e5187e49 | ||
![]() |
f407a94032 | ||
![]() |
330e5acbce | ||
![]() |
12af7016e2 | ||
![]() |
dbad797edd | ||
![]() |
de86f82483 | ||
![]() |
8d90171f8b | ||
![]() |
de47515477 | ||
![]() |
cca407b43e | ||
![]() |
0093c25dd3 | ||
![]() |
338664e96c | ||
![]() |
9058a5a19a | ||
![]() |
cc58ec9a80 | ||
![]() |
3b304fc04a | ||
![]() |
d989051220 | ||
![]() |
e01f35c4bb | ||
![]() |
9beaf84d2f | ||
![]() |
8e71a26e19 | ||
![]() |
20bfe0f2a3 | ||
![]() |
1aefbff641 | ||
![]() |
5ce8158a5d | ||
![]() |
f5b0f5e17f | ||
![]() |
e24e98534b | ||
![]() |
4e5e6506b5 | ||
![]() |
8bd1bbcec8 | ||
![]() |
c7f95fde1b | ||
![]() |
241c380da9 | ||
![]() |
a2d1e9cc79 | ||
![]() |
b0b656dd37 | ||
![]() |
9a0147754c | ||
![]() |
45e81e03f8 | ||
![]() |
968c7ab17e | ||
![]() |
ffad8d4c51 | ||
![]() |
de919b9b94 | ||
![]() |
90963a9c55 | ||
![]() |
496b0f944f | ||
![]() |
fd4021387e | ||
![]() |
d554a6c7f0 | ||
![]() |
2bf0869160 | ||
![]() |
9154782386 | ||
![]() |
9dc3cc2c68 | ||
![]() |
e1f27cdb4c | ||
![]() |
b0d08998f5 | ||
![]() |
d53aa0e94f | ||
![]() |
9cefd83cc7 | ||
![]() |
d82621877b | ||
![]() |
5ec0a6d13f | ||
![]() |
0adf950ccf | ||
![]() |
8ba8d7244f | ||
![]() |
c29a82c45f | ||
![]() |
e0d55f2871 | ||
![]() |
7612ba5ad9 | ||
![]() |
fb3667cd16 | ||
![]() |
cfb713b5c6 | ||
![]() |
353ca83f73 | ||
![]() |
d7ee323326 | ||
![]() |
773f23e00d | ||
![]() |
01fc02beee | ||
![]() |
8e30598115 | ||
![]() |
1d5eec2c62 | ||
![]() |
b615192a37 | ||
![]() |
544cef0155 | ||
![]() |
b22d3385b9 | ||
![]() |
cee9a8ce8a | ||
![]() |
a98736b9c0 | ||
![]() |
90fc7c6ad0 | ||
![]() |
c21cf6d3cc | ||
![]() |
9f994bb699 | ||
![]() |
37b755ab47 | ||
![]() |
de3a833ec7 | ||
![]() |
adfad73d8e | ||
![]() |
b3d0241416 | ||
![]() |
305673e923 | ||
![]() |
fa6f892055 | ||
![]() |
3d2f4154b1 | ||
![]() |
f2b6145d74 | ||
![]() |
cb245a71ca | ||
![]() |
3a6ee8819e | ||
![]() |
0169872fd3 | ||
![]() |
9aec64c34e | ||
![]() |
8f39e96d21 | ||
![]() |
60a341a05f | ||
![]() |
2c414fbbb1 | ||
![]() |
f04b53aa24 | ||
![]() |
d99f8feea3 | ||
![]() |
d520e2590a | ||
![]() |
69da692b0a | ||
![]() |
ba87a2cde7 | ||
![]() |
611351677d | ||
![]() |
e237cff0c8 | ||
![]() |
81a520e60e | ||
![]() |
ff8c848128 | ||
![]() |
9938196298 | ||
![]() |
f588113191 | ||
![]() |
c19ff66bfd | ||
![]() |
158f8b7ce3 | ||
![]() |
f72630b784 | ||
![]() |
e18177692a | ||
![]() |
f3f1970597 | ||
![]() |
384a39479a | ||
![]() |
0c930c2969 | ||
![]() |
15670ca1ad | ||
![]() |
8b05da1577 | ||
![]() |
8c8cf46c71 | ||
![]() |
4696a5a10e | ||
![]() |
830b5819a0 | ||
![]() |
1eb4aff57a | ||
![]() |
c8074e3792 | ||
![]() |
ef0a07c073 | ||
![]() |
8851903434 | ||
![]() |
4a8f081971 | ||
![]() |
471d6d4db5 | ||
![]() |
464ac8fe2a | ||
![]() |
54c0bf6429 | ||
![]() |
ec02d9aad6 | ||
![]() |
c57d315963 | ||
![]() |
04fdbfe17d | ||
![]() |
6bbec71fde | ||
![]() |
e215b6cb85 | ||
![]() |
e177c186e4 | ||
![]() |
4b81f627c6 | ||
![]() |
06b7561e78 | ||
![]() |
7fa69fb288 | ||
![]() |
795da343bb | ||
![]() |
07dfe0f5ea | ||
![]() |
8dcfd58e2c | ||
![]() |
d80bf3c656 | ||
![]() |
df99ab461e | ||
![]() |
55ce6bfffb | ||
![]() |
6beb7ee77a | ||
![]() |
f1e6828b7b | ||
![]() |
2943056f75 | ||
![]() |
44dc8b4753 | ||
![]() |
10fbae086a | ||
![]() |
18a53b6502 | ||
![]() |
c5a7f451ce | ||
![]() |
3c0cc9c2fb | ||
![]() |
e55de56a99 | ||
![]() |
f4d82c1438 | ||
![]() |
4f65cd7c0a | ||
![]() |
bde32edefe | ||
![]() |
0fd899aa07 | ||
![]() |
3e19e18f4c | ||
![]() |
00665d3c70 | ||
![]() |
eccd60aaf4 | ||
![]() |
44071fe77a | ||
![]() |
71e89cec23 | ||
![]() |
7973847d02 | ||
![]() |
e72ecdb7ca | ||
![]() |
8b543d09d8 | ||
![]() |
2f018b1833 | ||
![]() |
3af3515e74 | ||
![]() |
6fbb8d6739 | ||
![]() |
48dc1f3f90 | ||
![]() |
e9134421ab | ||
![]() |
09b51bbf87 | ||
![]() |
77286915a8 | ||
![]() |
d9497053e8 | ||
![]() |
674cb2afde | ||
![]() |
0daa45bd44 | ||
![]() |
6e5cb0debd | ||
![]() |
0f1bc5ddce | ||
![]() |
9e9e4431c1 | ||
![]() |
7da4d1561b | ||
![]() |
418947fcb3 | ||
![]() |
c68d89521f | ||
![]() |
6bcee20806 | ||
![]() |
5191f963bf | ||
![]() |
ef39f854d7 | ||
![]() |
04993f220a | ||
![]() |
2929dbf223 | ||
![]() |
3ffeceb851 | ||
![]() |
43631675d8 | ||
![]() |
aaff91d925 | ||
![]() |
85e240c045 | ||
![]() |
67e3b1e0c5 | ||
![]() |
e3cfe7853d | ||
![]() |
1257b04747 | ||
![]() |
ff4a628081 | ||
![]() |
f389196a34 | ||
![]() |
f26a4d484b | ||
![]() |
22173a64dd | ||
![]() |
fda2b1e906 | ||
![]() |
7a91177bc9 | ||
![]() |
840a2bb67d | ||
![]() |
bef505c158 | ||
![]() |
44f275d518 | ||
![]() |
1be0107168 | ||
![]() |
bcd8541863 | ||
![]() |
8dd63dbe31 | ||
![]() |
e4952ee006 | ||
![]() |
f69e0d314f | ||
![]() |
82a9051857 | ||
![]() |
5c05cd43cb | ||
![]() |
9bf9cc69c1 | ||
![]() |
163b2b241b | ||
![]() |
66f5e5c7d7 | ||
![]() |
9af9ea6099 | ||
![]() |
d285d6ca0d | ||
![]() |
abed6a0b1a | ||
![]() |
4b7f7be301 | ||
![]() |
9b6ed6c71c | ||
![]() |
348193f49c | ||
![]() |
48af5991b9 | ||
![]() |
e15f2b4b96 | ||
![]() |
6ab9e87599 | ||
![]() |
9c14a78afd | ||
![]() |
9baf60c617 | ||
![]() |
16a4168364 | ||
![]() |
a1ee06a099 | ||
![]() |
cebf31cf70 | ||
![]() |
2de447b60c | ||
![]() |
0a531ddf87 | ||
![]() |
bbdb074aec | ||
![]() |
6df80e8762 | ||
![]() |
77bfbc3006 | ||
![]() |
e247dd2535 | ||
![]() |
070f8df4dd | ||
![]() |
b5acf6e0c1 | ||
![]() |
6116af02ef | ||
![]() |
5ae90c84ea | ||
![]() |
e578d586f2 | ||
![]() |
fd58863eb6 | ||
![]() |
2d151f7739 | ||
![]() |
61f9a7b0d0 | ||
![]() |
ce92e784e1 | ||
![]() |
c9aafda6ac | ||
![]() |
4c83567da3 | ||
![]() |
4c1afd1e83 | ||
![]() |
fafe23cad7 | ||
![]() |
cbecae46f4 | ||
![]() |
4fe4b5abb6 | ||
![]() |
54b9510e05 | ||
![]() |
7d12597d29 | ||
![]() |
ca24ad0b95 | ||
![]() |
c8356e1151 | ||
![]() |
b67ce84c45 | ||
![]() |
e69a71427c | ||
![]() |
2cfc1b055b | ||
![]() |
ed0d135247 | ||
![]() |
564ad60c06 | ||
![]() |
dd068928c1 | ||
![]() |
5d8da126d0 | ||
![]() |
c205360f00 | ||
![]() |
d929a41f5f | ||
![]() |
34b99bc06b | ||
![]() |
c03a847884 | ||
![]() |
f75c4b39ec | ||
![]() |
01cdeff626 | ||
![]() |
60ce7d9e0a | ||
![]() |
a6052c7307 | ||
![]() |
7229493eb1 | ||
![]() |
a265334406 | ||
![]() |
dc53629587 | ||
![]() |
a6136e8b0b | ||
![]() |
f66ebcd0a2 | ||
![]() |
d071578ed0 | ||
![]() |
366528130e | ||
![]() |
35a7892781 | ||
![]() |
ed37136c5c | ||
![]() |
352a51e831 | ||
![]() |
9fdd5d7f03 | ||
![]() |
6e2bb564e1 | ||
![]() |
538361955d | ||
![]() |
b1412dc412 | ||
![]() |
d73dd1588c | ||
![]() |
2a4c9c6e45 | ||
![]() |
6744f48d88 | ||
![]() |
4e7d85e635 | ||
![]() |
9af14506e5 | ||
![]() |
5f5caa367a | ||
![]() |
2d99b81ab5 | ||
![]() |
0851057a8d | ||
![]() |
ab35caf9cf | ||
![]() |
40d6a95670 | ||
![]() |
de10ea55f3 | ||
![]() |
2316a38dd1 | ||
![]() |
a2dfeb8a16 | ||
![]() |
e243dbdc32 | ||
![]() |
5da6f0e903 | ||
![]() |
86ee92f2a2 | ||
![]() |
e34f2897d5 | ||
![]() |
71190f1f34 | ||
![]() |
204ec6337e | ||
![]() |
4487657576 | ||
![]() |
e2afcfb020 | ||
![]() |
709a87d194 | ||
![]() |
6710164c2c | ||
![]() |
f8010ea3ec | ||
![]() |
648fed975e | ||
![]() |
ec7cbabf01 | ||
![]() |
dfcd09dc22 | ||
![]() |
3a5721e91b | ||
![]() |
6452831cf9 | ||
![]() |
649123d07c | ||
![]() |
5d2dd2ebe2 | ||
![]() |
8728a5d50b | ||
![]() |
2a1a624878 | ||
![]() |
397ff2c35b | ||
![]() |
ca31f81a31 | ||
![]() |
b55f831678 | ||
![]() |
41b3c7850f | ||
![]() |
1813c53e8d | ||
![]() |
2eb8dc40ac | ||
![]() |
be7990bb49 | ||
![]() |
caf87f597f | ||
![]() |
60d0353119 | ||
![]() |
d2ff5d5bb0 | ||
![]() |
0376874c32 | ||
![]() |
9a36337d32 | ||
![]() |
2569fabf04 | ||
![]() |
b251c42195 | ||
![]() |
f9b738235e | ||
![]() |
0578087e5e | ||
![]() |
5c09f37d4a | ||
![]() |
7ac21332cf | ||
![]() |
28236867a0 | ||
![]() |
c08c09add7 | ||
![]() |
5a39d2d00e | ||
![]() |
984a93df96 | ||
![]() |
eb59dd6547 | ||
![]() |
273c7cfa2a | ||
![]() |
534abe4aaf | ||
![]() |
ec5af91b90 | ||
![]() |
e39be42c09 | ||
![]() |
909c967f35 | ||
![]() |
a619c3fcf9 | ||
![]() |
afbdafffc2 | ||
![]() |
499c9a1553 | ||
![]() |
8821579baa | ||
![]() |
6f4c4be952 | ||
![]() |
16a6f44570 | ||
![]() |
c6fe06bbc0 | ||
![]() |
300d3651e2 | ||
![]() |
df4f9342b9 | ||
![]() |
f2ea15f364 | ||
![]() |
87e03c2b85 | ||
![]() |
9bc1410ee1 | ||
![]() |
cd59577d57 | ||
![]() |
997fc8b133 | ||
![]() |
660bfb3fb3 | ||
![]() |
cd973be11b | ||
![]() |
41394d8236 | ||
![]() |
0a56bd3330 | ||
![]() |
83880cced3 | ||
![]() |
8b1f7d8774 | ||
![]() |
a3daa8cb13 | ||
![]() |
3ff92ba1ee | ||
![]() |
5d88830d51 | ||
![]() |
090cd10975 | ||
![]() |
15119f943a | ||
![]() |
6762c20af8 | ||
![]() |
7dd97eb597 | ||
![]() |
3308b76339 | ||
![]() |
41a91af5cf | ||
![]() |
84d4e4a7ef | ||
![]() |
59ac170340 | ||
![]() |
dbcdd29139 | ||
![]() |
17b21eae52 | ||
![]() |
b69fa866db | ||
![]() |
872ee4259a | ||
![]() |
d6cbe6ca87 | ||
![]() |
fb855feb52 | ||
![]() |
154822933e | ||
![]() |
a5d33d5e90 | ||
![]() |
a185ab70fd | ||
![]() |
52778d62fc | ||
![]() |
2820860ba3 | ||
![]() |
53749e1749 | ||
![]() |
e2eff5269f | ||
![]() |
ab279c6fb8 | ||
![]() |
456cf72974 | ||
![]() |
ce09d4134b | ||
![]() |
9c92eed86f | ||
![]() |
9db4dc971d | ||
![]() |
72422b0748 | ||
![]() |
eb4aab7173 | ||
![]() |
ada1956206 | ||
![]() |
6bf359fa79 | ||
![]() |
db346b5b48 | ||
![]() |
0daaa49586 | ||
![]() |
ee84da358c | ||
![]() |
5a96a9eba2 | ||
![]() |
6a826fce91 | ||
![]() |
ecf851bc60 | ||
![]() |
b00fd49640 | ||
![]() |
10b1738f59 | ||
![]() |
82adba0f2f | ||
![]() |
e76c6e2ee8 | ||
![]() |
2408a05151 | ||
![]() |
94f4469638 | ||
![]() |
20e0cb8d47 | ||
![]() |
72a7a884b4 | ||
![]() |
6acbd76b00 | ||
![]() |
421f2605c0 | ||
![]() |
23102bc18e | ||
![]() |
43833af53c | ||
![]() |
3632f02564 | ||
![]() |
5a594091dc | ||
![]() |
15334dcd89 | ||
![]() |
12acf0f7a7 | ||
![]() |
bac86a1941 | ||
![]() |
06994e0e21 | ||
![]() |
bc17ad31dc | ||
![]() |
8fc437ef43 | ||
![]() |
1c6e956079 | ||
![]() |
fed928b438 | ||
![]() |
1be315de37 | ||
![]() |
60d6a8b13d | ||
![]() |
514a51ef3e | ||
![]() |
c06995b34d | ||
![]() |
9cabe826ba | ||
![]() |
b558f750bf | ||
![]() |
6020e8b69e | ||
![]() |
fe7a53f3cf | ||
![]() |
682d5ff8e6 | ||
![]() |
34cc04d753 | ||
![]() |
3f9f7cfab1 | ||
![]() |
2b1bcd446b | ||
![]() |
26251d6d06 | ||
![]() |
f8f7f9d5f5 | ||
![]() |
de0a9548f7 | ||
![]() |
726197d890 | ||
![]() |
f09a30d5b0 | ||
![]() |
900708f93b | ||
![]() |
7dd3910f47 | ||
![]() |
ac87d9de69 | ||
![]() |
423d7af3df | ||
![]() |
808f504305 | ||
![]() |
28998cfd81 | ||
![]() |
63bb7198df | ||
![]() |
b9f3805447 | ||
![]() |
770ec228c7 | ||
![]() |
fc97e9fbdf | ||
![]() |
fe4ba69958 | ||
![]() |
7faeaf9f24 | ||
![]() |
4b8d6caf48 | ||
![]() |
a8cb510a2e | ||
![]() |
6a1557f2f4 | ||
![]() |
c10ae4bc85 | ||
![]() |
9ea1752d60 | ||
![]() |
8eb0888a5d | ||
![]() |
9ddeb6e187 | ||
![]() |
624ac8aede | ||
![]() |
18d244eded | ||
![]() |
911b1e49ab | ||
![]() |
5055d4a755 | ||
![]() |
c095f83116 | ||
![]() |
f0845197d8 | ||
![]() |
34de6d33c9 | ||
![]() |
b23fc444b5 | ||
![]() |
e888439f55 | ||
![]() |
7f70c5f7b7 | ||
![]() |
889bc3c20c | ||
![]() |
b58c17f8df | ||
![]() |
a8ad6b4d51 | ||
![]() |
59888b68ab | ||
![]() |
0ed31303b5 | ||
![]() |
e182a8c836 | ||
![]() |
b61a305039 | ||
![]() |
9370a0e5d8 | ||
![]() |
ccdbcfea0b | ||
![]() |
46a9600d0e | ||
![]() |
6fa0a0a516 | ||
![]() |
8c2cb81d7e | ||
![]() |
4fedad6c5b | ||
![]() |
ab1e11e44f | ||
![]() |
d4485f7cc0 | ||
![]() |
8d58012786 | ||
![]() |
7311fb7cad | ||
![]() |
e9b5616eaf | ||
![]() |
c82e7c75fe | ||
![]() |
a18db72a36 | ||
![]() |
b616ef9b22 | ||
![]() |
7c4bb23ff3 | ||
![]() |
dc4a9cbe85 | ||
![]() |
0a881575da | ||
![]() |
5898a1dcbb | ||
![]() |
d2bc610d64 | ||
![]() |
d55881d278 | ||
![]() |
88d643eb36 | ||
![]() |
1bbe6d0a30 | ||
![]() |
2e630d2611 | ||
![]() |
65ec4ea629 | ||
![]() |
dea7a41138 | ||
![]() |
d63c3d9d10 | ||
![]() |
5f5011e8f6 | ||
![]() |
b86e44aa35 | ||
![]() |
09b9f9b7ce | ||
![]() |
dd0fa4fd0e | ||
![]() |
d162815ca9 | ||
![]() |
dc1444e112 | ||
![]() |
90aae43984 | ||
![]() |
60716371e9 | ||
![]() |
6a9f2cdc68 | ||
![]() |
95a8af093f | ||
![]() |
c5f9762b7e | ||
![]() |
321a46b724 | ||
![]() |
1d8c612f78 | ||
![]() |
f4e372c8ab | ||
![]() |
907b2f18f7 | ||
![]() |
9fe6c12e81 | ||
![]() |
d0c4bd23f7 | ||
![]() |
3efc50d1d4 | ||
![]() |
6742fd8aea | ||
![]() |
89d1b36084 | ||
![]() |
9ad557fb2d | ||
![]() |
8ac7c23b7d | ||
![]() |
c55cf5f4c1 | ||
![]() |
46f432074e | ||
![]() |
a30242d661 | ||
![]() |
0d548b73ef | ||
![]() |
9dc90fcde1 | ||
![]() |
caf94c72c5 | ||
![]() |
697fb05c58 | ||
![]() |
5dd2ca767f | ||
![]() |
e84e1b68c1 | ||
![]() |
3eaa9a2579 | ||
![]() |
5563e808da | ||
![]() |
49f4358b0a | ||
![]() |
2c436b3362 | ||
![]() |
ddcfb49262 | ||
![]() |
eb44519b5d | ||
![]() |
134c0f0bdb | ||
![]() |
6740c94562 | ||
![]() |
c28ce5f619 | ||
![]() |
0446d4d691 | ||
![]() |
061b942dc0 | ||
![]() |
2f3e001717 | ||
![]() |
341102fe9f | ||
![]() |
102e0689d8 | ||
![]() |
ac2f90f2e1 | ||
![]() |
7773bbd098 | ||
![]() |
903ed09a61 | ||
![]() |
973bd10a12 | ||
![]() |
fe60fa9faa | ||
![]() |
b6ee90a243 | ||
![]() |
6ab5eb347b | ||
![]() |
bc52ec6110 | ||
![]() |
7997147245 | ||
![]() |
2923e8533d | ||
![]() |
32689aa5be | ||
![]() |
67fa9e5237 | ||
![]() |
ac55558c97 | ||
![]() |
608c3d7baf | ||
![]() |
6bf3dc77c4 | ||
![]() |
0c533a488f | ||
![]() |
249bdb07dd | ||
![]() |
6b45dbca04 | ||
![]() |
dee78a4095 | ||
![]() |
ec86f4215f | ||
![]() |
61ba3c5e31 | ||
![]() |
308dd53783 | ||
![]() |
5cb7a709e7 | ||
![]() |
d2c01d529f | ||
![]() |
c9ab209f9e | ||
![]() |
eb95b88156 | ||
![]() |
6c731d33f6 | ||
![]() |
aa951b1489 | ||
![]() |
190814bdae | ||
![]() |
cdd86f42cf | ||
![]() |
6fcadab3ce | ||
![]() |
20708a07bf | ||
![]() |
53a530b2f5 | ||
![]() |
4d2d844c12 | ||
![]() |
9fb7926a0d | ||
![]() |
dd27392861 | ||
![]() |
1b2d386a85 | ||
![]() |
88863bb6ae | ||
![]() |
c01a84e344 | ||
![]() |
765ff94b5b | ||
![]() |
f0bd2bc39a | ||
![]() |
fb8592b7ba | ||
![]() |
6b5d92f9e0 | ||
![]() |
8536348813 | ||
![]() |
ccbf14322a | ||
![]() |
e6f8b105b0 | ||
![]() |
cca6d4b267 | ||
![]() |
451ff827b8 | ||
![]() |
6e0c038a3c | ||
![]() |
4a58bd514e | ||
![]() |
2851bb9eff | ||
![]() |
f3d7eeff77 | ||
![]() |
db0685a663 | ||
![]() |
c162bc6294 | ||
![]() |
067bb1e9f4 | ||
![]() |
be53c209c0 | ||
![]() |
103ff26c0a | ||
![]() |
e0054fef7d | ||
![]() |
5b692124cc | ||
![]() |
a1adfdc7d5 | ||
![]() |
edccf18df5 | ||
![]() |
023631463c | ||
![]() |
7f3b9a4acc | ||
![]() |
76ffe0c5aa | ||
![]() |
bfb21f3e01 | ||
![]() |
7afd26a6d1 | ||
![]() |
91d3efa35a | ||
![]() |
dcb2780b83 | ||
![]() |
d5bce42b52 | ||
![]() |
fb07391ce4 | ||
![]() |
c8a5d6181b | ||
![]() |
6ff13d78b7 | ||
![]() |
7164f61850 | ||
![]() |
ed92ece815 | ||
![]() |
6b51c72e0c | ||
![]() |
6203c23449 | ||
![]() |
34057045be | ||
![]() |
932ea7a0d1 | ||
![]() |
f976826690 | ||
![]() |
45998deb5d | ||
![]() |
1f9dd689b9 | ||
![]() |
ceed29687f | ||
![]() |
9f534422e6 | ||
![]() |
1a961b5750 | ||
![]() |
f4132fb38b | ||
![]() |
d46e37cb4c | ||
![]() |
8813b29cec | ||
![]() |
23fb833ea7 | ||
![]() |
56b49955b7 | ||
![]() |
ceb45a0885 | ||
![]() |
fe55f37083 | ||
![]() |
622d355ab4 | ||
![]() |
d11884db49 | ||
![]() |
7572d5ac5a | ||
![]() |
0b03ac2cb2 | ||
![]() |
83f77c80c0 | ||
![]() |
5008205a3e | ||
![]() |
f572bd7e4e | ||
![]() |
ac4bbf55f6 | ||
![]() |
e9504b7fd8 | ||
![]() |
5bd8827431 | ||
![]() |
ad9c2d3cb9 | ||
![]() |
9ada97a810 | ||
![]() |
dc232b74fb | ||
![]() |
6f41ce0260 | ||
![]() |
abe38f7d26 | ||
![]() |
1f2b35860f | ||
![]() |
4a5bc6275d | ||
![]() |
5c1ddb5078 | ||
![]() |
21745d72b8 | ||
![]() |
274f32d42e | ||
![]() |
49dd615693 | ||
![]() |
ddce5bca03 | ||
![]() |
3cc7ebf810 | ||
![]() |
afae4b5141 | ||
![]() |
a58c9094db | ||
![]() |
873af01245 | ||
![]() |
b6c268b32a | ||
![]() |
5cbd3b383c | ||
![]() |
ba7d6a9e6b | ||
![]() |
54087d80f3 | ||
![]() |
90dd2b1473 | ||
![]() |
9714b9f590 | ||
![]() |
aec81f44d1 | ||
![]() |
67848c0b91 | ||
![]() |
2d4abc1cae | ||
![]() |
837100fcb1 | ||
![]() |
5f288220f9 | ||
![]() |
7f386b175c | ||
![]() |
175174597d | ||
![]() |
a11751eae8 | ||
![]() |
1cae99b4bf | ||
![]() |
5de1eae4f2 | ||
![]() |
586dafee2f | ||
![]() |
9d689d639d | ||
![]() |
3aa24042a8 | ||
![]() |
a494c99918 | ||
![]() |
e9990b43c2 | ||
![]() |
fbdc3ac4ef | ||
![]() |
d763d2fe7a | ||
![]() |
6bc54832ef | ||
![]() |
78bc52ea53 | ||
![]() |
c49e22d396 | ||
![]() |
7af8601db4 | ||
![]() |
27a577586e | ||
![]() |
44421a22c0 | ||
![]() |
ad32307e3b | ||
![]() |
7a4c9dc1c2 | ||
![]() |
4b83f37912 | ||
![]() |
7ab36403e1 | ||
![]() |
585d664b7b | ||
![]() |
ee2e6d1d1a | ||
![]() |
27f9b1c7b0 | ||
![]() |
3d0ee17c91 | ||
![]() |
6299332349 | ||
![]() |
5ab0f988ca | ||
![]() |
0b4054e043 | ||
![]() |
10c3b206cb | ||
![]() |
b588ccddd7 | ||
![]() |
de45ec0146 | ||
![]() |
4618c9c43b | ||
![]() |
e0466dc592 | ||
![]() |
59f4bd435c | ||
![]() |
2d732a11b1 | ||
![]() |
27a4fc436f | ||
![]() |
8f91f2c9b4 | ||
![]() |
20bde8866e | ||
![]() |
122dbc86ab | ||
![]() |
27a70fec48 | ||
![]() |
d109f5645b | ||
![]() |
e3c4c8a90e | ||
![]() |
df019cebd5 | ||
![]() |
6cf186edb5 | ||
![]() |
c8b40930c0 | ||
![]() |
944e3c0619 | ||
![]() |
a043899ba2 | ||
![]() |
36a4f3a259 | ||
![]() |
cddf84c398 | ||
![]() |
17077b6813 | ||
![]() |
11a05e778f | ||
![]() |
b9c7813058 | ||
![]() |
207b7ca4bc | ||
![]() |
0de019b6a6 | ||
![]() |
91b856ccce | ||
![]() |
b57d9a4ff0 | ||
![]() |
ebed8c6a2e | ||
![]() |
b1a4db0b69 | ||
![]() |
bab2f8200a | ||
![]() |
0f9c90e0ed | ||
![]() |
303e1df13f | ||
![]() |
baa981ea21 | ||
![]() |
753d0091e8 | ||
![]() |
8540b5e4ad | ||
![]() |
85bc6630c0 | ||
![]() |
9acd7bfe25 | ||
![]() |
a97cdff14d | ||
![]() |
fee367a74f | ||
![]() |
f629f8312d | ||
![]() |
5517d2323b | ||
![]() |
5af4703177 | ||
![]() |
90e5cc5484 | ||
![]() |
3e59c1e20d | ||
![]() |
1ebc96fe10 | ||
![]() |
5215e3205a | ||
![]() |
3717e2157f | ||
![]() |
0b93bab6c2 | ||
![]() |
b838ad5b7a | ||
![]() |
9888a54f15 | ||
![]() |
d9b3ebfede | ||
![]() |
51637f4256 | ||
![]() |
8c959be511 | ||
![]() |
a4f6cec7a3 | ||
![]() |
fe2546c81a | ||
![]() |
1b94f24d6e | ||
![]() |
c030a38168 | ||
![]() |
c24b74c229 | ||
![]() |
fdcde7dba3 | ||
![]() |
dddc609859 | ||
![]() |
9393be477a | ||
![]() |
bb7795e820 | ||
![]() |
7b686881a1 | ||
![]() |
9b6bf8fa37 | ||
![]() |
84d9245c70 | ||
![]() |
8674b0c3d1 | ||
![]() |
c391401648 | ||
![]() |
7d24a95b45 | ||
![]() |
df10714991 | ||
![]() |
05a3c12118 | ||
![]() |
1ffa4e5047 | ||
![]() |
64158f2b0b | ||
![]() |
fe3a58273e | ||
![]() |
03a129aacf | ||
![]() |
6ea3a08fdb | ||
![]() |
7c20f60b88 | ||
![]() |
ebb33eddd9 | ||
![]() |
731dc82f8c | ||
![]() |
f20f97c936 | ||
![]() |
a94255a7ac | ||
![]() |
53fa435a1f | ||
![]() |
764cf3251d | ||
![]() |
c287893225 | ||
![]() |
de8b1fd1de | ||
![]() |
540ed64635 | ||
![]() |
d6f9d1df04 | ||
![]() |
6d2c30daf3 | ||
![]() |
f19e5d6530 | ||
![]() |
a6de144c3e | ||
![]() |
f185c739bc | ||
![]() |
e8af34dc63 | ||
![]() |
bf3f0efb3a | ||
![]() |
d135ba99b2 | ||
![]() |
07931ed1c8 | ||
![]() |
ee031eb525 | ||
![]() |
eacd788cf5 | ||
![]() |
59b0d9f62d | ||
![]() |
f8d40e7d53 | ||
![]() |
c5f001a46a | ||
![]() |
67e4529292 | ||
![]() |
30a21830d0 | ||
![]() |
8fff2ef74a | ||
![]() |
8d8212d384 | ||
![]() |
d5b7f28b44 | ||
![]() |
a43a573ad5 | ||
![]() |
e6beb60da5 | ||
![]() |
20c672a460 | ||
![]() |
6b8c34137c | ||
![]() |
342239a9c5 | ||
![]() |
39c75d31be | ||
![]() |
556451a7f2 | ||
![]() |
b63cde97f4 | ||
![]() |
0407ddb364 | ||
![]() |
cf75de710c | ||
![]() |
69e3308771 | ||
![]() |
881f9e42d1 | ||
![]() |
45445e2e03 | ||
![]() |
c7495ebcc0 | ||
![]() |
1aa6276c29 | ||
![]() |
bbb21e5dd3 | ||
![]() |
ea020f2e26 | ||
![]() |
b6a603fe51 | ||
![]() |
a2fdd0a72f | ||
![]() |
4fa0970519 | ||
![]() |
faa15c5b83 | ||
![]() |
f5d4da0144 | ||
![]() |
67a2207c4a | ||
![]() |
7e8212c459 | ||
![]() |
314ff440f7 | ||
![]() |
d0b05e3c36 | ||
![]() |
9baa7ca37f | ||
![]() |
9837a9c401 | ||
![]() |
55d8967147 | ||
![]() |
a48e078c0d | ||
![]() |
e98bcf0523 | ||
![]() |
c46d6f8da2 | ||
![]() |
4aebd00a9e | ||
![]() |
24a353364d | ||
![]() |
f2660bee6a | ||
![]() |
42959d0e8f | ||
![]() |
c85f485aa7 | ||
![]() |
05f775b5f2 | ||
![]() |
ebb5977837 | ||
![]() |
7849070f99 | ||
![]() |
7bc6de7526 | ||
![]() |
07ec709141 | ||
![]() |
b9d5aea073 | ||
![]() |
d98199de9c | ||
![]() |
3ecb95298f | ||
![]() |
54cac3033f | ||
![]() |
68bef0a57d | ||
![]() |
860ecd7055 | ||
![]() |
ff819d8ad7 | ||
![]() |
6340689582 | ||
![]() |
eed10f7e23 | ||
![]() |
0356dbbb36 | ||
![]() |
a9b203d23f | ||
![]() |
b29a776550 | ||
![]() |
538af1c90a | ||
![]() |
b91cb18c36 | ||
![]() |
748f3ad5bb | ||
![]() |
7890157931 | ||
![]() |
8b199cb2fe | ||
![]() |
22d161a5dd | ||
![]() |
1be29dc5ac | ||
![]() |
b935a12dab | ||
![]() |
06bdc9ed83 | ||
![]() |
c202f17c8d | ||
![]() |
568cf73c90 | ||
![]() |
b574e95850 | ||
![]() |
47938e1e22 | ||
![]() |
895793fc82 | ||
![]() |
c9f511d24a | ||
![]() |
8e856ebcd0 | ||
![]() |
252a76db80 | ||
![]() |
c03dc13bb7 | ||
![]() |
4c8ed65b60 | ||
![]() |
248493f155 | ||
![]() |
a535d68380 | ||
![]() |
15043e93b6 | ||
![]() |
ed253b5fe6 | ||
![]() |
fe81380bf5 | ||
![]() |
5e92ee6565 | ||
![]() |
1a3635304b | ||
![]() |
2cb95bd937 | ||
![]() |
4ccaf86110 | ||
![]() |
76f0466536 | ||
![]() |
3aa2c0d63a | ||
![]() |
bc386c4882 | ||
![]() |
57bb3346d9 | ||
![]() |
6c19cbef26 | ||
![]() |
206f7ae76a | ||
![]() |
c286155bfa | ||
![]() |
8178ba2871 | ||
![]() |
fa3cfc0dd5 | ||
![]() |
af38cea133 | ||
![]() |
c484613ce0 | ||
![]() |
e423cfe194 | ||
![]() |
6f22b5afad | ||
![]() |
bd3a4166b2 | ||
![]() |
e45e519495 | ||
![]() |
21a5ce033c | ||
![]() |
163792e9b9 | ||
![]() |
0bc4e22379 | ||
![]() |
6168e1127c | ||
![]() |
6791c57420 | ||
![]() |
6144e26eb9 | ||
![]() |
9e721031d5 | ||
![]() |
3735537a50 | ||
![]() |
f33543377e | ||
![]() |
f265066081 | ||
![]() |
9fa8f7fc0a | ||
![]() |
0987d3b10f | ||
![]() |
3cc65ac054 | ||
![]() |
d4782fb1ca | ||
![]() |
7980614650 | ||
![]() |
7c97f78393 | ||
![]() |
430e516d3a | ||
![]() |
919223c23a | ||
![]() |
1265da0288 | ||
![]() |
2d8b9937de | ||
![]() |
0300c4d109 | ||
![]() |
ad58e50b45 | ||
![]() |
e479f3b944 | ||
![]() |
190c8516f5 | ||
![]() |
520c0b91a5 | ||
![]() |
4403864da3 | ||
![]() |
e8829710bc | ||
![]() |
ff8b2eb435 | ||
![]() |
d0b08f32f5 | ||
![]() |
9ea111d1af | ||
![]() |
4049492b6d | ||
![]() |
8a55f9b1c8 | ||
![]() |
db095f6563 | ||
![]() |
44f039a1c8 | ||
![]() |
2290a7a1b1 | ||
![]() |
2b0abdbd9a | ||
![]() |
0273f96ef6 | ||
![]() |
1a56a032fe | ||
![]() |
f4920fb485 | ||
![]() |
79d3e94942 | ||
![]() |
628d0335b8 | ||
![]() |
e47622f26b | ||
![]() |
62108c3b0b | ||
![]() |
99b4f25b99 | ||
![]() |
ca116df260 | ||
![]() |
ae4fae9d3e | ||
![]() |
7df4fc8941 | ||
![]() |
83b39a4a02 | ||
![]() |
88e1a17cde | ||
![]() |
e78e75d85d | ||
![]() |
bd798a3267 | ||
![]() |
fdfa1ed578 | ||
![]() |
d2268d5ebb | ||
![]() |
29654cfee7 | ||
![]() |
d4639ea6d9 | ||
![]() |
38687ee394 | ||
![]() |
1ea7541f65 | ||
![]() |
3cd7bf31e2 | ||
![]() |
0e9286a19e | ||
![]() |
0320a58082 | ||
![]() |
65c41e6c2b |
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,3 +1,8 @@
|
||||
# Tools
|
||||
.ropeproject/
|
||||
# Visual Studio
|
||||
/.vs/
|
||||
|
||||
# Build/deps dir
|
||||
/build/
|
||||
/cmake-build-debug/
|
||||
@@ -17,13 +22,13 @@ tags
|
||||
/src/nvim/po/vim.pot
|
||||
/src/nvim/po/*.ck
|
||||
|
||||
# generated by tests with $NVIM_LOG_FILE set.
|
||||
# Generated by tests with $NVIM_LOG_FILE set.
|
||||
/.nvimlog
|
||||
|
||||
# Files generated by scripts/vim-patch.sh
|
||||
# Generated by scripts/vim-patch.sh
|
||||
/.vim-src/
|
||||
|
||||
# Files generated by the tests
|
||||
# Generated by old (Vim) tests.
|
||||
/src/nvim/testdir/del
|
||||
/src/nvim/testdir/test*.out
|
||||
/src/nvim/testdir/test*.res
|
||||
@@ -36,10 +41,10 @@ tags
|
||||
/src/nvim/testdir/valgrind.*
|
||||
/src/nvim/testdir/.gdbinit
|
||||
|
||||
# Folder generated by the unit tests
|
||||
# Generated by unit tests.
|
||||
/test/includes/post/
|
||||
|
||||
# generated by luacheck during `make testlint'
|
||||
# Generated by luacheck during `make testlint'
|
||||
/test/.luacheckcache
|
||||
|
||||
# local make targets
|
||||
|
69
.travis.yml
69
.travis.yml
@@ -4,13 +4,8 @@ language: c
|
||||
|
||||
env:
|
||||
global:
|
||||
# To force rebuilding of third-party dependencies, set this to 'true'.
|
||||
- BUILD_NVIM_DEPS=false
|
||||
# Travis has 1.5 virtual cores according to
|
||||
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
||||
- MAKE_CMD="make -j2"
|
||||
# Update PATH for pip.
|
||||
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:/usr/lib/llvm-symbolizer-4.0/bin:$PATH"
|
||||
# Set "false" to force rebuild of third-party dependencies.
|
||||
- CACHE_ENABLE=true
|
||||
# Build directory for Neovim.
|
||||
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
||||
# Build directory for third-party dependencies.
|
||||
@@ -41,50 +36,54 @@ env:
|
||||
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
||||
# Environment variables for Valgrind.
|
||||
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
||||
# Cache marker for third-party dependencies cache.
|
||||
# If this file exists, we know that the cache contains compiled
|
||||
# dependencies and we can use it.
|
||||
# If this file exists, the cache is valid (compile was successful).
|
||||
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
||||
# default target name for functional tests
|
||||
- FUNCTIONALTEST=functionaltest
|
||||
- CI_TARGET=tests
|
||||
# Environment variables for ccache
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_SLOPPINESS=time_macros,file_macro
|
||||
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: sanitizers
|
||||
os: linux
|
||||
compiler: clang-4.0
|
||||
env: >
|
||||
CLANG_SANITIZER=ASAN_UBSAN
|
||||
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
- stage: normal builds
|
||||
os: linux
|
||||
compiler: gcc-5
|
||||
env: FUNCTIONALTEST=functionaltest-lua
|
||||
compiler: clang
|
||||
env: >
|
||||
CLANG_SANITIZER=ASAN_UBSAN
|
||||
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
|
||||
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
sudo: true
|
||||
- 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
|
||||
compiler: gcc
|
||||
env: >
|
||||
FUNCTIONALTEST=functionaltest-lua
|
||||
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
|
||||
- os: linux
|
||||
# Travis creates a cache per compiler. Set a different value here to
|
||||
# store 32-bit dependencies in a separate cache.
|
||||
compiler: gcc
|
||||
env: BUILD_32BIT=ON
|
||||
- os: osx
|
||||
compiler: clang
|
||||
osx_image: xcode7.3 # macOS 10.11
|
||||
- os: osx
|
||||
compiler: gcc-4.9
|
||||
compiler: gcc
|
||||
osx_image: xcode7.3 # macOS 10.11
|
||||
- stage: lint
|
||||
os: linux
|
||||
- os: linux
|
||||
env: CI_TARGET=lint
|
||||
- stage: Flaky builds
|
||||
os: linux
|
||||
compiler: gcc-5
|
||||
env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
compiler: gcc
|
||||
env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- os: linux
|
||||
compiler: clang-4.0
|
||||
compiler: clang
|
||||
env: CLANG_SANITIZER=TSAN
|
||||
allow_failures:
|
||||
- env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- env: CLANG_SANITIZER=TSAN
|
||||
fast_finish: true
|
||||
|
||||
@@ -93,31 +92,25 @@ install: ci/install.sh
|
||||
before_script: ci/before_script.sh
|
||||
script: ci/script.sh
|
||||
before_cache: ci/before_cache.sh
|
||||
after_success: ci/after_success.sh
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-4.0
|
||||
packages:
|
||||
- autoconf
|
||||
- automake
|
||||
- apport
|
||||
- build-essential
|
||||
- clang-4.0
|
||||
- clang
|
||||
- cmake
|
||||
- cscope
|
||||
- g++-5-multilib
|
||||
- g++-multilib
|
||||
- gcc-5-multilib
|
||||
- gcc-multilib
|
||||
- gdb
|
||||
- language-pack-tr
|
||||
- libc6-dev-i386
|
||||
- libtool
|
||||
- llvm-4.0-dev
|
||||
- locales
|
||||
- ninja-build
|
||||
- pkg-config
|
||||
- unzip
|
||||
- valgrind
|
||||
@@ -129,9 +122,11 @@ branches:
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
ccache: true
|
||||
directories:
|
||||
- "$HOME/.cache/pip"
|
||||
- "$HOME/.cache/nvim-deps"
|
||||
- "$HOME/.cache/nvim-deps-downloads"
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
|
148
CMakeLists.txt
148
CMakeLists.txt
@@ -1,5 +1,9 @@
|
||||
cmake_minimum_required(VERSION 2.8.7)
|
||||
project(nvim)
|
||||
# CMAKE REFERENCE
|
||||
# intro: https://codingnest.com/basic-cmake/
|
||||
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(nvim C)
|
||||
|
||||
if(POLICY CMP0059)
|
||||
cmake_policy(SET CMP0059 OLD) # Needed until cmake 2.8.12. #4389
|
||||
@@ -11,8 +15,41 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
# We don't support building in-tree.
|
||||
include(PreventInTreeBuilds)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Prefer our bundled versions of dependencies.
|
||||
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
if(DEFINED ENV{DEPS_BUILD_DIR})
|
||||
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
else()
|
||||
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
# When running from within CLion or Visual Studio,
|
||||
# build bundled dependencies automatically.
|
||||
if(NOT EXISTS ${DEPS_PREFIX}
|
||||
AND (DEFINED ENV{CLION_IDE}
|
||||
OR DEFINED ENV{VisualStudioEdition}))
|
||||
message(STATUS "Building dependencies...")
|
||||
set(DEPS_BUILD_DIR ${PROJECT_BINARY_DIR}/.deps)
|
||||
file(MAKE_DIRECTORY ${DEPS_BUILD_DIR})
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
|
||||
-DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
|
||||
-DCMAKE_C_FLAGS_MINSIZEREL=${CMAKE_C_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
${PROJECT_SOURCE_DIR}/third-party
|
||||
WORKING_DIRECTORY ${DEPS_BUILD_DIR})
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}
|
||||
--config ${CMAKE_BUILD_TYPE})
|
||||
set(DEPS_PREFIX ${DEPS_BUILD_DIR}/usr)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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)
|
||||
@@ -39,9 +76,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
@@ -49,6 +83,9 @@ if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(USE_FNAME_CASE TRUE)
|
||||
endif()
|
||||
|
||||
option(ENABLE_LIBINTL "enable libintl" ON)
|
||||
option(ENABLE_LIBICONV "enable libiconv" ON)
|
||||
|
||||
# Set default build type.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'.")
|
||||
@@ -63,12 +100,12 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
# If not in a git repo (e.g., a tarball) these tokens define the complete
|
||||
# version string, else they are combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 2)
|
||||
set(NVIM_VERSION_MINOR 3)
|
||||
set(NVIM_VERSION_PATCH 1)
|
||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
||||
|
||||
# API level
|
||||
set(NVIM_API_LEVEL 3) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL 4) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change.
|
||||
set(NVIM_API_PRERELEASE false)
|
||||
|
||||
@@ -170,7 +207,6 @@ if(NOT HAS_ACCEPTABLE_FORTIFY)
|
||||
# -U in add_definitions doesn't end up in the correct spot, so we add it to
|
||||
# the flags variable instead.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1")
|
||||
endif()
|
||||
|
||||
# Remove --sort-common from linker flags, as this seems to cause bugs (see #2641, #3374).
|
||||
@@ -204,6 +240,7 @@ int main(void)
|
||||
if(MSVC)
|
||||
# XXX: /W4 gives too many warnings. #3241
|
||||
add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
add_definitions(-DWIN32)
|
||||
else()
|
||||
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
||||
-Wstrict-prototypes -std=gnu99)
|
||||
@@ -223,6 +260,9 @@ endif()
|
||||
if(MINGW)
|
||||
# Use POSIX compatible stdio in Mingw
|
||||
add_definitions(-D__USE_MINGW_ANSI_STDIO)
|
||||
endif()
|
||||
if(WIN32)
|
||||
# Windows Vista is the minimum supported version
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
endif()
|
||||
|
||||
@@ -249,15 +289,16 @@ if(HAS_DIAG_COLOR_FLAG)
|
||||
add_definitions(-fdiagnostics-color=auto)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.5")
|
||||
# Array-bounds testing is broken in some GCC versions before 4.8.5.
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# 1. Array-bounds testing is broken in some GCC versions before 4.8.5.
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
|
||||
# 2. But _Pragma("...ignored") is broken (unresolved) in GCC 5+:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66099
|
||||
# So we must disable -Warray-bounds globally for GCC (for kbtree.h, #7083).
|
||||
check_c_compiler_flag(-Wno-array-bounds HAS_NO_ARRAY_BOUNDS_FLAG)
|
||||
if(HAS_NO_ARRAY_BOUNDS_FLAG)
|
||||
add_definitions(-Wno-array-bounds)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF)
|
||||
@@ -277,22 +318,25 @@ else()
|
||||
set(DEBUG 0)
|
||||
endif()
|
||||
|
||||
option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
|
||||
|
||||
add_definitions(-DINCLUDE_GENERATED_DECLARATIONS)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(NO_UNDEFINED "-Wl,--no-undefined -lsocket")
|
||||
elseif(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(NO_UNDEFINED "-Wl,--no-undefined")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${NO_UNDEFINED}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${NO_UNDEFINED}")
|
||||
|
||||
# For O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags on older systems
|
||||
# (pre POSIX.1-2008: glibc 2.11 and earlier). #4042
|
||||
# For ptsname(). #6743
|
||||
add_definitions(-D_GNU_SOURCE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined -lsocket")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
# Required for luajit.
|
||||
set(CMAKE_EXE_LINKER_FLAGS
|
||||
@@ -319,6 +363,7 @@ if(PREFER_LUA)
|
||||
find_package(Lua REQUIRED)
|
||||
set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
|
||||
set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES})
|
||||
# Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped.
|
||||
find_package(LuaJit)
|
||||
else()
|
||||
find_package(LuaJit REQUIRED)
|
||||
@@ -337,7 +382,7 @@ main(void)
|
||||
}
|
||||
" MSGPACK_HAS_FLOAT32)
|
||||
if(MSGPACK_HAS_FLOAT32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32")
|
||||
add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
|
||||
endif()
|
||||
|
||||
option(FEAT_TUI "Enable the Terminal UI" ON)
|
||||
@@ -358,7 +403,7 @@ if(FEAT_TUI)
|
||||
}
|
||||
" UNIBI_HAS_VAR_FROM)
|
||||
if(UNIBI_HAS_VAR_FROM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_UNIBI_HAS_VAR_FROM")
|
||||
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
|
||||
endif()
|
||||
|
||||
find_package(LibTermkey REQUIRED)
|
||||
@@ -387,31 +432,30 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA
|
||||
message(FATAL_ERROR "Sanitizers are only supported for Clang.")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD")
|
||||
message(STATUS "detected OpenBSD/FreeBSD; disabled jemalloc. #5318")
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD|Windows") # see #5318
|
||||
message(STATUS "skipping jemalloc on this system: ${CMAKE_SYSTEM_NAME}")
|
||||
option(ENABLE_JEMALLOC "enable jemalloc" OFF)
|
||||
else()
|
||||
option(ENABLE_JEMALLOC "enable jemalloc" ON)
|
||||
endif()
|
||||
|
||||
if (ENABLE_JEMALLOC)
|
||||
if(ENABLE_JEMALLOC)
|
||||
if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
|
||||
message(STATUS "Sanitizers have been enabled; don't use jemalloc.")
|
||||
else()
|
||||
find_package(JeMalloc)
|
||||
if(JEMALLOC_FOUND)
|
||||
find_package(JeMalloc REQUIRED)
|
||||
include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(LibIntl)
|
||||
if(LibIntl_FOUND)
|
||||
if(ENABLE_LIBINTL)
|
||||
# LibIntl (not Intl) selects our FindLibIntl.cmake script. #8464
|
||||
find_package(LibIntl REQUIRED)
|
||||
include_directories(SYSTEM ${LibIntl_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
find_package(Iconv)
|
||||
if(Iconv_FOUND)
|
||||
if(ENABLE_LIBICONV)
|
||||
find_package(Iconv REQUIRED)
|
||||
include_directories(SYSTEM ${Iconv_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
@@ -498,6 +542,11 @@ add_subdirectory(test/includes)
|
||||
add_subdirectory(config)
|
||||
add_subdirectory(test/functional/fixtures) # compile test programs
|
||||
add_subdirectory(runtime)
|
||||
if(WIN32)
|
||||
install_helper(
|
||||
FILES ${DEPS_PREFIX}/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim-qt/runtime/plugin)
|
||||
endif()
|
||||
|
||||
# Setup some test-related bits. We do this after going down the tree because we
|
||||
# need some of the targets.
|
||||
@@ -505,17 +554,6 @@ if(BUSTED_PRG)
|
||||
get_property(TEST_INCLUDE_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PROPERTY INCLUDE_DIRECTORIES)
|
||||
|
||||
# Set policy CMP0026 to OLD so we avoid CMake warnings on newer
|
||||
# versions of cmake.
|
||||
if(POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif()
|
||||
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()
|
||||
|
||||
# When running tests from 'ninja' we need to use the
|
||||
# console pool: to do so we need to use the USES_TERMINAL
|
||||
# option, but this is only available in CMake 3.2
|
||||
@@ -524,10 +562,6 @@ if(BUSTED_PRG)
|
||||
list(APPEND TEST_TARGET_ARGS "USES_TERMINAL")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
test/config/paths.lua.in
|
||||
${CMAKE_BINARY_DIR}/test/config/paths.lua)
|
||||
|
||||
set(UNITTEST_PREREQS nvim-test unittest-headers)
|
||||
set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test)
|
||||
if(NOT WIN32)
|
||||
@@ -538,6 +572,7 @@ if(BUSTED_PRG)
|
||||
# Useful for automated build systems, if they want to manually run the tests.
|
||||
add_custom_target(unittest-prereqs
|
||||
DEPENDS ${UNITTEST_PREREQS})
|
||||
set_target_properties(unittest-prereqs PROPERTIES FOLDER test)
|
||||
|
||||
add_custom_target(functionaltest-prereqs
|
||||
DEPENDS ${FUNCTIONALTEST_PREREQS})
|
||||
@@ -560,10 +595,23 @@ if(BUSTED_PRG)
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${UNITTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
set_target_properties(unittest PROPERTIES FOLDER test)
|
||||
else()
|
||||
message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}")
|
||||
endif()
|
||||
|
||||
if(LUA_HAS_FFI)
|
||||
set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
|
||||
else()
|
||||
set(TEST_LIBNVIM_PATH "")
|
||||
endif()
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
|
||||
${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
file(GENERATE
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
|
||||
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
|
||||
add_custom_target(functionaltest
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBUSTED_PRG=${BUSTED_PRG}
|
||||
@@ -578,6 +626,8 @@ if(BUSTED_PRG)
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${FUNCTIONALTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
set_target_properties(functionaltest functionaltest-prereqs
|
||||
PROPERTIES FOLDER test)
|
||||
|
||||
add_custom_target(benchmark
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@@ -593,6 +643,7 @@ if(BUSTED_PRG)
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${BENCHMARK_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
set_target_properties(benchmark benchmark-prereqs PROPERTIES FOLDER test)
|
||||
endif()
|
||||
|
||||
if(BUSTED_LUA_PRG)
|
||||
@@ -610,6 +661,7 @@ if(BUSTED_LUA_PRG)
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${FUNCTIONALTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
set_target_properties(functionaltest-lua PROPERTIES FOLDER test)
|
||||
endif()
|
||||
|
||||
if(LUACHECK_PRG)
|
||||
|
@@ -14,8 +14,15 @@ low-risk/isolated tasks:
|
||||
Developer guidelines
|
||||
--------------------
|
||||
|
||||
- Nvim developers should read `:help dev-help`.
|
||||
- Nvim contributors should read `:help dev` (especially `:help dev-api`).
|
||||
- External UI developers should read `:help dev-ui`.
|
||||
- API client developers should read `:help dev-api-client`.
|
||||
- Nvim developers are _strongly encouraged_ to install `ninja` for faster builds.
|
||||
```
|
||||
sudo apt-get install ninja-build
|
||||
make distclean
|
||||
make # Nvim build system uses ninja automatically, if available.
|
||||
```
|
||||
|
||||
Reporting problems
|
||||
------------------
|
||||
@@ -24,7 +31,7 @@ Reporting problems
|
||||
- Search [existing issues][github-issues] (including closed!)
|
||||
- Update Neovim to the latest version to see if your problem persists.
|
||||
- Disable plugins incrementally, to narrow down the cause of the issue.
|
||||
- When reporting a crash, include a stacktrace.
|
||||
- When reporting a crash, [include a stacktrace](https://github.com/neovim/neovim/wiki/Development-tips#backtrace-linux).
|
||||
- [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful.
|
||||
- Check `$NVIM_LOG_FILE`, if it exists.
|
||||
- Include `cmake --system-information` for **build** issues.
|
||||
@@ -92,7 +99,7 @@ and [AppVeyor].
|
||||
- CI builds are compiled with [`-Werror`][gcc-warnings], so compiler warnings
|
||||
will fail the build.
|
||||
- If any tests fail, the build will fail.
|
||||
See [Building Neovim#running-tests][wiki-run-tests] to run tests locally.
|
||||
See [test/README.md#running-tests][run-tests] to run tests locally.
|
||||
Passing locally doesn't guarantee passing the CI build, because of the
|
||||
different compilers and platforms tested against.
|
||||
- CI runs [ASan] and other analyzers.
|
||||
@@ -157,7 +164,7 @@ shows each commit's diff. To show the whole surrounding function of a change
|
||||
as context, use the `-W` argument as well.
|
||||
|
||||
[gcc-warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
[git-bisect]: http://git-scm.com/book/tr/v2/Git-Tools-Debugging-with-Git
|
||||
[git-bisect]: http://git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git
|
||||
[git-feature-branch]: https://www.atlassian.com/git/tutorials/comparing-workflows
|
||||
[git-history-filtering]: https://www.atlassian.com/git/tutorials/git-log/filtering-the-commit-history
|
||||
[git-history-rewriting]: http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
|
||||
@@ -168,7 +175,7 @@ as context, use the `-W` argument as well.
|
||||
[hygiene]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
||||
[style-guide]: http://neovim.io/develop/style-guide.xml
|
||||
[ASan]: http://clang.llvm.org/docs/AddressSanitizer.html
|
||||
[wiki-run-tests]: https://github.com/neovim/neovim/wiki/Building-Neovim#running-tests
|
||||
[run-tests]: https://github.com/neovim/neovim/blob/master/test/README.md#running-tests
|
||||
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
|
||||
[review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
|
||||
[3174]: https://github.com/neovim/neovim/issues/3174
|
||||
|
27
Makefile
27
Makefile
@@ -1,3 +1,4 @@
|
||||
THIS_DIR = $(shell pwd)
|
||||
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
|
||||
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||
|
||||
@@ -8,11 +9,14 @@ CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake))
|
||||
CMAKE_BUILD_TYPE ?= Debug
|
||||
|
||||
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
||||
DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages
|
||||
CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
|
||||
|
||||
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
|
||||
echo "Unix Makefiles")
|
||||
DEPS_BUILD_DIR ?= .deps
|
||||
|
||||
ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
|
||||
$(error DEPS_BUILD_DIR must not contain whitespace)
|
||||
endif
|
||||
|
||||
ifeq (,$(BUILD_TOOL))
|
||||
ifeq (Ninja,$(BUILD_TYPE))
|
||||
@@ -48,7 +52,7 @@ endif
|
||||
|
||||
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
||||
BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON
|
||||
$(shell [ -x .deps/usr/bin/lua ] || rm build/.ran-*)
|
||||
$(shell [ -x $(DEPS_BUILD_DIR)/usr/bin/lua ] || rm build/.ran-*)
|
||||
endif
|
||||
|
||||
# For use where we want to make sure only a single job is run. This does issue
|
||||
@@ -68,20 +72,20 @@ cmake:
|
||||
$(MAKE) build/.ran-cmake
|
||||
|
||||
build/.ran-cmake: | deps
|
||||
cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) ..
|
||||
cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(THIS_DIR)
|
||||
touch $@
|
||||
|
||||
deps: | build/.ran-third-party-cmake
|
||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||
+$(BUILD_CMD) -C .deps
|
||||
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
|
||||
endif
|
||||
|
||||
build/.ran-third-party-cmake:
|
||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||
mkdir -p .deps
|
||||
cd .deps && \
|
||||
mkdir -p $(DEPS_BUILD_DIR)
|
||||
cd $(DEPS_BUILD_DIR) && \
|
||||
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
||||
$(DEPS_CMAKE_FLAGS) ../third-party
|
||||
$(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party
|
||||
endif
|
||||
mkdir -p build
|
||||
touch $@
|
||||
@@ -124,7 +128,7 @@ clean:
|
||||
$(MAKE) -C runtime/doc clean
|
||||
|
||||
distclean: clean
|
||||
rm -rf .deps build
|
||||
rm -rf $(DEPS_BUILD_DIR) build
|
||||
|
||||
install: | nvim
|
||||
+$(BUILD_CMD) -C build install
|
||||
@@ -141,6 +145,11 @@ check-single-includes: build/.ran-cmake
|
||||
appimage:
|
||||
bash scripts/genappimage.sh
|
||||
|
||||
# Build an appimage with embedded update information appimage-nightly for
|
||||
# nightly builds or appimage-latest for a release
|
||||
appimage-%:
|
||||
bash scripts/genappimage.sh $*
|
||||
|
||||
lint: check-single-includes clint testlint lualint
|
||||
|
||||
.PHONY: test testlint lualint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage
|
||||
|
16
README.md
16
README.md
@@ -11,10 +11,11 @@
|
||||
[](https://codecov.io/gh/neovim/neovim)
|
||||
[](https://scan.coverity.com/projects/2227)
|
||||
[](https://neovim.io/doc/reports/clang)
|
||||
[](https://neovim.io/doc/reports/pvs)
|
||||
[](https://neovim.io/doc/reports/pvs/PVS-studio.html.d)
|
||||
|
||||
[](https://repology.org/metapackage/neovim)
|
||||
[](https://buildd.debian.org/neovim)
|
||||
[](https://github.com/neovim/neovim/releases/)
|
||||
[](https://github.com/neovim/neovim/releases/)
|
||||
|
||||
Neovim is a project that seeks to aggressively refactor Vim in order to:
|
||||
|
||||
@@ -34,11 +35,17 @@ Install from source
|
||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
sudo make install
|
||||
|
||||
To install to a non-default location, specify `CMAKE_INSTALL_PREFIX`:
|
||||
To install to a non-default location, set `CMAKE_INSTALL_PREFIX`:
|
||||
|
||||
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
|
||||
make install
|
||||
|
||||
To list all targets:
|
||||
|
||||
cmake --build build --target help
|
||||
|
||||
To skip "bundled" dependencies define `USE_BUNDLED_DEPS=NO` (CMake option: `USE_BUNDLED=NO`).
|
||||
|
||||
See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details.
|
||||
|
||||
Install from package
|
||||
@@ -69,9 +76,6 @@ Project layout
|
||||
├─ third-party/ cmake subproject to build dependencies
|
||||
└─ test/ tests (see test/README.md)
|
||||
|
||||
- To disable `third-party/` specify `USE_BUNDLED_DEPS=NO` or `USE_BUNDLED=NO`
|
||||
(CMake option).
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
|
@@ -1,7 +1,10 @@
|
||||
version: '{build}'
|
||||
environment:
|
||||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
||||
image: Visual Studio 2017
|
||||
configuration:
|
||||
- MSVC_64
|
||||
- MSVC_32
|
||||
- MINGW_64
|
||||
- MINGW_32
|
||||
- MINGW_64-gcov
|
||||
@@ -9,10 +12,12 @@ matrix:
|
||||
allow_failures:
|
||||
- configuration: MINGW_64-gcov
|
||||
install: []
|
||||
before_build:
|
||||
- ps: Install-Product node 8
|
||||
build_script:
|
||||
- call ci\build.bat
|
||||
- powershell ci\build.ps1
|
||||
cache:
|
||||
- C:\msys64\var\cache\pacman\pkg -> ci\build.bat
|
||||
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
|
||||
- .deps -> third-party\**
|
||||
artifacts:
|
||||
- path: build/Neovim.zip
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
if [[ -n "${GCOV}" ]]; then
|
||||
coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
||||
bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'
|
||||
fi
|
@@ -4,16 +4,27 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${CI_DIR}/common/build.sh"
|
||||
source "${CI_DIR}/common/suite.sh"
|
||||
|
||||
# Don't cache pip's log and selfcheck.
|
||||
rm -rf "${HOME}/.cache/pip/log"
|
||||
rm -f "${HOME}/.cache/pip/selfcheck.json"
|
||||
|
||||
echo "before_cache.sh: cache size"
|
||||
du -d 2 "${HOME}/.cache" | sort -n
|
||||
|
||||
echo "before_cache.sh: ccache stats"
|
||||
ccache -s 2>/dev/null || true
|
||||
|
||||
# Update the third-party dependency cache only if the build was successful.
|
||||
if ended_successfully; then
|
||||
rm -rf "${HOME}/.cache/nvim-deps"
|
||||
mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps"
|
||||
|
||||
rm -rf "${HOME}/.cache/nvim-deps-downloads"
|
||||
mv "${DEPS_DOWNLOAD_DIR}" "${HOME}/.cache/nvim-deps-downloads"
|
||||
|
||||
touch "${CACHE_MARKER}"
|
||||
echo "Updated third-party dependencies (timestamp: $(stat -c '%y' "${CACHE_MARKER}"))."
|
||||
echo "Updated third-party dependencies (timestamp: $(_stat "${CACHE_MARKER}"))."
|
||||
fi
|
||||
|
@@ -23,17 +23,26 @@ echo 'python info:'
|
||||
2>&1 pyenv versions || true
|
||||
) | sed 's/^/ /'
|
||||
|
||||
echo "Upgrade Python 2 pip."
|
||||
pip2.7 -q install --user --upgrade pip
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
echo "Install Python 3."
|
||||
brew install python3
|
||||
echo "Upgrade Python 3."
|
||||
brew upgrade python
|
||||
echo "Upgrade Python 3 pip."
|
||||
pip3 -q install --user --upgrade pip
|
||||
else
|
||||
echo "Upgrade Python 2 pip."
|
||||
pip2.7 -q install --user --upgrade pip
|
||||
echo "Upgrade Python 3 pip."
|
||||
# Allow failure. pyenv pip3 on travis is broken:
|
||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||
pip3 -q install --user --upgrade pip || true
|
||||
fi
|
||||
|
||||
echo "Install node (LTS)"
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]] || [ ! -f ~/.nvm/nvm.sh ]; then
|
||||
curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh
|
||||
fi
|
||||
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm install --lts
|
||||
nvm use --lts
|
||||
|
@@ -20,6 +20,9 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show ccache stats so we can compare in before_cache
|
||||
ccache -s 2>/dev/null || true
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
# Adds user to a dummy group.
|
||||
# That allows to test changing the group of the file by `os_fchown`.
|
||||
|
62
ci/build.bat
62
ci/build.bat
@@ -1,62 +0,0 @@
|
||||
:: These are native MinGW builds, but they use the toolchain inside
|
||||
:: MSYS2, this allows using all the dependencies and tools available
|
||||
:: in MSYS2, but we cannot build inside the MSYS2 shell.
|
||||
echo on
|
||||
if "%CONFIGURATION%" == "MINGW_32" (
|
||||
set ARCH=i686
|
||||
set BITS=32
|
||||
) else (
|
||||
set ARCH=x86_64
|
||||
set BITS=64
|
||||
)
|
||||
if "%CONFIGURATION%" == "MINGW_64-gcov" (
|
||||
set USE_GCOV="-DUSE_GCOV=ON"
|
||||
)
|
||||
|
||||
:: We cannot have sh.exe in the PATH (MinGW)
|
||||
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH%
|
||||
:: The default cpack in the PATH is not CMake
|
||||
set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%
|
||||
|
||||
:: Build third-party dependencies
|
||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error
|
||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error
|
||||
|
||||
:: Setup python (use AppVeyor system python)
|
||||
C:\Python27\python.exe -m pip install neovim || goto :error
|
||||
C:\Python35\python.exe -m pip install neovim || goto :error
|
||||
:: Disambiguate python3
|
||||
move c:\Python35\python.exe c:\Python35\python3.exe
|
||||
set PATH=C:\Python35;C:\Python27;%PATH%
|
||||
:: Sanity check
|
||||
python -c "import neovim; print(str(neovim))" || goto :error
|
||||
python3 -c "import neovim; print(str(neovim))" || goto :error
|
||||
|
||||
mkdir .deps
|
||||
cd .deps
|
||||
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error
|
||||
mingw32-make VERBOSE=1 || goto :error
|
||||
cd ..
|
||||
|
||||
:: Build Neovim
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error
|
||||
mingw32-make VERBOSE=1 || goto :error
|
||||
bin\nvim --version || goto :error
|
||||
|
||||
:: Functional tests
|
||||
mingw32-make functionaltest VERBOSE=1 || goto :error
|
||||
|
||||
if defined USE_GCOV (
|
||||
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'"
|
||||
)
|
||||
|
||||
:: Build artifacts
|
||||
cpack -G ZIP -C RelWithDebInfo
|
||||
if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo
|
||||
|
||||
goto :EOF
|
||||
:error
|
||||
exit /b %errorlevel%
|
129
ci/build.ps1
Normal file
129
ci/build.ps1
Normal file
@@ -0,0 +1,129 @@
|
||||
Set-PSDebug -Trace 1
|
||||
|
||||
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
|
||||
$compiler = $Matches.compiler
|
||||
$compileOption = $Matches.option
|
||||
$bits = $Matches.bits
|
||||
$cmakeBuildType = 'RelWithDebInfo'
|
||||
$depsCmakeVars = @{
|
||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||
}
|
||||
$nvimCmakeVars = @{
|
||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||
BUSTED_OUTPUT_TYPE = 'nvim';
|
||||
}
|
||||
|
||||
# For pull requests, skip some build configurations to save time.
|
||||
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32)$') {
|
||||
exit 0
|
||||
}
|
||||
|
||||
function exitIfFailed() {
|
||||
if ($LastExitCode -ne 0) {
|
||||
exit $LastExitCode
|
||||
}
|
||||
}
|
||||
|
||||
if ($compiler -eq 'MINGW') {
|
||||
if ($bits -eq 32) {
|
||||
$arch = 'i686'
|
||||
}
|
||||
elseif ($bits -eq 64) {
|
||||
$arch = 'x86_64'
|
||||
}
|
||||
if ($compileOption -eq 'gcov') {
|
||||
$nvimCmakeVars['USE_GCOV'] = 'ON'
|
||||
$uploadToCodecov = $true
|
||||
}
|
||||
# These are native MinGW builds, but they use the toolchain inside
|
||||
# MSYS2, this allows using all the dependencies and tools available
|
||||
# in MSYS2, but we cannot build inside the MSYS2 shell.
|
||||
$cmakeGenerator = 'MinGW Makefiles'
|
||||
$cmakeGeneratorArgs = 'VERBOSE=1'
|
||||
|
||||
# Add MinGW to the PATH
|
||||
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"
|
||||
|
||||
# Build third-party dependencies
|
||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
|
||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium" ; exitIfFailed
|
||||
}
|
||||
elseif ($compiler -eq 'MSVC') {
|
||||
$cmakeGeneratorArgs = '/verbosity:normal'
|
||||
if ($bits -eq 32) {
|
||||
$cmakeGenerator = 'Visual Studio 15 2017'
|
||||
}
|
||||
elseif ($bits -eq 64) {
|
||||
$cmakeGenerator = 'Visual Studio 15 2017 Win64'
|
||||
}
|
||||
}
|
||||
|
||||
# Remove Git Unix utilities from the PATH
|
||||
$env:PATH = $env:PATH.Replace('C:\Program Files\Git\usr\bin', '')
|
||||
|
||||
# Setup python (use AppVeyor system python)
|
||||
C:\Python27\python.exe -m pip install neovim ; exitIfFailed
|
||||
C:\Python35\python.exe -m pip install neovim ; exitIfFailed
|
||||
# Disambiguate python3
|
||||
move c:\Python35\python.exe c:\Python35\python3.exe
|
||||
$env:PATH = "C:\Python35;C:\Python27;$env:PATH"
|
||||
# Sanity check
|
||||
python -c "import neovim; print(str(neovim))" ; exitIfFailed
|
||||
python3 -c "import neovim; print(str(neovim))" ; exitIfFailed
|
||||
|
||||
$env:PATH = "C:\Ruby24\bin;$env:PATH"
|
||||
cmd /c gem.cmd install neovim ; exitIfFailed
|
||||
where.exe neovim-ruby-host.bat ; exitIfFailed
|
||||
|
||||
cmd /c npm.cmd install -g neovim ; exitIfFailed
|
||||
where.exe neovim-node-host.cmd ; exitIfFailed
|
||||
cmd /c npm link neovim
|
||||
|
||||
function convertToCmakeArgs($vars) {
|
||||
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
||||
}
|
||||
|
||||
mkdir .deps
|
||||
cd .deps
|
||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) ..\third-party\ ; exitIfFailed
|
||||
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
||||
cd ..
|
||||
|
||||
# Build Neovim
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
|
||||
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
||||
bin\nvim --version ; exitIfFailed
|
||||
|
||||
# Functional tests
|
||||
# The $LastExitCode from MSBuild can't be trusted
|
||||
$failed = $false
|
||||
# Temporarily turn off tracing to reduce log file output
|
||||
Set-PSDebug -Off
|
||||
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
|
||||
foreach { $failed = $failed -or
|
||||
$_ -match 'Running functional tests failed with error'; $_ }
|
||||
Set-PSDebug -Trace 1
|
||||
if ($failed) {
|
||||
exit $LastExitCode
|
||||
}
|
||||
|
||||
|
||||
if ($uploadToCodecov) {
|
||||
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'"
|
||||
}
|
||||
|
||||
# Old tests
|
||||
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
|
||||
& "C:\msys64\mingw$bits\bin\mingw32-make.exe" -C $(Convert-Path ..\src\nvim\testdir) VERBOSE=1
|
||||
|
||||
if ($uploadToCodecov) {
|
||||
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F oldtest || echo 'codecov upload failed.'"
|
||||
}
|
||||
|
||||
# Build artifacts
|
||||
cpack -G ZIP -C RelWithDebInfo
|
||||
if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) {
|
||||
cpack -G NSIS -C RelWithDebInfo
|
||||
}
|
@@ -1,5 +1,16 @@
|
||||
_stat() {
|
||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
||||
stat -f %Sm "${@}"
|
||||
else
|
||||
stat -c %y "${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
top_make() {
|
||||
${MAKE_CMD} "$@"
|
||||
echo '================================================================================'
|
||||
# Travis has 1.5 virtual cores according to:
|
||||
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
||||
ninja "$@"
|
||||
}
|
||||
|
||||
build_make() {
|
||||
@@ -15,28 +26,23 @@ build_deps() {
|
||||
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
|
||||
fi
|
||||
|
||||
rm -rf "${DEPS_BUILD_DIR}"
|
||||
|
||||
# If there is a valid cache and we're not forced to recompile,
|
||||
# use cached third-party dependencies.
|
||||
if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then
|
||||
local statcmd="stat -c '%y'"
|
||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
||||
statcmd="stat -f '%Sm'"
|
||||
fi
|
||||
echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))."
|
||||
|
||||
mkdir -p "$(dirname "${DEPS_BUILD_DIR}")"
|
||||
mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}"
|
||||
else
|
||||
mkdir -p "${DEPS_BUILD_DIR}"
|
||||
mkdir -p "${DEPS_DOWNLOAD_DIR}"
|
||||
|
||||
# Use cached dependencies if $CACHE_MARKER exists.
|
||||
if test "${CACHE_ENABLE}" = "false" ; then
|
||||
export CCACHE_RECACHE=1
|
||||
elif test -f "${CACHE_MARKER}" ; then
|
||||
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
||||
cp -r "${HOME}/.cache/nvim-deps"/. "${DEPS_BUILD_DIR}"
|
||||
cp -r "${HOME}/.cache/nvim-deps-downloads" "${DEPS_DOWNLOAD_DIR}"
|
||||
fi
|
||||
|
||||
# Even if we're using cached dependencies, run CMake and make to
|
||||
# update CMake configuration and update to newer deps versions.
|
||||
cd "${DEPS_BUILD_DIR}"
|
||||
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
|
||||
CC= cmake ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
|
||||
CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
|
||||
|
||||
if ! top_make; then
|
||||
exit 1
|
||||
@@ -56,7 +62,7 @@ prepare_build() {
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
cd "${BUILD_DIR}"
|
||||
echo "Configuring with '${CMAKE_FLAGS} $@'."
|
||||
cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
|
||||
cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
|
||||
}
|
||||
|
||||
build_nvim() {
|
||||
@@ -71,11 +77,13 @@ build_nvim() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
|
||||
echo "Building nvim-test."
|
||||
if ! top_make nvim-test ; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Invoke nvim to trigger *San early.
|
||||
if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then
|
||||
@@ -87,3 +95,12 @@ build_nvim() {
|
||||
|
||||
cd "${TRAVIS_BUILD_DIR}"
|
||||
}
|
||||
|
||||
macos_rvm_dance() {
|
||||
# neovim-ruby gem requires a ruby newer than the macOS default.
|
||||
source ~/.rvm/scripts/rvm
|
||||
rvm get stable --auto-dotfiles
|
||||
rvm reload
|
||||
rvm use 2.2.5
|
||||
rvm use
|
||||
}
|
||||
|
@@ -1,6 +1,15 @@
|
||||
. "${CI_DIR}/common/build.sh"
|
||||
. "${CI_DIR}/common/suite.sh"
|
||||
|
||||
submit_coverage() {
|
||||
if [ -n "${GCOV}" ]; then
|
||||
if curl --fail --output codecov.bash --silent https://codecov.io/bash; then
|
||||
bash codecov.bash -c -F "$1" || echo "codecov upload failed."
|
||||
rm -f codecov.bash
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
print_core() {
|
||||
local app="$1"
|
||||
local core="$2"
|
||||
@@ -71,7 +80,9 @@ valgrind_check() {
|
||||
}
|
||||
|
||||
asan_check() {
|
||||
check_logs "${1}" "*san.*"
|
||||
if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
|
||||
check_logs "${1}" "*san.*" | asan_symbolize
|
||||
fi
|
||||
}
|
||||
|
||||
run_unittests() {(
|
||||
@@ -80,6 +91,7 @@ run_unittests() {(
|
||||
if ! build_make unittest ; then
|
||||
fail 'unittests' F 'Unit tests failed'
|
||||
fi
|
||||
submit_coverage unittest
|
||||
check_core_dumps "$(which luajit)"
|
||||
exit_suite
|
||||
)}
|
||||
@@ -90,6 +102,7 @@ run_functionaltests() {(
|
||||
if ! build_make ${FUNCTIONALTEST}; then
|
||||
fail 'functionaltests' F 'Functional tests failed'
|
||||
fi
|
||||
submit_coverage functionaltest
|
||||
asan_check "${LOG_DIR}"
|
||||
valgrind_check "${LOG_DIR}"
|
||||
check_core_dumps
|
||||
@@ -103,6 +116,7 @@ run_oldtests() {(
|
||||
reset
|
||||
fail 'oldtests' F 'Legacy tests failed'
|
||||
fi
|
||||
submit_coverage oldtest
|
||||
asan_check "${LOG_DIR}"
|
||||
valgrind_check "${LOG_DIR}"
|
||||
check_core_dumps
|
||||
|
@@ -8,18 +8,29 @@ if [[ "${CI_TARGET}" == lint ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
brew install ninja
|
||||
brew install gettext
|
||||
brew reinstall -s libtool
|
||||
brew install ccache
|
||||
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||
fi
|
||||
|
||||
# Use default CC to avoid compilation problems when installing Python modules.
|
||||
echo "Install neovim module and coveralls for Python 2."
|
||||
CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls
|
||||
|
||||
echo "Install neovim module for Python 3."
|
||||
# Allow failure. pyenv pip3 on travis is broken:
|
||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||
CC=cc pip3 -q install --user --upgrade neovim || true
|
||||
|
||||
echo "Install neovim RubyGem."
|
||||
gem install --no-document --version ">= 0.2.0" neovim
|
||||
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
|
||||
# Update PATH for pip.
|
||||
export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
|
||||
# Use default CC to avoid compilation problems when installing Python modules.
|
||||
echo "Install neovim module for Python 2."
|
||||
CC=cc pip2.7 -q install --user --upgrade neovim
|
||||
|
||||
echo "Install neovim RubyGem."
|
||||
gem install --no-document --version ">= 0.2.0" neovim
|
||||
fi
|
||||
|
||||
echo "Install neovim npm package"
|
||||
npm install -g neovim
|
||||
npm link neovim
|
||||
|
@@ -10,19 +10,19 @@ source "${CI_DIR}/common/suite.sh"
|
||||
|
||||
enter_suite 'clint'
|
||||
|
||||
run_test 'top_make clint-full' clint
|
||||
run_test 'make clint-full' clint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'testlint'
|
||||
|
||||
run_test 'top_make testlint' testlint
|
||||
run_test 'make testlint' testlint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'lualint'
|
||||
|
||||
run_test 'top_make lualint' lualint
|
||||
run_test 'make lualint' lualint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
@@ -31,7 +31,7 @@ enter_suite single-includes
|
||||
CLICOLOR_FORCE=1 run_test_wd \
|
||||
--allow-hang \
|
||||
10s \
|
||||
'top_make check-single-includes' \
|
||||
'make check-single-includes' \
|
||||
'csi_clean' \
|
||||
single-includes
|
||||
|
||||
|
@@ -22,7 +22,9 @@ enter_suite tests
|
||||
if test "$CLANG_SANITIZER" != "TSAN" ; then
|
||||
# Additional threads are only created when the builtin UI starts, which
|
||||
# doesn't happen in the unit/functional tests
|
||||
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
|
||||
run_test run_unittests
|
||||
fi
|
||||
run_test run_functionaltests
|
||||
fi
|
||||
run_test run_oldtests
|
||||
|
@@ -8,7 +8,7 @@
|
||||
include(LibFindMacros)
|
||||
|
||||
find_path(ICONV_INCLUDE_DIR NAMES iconv.h)
|
||||
find_library(ICONV_LIBRARY NAMES iconv)
|
||||
find_library(ICONV_LIBRARY NAMES iconv libiconv)
|
||||
|
||||
set(Iconv_PROCESS_INCLUDES ICONV_INCLUDE_DIR)
|
||||
if(ICONV_LIBRARY)
|
||||
|
@@ -27,16 +27,15 @@ find_path(LibIntl_INCLUDE_DIR
|
||||
)
|
||||
|
||||
find_library(LibIntl_LIBRARY
|
||||
NAMES intl libintl.a
|
||||
NAMES intl libintl
|
||||
)
|
||||
|
||||
if (LibIntl_INCLUDE_DIR)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
# This is required because some operating systems don't have a separate
|
||||
# libintl--it is built into glibc. So we only need to specify the library
|
||||
# if one was actually found.
|
||||
# On some systems (linux+glibc) libintl is passively available.
|
||||
# So only specify the library if one was found.
|
||||
if (LibIntl_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
|
||||
endif()
|
||||
@@ -53,6 +52,13 @@ int main(int argc, char** argv) {
|
||||
}" HAVE_WORKING_LIBINTL)
|
||||
|
||||
if (HAVE_WORKING_LIBINTL)
|
||||
# On some systems (linux+glibc) libintl is passively available.
|
||||
# If HAVE_WORKING_LIBINTL then we consider the requirement satisfied.
|
||||
# Unset REQUIRED so that libfind_process(LibIntl) can proceed.
|
||||
if(LibIntl_FIND_REQUIRED)
|
||||
unset(LibIntl_FIND_REQUIRED)
|
||||
endif()
|
||||
|
||||
check_variable_exists(_nl_msg_cat_cntr HAVE_NL_MSG_CAT_CNTR)
|
||||
endif()
|
||||
|
||||
|
@@ -31,11 +31,7 @@ if(LIBUV_USE_STATIC)
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif(LIBUV_USE_STATIC)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND LIBUV_NAMES libuv)
|
||||
else()
|
||||
list(APPEND LIBUV_NAMES uv)
|
||||
endif()
|
||||
list(APPEND LIBUV_NAMES uv)
|
||||
|
||||
find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES}
|
||||
HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS}
|
||||
|
@@ -44,7 +44,7 @@ endif()
|
||||
|
||||
if(MSVC)
|
||||
# The import library for the msgpack DLL has a different name
|
||||
list(APPEND MSGPACK_NAMES msgpack_import)
|
||||
list(APPEND MSGPACK_NAMES msgpackc_import)
|
||||
else()
|
||||
list(APPEND MSGPACK_NAMES msgpackc msgpack)
|
||||
endif()
|
||||
|
@@ -38,6 +38,7 @@ function(get_compile_flags _compile_flags)
|
||||
get_directory_property(include_directories_list
|
||||
DIRECTORY "src/nvim"
|
||||
INCLUDE_DIRECTORIES)
|
||||
list(REMOVE_DUPLICATES include_directories_list)
|
||||
foreach(include_directory ${include_directories_list})
|
||||
set(include_directories "${include_directories} -I${include_directory}")
|
||||
endforeach()
|
||||
|
@@ -4,9 +4,8 @@
|
||||
|
||||
# Check if a module is available in Lua
|
||||
function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR)
|
||||
execute_process(COMMAND ${LUA_PRG_PATH} -e "require('${MODULE}')"
|
||||
RESULT_VARIABLE module_missing
|
||||
ERROR_QUIET)
|
||||
execute_process(COMMAND ${LUA_PRG_PATH} -l "${MODULE}" -e ""
|
||||
RESULT_VARIABLE module_missing)
|
||||
if(module_missing)
|
||||
set(${RESULT_VAR} False PARENT_SCOPE)
|
||||
else()
|
||||
|
@@ -24,12 +24,12 @@ if(BUSTED_OUTPUT_TYPE STREQUAL junit)
|
||||
set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml)
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TEST_TAG})
|
||||
if(DEFINED ENV{TEST_TAG} AND NOT "$ENV{TEST_TAG}" STREQUAL "")
|
||||
set(TEST_TAG "--tags=$ENV{TEST_TAG}")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TEST_FILTER})
|
||||
set(TEST_TAG "--filter=$ENV{TEST_FILTER}")
|
||||
if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
|
||||
set(TEST_FILTER "--filter=$ENV{TEST_FILTER}")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKING_DIR}/Xtest-tmpdir)
|
||||
@@ -38,7 +38,7 @@ set(ENV{SYSTEM_NAME} ${SYSTEM_NAME})
|
||||
execute_process(
|
||||
COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE}
|
||||
--lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
|
||||
--lpath=${BUILD_DIR}/?.lua ${TEST_PATH}
|
||||
--lpath=${BUILD_DIR}/?.lua --lpath=?.lua ${TEST_PATH}
|
||||
WORKING_DIRECTORY ${WORKING_DIR}
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res
|
||||
|
@@ -1,6 +1,6 @@
|
||||
codecov:
|
||||
notify:
|
||||
require_ci_to_pass: yes
|
||||
require_ci_to_pass: no
|
||||
ci:
|
||||
- appveyor
|
||||
- travis
|
||||
|
@@ -12,6 +12,11 @@ check_type_size("size_t" SIZEOF_SIZE_T)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size("void *" SIZEOF_VOID_PTR)
|
||||
|
||||
if (CMAKE_HOST_SYSTEM_VERSION MATCHES ".*-Microsoft")
|
||||
# Windows Subsystem for Linux
|
||||
set(HAVE_WSL 1)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
|
||||
|
||||
# Headers
|
||||
|
@@ -48,6 +48,7 @@
|
||||
#cmakedefine HAVE_UTIME_H
|
||||
#cmakedefine HAVE_UTIMES
|
||||
#cmakedefine HAVE_WORKING_LIBINTL
|
||||
#cmakedefine HAVE_WSL
|
||||
#cmakedefine UNIX
|
||||
#cmakedefine USE_FNAME_CASE
|
||||
#cmakedefine HAVE_SYS_UIO_H
|
||||
@@ -62,6 +63,7 @@
|
||||
|
||||
#ifndef UNIT_TESTING
|
||||
#cmakedefine HAVE_JEMALLOC
|
||||
#cmakedefine LOG_LIST_ACTIONS
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_BE64TOH
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
|
||||
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
|
||||
char *default_vimruntime_dir = "";
|
||||
|
@@ -36,7 +36,6 @@
|
||||
# them.
|
||||
#
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_BUSTED=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_DEPS=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_JEMALLOC=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBTERMKEY=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF
|
||||
@@ -45,6 +44,10 @@
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAROCKS=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF
|
||||
#
|
||||
# Or disable all bundled dependencies at once.
|
||||
#
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED=OFF
|
||||
|
||||
# By default, bundled libraries are statically linked to nvim.
|
||||
# This has no effect for non-bundled deps, which are always dynamically linked.
|
||||
|
159
man/nvim.1
159
man/nvim.1
@@ -1,4 +1,4 @@
|
||||
.Dd January 28, 2016
|
||||
.Dd December 17, 2017
|
||||
.Dt NVIM 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -25,7 +25,7 @@ To enter commands in
|
||||
type a colon
|
||||
.Pq Sq \&:
|
||||
which is also used in this manual to denote commands.
|
||||
For more information, consult the on-line help system with the
|
||||
For more information, consult the online help with the
|
||||
.Ic :help
|
||||
command.
|
||||
.Bl -tag -width Fl
|
||||
@@ -54,7 +54,7 @@ If
|
||||
is a function name, the file containing that function is opened
|
||||
with the cursor positioned at the start of the function.
|
||||
See
|
||||
.Ic :help tag-commands .
|
||||
.Ic ":help tag-commands" .
|
||||
.It Fl q Op Ar errorfile
|
||||
QuickFix mode.
|
||||
Display the first error in
|
||||
@@ -67,82 +67,70 @@ Further errors can be jumped to with the
|
||||
.Ic :cnext
|
||||
command.
|
||||
See
|
||||
.Ic :help quickfix .
|
||||
.Ic ":help quickfix" .
|
||||
.It There are a number of other options:
|
||||
.It Fl -
|
||||
Interpret all further arguments as files.
|
||||
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.
|
||||
.It Fl e
|
||||
Ex mode.
|
||||
Ex mode. Reads stdin as Ex commands.
|
||||
See
|
||||
.Ic :help Ex-mode .
|
||||
.Ic ":help Ex-mode" .
|
||||
.It Fl E
|
||||
Improved Ex mode.
|
||||
Ex mode. Reads stdin as text.
|
||||
See
|
||||
.Ic :help gQ .
|
||||
.It Fl s
|
||||
Silent mode.
|
||||
Only takes effect if
|
||||
.Fl e
|
||||
or
|
||||
.Fl E
|
||||
is specified before it.
|
||||
.It Fl es
|
||||
Silent (batch) mode. Reads stdin as Ex commands.
|
||||
.It Fl \&Es
|
||||
Silent (batch) mode. Reads stdin as text.
|
||||
.It Fl d
|
||||
Diff mode.
|
||||
Show the difference between two to four files, similar to
|
||||
.Xr sdiff 1 .
|
||||
See
|
||||
.Ic :help diff .
|
||||
.Ic ":help diff" .
|
||||
.It Fl R
|
||||
Read-only mode.
|
||||
Sets the option 'readonly'.
|
||||
Sets the 'readonly' option.
|
||||
Implies
|
||||
.Fl n .
|
||||
Buffers can still be edited, but cannot be written to disk if already
|
||||
associated with a file.
|
||||
To overwrite a file, add an exclamation mark to the needed Ex command, such as
|
||||
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
|
||||
.Ic :w! .
|
||||
See
|
||||
.Ic :help 'readonly' .
|
||||
.Ic ":help 'readonly'" .
|
||||
.It Fl Z
|
||||
Restricted mode.
|
||||
Disable commands that make use of an external shell.
|
||||
.It Fl m
|
||||
Disable file modifications.
|
||||
Unsets the option 'write'.
|
||||
Resets the 'write' option, to disable file modifications.
|
||||
Writing to a file is disabled, but buffers can still be modified.
|
||||
.It Fl M
|
||||
Disable file and buffer modifications.
|
||||
Unsets the options 'write' and 'modifiable'.
|
||||
Note that these options can be set to re-enable making modifications.
|
||||
Resets the 'write' and 'modifiable' options, to disable file and buffer
|
||||
modifications.
|
||||
.It Fl b
|
||||
Binary mode.
|
||||
See
|
||||
.Ic :help edit-binary .
|
||||
.Ic ":help edit-binary" .
|
||||
.It Fl l
|
||||
Lisp mode.
|
||||
Sets the options 'lisp' and 'showmatch'.
|
||||
Sets the 'lisp' and 'showmatch' options.
|
||||
.It Fl A
|
||||
Arabic mode.
|
||||
Sets the option 'arabic'.
|
||||
.It Fl F
|
||||
Farsi mode.
|
||||
Sets the options 'fkmap' and 'rightleft'.
|
||||
Sets the 'arabic' option.
|
||||
.It Fl H
|
||||
Hebrew mode.
|
||||
Sets the options 'hkmap' and 'rightleft'.
|
||||
Sets the 'hkmap' and 'rightleft' options.
|
||||
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
|
||||
Verbose mode.
|
||||
Print messages about which files are being sourced and for reading and
|
||||
writing a ShaDa file.
|
||||
.Ar N
|
||||
is the value for the 'verbose' option; defaults to
|
||||
.Cm 10
|
||||
if omitted.
|
||||
is the 'verbose' level; defaults to
|
||||
.Cm 10.
|
||||
If
|
||||
.Ar file
|
||||
is specified, append messages to
|
||||
@@ -153,9 +141,9 @@ Debugging mode.
|
||||
Started when executing the first command from a script.
|
||||
.It Fl n
|
||||
Disable the use of swap files.
|
||||
Sets the option 'updatecount' to
|
||||
Sets the 'updatecount' option to
|
||||
.Cm 0 .
|
||||
Can be useful for editing file(s) on a slow medium.
|
||||
Can be useful for editing files on a slow medium.
|
||||
.It Fl r Op Ar file
|
||||
Recovery mode.
|
||||
If
|
||||
@@ -169,20 +157,20 @@ The swap file has the same name as the file it's associated with, but with
|
||||
.Sq .swp
|
||||
appended.
|
||||
See
|
||||
.Ic :help recovery .
|
||||
.Ic ":help recovery" .
|
||||
.It Fl L Op Ar file
|
||||
Alias for
|
||||
.Fl r .
|
||||
.It Fl u Ar vimrc
|
||||
Use
|
||||
.Ar vimrc
|
||||
instead of the default of
|
||||
instead of the default
|
||||
.Pa ~/.config/nvim/init.vim .
|
||||
If
|
||||
.Ar vimrc
|
||||
is
|
||||
.Cm NORC ,
|
||||
do not load any initialization files (excluding plugins),
|
||||
do not load any initialization files (except plugins),
|
||||
and do not attempt to parse environment variables.
|
||||
If
|
||||
.Ar vimrc
|
||||
@@ -190,11 +178,11 @@ is
|
||||
.Cm NONE ,
|
||||
loading plugins is also skipped.
|
||||
See
|
||||
.Ic :help initialization .
|
||||
.Ic ":help initialization" .
|
||||
.It Fl i Ar shada
|
||||
Use
|
||||
.Ar shada
|
||||
instead of the default of
|
||||
instead of the default
|
||||
.Pa ~/.local/share/nvim/shada/main.shada .
|
||||
If
|
||||
.Ar shada
|
||||
@@ -202,7 +190,7 @@ is
|
||||
.Cm NONE ,
|
||||
do not read or write a ShaDa file.
|
||||
See
|
||||
.Ic :help shada .
|
||||
.Ic ":help shada" .
|
||||
.It Fl -noplugin
|
||||
Skip loading plugins.
|
||||
Implied by
|
||||
@@ -233,7 +221,6 @@ For the first file, position the cursor on line
|
||||
If
|
||||
.Ar linenum
|
||||
is omitted, position the cursor on the last line of the file.
|
||||
Note that
|
||||
.Cm +5
|
||||
and
|
||||
.Cm -c 5
|
||||
@@ -246,8 +233,7 @@ For the first file, position the cursor on the first occurrence of
|
||||
.Ar pattern .
|
||||
If
|
||||
.Ar pattern
|
||||
is omitted, the most recently used search pattern is used (if there is one).
|
||||
Note that
|
||||
is omitted, the most recent search pattern is used (if any).
|
||||
.Cm +/foo
|
||||
and
|
||||
.Cm -c /foo
|
||||
@@ -258,7 +244,7 @@ and
|
||||
inside
|
||||
.Nm .
|
||||
See
|
||||
.Ic :help search-pattern .
|
||||
.Ic ":help search-pattern" .
|
||||
.It Fl c Ar command
|
||||
Execute
|
||||
.Ar command
|
||||
@@ -268,10 +254,9 @@ Up to 10 instances of
|
||||
or
|
||||
.Cm +
|
||||
can be used.
|
||||
Note that
|
||||
.Qq Cm +set si
|
||||
.Qq Cm +foo
|
||||
and
|
||||
.Cm -c \(dqset si\(dq
|
||||
.Cm -c \(dqfoo\(dq
|
||||
are equivalent.
|
||||
.It Fl -cmd Ar command
|
||||
Like
|
||||
@@ -292,16 +277,16 @@ cannot start with a hyphen
|
||||
.Pq Sq - .
|
||||
If
|
||||
.Ar session
|
||||
is omitted, then
|
||||
.Pa Session.vim ,
|
||||
if found, is used.
|
||||
is omitted then
|
||||
.Pa Session.vim
|
||||
is used, if found.
|
||||
See
|
||||
.Ic :help session-file .
|
||||
.Ic ":help session-file" .
|
||||
.It Fl s Ar scriptin
|
||||
Read normal mode commands from
|
||||
.Ar scriptin .
|
||||
The same can be done with the command
|
||||
.Ic :source! scriptin .
|
||||
.Ic ":source! scriptin" .
|
||||
If the end of the file is reached before
|
||||
.Nm
|
||||
exits, further characters are read from the keyboard.
|
||||
@@ -329,6 +314,8 @@ Implies
|
||||
.Fl -headless .
|
||||
.It Fl -headless
|
||||
Do not start a user interface.
|
||||
.It Fl -listen Ar address
|
||||
Start RPC server on this pipe or TCP socket.
|
||||
.It Fl h , -help
|
||||
Print usage information and exit.
|
||||
.It Fl v , -version
|
||||
@@ -336,27 +323,30 @@ Print version information and exit.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width Fl
|
||||
.It Ev NVIM_LOG_FILE
|
||||
Low-level log file, usually found at ~/.local/share/nvim/log. See :help
|
||||
$NVIM_LOG_FILE.
|
||||
.It Ev VIM
|
||||
Used to locate various user files, such as the user's init.vim.
|
||||
Used to locate user files, such as init.vim.
|
||||
System-dependent, see :help $VIM.
|
||||
.It Ev VIMRUNTIME
|
||||
Used to locate run time files, such as on-line documentation and
|
||||
syntax highlighting definitions.
|
||||
Used to locate runtime files (documentation, syntax highlighting, etc.).
|
||||
.It Ev XDG_CONFIG_HOME
|
||||
Path to use for the user-local configuration directory, see
|
||||
Path to the user-local configuration directory, see
|
||||
.Sx FILES .
|
||||
Defaults to
|
||||
.Pa ~/.config
|
||||
if not set.
|
||||
.Pa ~/.config .
|
||||
See :help xdg.
|
||||
.It Ev XDG_DATA_HOME
|
||||
Like
|
||||
.Ev XDG_CONFIG_HOME ,
|
||||
but used to store data not generally edited by the user,
|
||||
namely swap, backup, and ShaDa files.
|
||||
Defaults to
|
||||
.Pa ~/.local/share
|
||||
if not set.
|
||||
.Pa ~/.local/share .
|
||||
See :help xdg.
|
||||
.It Ev VIMINIT
|
||||
A string of Ex commands to be executed at startup.
|
||||
Ex commands to be executed at startup.
|
||||
For example, the command to quit is
|
||||
.Ic :q ,
|
||||
so to have
|
||||
@@ -366,50 +356,43 @@ quit immediately after starting, set
|
||||
to
|
||||
.Cm q .
|
||||
See
|
||||
.Ic :help VIMINIT .
|
||||
.Ic ":help VIMINIT" .
|
||||
.It Ev SHELL
|
||||
Used to set the 'shell' option, which determines the shell used by the
|
||||
.Ic :terminal
|
||||
command.
|
||||
Used to initialize the 'shell' option, which decides the default shell used by
|
||||
features like
|
||||
.Ic :terminal ,
|
||||
.Ic :! , and
|
||||
.Ic system() .
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width "~/.config/nvim/init.vim"
|
||||
.It Pa ~/.config/nvim/init.vim
|
||||
The user-local
|
||||
User-local
|
||||
.Nm
|
||||
configuration file.
|
||||
See
|
||||
.Ev XDG_CONFIG_HOME
|
||||
above.
|
||||
.It Pa ~/.config/nvim
|
||||
The user-local
|
||||
User-local
|
||||
.Nm
|
||||
configuration directory.
|
||||
See
|
||||
.Ev XDG_CONFIG_HOME
|
||||
above.
|
||||
See also
|
||||
.Ev XDG_CONFIG_HOME .
|
||||
.It Pa $VIM/sysinit.vim
|
||||
The system-global
|
||||
System-global
|
||||
.Nm
|
||||
configuration file.
|
||||
.It Pa /usr/local/share/nvim
|
||||
The system-global
|
||||
System-global
|
||||
.Nm
|
||||
runtime directory.
|
||||
.El
|
||||
.Sh AUTHORS
|
||||
.Nm
|
||||
was started by
|
||||
.An Thiago de Arruda ,
|
||||
with a lot of help from others.
|
||||
.Pp
|
||||
Nvim was started by
|
||||
.An Thiago de Arruda .
|
||||
Most of Vim was written by
|
||||
.An -nosplit
|
||||
.An Bram Moolenaar ,
|
||||
with a lot of help from others.
|
||||
.An Bram Moolenaar .
|
||||
See
|
||||
.Ic :help credits .
|
||||
.Pp
|
||||
.Ic ":help credits" .
|
||||
Vim is based on Stevie, worked on by
|
||||
.An Tim Thompson ,
|
||||
.An Tony Andrews ,
|
||||
|
@@ -21,17 +21,13 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
|
||||
${FUNCS_DATA}
|
||||
)
|
||||
|
||||
if(POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 OLD)
|
||||
endif()
|
||||
|
||||
file(GLOB PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
|
||||
|
||||
set(GENERATED_PACKAGE_TAGS)
|
||||
foreach(PACKAGE ${PACKAGES})
|
||||
get_filename_component(PACKNAME ${PACKAGE} NAME)
|
||||
file(GLOB "${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
|
||||
if("${PACKNAME}_DOC_FILES")
|
||||
if(${PACKNAME}_DOC_FILES)
|
||||
file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
|
||||
add_custom_target("${PACKNAME}-tags"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
@@ -42,6 +38,7 @@ foreach(PACKAGE ${PACKAGES})
|
||||
nvim
|
||||
WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}"
|
||||
)
|
||||
add_dependencies(${PACKNAME}-tags nvim_runtime_deps)
|
||||
|
||||
add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
|
||||
DEPENDS
|
||||
@@ -71,7 +68,7 @@ foreach(DF ${DOCFILES})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(helptags
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${GENERATED_RUNTIME_DIR}/doc
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${GENERATED_RUNTIME_DIR}/doc/*
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
|
||||
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
|
||||
@@ -80,6 +77,7 @@ add_custom_target(helptags
|
||||
nvim
|
||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
|
||||
)
|
||||
add_dependencies(helptags nvim_runtime_deps)
|
||||
|
||||
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||
DEPENDS
|
||||
@@ -137,7 +135,8 @@ endforeach()
|
||||
|
||||
file(GLOB_RECURSE RUNTIME_FILES
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
*.vim *.dict *.py *.rb *.ps *.tutor)
|
||||
rgb.txt
|
||||
*.vim *.lua *.dict *.py *.rb *.ps *.spl *.tutor *.tutor.json)
|
||||
|
||||
foreach(F ${RUNTIME_FILES})
|
||||
get_filename_component(BASEDIR ${F} PATH)
|
||||
|
741
runtime/autoload/dist/ft.vim
vendored
Normal file
741
runtime/autoload/dist/ft.vim
vendored
Normal file
@@ -0,0 +1,741 @@
|
||||
" Vim functions for file type detection
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Nov 11
|
||||
|
||||
" These functions are moved here from runtime/filetype.vim to make startup
|
||||
" faster.
|
||||
|
||||
" Line continuation is used here, remove 'C' from 'cpoptions'
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
func dist#ft#Check_inp()
|
||||
if getline(1) =~ '^\*'
|
||||
setf abaqus
|
||||
else
|
||||
let n = 1
|
||||
if line("$") > 500
|
||||
let nmax = 500
|
||||
else
|
||||
let nmax = line("$")
|
||||
endif
|
||||
while n <= nmax
|
||||
if getline(n) =~? "^header surface data"
|
||||
setf trasys
|
||||
break
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" This function checks for the kind of assembly that is wanted by the user, or
|
||||
" can be detected from the first five lines of the file.
|
||||
func dist#ft#FTasm()
|
||||
" make sure b:asmsyntax exists
|
||||
if !exists("b:asmsyntax")
|
||||
let b:asmsyntax = ""
|
||||
endif
|
||||
|
||||
if b:asmsyntax == ""
|
||||
call dist#ft#FTasmsyntax()
|
||||
endif
|
||||
|
||||
" if b:asmsyntax still isn't set, default to asmsyntax or GNU
|
||||
if b:asmsyntax == ""
|
||||
if exists("g:asmsyntax")
|
||||
let b:asmsyntax = g:asmsyntax
|
||||
else
|
||||
let b:asmsyntax = "asm"
|
||||
endif
|
||||
endif
|
||||
|
||||
exe "setf " . fnameescape(b:asmsyntax)
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTasmsyntax()
|
||||
" see if file contains any asmsyntax=foo overrides. If so, change
|
||||
" b:asmsyntax appropriately
|
||||
let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4).
|
||||
\" ".getline(5)." "
|
||||
let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
|
||||
if match != ''
|
||||
let b:asmsyntax = match
|
||||
elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
|
||||
let b:asmsyntax = "vmasm"
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Check if one of the first five lines contains "VB_Name". In that case it is
|
||||
" probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype.
|
||||
func dist#ft#FTVB(alt)
|
||||
if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
|
||||
setf vb
|
||||
else
|
||||
exe "setf " . a:alt
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTbtm()
|
||||
if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
|
||||
setf dosbatch
|
||||
else
|
||||
setf btm
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#BindzoneCheck(default)
|
||||
if getline(1).getline(2).getline(3).getline(4) =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
|
||||
setf bindzone
|
||||
elseif a:default != ''
|
||||
exe 'setf ' . a:default
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTlpc()
|
||||
if exists("g:lpc_syntax_for_c")
|
||||
let lnum = 1
|
||||
while lnum <= 12
|
||||
if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)'
|
||||
setf lpc
|
||||
return
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endwhile
|
||||
endif
|
||||
setf c
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTheader()
|
||||
if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
|
||||
if exists("g:c_syntax_for_h")
|
||||
setf objc
|
||||
else
|
||||
setf objcpp
|
||||
endif
|
||||
elseif exists("g:c_syntax_for_h")
|
||||
setf c
|
||||
elseif exists("g:ch_syntax_for_h")
|
||||
setf ch
|
||||
else
|
||||
setf cpp
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" This function checks if one of the first ten lines start with a '@'. In
|
||||
" that case it is probably a change file.
|
||||
" If the first line starts with # or ! it's probably a ch file.
|
||||
" If a line has "main", "include", "//" ir "/*" it's probably ch.
|
||||
" Otherwise CHILL is assumed.
|
||||
func dist#ft#FTchange()
|
||||
let lnum = 1
|
||||
while lnum <= 10
|
||||
if getline(lnum)[0] == '@'
|
||||
setf change
|
||||
return
|
||||
endif
|
||||
if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!')
|
||||
setf ch
|
||||
return
|
||||
endif
|
||||
if getline(lnum) =~ "MODULE"
|
||||
setf chill
|
||||
return
|
||||
endif
|
||||
if getline(lnum) =~ 'main\s*(\|#\s*include\|//'
|
||||
setf ch
|
||||
return
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endwhile
|
||||
setf chill
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTent()
|
||||
" This function checks for valid cl syntax in the first five lines.
|
||||
" Look for either an opening comment, '#', or a block start, '{".
|
||||
" If not found, assume SGML.
|
||||
let lnum = 1
|
||||
while lnum < 6
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*[#{]'
|
||||
setf cl
|
||||
return
|
||||
elseif line !~ '^\s*$'
|
||||
" Not a blank line, not a comment, and not a block start,
|
||||
" so doesn't look like valid cl code.
|
||||
break
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endw
|
||||
setf dtd
|
||||
endfunc
|
||||
|
||||
func dist#ft#EuphoriaCheck()
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
else
|
||||
setf euphoria3
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#DtraceCheck()
|
||||
let lines = getline(1, min([line("$"), 100]))
|
||||
if match(lines, '^module\>\|^import\>') > -1
|
||||
" D files often start with a module and/or import statement.
|
||||
setf d
|
||||
elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1
|
||||
setf dtrace
|
||||
else
|
||||
setf d
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTe()
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
else
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
|
||||
setf specman
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf eiffel
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Distinguish between HTML, XHTML and Django
|
||||
func dist#ft#FThtml()
|
||||
let n = 1
|
||||
while n < 10 && n < line("$")
|
||||
if getline(n) =~ '\<DTD\s\+XHTML\s'
|
||||
setf xhtml
|
||||
return
|
||||
endif
|
||||
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
|
||||
setf htmldjango
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf html
|
||||
endfunc
|
||||
|
||||
" Distinguish between standard IDL and MS-IDL
|
||||
func dist#ft#FTidl()
|
||||
let n = 1
|
||||
while n < 50 && n < line("$")
|
||||
if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
|
||||
setf msidl
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf idl
|
||||
endfunc
|
||||
|
||||
" Distinguish between "default" and Cproto prototype file. */
|
||||
func dist#ft#ProtoCheck(default)
|
||||
" Cproto files have a comment in the first line and a function prototype in
|
||||
" the second line, it always ends in ";". Indent files may also have
|
||||
" comments, thus we can't match comments to see the difference.
|
||||
" IDL files can have a single ';' in the second line, require at least one
|
||||
" chacter before the ';'.
|
||||
if getline(2) =~ '.;$'
|
||||
setf cpp
|
||||
else
|
||||
exe 'setf ' . a:default
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTm()
|
||||
let n = 1
|
||||
let saw_comment = 0 " Whether we've seen a multiline comment leader.
|
||||
while n < 100
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*/\*'
|
||||
" /* ... */ is a comment in Objective C and Murphi, so we can't conclude
|
||||
" it's either of them yet, but track this as a hint in case we don't see
|
||||
" anything more definitive.
|
||||
let saw_comment = 1
|
||||
endif
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|//\)'
|
||||
setf objc
|
||||
return
|
||||
endif
|
||||
if line =~ '^\s*%'
|
||||
setf matlab
|
||||
return
|
||||
endif
|
||||
if line =~ '^\s*(\*'
|
||||
setf mma
|
||||
return
|
||||
endif
|
||||
if line =~ '^\c\s*\(\(type\|var\)\>\|--\)'
|
||||
setf murphi
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
|
||||
if saw_comment
|
||||
" We didn't see anything definitive, but this looks like either Objective C
|
||||
" or Murphi based on the comment leader. Assume the former as it is more
|
||||
" common.
|
||||
setf objc
|
||||
elseif exists("g:filetype_m")
|
||||
" Use user specified default filetype for .m
|
||||
exe "setf " . g:filetype_m
|
||||
else
|
||||
" Default is matlab
|
||||
setf matlab
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTmms()
|
||||
let n = 1
|
||||
while n < 10
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
|
||||
setf mmix
|
||||
return
|
||||
endif
|
||||
if line =~ '^\s*#'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf mmix
|
||||
endfunc
|
||||
|
||||
" This function checks if one of the first five lines start with a dot. In
|
||||
" that case it is probably an nroff file: 'filetype' is set and 1 is returned.
|
||||
func dist#ft#FTnroff()
|
||||
if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.'
|
||||
setf nroff
|
||||
return 1
|
||||
endif
|
||||
return 0
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTmm()
|
||||
let n = 1
|
||||
while n < 10
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
|
||||
setf objcpp
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf nroff
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTpl()
|
||||
if exists("g:filetype_pl")
|
||||
exe "setf " . g:filetype_pl
|
||||
else
|
||||
" recognize Prolog by specific text in the first non-empty line
|
||||
" require a blank after the '%' because Perl uses "%list" and "%translate"
|
||||
let l = getline(nextnonblank(1))
|
||||
if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
|
||||
setf prolog
|
||||
else
|
||||
setf perl
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTinc()
|
||||
if exists("g:filetype_inc")
|
||||
exe "setf " . g:filetype_inc
|
||||
else
|
||||
let lines = getline(1).getline(2).getline(3)
|
||||
if lines =~? "perlscript"
|
||||
setf aspperl
|
||||
elseif lines =~ "<%"
|
||||
setf aspvbs
|
||||
elseif lines =~ "<?"
|
||||
setf php
|
||||
else
|
||||
call dist#ft#FTasmsyntax()
|
||||
if exists("b:asmsyntax")
|
||||
exe "setf " . fnameescape(b:asmsyntax)
|
||||
else
|
||||
setf pov
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTprogress_cweb()
|
||||
if exists("g:filetype_w")
|
||||
exe "setf " . g:filetype_w
|
||||
return
|
||||
endif
|
||||
if getline(1) =~ '&ANALYZE' || getline(3) =~ '&GLOBAL-DEFINE'
|
||||
setf progress
|
||||
else
|
||||
setf cweb
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTprogress_asm()
|
||||
if exists("g:filetype_i")
|
||||
exe "setf " . g:filetype_i
|
||||
return
|
||||
endif
|
||||
" This function checks for an assembly comment the first ten lines.
|
||||
" If not found, assume Progress.
|
||||
let lnum = 1
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*;' || line =~ '^\*'
|
||||
call dist#ft#FTasm()
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
" Not an empty line: Doesn't look like valid assembly code.
|
||||
" Or it looks like a Progress /* comment
|
||||
break
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endw
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTprogress_pascal()
|
||||
if exists("g:filetype_p")
|
||||
exe "setf " . g:filetype_p
|
||||
return
|
||||
endif
|
||||
" This function checks for valid Pascal syntax in the first ten lines.
|
||||
" Look for either an opening comment or a program start.
|
||||
" If not found, assume Progress.
|
||||
let lnum = 1
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
|
||||
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
|
||||
setf pascal
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
" Not an empty line: Doesn't look like valid Pascal code.
|
||||
" Or it looks like a Progress /* comment
|
||||
break
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endw
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTr()
|
||||
let max = line("$") > 50 ? 50 : line("$")
|
||||
|
||||
for n in range(1, max)
|
||||
" Rebol is easy to recognize, check for that first
|
||||
if getline(n) =~? '\<REBOL\>'
|
||||
setf rebol
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
for n in range(1, max)
|
||||
" R has # comments
|
||||
if getline(n) =~ '^\s*#'
|
||||
setf r
|
||||
return
|
||||
endif
|
||||
" Rexx has /* comments */
|
||||
if getline(n) =~ '^\s*/\*'
|
||||
setf rexx
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Nothing recognized, use user default or assume Rexx
|
||||
if exists("g:filetype_r")
|
||||
exe "setf " . g:filetype_r
|
||||
else
|
||||
" Rexx used to be the default, but R appears to be much more popular.
|
||||
setf r
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#McSetf()
|
||||
" Rely on the file to start with a comment.
|
||||
" MS message text files use ';', Sendmail files use '#' or 'dnl'
|
||||
for lnum in range(1, min([line("$"), 20]))
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\(#\|dnl\)'
|
||||
setf m4 " Sendmail .mc file
|
||||
return
|
||||
elseif line =~ '^\s*;'
|
||||
setf msmessages " MS Message text file
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
setf m4 " Default: Sendmail .mc file
|
||||
endfunc
|
||||
|
||||
" Called from filetype.vim and scripts.vim.
|
||||
func dist#ft#SetFileTypeSH(name)
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
if a:name =~ '\<csh\>'
|
||||
" Some .sh scripts contain #!/bin/csh.
|
||||
call dist#ft#SetFileTypeShell("csh")
|
||||
return
|
||||
elseif a:name =~ '\<tcsh\>'
|
||||
" Some .sh scripts contain #!/bin/tcsh.
|
||||
call dist#ft#SetFileTypeShell("tcsh")
|
||||
return
|
||||
elseif a:name =~ '\<zsh\>'
|
||||
" Some .sh scripts contain #!/bin/zsh.
|
||||
call dist#ft#SetFileTypeShell("zsh")
|
||||
return
|
||||
elseif a:name =~ '\<ksh\>'
|
||||
let b:is_kornshell = 1
|
||||
if exists("b:is_bash")
|
||||
unlet b:is_bash
|
||||
endif
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
elseif exists("g:bash_is_sh") || a:name =~ '\<bash\>' || a:name =~ '\<bash2\>'
|
||||
let b:is_bash = 1
|
||||
if exists("b:is_kornshell")
|
||||
unlet b:is_kornshell
|
||||
endif
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
elseif a:name =~ '\<sh\>'
|
||||
let b:is_sh = 1
|
||||
if exists("b:is_kornshell")
|
||||
unlet b:is_kornshell
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
unlet b:is_bash
|
||||
endif
|
||||
endif
|
||||
call dist#ft#SetFileTypeShell("sh")
|
||||
endfunc
|
||||
|
||||
" For shell-like file types, check for an "exec" command hidden in a comment,
|
||||
" as used for Tcl.
|
||||
" Also called from scripts.vim, thus can't be local to this script.
|
||||
func dist#ft#SetFileTypeShell(name)
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
let l = 2
|
||||
while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
|
||||
" Skip empty and comment lines.
|
||||
let l = l + 1
|
||||
endwhile
|
||||
if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
|
||||
" Found an "exec" line after a comment with continuation
|
||||
let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '')
|
||||
if n =~ '\<tclsh\|\<wish'
|
||||
setf tcl
|
||||
return
|
||||
endif
|
||||
endif
|
||||
exe "setf " . a:name
|
||||
endfunc
|
||||
|
||||
func dist#ft#CSH()
|
||||
if exists("g:filetype_csh")
|
||||
call dist#ft#SetFileTypeShell(g:filetype_csh)
|
||||
elseif &shell =~ "tcsh"
|
||||
call dist#ft#SetFileTypeShell("tcsh")
|
||||
else
|
||||
call dist#ft#SetFileTypeShell("csh")
|
||||
endif
|
||||
endfunc
|
||||
|
||||
let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
|
||||
func dist#ft#FTRules()
|
||||
let path = expand('<amatch>:p')
|
||||
if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
|
||||
setf udevrules
|
||||
return
|
||||
endif
|
||||
if path =~ '^/etc/ufw/'
|
||||
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/
|
||||
setf hog
|
||||
return
|
||||
endtry
|
||||
let dir = expand('<amatch>:p:h')
|
||||
for line in config_lines
|
||||
if line =~ s:ft_rules_udev_rules_pattern
|
||||
let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
|
||||
if dir == udev_rules
|
||||
setf udevrules
|
||||
endif
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
setf hog
|
||||
endfunc
|
||||
|
||||
func dist#ft#SQL()
|
||||
if exists("g:filetype_sql")
|
||||
exe "setf " . g:filetype_sql
|
||||
else
|
||||
setf sql
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" If the file has an extension of 't' and is in a directory 't' or 'xt' then
|
||||
" it is almost certainly a Perl test file.
|
||||
" If the first line starts with '#' and contains 'perl' it's probably a Perl
|
||||
" file.
|
||||
" (Slow test) If a file contains a 'use' statement then it is almost certainly
|
||||
" a Perl file.
|
||||
func dist#ft#FTperl()
|
||||
let dirname = expand("%:p:h:t")
|
||||
if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt')
|
||||
setf perl
|
||||
return 1
|
||||
endif
|
||||
if getline(1)[0] == '#' && getline(1) =~ 'perl'
|
||||
setf perl
|
||||
return 1
|
||||
endif
|
||||
if search('^use\s\s*\k', 'nc', 30)
|
||||
setf perl
|
||||
return 1
|
||||
endif
|
||||
return 0
|
||||
endfunc
|
||||
|
||||
" Choose context, plaintex, or tex (LaTeX) based on these rules:
|
||||
" 1. Check the first line of the file for "%&<format>".
|
||||
" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
|
||||
" 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc.
|
||||
func dist#ft#FTtex()
|
||||
let firstline = getline(1)
|
||||
if firstline =~ '^%&\s*\a\+'
|
||||
let format = tolower(matchstr(firstline, '\a\+'))
|
||||
let format = substitute(format, 'pdf', '', '')
|
||||
if format == 'tex'
|
||||
let format = 'latex'
|
||||
elseif format == 'plaintex'
|
||||
let format = 'plain'
|
||||
endif
|
||||
elseif expand('%') =~ 'tex/context/.*/.*.tex'
|
||||
let format = 'context'
|
||||
else
|
||||
" Default value, may be changed later:
|
||||
let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain'
|
||||
" Save position, go to the top of the file, find first non-comment line.
|
||||
let save_cursor = getpos('.')
|
||||
call cursor(1,1)
|
||||
let firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
|
||||
if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword.
|
||||
let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
|
||||
let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
|
||||
let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)',
|
||||
\ 'cnp', firstNC + 1000)
|
||||
if kwline == 1 " lpat matched
|
||||
let format = 'latex'
|
||||
elseif kwline == 2 " cpat matched
|
||||
let format = 'context'
|
||||
endif " If neither matched, keep default set above.
|
||||
" let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000)
|
||||
" let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000)
|
||||
" if cline > 0
|
||||
" let format = 'context'
|
||||
" endif
|
||||
" if lline > 0 && (cline == 0 || cline > lline)
|
||||
" let format = 'tex'
|
||||
" endif
|
||||
endif " firstNC
|
||||
call setpos('.', save_cursor)
|
||||
endif " firstline =~ '^%&\s*\a\+'
|
||||
|
||||
" Translation from formats to file types. TODO: add AMSTeX, RevTex, others?
|
||||
if format == 'plain'
|
||||
setf plaintex
|
||||
elseif format == 'context'
|
||||
setf context
|
||||
else " probably LaTeX
|
||||
setf tex
|
||||
endif
|
||||
return
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTxml()
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
let line = getline(n)
|
||||
" DocBook 4 or DocBook 5.
|
||||
let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
|
||||
let is_docbook5 = line =~ ' xmlns="http://docbook.org/ns/docbook"'
|
||||
if is_docbook4 || is_docbook5
|
||||
let b:docbk_type = "xml"
|
||||
if is_docbook5
|
||||
let b:docbk_ver = 5
|
||||
else
|
||||
let b:docbk_ver = 4
|
||||
endif
|
||||
setf docbk
|
||||
return
|
||||
endif
|
||||
if line =~ 'xmlns:xbl="http://www.mozilla.org/xbl"'
|
||||
setf xbl
|
||||
return
|
||||
endif
|
||||
let n += 1
|
||||
endwhile
|
||||
setf xml
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTy()
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*%'
|
||||
setf yacc
|
||||
return
|
||||
endif
|
||||
if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include'
|
||||
setf racc
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf yacc
|
||||
endfunc
|
||||
|
||||
func dist#ft#Redif()
|
||||
let lnum = 1
|
||||
while lnum <= 5 && lnum < line('$')
|
||||
if getline(lnum) =~ "^\ctemplate-type:"
|
||||
setf redif
|
||||
return
|
||||
endif
|
||||
let lnum = lnum + 1
|
||||
endwhile
|
||||
endfunc
|
||||
|
||||
|
||||
" Restore 'cpoptions'
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
@@ -3,20 +3,20 @@ function! s:enhance_syntax() abort
|
||||
|
||||
syntax keyword healthError ERROR[:]
|
||||
\ containedin=markdownCodeBlock,mkdListItemLine
|
||||
highlight link healthError Error
|
||||
highlight default link healthError Error
|
||||
|
||||
syntax keyword healthWarning WARNING[:]
|
||||
\ containedin=markdownCodeBlock,mkdListItemLine
|
||||
highlight link healthWarning WarningMsg
|
||||
highlight default link healthWarning WarningMsg
|
||||
|
||||
syntax keyword healthSuccess OK[:]
|
||||
\ containedin=markdownCodeBlock,mkdListItemLine
|
||||
highlight healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232
|
||||
highlight default healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232
|
||||
|
||||
syntax match healthHelp "|.\{-}|" contains=healthBar
|
||||
\ containedin=markdownCodeBlock,mkdListItemLine
|
||||
syntax match healthBar "|" contained conceal
|
||||
highlight link healthHelp Identifier
|
||||
highlight default link healthHelp Identifier
|
||||
|
||||
" We do not care about markdown syntax errors in :checkhealth output.
|
||||
highlight! link markdownError Normal
|
||||
@@ -93,26 +93,26 @@ function! s:help_to_link(s) abort
|
||||
return substitute(a:s, '\v:h%[elp] ([^|][^"\r\n ]+)', ':help |\1|', 'g')
|
||||
endfunction
|
||||
|
||||
" Format a message for a specific report item
|
||||
" Format a message for a specific report item.
|
||||
" a:1: Optional advice (string or list)
|
||||
function! s:format_report_message(status, msg, ...) abort " {{{
|
||||
let output = ' - ' . a:status . ': ' . s:indent_after_line1(a:msg, 4)
|
||||
let advice = []
|
||||
|
||||
" Optional parameters
|
||||
if a:0 > 0
|
||||
let advice = type(a:1) == type("") ? [a:1] : a:1
|
||||
let advice = type(a:1) == type('') ? [a:1] : a:1
|
||||
if type(advice) != type([])
|
||||
throw "Expected String or List"
|
||||
endif
|
||||
throw 'a:1: expected String or List'
|
||||
endif
|
||||
|
||||
" Report each suggestion
|
||||
if len(advice) > 0
|
||||
if !empty(advice)
|
||||
let output .= "\n - ADVICE:"
|
||||
endif
|
||||
for suggestion in advice
|
||||
let output .= "\n - " . s:indent_after_line1(suggestion, 10)
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
return s:help_to_link(output)
|
||||
endfunction " }}}
|
||||
@@ -128,6 +128,7 @@ function! health#report_ok(msg) abort " {{{
|
||||
endfunction " }}}
|
||||
|
||||
" Reports a health warning.
|
||||
" a:1: Optional advice (string or list)
|
||||
function! health#report_warn(msg, ...) abort " {{{
|
||||
if a:0 > 0
|
||||
echo s:format_report_message('WARNING', a:msg, a:1)
|
||||
@@ -137,6 +138,7 @@ function! health#report_warn(msg, ...) abort " {{{
|
||||
endfunction " }}}
|
||||
|
||||
" Reports a failed healthcheck.
|
||||
" a:1: Optional advice (string or list)
|
||||
function! health#report_error(msg, ...) abort " {{{
|
||||
if a:0 > 0
|
||||
echo s:format_report_message('ERROR', a:msg, a:1)
|
||||
|
@@ -7,12 +7,12 @@ function! s:check_config() abort
|
||||
" If $VIM is empty we don't care. Else make sure it is valid.
|
||||
if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt')
|
||||
let ok = v:false
|
||||
call health#report_error("$VIM is invalid: ".$VIM)
|
||||
call health#report_error('$VIM is invalid: '.$VIM)
|
||||
endif
|
||||
|
||||
if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE')
|
||||
let ok = v:false
|
||||
call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+",
|
||||
call health#report_warn('$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+',
|
||||
\ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'",
|
||||
\ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
|
||||
endif
|
||||
@@ -58,7 +58,7 @@ function! s:check_rplugin_manifest() abort
|
||||
let contents = join(readfile(script))
|
||||
if contents =~# '\<\%(from\|import\)\s\+neovim\>'
|
||||
if script =~# '[\/]__init__\.py$'
|
||||
let script = fnamemodify(script, ':h')
|
||||
let script = tr(fnamemodify(script, ':h'), '\', '/')
|
||||
endif
|
||||
|
||||
if !has_key(existing_rplugins, script)
|
||||
@@ -100,8 +100,8 @@ function! s:check_performance() abort
|
||||
else
|
||||
call health#report_info(buildtype)
|
||||
call health#report_warn(
|
||||
\ "Non-optimized build-type. Nvim will be slower.",
|
||||
\ ["Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.",
|
||||
\ 'Non-optimized build-type. Nvim will be slower.',
|
||||
\ ['Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.',
|
||||
\ s:suggest_faq])
|
||||
endif
|
||||
endfunction
|
||||
@@ -174,7 +174,7 @@ function! s:check_terminal() abort
|
||||
\ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry))
|
||||
endif
|
||||
for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY']
|
||||
if !exists('$'.env_var)
|
||||
if exists('$'.env_var)
|
||||
call health#report_info(printf("$%s='%s'", env_var, eval('$'.env_var)))
|
||||
endif
|
||||
endfor
|
||||
|
@@ -13,6 +13,12 @@ function! s:normalize_path(s) abort
|
||||
return substitute(substitute(a:s, '\', '/', 'g'), '/\./\|/\+', '/', 'g')
|
||||
endfunction
|
||||
|
||||
" Returns TRUE if `cmd` exits with success, else FALSE.
|
||||
function! s:cmd_ok(cmd) abort
|
||||
call system(a:cmd)
|
||||
return v:shell_error == 0
|
||||
endfunction
|
||||
|
||||
" Simple version comparison.
|
||||
function! s:version_cmp(a, b) abort
|
||||
let a = split(a:a, '\.', 0)
|
||||
@@ -45,7 +51,7 @@ function! s:shellify(cmd) abort
|
||||
return a:cmd
|
||||
endif
|
||||
return join(map(copy(a:cmd),
|
||||
\'v:val =~# ''\m[\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ')
|
||||
\'v:val =~# ''\m[^\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ')
|
||||
endfunction
|
||||
|
||||
" Run a system command and timeout after 30 seconds.
|
||||
@@ -64,7 +70,8 @@ function! s:system(cmd, ...) abort
|
||||
let jobid = jobstart(a:cmd, opts)
|
||||
|
||||
if jobid < 1
|
||||
call health#report_error(printf('Command error (job=%d): %s', jobid, s:shellify(a:cmd)))
|
||||
call health#report_error(printf('Command error (job=%d): `%s` (in %s)',
|
||||
\ jobid, s:shellify(a:cmd), string(getcwd())))
|
||||
let s:shell_error = 1
|
||||
return opts.output
|
||||
endif
|
||||
@@ -78,8 +85,8 @@ function! s:system(cmd, ...) abort
|
||||
call health#report_error(printf('Command timed out: %s', s:shellify(a:cmd)))
|
||||
call jobstop(jobid)
|
||||
elseif s:shell_error != 0 && !ignore_error
|
||||
call health#report_error(printf("Command error (job=%d): %s\nOutput: %s", jobid,
|
||||
\ s:shellify(a:cmd), opts.output))
|
||||
call health#report_error(printf("Command error (job=%d): `%s` (in %s)\nOutput: %s",
|
||||
\ jobid, s:shellify(a:cmd), string(getcwd()), opts.output))
|
||||
endif
|
||||
|
||||
return opts.output
|
||||
@@ -120,6 +127,13 @@ endfunction
|
||||
function! s:check_clipboard() abort
|
||||
call health#report_start('Clipboard (optional)')
|
||||
|
||||
if !empty($TMUX) && executable('tmux') && executable('pbpaste') && !s:cmd_ok('pbpaste')
|
||||
let tmux_version = matchstr(system('tmux -V'), '\d\+\.\d\+')
|
||||
call health#report_error('pbcopy does not work with tmux version: '.tmux_version,
|
||||
\ ['Install tmux 2.6+. https://superuser.com/q/231130',
|
||||
\ 'or use tmux with reattach-to-user-namespace. https://superuser.com/a/413233'])
|
||||
endif
|
||||
|
||||
let clipboard_tool = provider#clipboard#Executable()
|
||||
if exists('g:clipboard') && empty(clipboard_tool)
|
||||
call health#report_error(
|
||||
@@ -172,7 +186,9 @@ function! s:version_info(python) abort
|
||||
endif
|
||||
|
||||
let nvim_path = s:trim(s:system([
|
||||
\ a:python, '-c', 'import neovim; print(neovim.__file__)']))
|
||||
\ a:python, '-c',
|
||||
\ 'import sys; sys.path.remove(""); ' .
|
||||
\ 'import neovim; print(neovim.__file__)']))
|
||||
if s:shell_error || empty(nvim_path)
|
||||
return [python_version, 'unable to load neovim Python module', pypi_version,
|
||||
\ nvim_path]
|
||||
@@ -247,20 +263,23 @@ function! s:check_python(version) abort
|
||||
let python_multiple = []
|
||||
|
||||
if exists(loaded_var) && !exists('*provider#'.pyname.'#Call')
|
||||
call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var))
|
||||
return
|
||||
call health#report_info('Disabled ('.loaded_var.'='.eval(loaded_var).'). This might be due to some previous error.')
|
||||
endif
|
||||
|
||||
if !empty(pyenv)
|
||||
if empty(pyenv_root)
|
||||
call health#report_warn(
|
||||
\ 'pyenv was found, but $PYENV_ROOT is not set.',
|
||||
\ ['Did you follow the final install instructions?',
|
||||
\ 'If you use a shell "framework" like Prezto or Oh My Zsh, try without.',
|
||||
\ 'Try a different shell (bash).']
|
||||
call health#report_info(
|
||||
\ 'pyenv was found, but $PYENV_ROOT is not set. `pyenv root` will be used.'
|
||||
\ .' If you run into problems, try setting $PYENV_ROOT explicitly.'
|
||||
\ )
|
||||
let pyenv_root = s:trim(s:system([pyenv, 'root']))
|
||||
endif
|
||||
|
||||
if !isdirectory(pyenv_root)
|
||||
call health#report_error('Invalid pyenv root: '.pyenv_root)
|
||||
else
|
||||
call health#report_ok(printf('pyenv found: "%s"', pyenv))
|
||||
call health#report_info(printf('pyenv: %s', pyenv))
|
||||
call health#report_info(printf('pyenv root: %s', pyenv_root))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -272,9 +291,6 @@ function! s:check_python(version) abort
|
||||
if empty(pyname)
|
||||
call health#report_warn('No Python interpreter was found with the neovim '
|
||||
\ . 'module. Using the first available for diagnostics.')
|
||||
if !empty(pythonx_errs)
|
||||
call health#report_warn(pythonx_errs)
|
||||
endif
|
||||
endif
|
||||
|
||||
if !empty(pyname)
|
||||
@@ -332,8 +348,8 @@ function! s:check_python(version) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
if !empty(python_bin)
|
||||
if empty(venv) && !empty(pyenv) && !exists('g:'.host_prog_var)
|
||||
if !empty(python_bin) && !exists('g:'.host_prog_var)
|
||||
if empty(venv) && !empty(pyenv)
|
||||
\ && !empty(pyenv_root) && resolve(python_bin) !~# '^'.pyenv_root.'/'
|
||||
call health#report_warn('pyenv is not set up optimally.', [
|
||||
\ printf('Create a virtualenv specifically '
|
||||
@@ -341,7 +357,7 @@ function! s:check_python(version) abort
|
||||
\ . 'the need to install the Neovim Python module in each '
|
||||
\ . 'version/virtualenv.', host_prog_var)
|
||||
\ ])
|
||||
elseif !empty(venv) && exists('g:'.host_prog_var)
|
||||
elseif !empty(venv)
|
||||
if !empty(pyenv_root)
|
||||
let venv_root = pyenv_root
|
||||
else
|
||||
@@ -366,25 +382,16 @@ function! s:check_python(version) abort
|
||||
let python_bin = ''
|
||||
endif
|
||||
|
||||
" Check if $VIRTUAL_ENV is active
|
||||
let virtualenv_inactive = 0
|
||||
|
||||
if exists('$VIRTUAL_ENV')
|
||||
if !empty(pyenv)
|
||||
let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix'])))
|
||||
if $VIRTUAL_ENV != pyenv_prefix
|
||||
let virtualenv_inactive = 1
|
||||
endif
|
||||
elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/'
|
||||
let virtualenv_inactive = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
if virtualenv_inactive
|
||||
" Check if $VIRTUAL_ENV is valid.
|
||||
if exists('$VIRTUAL_ENV') && !empty(python_bin)
|
||||
if $VIRTUAL_ENV ==# matchstr(python_bin, '^\V'.$VIRTUAL_ENV)
|
||||
call health#report_info('$VIRTUAL_ENV matches executable')
|
||||
else
|
||||
call health#report_warn(
|
||||
\ '$VIRTUAL_ENV exists but appears to be inactive. '
|
||||
\ . 'This could lead to unexpected results.',
|
||||
\ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654/5229' ])
|
||||
\ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654' ])
|
||||
endif
|
||||
endif
|
||||
|
||||
" Diagnostic output
|
||||
@@ -451,10 +458,11 @@ function! s:check_ruby() abort
|
||||
|
||||
let host = provider#ruby#Detect()
|
||||
if empty(host)
|
||||
call health#report_warn('Missing "neovim" gem.',
|
||||
\ ['Run in shell: gem install neovim',
|
||||
\ 'Is the gem bin directory in $PATH? Check `gem environment`.',
|
||||
\ 'If you are using rvm/rbenv/chruby, try "rehashing".'])
|
||||
call health#report_warn('`neovim-ruby-host` not found.',
|
||||
\ ['Run `gem install neovim` to ensure the neovim RubyGem is installed.',
|
||||
\ 'Run `gem environment` to ensure the gem bin directory is in $PATH.',
|
||||
\ 'If you are using rvm/rbenv/chruby, try "rehashing".',
|
||||
\ 'See :help g:ruby_host_prog for non-standard gem installations.'])
|
||||
return
|
||||
endif
|
||||
call health#report_info('Host: '. host)
|
||||
@@ -487,9 +495,80 @@ function! s:check_ruby() abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:check_node() abort
|
||||
call health#report_start('Node.js provider (optional)')
|
||||
|
||||
let loaded_var = 'g:loaded_node_provider'
|
||||
if exists(loaded_var) && !exists('*provider#node#Call')
|
||||
call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var))
|
||||
return
|
||||
endif
|
||||
|
||||
if !executable('node') || (!executable('npm') && !executable('yarn'))
|
||||
call health#report_warn(
|
||||
\ '`node` and `npm` (or `yarn`) must be in $PATH.',
|
||||
\ ['Install Node.js and verify that `node` and `npm` (or `yarn`) commands work.'])
|
||||
return
|
||||
endif
|
||||
let node_v = get(split(s:system('node -v'), "\n"), 0, '')
|
||||
call health#report_info('Node.js: '. node_v)
|
||||
if !s:shell_error && s:version_cmp(node_v[1:], '6.0.0') < 0
|
||||
call health#report_warn('Neovim node.js host does not support '.node_v)
|
||||
" Skip further checks, they are nonsense if nodejs is too old.
|
||||
return
|
||||
endif
|
||||
if !provider#node#can_inspect()
|
||||
call health#report_warn('node.js on this system does not support --inspect-brk so $NVIM_NODE_HOST_DEBUG is ignored.')
|
||||
endif
|
||||
|
||||
let host = provider#node#Detect()
|
||||
if empty(host)
|
||||
call health#report_warn('Missing "neovim" npm (or yarn) package.',
|
||||
\ ['Run in shell: npm install -g neovim',
|
||||
\ 'Run in shell (if you use yarn): yarn global add neovim'])
|
||||
return
|
||||
endif
|
||||
call health#report_info('Neovim node.js host: '. host)
|
||||
|
||||
let latest_npm_cmd = has('win32') ? 'cmd /c npm info neovim --json' : 'npm info neovim --json'
|
||||
let latest_npm = s:system(split(latest_npm_cmd))
|
||||
if s:shell_error || empty(latest_npm)
|
||||
call health#report_error('Failed to run: '. latest_npm_cmd,
|
||||
\ ["Make sure you're connected to the internet.",
|
||||
\ 'Are you behind a firewall or proxy?'])
|
||||
return
|
||||
endif
|
||||
if !empty(latest_npm)
|
||||
try
|
||||
let pkg_data = json_decode(latest_npm)
|
||||
catch /E474/
|
||||
return 'error: '.latest_npm
|
||||
endtry
|
||||
let latest_npm = get(get(pkg_data, 'dist-tags', {}), 'latest', 'unable to parse')
|
||||
endif
|
||||
|
||||
let current_npm_cmd = ['node', host, '--version']
|
||||
let current_npm = s:system(current_npm_cmd)
|
||||
if s:shell_error
|
||||
call health#report_error('Failed to run: '. string(current_npm_cmd),
|
||||
\ ['Report this issue with the output of: ', string(current_npm_cmd)])
|
||||
return
|
||||
endif
|
||||
|
||||
if s:version_cmp(current_npm, latest_npm) == -1
|
||||
call health#report_warn(
|
||||
\ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s',
|
||||
\ current_npm, latest_npm),
|
||||
\ ['Run in shell: npm install -g neovim'])
|
||||
else
|
||||
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! health#provider#check() abort
|
||||
call s:check_clipboard()
|
||||
call s:check_python(2)
|
||||
call s:check_python(3)
|
||||
call s:check_ruby()
|
||||
call s:check_node()
|
||||
endfunction
|
||||
|
@@ -19,7 +19,7 @@ function! s:init() abort
|
||||
let s:find_arg = '-l'
|
||||
endif
|
||||
" Check for -l support.
|
||||
call s:get_page(s:get_path('', 'man')[0:-2])
|
||||
call s:get_page(s:get_path('', 'man'))
|
||||
catch /E145:/
|
||||
" Ignore the error in restricted mode
|
||||
catch /command error .*/
|
||||
@@ -65,9 +65,9 @@ function! man#open_page(count, count1, mods, ...) abort
|
||||
try
|
||||
set eventignore+=BufReadCmd
|
||||
if a:mods !~# 'tab' && s:find_man()
|
||||
execute 'silent edit' fnameescape(bufname)
|
||||
execute 'silent keepalt edit' fnameescape(bufname)
|
||||
else
|
||||
execute 'silent' a:mods 'split' fnameescape(bufname)
|
||||
execute 'silent keepalt' a:mods 'split' fnameescape(bufname)
|
||||
endif
|
||||
finally
|
||||
set eventignore-=BufReadCmd
|
||||
@@ -148,7 +148,8 @@ function! s:get_page(path) abort
|
||||
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
|
||||
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
||||
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
||||
let cmd = ['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man']
|
||||
" Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces.
|
||||
let cmd = ['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'MAN_KEEP_FORMATTING=1', 'man']
|
||||
return s:system(cmd + (s:localfile_arg ? ['-l', a:path] : [a:path]))
|
||||
endfunction
|
||||
|
||||
@@ -157,11 +158,10 @@ function! s:put_page(page) abort
|
||||
setlocal noreadonly
|
||||
silent keepjumps %delete _
|
||||
silent put =a:page
|
||||
" Remove all backspaced/escape characters.
|
||||
execute 'silent keeppatterns keepjumps %substitute,.\b\|\e\[\d\+m,,e'.(&gdefault?'':'g')
|
||||
while getline(1) =~# '^\s*$'
|
||||
silent keepjumps 1delete _
|
||||
endwhile
|
||||
lua require("man").highlight_man_page()
|
||||
setlocal filetype=man
|
||||
endfunction
|
||||
|
||||
@@ -212,15 +212,17 @@ function! man#extract_sect_and_name_ref(ref) abort
|
||||
endfunction
|
||||
|
||||
function! s:get_path(sect, name) abort
|
||||
" Some man implementations (OpenBSD) return all available paths from the
|
||||
" search command, so we get() the first one. #8341
|
||||
if empty(a:sect)
|
||||
return s:system(['man', s:find_arg, a:name])
|
||||
return substitute(get(split(s:system(['man', s:find_arg, a:name])), 0, ''), '\n\+$', '', '')
|
||||
endif
|
||||
" '-s' flag handles:
|
||||
" - tokens like 'printf(echo)'
|
||||
" - sections starting with '-'
|
||||
" - 3pcap section (found on macOS)
|
||||
" - commas between sections (for section priority)
|
||||
return s:system(['man', s:find_arg, s:section_arg, a:sect, a:name])
|
||||
return substitute(get(split(s:system(['man', s:find_arg, s:section_arg, a:sect, a:name])), 0, ''), '\n\+$', '', '')
|
||||
endfunction
|
||||
|
||||
function! s:verify_exists(sect, name) abort
|
||||
@@ -233,13 +235,10 @@ function! s:verify_exists(sect, name) abort
|
||||
let path = s:get_path('', a:name)
|
||||
endtry
|
||||
endtry
|
||||
" We need to extract the section from the path because sometimes
|
||||
" the actual section of the manpage is more specific than the section
|
||||
" we provided to `man`. Try ':Man 3 App::CLI'.
|
||||
" Also on linux, it seems that the name is case insensitive. So if one does
|
||||
" ':Man PRIntf', we still want the name of the buffer to be 'printf' or
|
||||
" whatever the correct capitilization is.
|
||||
let path = path[:len(path)-2]
|
||||
" Extract the section from the path, because sometimes the actual section is
|
||||
" more specific than what we provided to `man` (try `:Man 3 App::CLI`).
|
||||
" Also on linux, name seems to be case-insensitive. So for `:Man PRIntf`, we
|
||||
" still want the name of the buffer to be 'printf'.
|
||||
return s:extract_sect_and_name_path(path) + [path]
|
||||
endfunction
|
||||
|
||||
@@ -299,6 +298,12 @@ endfunction
|
||||
" see man#extract_sect_and_name_ref on why tolower(sect)
|
||||
function! man#complete(arg_lead, cmd_line, cursor_pos) abort
|
||||
let args = split(a:cmd_line)
|
||||
let cmd_offset = index(args, 'Man')
|
||||
if cmd_offset > 0
|
||||
" Prune all arguments up to :Man itself. Otherwise modifier commands like
|
||||
" :tab, :vertical, etc. would lead to a wrong length.
|
||||
let args = args[cmd_offset:]
|
||||
endif
|
||||
let l = len(args)
|
||||
if l > 3
|
||||
return
|
||||
@@ -370,13 +375,12 @@ function! s:format_candidate(path, psect) abort
|
||||
endfunction
|
||||
|
||||
function! man#init_pager() abort
|
||||
" Remove all backspaced/escape characters.
|
||||
execute 'silent keeppatterns keepjumps %substitute,.\b\|\e\[\d\+m,,e'.(&gdefault?'':'g')
|
||||
if getline(1) =~# '^\s*$'
|
||||
silent keepjumps 1delete _
|
||||
else
|
||||
keepjumps 1
|
||||
endif
|
||||
lua require("man").highlight_man_page()
|
||||
" This is not perfect. See `man glDrawArraysInstanced`. Since the title is
|
||||
" all caps it is impossible to tell what the original capitilization was.
|
||||
let ref = substitute(matchstr(getline(1), '^[^)]\+)'), ' ', '_', 'g')
|
||||
|
@@ -40,9 +40,10 @@ function s:msgpack_init_python() abort
|
||||
return s:msgpack_python_type
|
||||
endif
|
||||
let s:msgpack_python_initialized = 1
|
||||
for suf in ['', '3']
|
||||
for suf in (has('win32') ? ['3'] : ['', '3'])
|
||||
try
|
||||
execute 'python' . suf
|
||||
\. "\n"
|
||||
\. "def shada_dict_strftime():\n"
|
||||
\. " import datetime\n"
|
||||
\. " import vim\n"
|
||||
@@ -60,12 +61,15 @@ function s:msgpack_init_python() abort
|
||||
\. " fmt = vim.eval('a:format')\n"
|
||||
\. " timestr = vim.eval('a:string')\n"
|
||||
\. " timestamp = datetime.datetime.strptime(timestr, fmt)\n"
|
||||
\. " try:\n"
|
||||
\. " timestamp = int(timestamp.timestamp())\n"
|
||||
\. " except:\n"
|
||||
\. " timestamp = int(timestamp.strftime('%s'))\n"
|
||||
\. " if timestamp > 2 ** 31:\n"
|
||||
\. " tsabs = abs(timestamp)"
|
||||
\. " tsabs = abs(timestamp)\n"
|
||||
\. " return ('{\"_TYPE\": v:msgpack_types.integer,'\n"
|
||||
\. " + '\"_VAL\": [{sign},{v1},{v2},{v3}]}').format(\n"
|
||||
\. " sign=1 if timestamp >= 0 else -1,\n"
|
||||
\. " sign=(1 if timestamp >= 0 else -1),\n"
|
||||
\. " v1=((tsabs >> 62) & 0x3),\n"
|
||||
\. " v2=((tsabs >> 31) & (2 ** 31 - 1)),\n"
|
||||
\. " v3=(tsabs & (2 ** 31 - 1)))\n"
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Nov 09, 2016
|
||||
" Date: Dec 30, 2014
|
||||
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 16
|
||||
" Version: 15
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v16"
|
||||
let g:loaded_netrwSettings = "v15"
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||
@@ -154,13 +154,9 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
||||
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
|
||||
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
|
||||
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
|
||||
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
|
||||
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
|
||||
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
|
||||
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
|
||||
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
|
||||
put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
|
||||
|
@@ -1,20 +1,21 @@
|
||||
" Common functionality for providers
|
||||
" Common functions for providers
|
||||
|
||||
let s:stderr = {}
|
||||
|
||||
function! provider#stderr_collector(chan_id, data, event)
|
||||
let stderr = get(s:stderr, a:chan_id, [''])
|
||||
let stderr[-1] .= a:data[0]
|
||||
call extend(stderr, a:data[1:])
|
||||
let s:stderr[a:chan_id] = stderr
|
||||
endfunction
|
||||
|
||||
function! provider#clear_stderr(chan_id)
|
||||
if has_key(s:stderr, a:chan_id)
|
||||
call remove(s:stderr, a:chan_id)
|
||||
" Start the provider and perform a 'poll' request
|
||||
"
|
||||
" Returns a valid channel on success
|
||||
function! provider#Poll(argv, orig_name, log_env) abort
|
||||
let job = {'rpc': v:true, 'stderr_buffered': v:true}
|
||||
try
|
||||
let channel_id = jobstart(a:argv, job)
|
||||
if channel_id > 0 && rpcrequest(channel_id, 'poll') ==# 'ok'
|
||||
return channel_id
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! provider#get_stderr(chan_id)
|
||||
return get(s:stderr, a:chan_id, [])
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
for row in get(job, 'stderr', [])
|
||||
echomsg row
|
||||
endfor
|
||||
endtry
|
||||
throw remote#host#LoadErrorForHost(a:orig_name, a:log_env)
|
||||
endfunction
|
||||
|
@@ -7,7 +7,7 @@ let s:clipboard = {}
|
||||
|
||||
" When caching is enabled, store the jobid of the xclip/xsel process keeping
|
||||
" ownership of the selection, so we know how long the cache is valid.
|
||||
let s:selection = { 'owner': 0, 'data': [], 'on_stderr': function('provider#stderr_collector') }
|
||||
let s:selection = { 'owner': 0, 'data': [], 'stderr_buffered': v:true }
|
||||
|
||||
function! s:selection.on_exit(jobid, data, event) abort
|
||||
" At this point this nvim instance might already have launched
|
||||
@@ -16,19 +16,17 @@ function! s:selection.on_exit(jobid, data, event) abort
|
||||
let self.owner = 0
|
||||
endif
|
||||
if a:data != 0
|
||||
let stderr = provider#get_stderr(a:jobid)
|
||||
echohl WarningMsg
|
||||
echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(stderr)
|
||||
echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(self.stderr)
|
||||
echohl None
|
||||
endif
|
||||
call provider#clear_stderr(a:jobid)
|
||||
endfunction
|
||||
|
||||
let s:selections = { '*': s:selection, '+': copy(s:selection) }
|
||||
|
||||
function! s:try_cmd(cmd, ...) abort
|
||||
let argv = split(a:cmd, " ")
|
||||
let out = a:0 ? systemlist(argv, a:1, 1) : systemlist(argv, [''], 1)
|
||||
let out = systemlist(argv, (a:0 ? a:1 : ['']), 1)
|
||||
if v:shell_error
|
||||
if !exists('s:did_error_try_cmd')
|
||||
echohl WarningMsg
|
||||
@@ -66,7 +64,7 @@ function! provider#clipboard#Executable() abort
|
||||
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
|
||||
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
|
||||
return get(g:clipboard, 'name', 'g:clipboard')
|
||||
elseif has('mac') && executable('pbcopy')
|
||||
elseif has('mac') && executable('pbpaste') && s:cmd_ok('pbpaste')
|
||||
let s:copy['+'] = 'pbcopy'
|
||||
let s:paste['+'] = 'pbpaste'
|
||||
let s:copy['*'] = s:copy['+']
|
||||
@@ -142,12 +140,13 @@ function! s:clipboard.set(lines, regtype, reg) abort
|
||||
return 0
|
||||
end
|
||||
|
||||
let selection = s:selections[a:reg]
|
||||
if selection.owner > 0
|
||||
if s:selections[a:reg].owner > 0
|
||||
" The previous provider instance should exit when the new one takes
|
||||
" ownership, but kill it to be sure we don't fill up the job table.
|
||||
call jobstop(selection.owner)
|
||||
call jobstop(s:selections[a:reg].owner)
|
||||
end
|
||||
let s:selections[a:reg] = copy(s:selection)
|
||||
let selection = s:selections[a:reg]
|
||||
let selection.data = [a:lines, a:regtype]
|
||||
let argv = split(s:copy[a:reg], " ")
|
||||
let selection.argv = argv
|
||||
|
123
runtime/autoload/provider/node.vim
Normal file
123
runtime/autoload/provider/node.vim
Normal file
@@ -0,0 +1,123 @@
|
||||
if exists('g:loaded_node_provider')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_node_provider = 1
|
||||
|
||||
function! s:is_minimum_version(version, min_major, min_minor) abort
|
||||
if empty(a:version)
|
||||
let nodejs_version = get(split(system(['node', '-v']), "\n"), 0, '')
|
||||
if v:shell_error || nodejs_version[0] !=# 'v'
|
||||
return 0
|
||||
endif
|
||||
else
|
||||
let nodejs_version = a:version
|
||||
endif
|
||||
" Remove surrounding junk. Example: 'v4.12.0' => '4.12.0'
|
||||
let nodejs_version = matchstr(nodejs_version, '\(\d\.\?\)\+')
|
||||
" [major, minor, patch]
|
||||
let v_list = split(nodejs_version, '\.')
|
||||
return len(v_list) == 3
|
||||
\ && ((str2nr(v_list[0]) > str2nr(a:min_major))
|
||||
\ || (str2nr(v_list[0]) == str2nr(a:min_major)
|
||||
\ && str2nr(v_list[1]) >= str2nr(a:min_minor)))
|
||||
endfunction
|
||||
|
||||
function! s:find_node_client(package_manager) abort
|
||||
if !executable(a:package_manager)
|
||||
return ''
|
||||
endif
|
||||
let is_yarn = a:package_manager ==# 'yarn'
|
||||
let cmd = is_yarn ? 'yarn global dir' : 'npm --loglevel silent root -g'
|
||||
let global_modules_dir = get(split(system(cmd), "\n"), 0, '')
|
||||
if v:shell_error || !isdirectory(global_modules_dir)
|
||||
return ''
|
||||
endif
|
||||
" `yarn global dir` returns the parent of '/node_modules'.
|
||||
let global_modules_dir = is_yarn ? global_modules_dir . '/node_modules' : global_modules_dir
|
||||
if !isdirectory(global_modules_dir)
|
||||
return ''
|
||||
endif
|
||||
let entry_point = global_modules_dir . '/neovim/bin/cli.js'
|
||||
if !filereadable(entry_point)
|
||||
return ''
|
||||
endif
|
||||
return entry_point
|
||||
endfunction
|
||||
|
||||
" Support for --inspect-brk requires node 6.12+ or 7.6+ or 8+
|
||||
" Return 1 if it is supported
|
||||
" Return 0 otherwise
|
||||
function! provider#node#can_inspect() abort
|
||||
if !executable('node')
|
||||
return 0
|
||||
endif
|
||||
let ver = get(split(system(['node', '-v']), "\n"), 0, '')
|
||||
if v:shell_error || ver[0] !=# 'v'
|
||||
return 0
|
||||
endif
|
||||
return (ver[1] ==# '6' && s:is_minimum_version(ver, 6, 12))
|
||||
\ || s:is_minimum_version(ver, 7, 6)
|
||||
endfunction
|
||||
|
||||
function! provider#node#Detect() abort
|
||||
if exists('g:node_host_prog')
|
||||
return g:node_host_prog
|
||||
endif
|
||||
if !s:is_minimum_version(v:null, 6, 0)
|
||||
return ''
|
||||
endif
|
||||
let entry_point = s:find_node_client('npm')
|
||||
let entry_point = !empty(entry_point) ? entry_point : s:find_node_client('yarn')
|
||||
return entry_point
|
||||
endfunction
|
||||
|
||||
function! provider#node#Prog() abort
|
||||
return s:prog
|
||||
endfunction
|
||||
|
||||
function! provider#node#Require(host) abort
|
||||
if s:err != ''
|
||||
echoerr s:err
|
||||
return
|
||||
endif
|
||||
|
||||
let args = ['node']
|
||||
|
||||
if !empty($NVIM_NODE_HOST_DEBUG) && provider#node#can_inspect()
|
||||
call add(args, '--inspect-brk')
|
||||
endif
|
||||
|
||||
call add(args, provider#node#Prog())
|
||||
|
||||
return provider#Poll(args, a:host.orig_name, '$NVIM_NODE_LOG_FILE')
|
||||
endfunction
|
||||
|
||||
function! provider#node#Call(method, args) abort
|
||||
if s:err != ''
|
||||
echoerr s:err
|
||||
return
|
||||
endif
|
||||
|
||||
if !exists('s:host')
|
||||
try
|
||||
let s:host = remote#host#Require('node')
|
||||
catch
|
||||
let s:err = v:exception
|
||||
echohl WarningMsg
|
||||
echomsg v:exception
|
||||
echohl None
|
||||
return
|
||||
endtry
|
||||
endif
|
||||
return call('rpcrequest', insert(insert(a:args, 'node_'.a:method), s:host))
|
||||
endfunction
|
||||
|
||||
|
||||
let s:err = ''
|
||||
let s:prog = provider#node#Detect()
|
||||
|
||||
if empty(s:prog)
|
||||
let s:err = 'Cannot find the "neovim" node package. Try :checkhealth'
|
||||
endif
|
||||
|
||||
call remote#host#RegisterPlugin('node-provider', 'node', [])
|
@@ -11,11 +11,11 @@ let g:loaded_python_provider = 1
|
||||
|
||||
let [s:prog, s:err] = provider#pythonx#Detect(2)
|
||||
|
||||
function! provider#python#Prog()
|
||||
function! provider#python#Prog() abort
|
||||
return s:prog
|
||||
endfunction
|
||||
|
||||
function! provider#python#Error()
|
||||
function! provider#python#Error() abort
|
||||
return s:err
|
||||
endfunction
|
||||
|
||||
@@ -29,7 +29,7 @@ endif
|
||||
call remote#host#RegisterClone('legacy-python-provider', 'python')
|
||||
call remote#host#RegisterPlugin('legacy-python-provider', 'script_host.py', [])
|
||||
|
||||
function! provider#python#Call(method, args)
|
||||
function! provider#python#Call(method, args) abort
|
||||
if s:err != ''
|
||||
return
|
||||
endif
|
||||
|
@@ -11,11 +11,11 @@ let g:loaded_python3_provider = 1
|
||||
|
||||
let [s:prog, s:err] = provider#pythonx#Detect(3)
|
||||
|
||||
function! provider#python3#Prog()
|
||||
function! provider#python3#Prog() abort
|
||||
return s:prog
|
||||
endfunction
|
||||
|
||||
function! provider#python3#Error()
|
||||
function! provider#python3#Error() abort
|
||||
return s:err
|
||||
endfunction
|
||||
|
||||
@@ -29,7 +29,7 @@ endif
|
||||
call remote#host#RegisterClone('legacy-python3-provider', 'python3')
|
||||
call remote#host#RegisterPlugin('legacy-python3-provider', 'script_host.py', [])
|
||||
|
||||
function! provider#python3#Call(method, args)
|
||||
function! provider#python3#Call(method, args) abort
|
||||
if s:err != ''
|
||||
return
|
||||
endif
|
||||
|
@@ -5,8 +5,6 @@ endif
|
||||
|
||||
let s:loaded_pythonx_provider = 1
|
||||
|
||||
let s:job_opts = {'rpc': v:true, 'on_stderr': function('provider#stderr_collector')}
|
||||
|
||||
function! provider#pythonx#Require(host) abort
|
||||
let ver = (a:host.orig_name ==# 'python') ? 2 : 3
|
||||
|
||||
@@ -20,22 +18,7 @@ function! provider#pythonx#Require(host) abort
|
||||
call add(args, plugin.path)
|
||||
endfor
|
||||
|
||||
try
|
||||
let channel_id = jobstart(args, s:job_opts)
|
||||
if rpcrequest(channel_id, 'poll') ==# 'ok'
|
||||
return channel_id
|
||||
endif
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
for row in provider#get_stderr(channel_id)
|
||||
echomsg row
|
||||
endfor
|
||||
finally
|
||||
call provider#clear_stderr(channel_id)
|
||||
endtry
|
||||
throw remote#host#LoadErrorForHost(a:host.orig_name,
|
||||
\ '$NVIM_PYTHON_LOG_FILE')
|
||||
return provider#Poll(args, a:host.orig_name, '$NVIM_PYTHON_LOG_FILE')
|
||||
endfunction
|
||||
|
||||
function! provider#pythonx#Detect(major_ver) abort
|
||||
|
@@ -4,26 +4,15 @@ if exists('g:loaded_ruby_provider')
|
||||
endif
|
||||
let g:loaded_ruby_provider = 1
|
||||
|
||||
let s:stderr = {}
|
||||
let s:job_opts = {'rpc': v:true}
|
||||
|
||||
function! s:job_opts.on_stderr(chan_id, data, event)
|
||||
let stderr = get(s:stderr, a:chan_id, [''])
|
||||
let last = remove(stderr, -1)
|
||||
let a:data[0] = last.a:data[0]
|
||||
call extend(stderr, a:data)
|
||||
let s:stderr[a:chan_id] = stderr
|
||||
endfunction
|
||||
|
||||
function! provider#ruby#Detect() abort
|
||||
if exists("g:ruby_host_prog")
|
||||
return g:ruby_host_prog
|
||||
else
|
||||
return exepath('neovim-ruby-host')
|
||||
return has('win32') ? exepath('neovim-ruby-host.bat') : exepath('neovim-ruby-host')
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! provider#ruby#Prog()
|
||||
function! provider#ruby#Prog() abort
|
||||
return s:prog
|
||||
endfunction
|
||||
|
||||
@@ -35,22 +24,10 @@ function! provider#ruby#Require(host) abort
|
||||
let prog .= " " . shellescape(plugin.path)
|
||||
endfor
|
||||
|
||||
try
|
||||
let channel_id = jobstart(prog, s:job_opts)
|
||||
if rpcrequest(channel_id, 'poll') ==# 'ok'
|
||||
return channel_id
|
||||
endif
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
for row in get(s:stderr, channel_id, [])
|
||||
echomsg row
|
||||
endfor
|
||||
endtry
|
||||
throw remote#host#LoadErrorForHost(a:host.orig_name, '$NVIM_RUBY_LOG_FILE')
|
||||
return provider#Poll(prog, a:host.orig_name, '$NVIM_RUBY_LOG_FILE')
|
||||
endfunction
|
||||
|
||||
function! provider#ruby#Call(method, args)
|
||||
function! provider#ruby#Call(method, args) abort
|
||||
if s:err != ''
|
||||
echoerr s:err
|
||||
return
|
||||
|
@@ -199,3 +199,7 @@ call remote#host#Register('python3', '*',
|
||||
" Ruby
|
||||
call remote#host#Register('ruby', '*.rb',
|
||||
\ function('provider#ruby#Require'))
|
||||
|
||||
" nodejs
|
||||
call remote#host#Register('node', '*',
|
||||
\ function('provider#node#Require'))
|
||||
|
@@ -2,9 +2,6 @@
|
||||
|
||||
" Setup: {{{1
|
||||
function! tutor#SetupVim()
|
||||
if &columns < 90
|
||||
set columns=90
|
||||
endif
|
||||
if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
|
||||
filetype plugin on
|
||||
endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -259,13 +259,14 @@ Name triggered by ~
|
||||
|BufNew| just after creating a new buffer
|
||||
|
||||
|SwapExists| detected an existing swap file
|
||||
|TermOpen| when a terminal buffer is starting
|
||||
|TermClose| when a terminal buffer ends
|
||||
|TermOpen| when a terminal job starts
|
||||
|TermClose| when a terminal job ends
|
||||
|ChanOpen| after a channel opened
|
||||
|ChanInfo| after a channel has its state changed
|
||||
|
||||
Options
|
||||
|FileType| when the 'filetype' option has been set
|
||||
|Syntax| when the 'syntax' option has been set
|
||||
|TermChanged| after the value of 'term' has changed
|
||||
|OptionSet| after setting any option
|
||||
|
||||
Startup and exit
|
||||
@@ -273,10 +274,11 @@ Name triggered by ~
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|GUIFailed| after starting the GUI failed
|
||||
|TermResponse| after the terminal response to |t_RV| is received
|
||||
|
||||
|QuitPre| when using `:quit`, before deciding whether to quit
|
||||
|VimLeavePre| before exiting Vim, before writing the shada file
|
||||
|VimLeave| before exiting Vim, after writing the shada file
|
||||
|VimLeavePre| before exiting Nvim, before writing the shada file
|
||||
|VimLeave| before exiting Nvim, after writing the shada file
|
||||
|VimResume| after Nvim is resumed
|
||||
|VimSuspend| before Nvim is suspended
|
||||
|
||||
Various
|
||||
|DirChanged| after the |current-directory| was changed
|
||||
@@ -295,8 +297,8 @@ Name triggered by ~
|
||||
|SourceCmd| before sourcing a Vim script |Cmd-event|
|
||||
|
||||
|VimResized| after the Vim window size changed
|
||||
|FocusGained| Vim got input focus
|
||||
|FocusLost| Vim lost input focus
|
||||
|FocusGained| Nvim got focus
|
||||
|FocusLost| Nvim lost focus
|
||||
|CursorHold| the user doesn't press a key for a while
|
||||
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|
||||
|CursorMoved| the cursor was moved in Normal mode
|
||||
@@ -310,6 +312,8 @@ Name triggered by ~
|
||||
|TabNew| when creating a new tab page
|
||||
|TabNewEntered| after entering a new tab page
|
||||
|TabClosed| after closing a tab page
|
||||
|CmdlineEnter| after entering cmdline mode
|
||||
|CmdlineLeave| before leaving cmdline mode
|
||||
|CmdwinEnter| after entering the command-line window
|
||||
|CmdwinLeave| before leaving the command-line window
|
||||
|
||||
@@ -323,6 +327,9 @@ Name triggered by ~
|
||||
|
||||
|TextChanged| after a change was made to the text in Normal mode
|
||||
|TextChangedI| after a change was made to the text in Insert mode
|
||||
when popup menu is not visible
|
||||
|TextChangedP| after a change was made to the text in Insert mode
|
||||
when popup menu visible
|
||||
|
||||
|ColorScheme| after loading a color scheme
|
||||
|
||||
@@ -482,6 +489,19 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
(should undo the commands for BufWritePre).
|
||||
*ChanInfo*
|
||||
ChanInfo State of channel changed, for instance the
|
||||
client of a RPC channel described itself.
|
||||
Sets these |v:event| keys:
|
||||
info
|
||||
See |nvim_get_chan_info| for the format of the
|
||||
info Dictionary.
|
||||
*ChanOpen*
|
||||
ChanOpen Just after a channel was opened.
|
||||
Sets these |v:event| keys:
|
||||
info
|
||||
See |nvim_get_chan_info| for the format of the
|
||||
info Dictionary.
|
||||
*CmdUndefined*
|
||||
CmdUndefined When a user command is used but it isn't
|
||||
defined. Useful for defining a command only
|
||||
@@ -492,6 +512,28 @@ CmdUndefined When a user command is used but it isn't
|
||||
command is defined. An alternative is to
|
||||
always define the user command and have it
|
||||
invoke an autoloaded function. See |autoload|.
|
||||
*CmdlineEnter*
|
||||
CmdlineEnter After moving the cursor to the command line,
|
||||
where the user can type a command or search
|
||||
string.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdline-char|
|
||||
Sets these |v:event| keys:
|
||||
cmdlevel
|
||||
cmdtype
|
||||
*CmdlineLeave*
|
||||
CmdlineLeave Before leaving the command line.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdline-char|
|
||||
Sets these |v:event| keys:
|
||||
abort (mutable)
|
||||
cmdlevel
|
||||
cmdtype
|
||||
Note: `abort` can only be changed from false
|
||||
to true. An autocmd cannot execute an already
|
||||
aborted cmdline by changing it to false.
|
||||
*CmdwinEnter*
|
||||
CmdwinEnter After entering the command-line window.
|
||||
Useful for setting options specifically for
|
||||
@@ -693,14 +735,10 @@ FilterWritePre Before writing a file for a filter command or
|
||||
filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FocusGained*
|
||||
FocusGained When Vim got input focus. Only for the GUI
|
||||
version and a few console versions where this
|
||||
can be detected.
|
||||
FocusGained Nvim got focus.
|
||||
*FocusLost*
|
||||
FocusLost When Vim lost input focus. Only for the GUI
|
||||
version and a few console versions where this
|
||||
can be detected. May also happen when a
|
||||
dialog pops up.
|
||||
FocusLost Nvim lost focus. Also (potentially) when
|
||||
a GUI dialog pops up.
|
||||
*FuncUndefined*
|
||||
FuncUndefined When a user function is used but it isn't
|
||||
defined. Useful for defining a function only
|
||||
@@ -862,14 +900,11 @@ SpellFileMissing When trying to load a spell checking file and
|
||||
language, 'encoding' also matters. See
|
||||
|spell-SpellFileMissing|.
|
||||
*StdinReadPost*
|
||||
StdinReadPost After reading from the stdin into the buffer,
|
||||
before executing the modelines. Only used
|
||||
when the "-" argument was used when Vim was
|
||||
started |--|.
|
||||
StdinReadPost During startup, after reading from stdin into
|
||||
the buffer, before executing modelines. |--|
|
||||
*StdinReadPre*
|
||||
StdinReadPre Before reading from stdin into the buffer.
|
||||
Only used when the "-" argument was used when
|
||||
Vim was started |--|.
|
||||
StdinReadPre During startup, before reading from stdin into
|
||||
the buffer. |--|
|
||||
*SwapExists*
|
||||
SwapExists Detected an existing swap file when starting
|
||||
to edit a file. Only when it is possible to
|
||||
@@ -909,26 +944,20 @@ TabEnter Just after entering a tab page. |tab-page|
|
||||
TabLeave Just before leaving a tab page. |tab-page|
|
||||
A WinLeave event will have been triggered
|
||||
first.
|
||||
{Nvim} *TabNew*
|
||||
*TabNew*
|
||||
TabNew When creating a new tab page. |tab-page|
|
||||
After WinEnter and before TabEnter.
|
||||
{Nvim} *TabNewEntered*
|
||||
*TabNewEntered*
|
||||
TabNewEntered After entering a new tab page. |tab-page|
|
||||
After BufEnter.
|
||||
{Nvim} *TabClosed*
|
||||
*TabClosed*
|
||||
TabClosed After closing a tab page. <afile> can be used
|
||||
for the tab page number.
|
||||
*TermChanged*
|
||||
TermChanged After the value of 'term' has changed. Useful
|
||||
for re-loading the syntax file to update the
|
||||
colors, fonts and other terminal-dependent
|
||||
settings. Executed for all loaded buffers.
|
||||
{Nvim} *TermClose*
|
||||
TermClose When a terminal buffer ends.
|
||||
{Nvim} *TermOpen*
|
||||
TermOpen When a terminal buffer is starting. This can
|
||||
be used to configure the terminal emulator by
|
||||
setting buffer variables. |terminal|
|
||||
*TermClose*
|
||||
TermClose When a |terminal| job ends.
|
||||
*TermOpen*
|
||||
TermOpen When a |terminal| job is starting. Can be
|
||||
used to configure the terminal buffer.
|
||||
*TermResponse*
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
@@ -951,6 +980,11 @@ TextChangedI After a change was made to the text in the
|
||||
current buffer in Insert mode.
|
||||
Not triggered when the popup menu is visible.
|
||||
Otherwise the same as TextChanged.
|
||||
*TextChangedP*
|
||||
TextChangedP After a change was made to the text in the
|
||||
current buffer in Insert mode, only when the
|
||||
popup menu is visible. Otherwise the same as
|
||||
TextChanged.
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
@@ -992,6 +1026,10 @@ VimLeavePre Before exiting Vim, just before writing the
|
||||
VimResized After the Vim window was resized, thus 'lines'
|
||||
and/or 'columns' changed. Not when starting
|
||||
up though.
|
||||
*VimResume*
|
||||
VimResume After Nvim resumes from |suspend| state.
|
||||
*VimSuspend*
|
||||
VimSuspend Before Nvim enters |suspend| state.
|
||||
*WinEnter*
|
||||
WinEnter After entering another window. Not done for
|
||||
the first window, when Vim has just started.
|
||||
|
170
runtime/doc/channel.txt
Normal file
170
runtime/doc/channel.txt
Normal file
@@ -0,0 +1,170 @@
|
||||
*channel.txt* Nvim
|
||||
|
||||
|
||||
NVIM REFERENCE MANUAL by Thiago de Arruda
|
||||
|
||||
|
||||
Nvim asynchronous IO *channel*
|
||||
|
||||
Type |gO| to see the table of contents.
|
||||
|
||||
==============================================================================
|
||||
1. Introduction *channel-intro*
|
||||
|
||||
Channels are nvim's way of communicating with external processes.
|
||||
|
||||
There are several ways to open a channel:
|
||||
|
||||
1. Through stdin/stdout when `nvim` is started with `--headless`, and a startup
|
||||
script or --cmd command opens the stdio channel using |stdioopen()|.
|
||||
|
||||
2. Through stdin, stdout and stderr of a process spawned by |jobstart()|.
|
||||
|
||||
3. Through the PTY master end of a PTY opened with
|
||||
`jobstart(..., {'pty': v:true})` or |termopen()|.
|
||||
|
||||
4. By connecting to a TCP/IP socket or named pipe with |sockconnect()|.
|
||||
|
||||
5. By another process connecting to a socket listened to by nvim. This only
|
||||
supports RPC channels, see |rpc-connecting|.
|
||||
|
||||
Channels support multiple modes or protocols. In the most basic
|
||||
mode of operation, raw bytes are read and written to the channel.
|
||||
The |rpc| protocol, based on the msgpack-rpc standard, enables nvim and the
|
||||
process at the other end to send remote calls and events to each other.
|
||||
Additionally, the builtin |terminal-emulator|, is implemented on top of PTY
|
||||
channels.
|
||||
|
||||
==============================================================================
|
||||
2. Reading and writing raw bytes *channel-bytes*
|
||||
|
||||
By default, channels opened by vimscript functions will operate with raw
|
||||
bytes. Additionally, for a job channel using rpc, bytes can still be
|
||||
read over its stderr. Similarily, only bytes can be written to nvim's own stderr.
|
||||
|
||||
*channel-callback* *buffered*
|
||||
*E5210* *on_stdout* *on_stderr* *on_stdin* *on_data*
|
||||
It is possible to register callback functions when a channel receives data by
|
||||
passing the `on_stdout`, `on_stderr`, `on_stdin` options on creation. Sockets
|
||||
may specify an `on_data` callback instead. Each callback function will be
|
||||
invoked with data read from the channel. By default, the callback will be
|
||||
invoked immediately when data is available, to facilitate interactive
|
||||
communication. The same callback will then be invoked with empty data, to
|
||||
indicate that the stream reached EOF. Alternatively the `stdout_buffered`,
|
||||
`stderr_buffered`, `stdin_buffered`, `data_buffered` options can be set to
|
||||
invoke the corresponding callback only when the underlying stream reaches EOF.
|
||||
The callback will then be passed complete output. This is helpful when only
|
||||
the complete output is useful, and not partial data. Futhermore if the stream
|
||||
is set to be buffered, but the callback is not set, the data is saved in the
|
||||
options dict, with the stream name as key. For this to work a new options dict
|
||||
must be used for each opened channel. If a script uses a global `s:job_opts`
|
||||
dict, it can be copied with |copy()| before supplying it to |jobstart()|. If a
|
||||
dict is reused, so that the dict key already is occupied, error `E5210` will
|
||||
be raised.
|
||||
|
||||
- The arguments passed to the callback function are:
|
||||
|
||||
0: The channel id
|
||||
1: the raw data read from the channel, formatted as a |readfile()|-style
|
||||
list. If EOF occured, a single empty string `['']` will be passed in.
|
||||
Note that the items in this list do not directly correspond to actual
|
||||
lines in the output. See |channel-lines|
|
||||
2: Stream name as a string, like `"stdout"`. This is to allow multiple
|
||||
stream handlers to be implemented by the same function. The available
|
||||
events depend on how the channel was opened and in what mode/protocol.
|
||||
|
||||
*channel-lines*
|
||||
Note:
|
||||
stream event handlers may receive partial (incomplete) lines. For a given
|
||||
invocation of on_stdout etc, `a:data` is not guaranteed to end
|
||||
with a newline.
|
||||
- `abcdefg` may arrive as `['abc']`, `['defg']`.
|
||||
- `abc\nefg` may arrive as `['abc', '']`, `['efg']` or `['abc']`,
|
||||
`['','efg']`, or even `['ab']`, `['c','efg']`.
|
||||
|
||||
If you only are interested in complete output when the process exits,
|
||||
use buffered mode. Otherwise, an easy way to deal with this:
|
||||
initialize a list as `['']`, then append to it as follows: >
|
||||
let s:chunks = ['']
|
||||
func! s:on_event(job_id, data, event) dict
|
||||
let s:chunks[-1] .= a:data[0]
|
||||
call extend(s:chunks, a:data[1:])
|
||||
endf
|
||||
<
|
||||
|
||||
Additionally, if the callbacks are Dictionary functions, |self| can be used to
|
||||
refer to the options dictionary containing the callbacks. |Partial|s can also be
|
||||
used as callbacks.
|
||||
|
||||
Data can be sent to the channel using the |chansend()| function. Here is a
|
||||
simple example, echoing some data through a cat-process:
|
||||
>
|
||||
function! s:OnEvent(id, data, event) dict
|
||||
let str = join(a:data, "\n")
|
||||
echomsg str
|
||||
endfunction
|
||||
let id = jobstart(['cat'], {'on_stdout': function('s:OnEvent') } )
|
||||
call chansend(id, "hello!")
|
||||
<
|
||||
|
||||
Here is a example of setting a buffer to the result of grep, but only after
|
||||
all data has been processed:
|
||||
>
|
||||
function! s:OnEvent(id, data, event) dict
|
||||
call nvim_buf_set_lines(2, 0, -1, v:true, a:data)
|
||||
endfunction
|
||||
let id = jobstart(['grep', '^[0-9]'], { 'on_stdout': function('s:OnEvent'),
|
||||
\ 'stdout_buffered':v:true } )
|
||||
|
||||
call chansend(id, "stuff\n10 PRINT \"NVIM\"\nxx")
|
||||
" no output is received, buffer is empty
|
||||
|
||||
call chansend(id, "xx\n20 GOTO 10\nzz\n")
|
||||
call chanclose(id, 'stdin')
|
||||
" now buffer has result
|
||||
<
|
||||
For additional examples with jobs, see |job-control|.
|
||||
|
||||
*channel-pty*
|
||||
Special case: PTY channels opened with `jobstart(..., {'pty': v:true})` do not
|
||||
preprocess ANSI escape sequences, these will be sent raw to the callback.
|
||||
However, change of PTY size can be signaled to the slave using |jobresize()|.
|
||||
See also |terminal-emulator|.
|
||||
|
||||
Terminal characteristics (termios) for |:terminal| and PTY channels are copied
|
||||
from the host TTY, or if Nvim is |--headless| it uses default values: >
|
||||
:echo system('nvim --headless +"te stty -a" +"sleep 1" +"1,/^$/print" +q')
|
||||
|
||||
==============================================================================
|
||||
3. Communicating using msgpack-rpc *channel-rpc*
|
||||
|
||||
When channels are opened with the `rpc` option set to true, the channel can be
|
||||
used for remote method calls in both directions, see |msgpack-rpc|. Note that
|
||||
rpc channels are implicitly trusted and the process at the other end can
|
||||
invoke any |api| function!
|
||||
|
||||
==============================================================================
|
||||
4. Standard IO channel *channel-stdio*
|
||||
|
||||
Nvim uses stdin/stdout to interact with the user over the terminal interface
|
||||
(TUI). If Nvim is |--headless| the TUI is not started and stdin/stdout can be
|
||||
used as a channel. See also |--embed|.
|
||||
|
||||
Call |stdioopen()| during |startup| to open the stdio channel as channel-id 1.
|
||||
Nvim's stderr is always available as channel-id 2 (|v:stderr| to be explicit),
|
||||
a write-only bytes channel.
|
||||
|
||||
Example: >
|
||||
func! OnEvent(id, data, event)
|
||||
if a:data == [""]
|
||||
quit
|
||||
end
|
||||
call chansend(a:id, map(a:data, {i,v -> toupper(v)}))
|
||||
endfunc
|
||||
call stdioopen({'on_stdin': 'OnEvent'})
|
||||
<
|
||||
Put this in `uppercase.vim` and run: >
|
||||
nvim --headless --cmd "source uppercase.vim"
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
@@ -382,7 +382,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.
|
||||
history.
|
||||
*c_CTRL-A*
|
||||
CTRL-A All names that match the pattern in front of the cursor are
|
||||
inserted.
|
||||
@@ -1088,7 +1088,7 @@ Another example: >
|
||||
:au CmdwinEnter [/?] startinsert
|
||||
This will make Vim start in Insert mode in the command-line window.
|
||||
|
||||
*cmdwin-char*
|
||||
*cmdline-char* *cmdwin-char*
|
||||
The character used for the pattern indicates the type of command-line:
|
||||
: normal Ex command
|
||||
> debug mode command |debug-mode|
|
||||
|
@@ -12,16 +12,16 @@ updated.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Normal commands ~
|
||||
*]f*
|
||||
*[f* Same as "gf".
|
||||
|
||||
Commands ~
|
||||
*:rv*
|
||||
*:rviminfo* Deprecated alias to |:rshada| command.
|
||||
*:wv*
|
||||
*:wviminfo* Deprecated alias to |:wshada| command.
|
||||
|
||||
Environment Variables ~
|
||||
*$NVIM_LISTEN_ADDRESS* Deprecated in favor of |--listen|. If both are given,
|
||||
$NVIM_LISTEN_ADDRESS is ignored.
|
||||
|
||||
Events ~
|
||||
*EncodingChanged* Never fired; 'encoding' is always "utf-8".
|
||||
*FileEncoding* Never fired; equivalent to |EncodingChanged|.
|
||||
@@ -37,6 +37,8 @@ Functions ~
|
||||
*file_readable()* Obsolete name for |filereadable()|.
|
||||
*highlight_exists()* Obsolete name for |hlexists()|.
|
||||
*highlightID()* Obsolete name for |hlID()|.
|
||||
*jobclose()* Obsolete name for |chanclose()|
|
||||
*jobsend()* Obsolete name for |chansend()|
|
||||
*last_buffer_nr()* Obsolete name for bufnr("$").
|
||||
|
||||
Modifiers ~
|
||||
@@ -45,11 +47,22 @@ Modifiers ~
|
||||
*:map-<special>*
|
||||
*:map-special* <> notation is always enabled. |cpo-<|
|
||||
|
||||
Normal commands ~
|
||||
*]f*
|
||||
*[f* Same as "gf".
|
||||
|
||||
Options ~
|
||||
*'cscopeverbose'* Enabled by default. Use |:silent| instead.
|
||||
'gd'
|
||||
'gdefault' Enables the |:substitute| flag 'g' by default.
|
||||
*'fe'* 'fenc'+'enc' before Vim 6.0; no longer used.
|
||||
*'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed.
|
||||
*'langnoremap'* Deprecated alias to 'nolangremap'.
|
||||
*'vi'*
|
||||
*'viminfo'* Deprecated alias to 'shada' option.
|
||||
|
||||
Variables~
|
||||
*b:terminal_job_pid* PID of the top-level process in a |:terminal|.
|
||||
Use `jobpid(&channel)` instead.
|
||||
|
||||
vim:noet:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -203,7 +203,7 @@ DOCUMENTATION *dev-doc*
|
||||
|
||||
API *dev-api*
|
||||
|
||||
Use this pattern to name new API functions:
|
||||
Use this template to name new API functions:
|
||||
nvim_{thing}_{action}_{arbitrary-qualifiers}
|
||||
|
||||
If the function acts on an object then {thing} is the name of that object
|
||||
@@ -231,6 +231,11 @@ Example: `nvim_list_bufs` operates in a global context (first parameter is
|
||||
_not_ a Buffer). The common {action} "list" indicates that it lists all
|
||||
bufs (plural) in the global context.
|
||||
|
||||
Use this template to name new API events:
|
||||
nvim_{thing}_{event}_event
|
||||
|
||||
Example: `nvim_buf_changedtick_event`.
|
||||
|
||||
|
||||
API-CLIENT *dev-api-client*
|
||||
|
||||
@@ -257,22 +262,22 @@ C project source, too. https://github.com/libmpack/libmpack/
|
||||
|
||||
EXTERNAL UI *dev-ui*
|
||||
|
||||
Compatibility ~
|
||||
External UIs should be aware of the |api-contract|. In particular, future
|
||||
versions of Nvim may add new items to existing events. The API is strongly
|
||||
backwards-compatible, but clients must not break if new fields are added to
|
||||
existing events.
|
||||
backwards-compatible, but clients must not break if new (optional) fields are
|
||||
added to existing events.
|
||||
|
||||
Common Features ~
|
||||
External UIs are expected to implement these common features:
|
||||
- Cursor style (shape, color) should respond to the 'guicursor' properties
|
||||
- Cursor style (shape, color) should conform to the 'guicursor' properties
|
||||
delivered with the mode_info_set UI event.
|
||||
- Send the ALT/META ("Option" on macOS) key as a |<M-| chord.
|
||||
- Send the "super" key (Windows key, Apple key) as a |<D-| chord.
|
||||
|
||||
Implementation ~
|
||||
- Options can be monitored for changes by the |OptionSet| autocmd. E.g. if the
|
||||
user sets the 'guifont' option, this autocmd notifies channel 42: >
|
||||
autocmd OptionSet guifont call rpcnotify(42, 'option-changed', 'guifont', &guifont)
|
||||
- Avoid mappings that conflict with the Nvim keymap-space; GUIs have many new
|
||||
chords (<C-,> <C-Enter> <C-S-x> <D-x>) and patterns ("shift shift") that do
|
||||
not potentially conflict with Nvim defaults, plugins, etc.
|
||||
- Consider the "option_set" |ui-global| event as a hint for other GUI
|
||||
behaviors. UI-related options ('guifont', 'ambiwidth', …) are published in
|
||||
this event.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -165,7 +165,7 @@ loaded. Since Vim doesn't allow having two buffers for the same file, you
|
||||
need another buffer. This command is useful: >
|
||||
command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_
|
||||
\ | diffthis | wincmd p | diffthis
|
||||
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
|
||||
Use ":DiffOrig" to see the differences
|
||||
between the current buffer and the file it was loaded from.
|
||||
|
||||
A buffer that is unloaded cannot be used for the diff. But it does work for
|
||||
|
@@ -562,16 +562,16 @@ list of the current window.
|
||||
buffer.
|
||||
Also see |++opt| and |+cmd|.
|
||||
|
||||
:[count]arge[dit][!] [++opt] [+cmd] {name} *:arge* *:argedit*
|
||||
Add {name} to the argument list and edit it.
|
||||
:[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit*
|
||||
Add {name}s to the argument list and edit it.
|
||||
When {name} already exists in the argument list, this
|
||||
entry is edited.
|
||||
This is like using |:argadd| and then |:edit|.
|
||||
Note that only one file name is allowed, and spaces
|
||||
inside the file name are allowed, like with |:edit|.
|
||||
Spaces in filenames have to be escaped with "\".
|
||||
[count] is used like with |:argadd|.
|
||||
[!] is required if the current file cannot be
|
||||
|abandon|ed.
|
||||
If the current file cannot be |abandon|ed {name}s will
|
||||
still be added to the argument list, but won't be
|
||||
edited. No check for duplicates is done.
|
||||
Also see |++opt| and |+cmd|.
|
||||
|
||||
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
|
||||
|
@@ -1474,7 +1474,6 @@ v:count The count given for the last Normal mode command. Can be used
|
||||
When there are two counts, as in "3d2w", they are multiplied,
|
||||
just like what happens in the command, "d6w" for the example.
|
||||
Also used for evaluating the 'formatexpr' option.
|
||||
"count" also works, for backwards compatibility.
|
||||
|
||||
*v:count1* *count1-variable*
|
||||
v:count1 Just like "v:count", but defaults to one when no count is
|
||||
@@ -1528,13 +1527,18 @@ v:event Dictionary of event data for the current |autocommand|. Valid
|
||||
< Keys vary by event; see the documentation for the specific
|
||||
event, e.g. |DirChanged| or |TextYankPost|.
|
||||
KEY DESCRIPTION ~
|
||||
cwd Current working directory
|
||||
abort Whether the event triggered during
|
||||
an aborting condition (e.g. |c_Esc| or
|
||||
|c_CTRL-c| for |CmdlineLeave|).
|
||||
cmdlevel Level of cmdline.
|
||||
cmdtype Type of cmdline, |cmdline-char|.
|
||||
cwd Current working directory.
|
||||
scope Event-specific scope name.
|
||||
operator Current |operator|. Also set for Ex
|
||||
commands (unlike |v:operator|). For
|
||||
example if |TextYankPost| is triggered
|
||||
by the |:yank| Ex command then
|
||||
`v:event['operator']` is "y".
|
||||
`v:event.operator` is "y".
|
||||
regcontents Text stored in the register as a
|
||||
|readfile()|-style list of lines.
|
||||
regname Requested register (e.g "x" for "xyy)
|
||||
@@ -1784,9 +1788,9 @@ v:scrollstart String describing the script or function that caused the
|
||||
hit-enter prompt.
|
||||
|
||||
*v:servername* *servername-variable*
|
||||
*$NVIM_LISTEN_ADDRESS*
|
||||
v:servername Default Nvim server address. Equivalent to
|
||||
|$NVIM_LISTEN_ADDRESS| on startup. |serverstop()|
|
||||
v:servername Primary listen-address of the current Nvim instance, the first
|
||||
item returned by |serverlist()|. Can be set by |--listen| or
|
||||
|$NVIM_LISTEN_ADDRESS| at startup. |serverstart()| |serverstop()|
|
||||
Read-only.
|
||||
|
||||
|
||||
@@ -1814,6 +1818,13 @@ v:shell_error Result of the last shell command. When non-zero, the last
|
||||
*v:statusmsg* *statusmsg-variable*
|
||||
v:statusmsg Last given status message. It's allowed to set this variable.
|
||||
|
||||
*v:stderr* *stderr-variable*
|
||||
v:stderr Channel id for stderr. Unlike stdin and stdout (see
|
||||
|stdioopen()|), stderr is always open for writing. This channel
|
||||
ID is always 2, but this variable can be used to be explicit.
|
||||
Example: >
|
||||
:call chansend(v:stderr, "something bad happened\n")
|
||||
<
|
||||
*v:swapname* *swapname-variable*
|
||||
v:swapname Only valid when executing |SwapExists| autocommands: Name of
|
||||
the swap file found. Read-only.
|
||||
@@ -1985,6 +1996,8 @@ call({func}, {arglist} [, {dict}])
|
||||
any call {func} with arguments {arglist}
|
||||
ceil({expr}) Float round {expr} up
|
||||
changenr() Number current change number
|
||||
chanclose({id}[, {stream}]) Number Closes a channel or one of its streams
|
||||
chansend({id}, {data}) Number Writes {data} to channel
|
||||
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches() none clear all matches
|
||||
@@ -2133,13 +2146,11 @@ isdirectory({directory}) Number |TRUE| if {directory} is a directory
|
||||
islocked({expr}) Number |TRUE| if {expr} is locked
|
||||
id({expr}) String identifier of the container
|
||||
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
|
||||
jobpid({id}) Number Returns pid of a job.
|
||||
jobresize({id}, {width}, {height})
|
||||
Number Resize pseudo terminal window of a job
|
||||
jobstart({cmd}[, {opts}]) Number Spawns {cmd} as a job
|
||||
jobstop({job}) Number Stops a job
|
||||
jobstop({id}) Number Stops a job
|
||||
jobwait({ids}[, {timeout}]) Number Wait for a set of jobs
|
||||
join({list} [, {sep}]) String join {list} items into one String
|
||||
json_decode({expr}) any Convert {expr} from JSON
|
||||
@@ -2211,6 +2222,8 @@ remote_read({serverid} [, {timeout}])
|
||||
String read reply string
|
||||
remote_send({server}, {string} [, {idvar}])
|
||||
String send key sequence
|
||||
remote_startserver({name}) none become server {name}
|
||||
String send key sequence
|
||||
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
|
||||
remove({dict}, {key}) any remove entry {key} from {dict}
|
||||
rename({from}, {to}) Number rename (move) file from {from} to {to}
|
||||
@@ -2222,7 +2235,6 @@ rpcnotify({channel}, {event}[, {args}...])
|
||||
Sends an |RPC| notification to {channel}
|
||||
rpcrequest({channel}, {method}[, {args}...])
|
||||
Sends an |RPC| request to {channel}
|
||||
rpcstop({channel}) Closes an |RPC| {channel}
|
||||
screenattr({row}, {col}) Number attribute at screen position
|
||||
screenchar({row}, {col}) Number character at screen position
|
||||
screencol() Number current cursor column
|
||||
@@ -2264,6 +2276,8 @@ shiftwidth() Number effective value of 'shiftwidth'
|
||||
simplify({filename}) String simplify filename as much as possible
|
||||
sin({expr}) Float sine of {expr}
|
||||
sinh({expr}) Float hyperbolic sine of {expr}
|
||||
sockconnect({mode}, {address} [, {opts}])
|
||||
Number Connects to socket
|
||||
sort({list} [, {func} [, {dict}]])
|
||||
List sort {list}, using {func} to compare
|
||||
soundfold({word}) String sound-fold {word}
|
||||
@@ -2273,6 +2287,8 @@ spellsuggest({word} [, {max} [, {capital}]])
|
||||
split({expr} [, {pat} [, {keepempty}]])
|
||||
List make |List| from {pat} separated {expr}
|
||||
sqrt({expr}) Float square root of {expr}
|
||||
stdioopen({dict}) Number open stdio in a headless instance.
|
||||
stdpath({what}) String/List returns the standard path(s) for {what}
|
||||
str2float({expr}) Float convert String to Float
|
||||
str2nr({expr} [, {base}]) Number convert String to Number
|
||||
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
|
||||
@@ -2757,6 +2773,35 @@ changenr() *changenr()*
|
||||
redo it is the number of the redone change. After undo it is
|
||||
one less than the number of the undone change.
|
||||
|
||||
chanclose({id}[, {stream}]) {Nvim} *chanclose()*
|
||||
Close a channel or a specific stream associated with it.
|
||||
For a job, {stream} can be one of "stdin", "stdout",
|
||||
"stderr" or "rpc" (closes stdin/stdout for a job started
|
||||
with `"rpc":v:true`) If {stream} is omitted, all streams
|
||||
are closed. If the channel is a pty, this will then close the
|
||||
pty master, sending SIGHUP to the job process.
|
||||
For a socket, there is only one stream, and {stream} should be
|
||||
ommited.
|
||||
|
||||
chansend({id}, {data}) {Nvim} *chansend()*
|
||||
Send data to channel {id}. For a job, it writes it to the
|
||||
stdin of the process. For the stdio channel |channel-stdio|,
|
||||
it writes to Nvim's stdout. Returns the number of bytes
|
||||
written if the write succeeded, 0 otherwise.
|
||||
See |channel-bytes| for more information.
|
||||
|
||||
{data} may be a string, string convertible, or a list. If
|
||||
{data} is a list, the items will be joined by newlines; any
|
||||
newlines in an item will be sent as NUL. To send a final
|
||||
newline, include a final empty string. Example: >
|
||||
:call chansend(id, ["abc", "123\n456", ""])
|
||||
< will send "abc<NL>123<NUL>456<NL>".
|
||||
|
||||
chansend() writes raw data, not RPC messages. If the channel
|
||||
was created with `"rpc":v:true` then the channel expects RPC
|
||||
messages, use |rpcnotify()| and |rpcrequest()| instead.
|
||||
|
||||
|
||||
char2nr({expr} [, {utf8}]) *char2nr()*
|
||||
Return number value of the first char in {expr}. Examples: >
|
||||
char2nr(" ") returns 32
|
||||
@@ -4166,8 +4211,7 @@ getftype({fname}) *getftype()*
|
||||
getftype("/home")
|
||||
< Note that a type such as "link" will only be returned on
|
||||
systems that support it. On some systems only "dir" and
|
||||
"file" are returned. On MS-Windows a symbolic link to a
|
||||
directory returns "dir" instead of "link".
|
||||
"file" are returned.
|
||||
|
||||
*getline()*
|
||||
getline({lnum} [, {end}])
|
||||
@@ -4285,17 +4329,25 @@ getqflist([{what}]) *getqflist()*
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
returns only the items listed in {what} as a dictionary. The
|
||||
following string items are supported in {what}:
|
||||
context get the context stored with |setqflist()|
|
||||
items quickfix list entries
|
||||
nr get information for this quickfix list; zero
|
||||
means the current quickfix list
|
||||
means the current quickfix list and '$' means
|
||||
the last quickfix list
|
||||
title get the list title
|
||||
winid get the |window-ID| (if opened)
|
||||
all all of the above quickfix properties
|
||||
Non-string items in {what} are ignored.
|
||||
If "nr" is not present then the current quickfix list is used.
|
||||
To get the number of lists in the quickfix stack, set 'nr' to
|
||||
'$' in {what}. The 'nr' value in the returned dictionary
|
||||
contains the quickfix stack size.
|
||||
In case of error processing {what}, an empty dictionary is
|
||||
returned.
|
||||
|
||||
The returned dictionary contains the following entries:
|
||||
context context information stored with |setqflist()|
|
||||
items quickfix list entries
|
||||
nr quickfix list number
|
||||
title quickfix list title text
|
||||
winid quickfix |window-ID| (if opened)
|
||||
@@ -4791,8 +4843,8 @@ input({opts})
|
||||
modifier. If the function causes any errors, it will be
|
||||
skipped for the duration of the current input() call.
|
||||
|
||||
Currently coloring is disabled when command-line contains
|
||||
arabic characters.
|
||||
Highlighting is disabled if command-line contains arabic
|
||||
characters.
|
||||
|
||||
NOTE: This function must not be used in a startup file, for
|
||||
the versions that only run in GUI mode (e.g., the Win32 GUI).
|
||||
@@ -4927,12 +4979,6 @@ items({dict}) *items()*
|
||||
entry and the value of this entry. The |List| is in arbitrary
|
||||
order.
|
||||
|
||||
jobclose({job}[, {stream}]) *jobclose()*
|
||||
Close {stream} of |job-id| {job}, where {stream} is one of:
|
||||
"stdin", "stdout", "stderr", "rpc" (RPC channel of a job
|
||||
started with `"rpc":v:true`). If {stream} is omitted, all
|
||||
streams are closed. If the job is a pty job, this will close
|
||||
the pty master, sending SIGHUP to the job process.
|
||||
|
||||
jobpid({job}) *jobpid()*
|
||||
Return the PID (process id) of |job-id| {job}.
|
||||
@@ -4942,22 +4988,6 @@ jobresize({job}, {width}, {height}) *jobresize()*
|
||||
columns and {height} rows.
|
||||
Fails if the job was not started with `"pty":v:true`.
|
||||
|
||||
jobsend({job}, {data}) *jobsend()*
|
||||
Writes to stdin of the process associated with |job-id| {job}.
|
||||
Returns 1 if the write succeeded, 0 otherwise.
|
||||
See |job-control|.
|
||||
|
||||
{data} may be a string, string convertible, or a list. If
|
||||
{data} is a list, the items will be joined by newlines; any
|
||||
newlines in an item will be sent as NUL. To send a final
|
||||
newline, include a final empty string. Example: >
|
||||
:call jobsend(j, ["abc", "123\n456", ""])
|
||||
< will send "abc<NL>123<NUL>456<NL>".
|
||||
|
||||
jobsend() writes raw data, not RPC messages. If the job was
|
||||
created with `"rpc":v:true` then the channel expects RPC
|
||||
messages, use |rpcnotify()| and |rpcrequest()| instead.
|
||||
|
||||
jobstart({cmd}[, {opts}]) *jobstart()*
|
||||
Spawns {cmd} as a job.
|
||||
If {cmd} is a List it runs directly (no 'shell').
|
||||
@@ -4965,8 +4995,16 @@ jobstart({cmd}[, {opts}]) *jobstart()*
|
||||
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
||||
< (See |shell-unquoting| for details.)
|
||||
|
||||
Example: >
|
||||
:call jobstart('nvim -h', {'on_stdout':{j,d,e->append(line('.'),d)}})
|
||||
<
|
||||
Returns |job-id| on success, 0 on invalid arguments (or job
|
||||
table is full), -1 if {cmd}[0] or 'shell' is not executable.
|
||||
For communication over the job's stdio, it is represented as a
|
||||
|channel|, and a channel ID is returned on success. Use
|
||||
|chansend()| (or |rpcnotify()| and |rpcrequest()| if "rpc" option
|
||||
was used) to send data to stdin and |chanclose()| to close stdio
|
||||
streams without stopping the job explicitly.
|
||||
|
||||
See |job-control| and |rpc|.
|
||||
|
||||
@@ -4983,7 +5021,9 @@ jobstart({cmd}[, {opts}]) *jobstart()*
|
||||
*jobstart-options*
|
||||
{opts} is a dictionary with these keys:
|
||||
|on_stdout|: stdout event handler (function name or |Funcref|)
|
||||
stdout_buffered : read stdout in |buffered| mode.
|
||||
|on_stderr|: stderr event handler (function name or |Funcref|)
|
||||
stderr_buffered : read stderr in |buffered| mode.
|
||||
|on_exit| : exit event handler (function name or |Funcref|)
|
||||
cwd : Working directory of the job; defaults to
|
||||
|current-directory|.
|
||||
@@ -4998,16 +5038,20 @@ jobstart({cmd}[, {opts}]) *jobstart()*
|
||||
width : (pty only) Width of the terminal screen
|
||||
height : (pty only) Height of the terminal screen
|
||||
TERM : (pty only) $TERM environment variable
|
||||
detach : (non-pty only) Detach the job process from the
|
||||
nvim process. The process will not get killed
|
||||
when nvim exits. If the process dies before
|
||||
nvim exits, "on_exit" will still be invoked.
|
||||
detach : (non-pty only) Detach the job process: it will
|
||||
not be killed when Nvim exits. If the process
|
||||
exits before Nvim, "on_exit" will be invoked.
|
||||
|
||||
{opts} is passed as |self| dictionary to the callback; the
|
||||
caller may set other keys to pass application-specific data.
|
||||
Returns:
|
||||
- The channel ID on success
|
||||
- 0 on invalid arguments
|
||||
- -1 if {cmd}[0] is not executable.
|
||||
See |job-control|, |channels|, and |msgpack-rpc| for more information.
|
||||
|
||||
jobstop({job}) *jobstop()*
|
||||
Stop |job-id| {job} by sending SIGTERM to the job process. If
|
||||
jobstop({id}) *jobstop()*
|
||||
Stop |job-id| {id} by sending SIGTERM to the job process. If
|
||||
the process does not terminate after a timeout then SIGKILL
|
||||
will be sent. When the job terminates its |on_exit| handler
|
||||
(if any) will be invoked.
|
||||
@@ -5143,8 +5187,10 @@ line({expr}) The result is a Number, which is the line number of the file
|
||||
$ the last line in the current buffer
|
||||
'x position of mark x (if the mark is not set, 0 is
|
||||
returned)
|
||||
w0 first line visible in current window
|
||||
w$ last line visible in current window
|
||||
w0 first line visible in current window (one if the
|
||||
display isn't updated, e.g. in silent Ex mode)
|
||||
w$ last line visible in current window (this is one
|
||||
less than "w0" if no lines are visible)
|
||||
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
|
||||
@@ -5461,7 +5507,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
sets buffer line boundaries to redraw screen. It is supposed
|
||||
to be used when fast match additions and deletions are
|
||||
required, for example to highlight matching parentheses.
|
||||
|
||||
*E5030* *E5031*
|
||||
The list {pos} can contain one of these items:
|
||||
- A number. This whole line will be highlighted. The first
|
||||
line has number 1.
|
||||
@@ -5475,6 +5521,10 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
- A list with three numbers, e.g., [23, 11, 3]. As above, but
|
||||
the third number gives the length of the highlight in bytes.
|
||||
|
||||
Entries with zero and negative line numbers are silently
|
||||
ignored, as well as entries with negative column numbers and
|
||||
lengths.
|
||||
|
||||
The maximum number of positions is 8.
|
||||
|
||||
Example: >
|
||||
@@ -5661,9 +5711,13 @@ mode([expr]) Return a string that indicates the current mode.
|
||||
S Select by line
|
||||
CTRL-S Select blockwise
|
||||
i Insert
|
||||
ic Insert mode completion |compl-generic|
|
||||
ix Insert mode |i_CTRL-X| completion
|
||||
R Replace |R|
|
||||
Rc Replace mode completion |compl-generic|
|
||||
Rv Virtual Replace |gR|
|
||||
c Command-line
|
||||
Rx Replace mode |i_CTRL-X| completion
|
||||
c Command-line editing
|
||||
cv Vim Ex mode |gQ|
|
||||
ce Normal Ex mode |Q|
|
||||
r Hit-enter prompt
|
||||
@@ -5719,13 +5773,11 @@ msgpackparse({list}) {Nvim} *msgpackparse()*
|
||||
contains name of the key from |v:msgpack_types|):
|
||||
|
||||
Key Value ~
|
||||
nil Zero, ignored when dumping. This value cannot
|
||||
possibly appear in |msgpackparse()| output in Neovim
|
||||
versions which have |v:null|.
|
||||
nil Zero, ignored when dumping. Not returned by
|
||||
|msgpackparse()| since |v:null| was introduced.
|
||||
boolean One or zero. When dumping it is only checked that
|
||||
value is a |Number|. This value cannot possibly
|
||||
appear in |msgpackparse()| output in Neovim versions
|
||||
which have |v:true| and |v:false|.
|
||||
value is a |Number|. Not returned by |msgpackparse()|
|
||||
since |v:true| and |v:false| were introduced.
|
||||
integer |List| with four numbers: sign (-1 or 1), highest two
|
||||
bits, number with bits from 62nd to 31st, lowest 31
|
||||
bits. I.e. to get actual number one will need to use
|
||||
@@ -5812,7 +5864,7 @@ pathshorten({expr}) *pathshorten()*
|
||||
components in the path are reduced to single letters. Leading
|
||||
'~' and '.' characters are kept. Example: >
|
||||
:echo pathshorten('~/.config/nvim/autoload/file1.vim')
|
||||
< ~/.v/a/file1.vim ~
|
||||
< ~/.c/n/a/file1.vim ~
|
||||
It doesn't matter if the path exists or not.
|
||||
|
||||
pow({x}, {y}) *pow()*
|
||||
@@ -6149,15 +6201,17 @@ reltimestr({time}) *reltimestr()*
|
||||
< Also see |profiling|.
|
||||
|
||||
*remote_expr()* *E449*
|
||||
remote_expr({server}, {string} [, {idvar}])
|
||||
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
|
||||
Send the {string} to {server}. The string is sent as an
|
||||
expression and the result is returned after evaluation.
|
||||
The result must be a String or a |List|. A |List| is turned
|
||||
into a String by joining the items with a line break in
|
||||
between (not at the end), like with join(expr, "\n").
|
||||
If {idvar} is present, it is taken as the name of a
|
||||
variable and a {serverid} for later use with
|
||||
If {idvar} is present and not empty, it is taken as the name
|
||||
of a variable and a {serverid} for later use with
|
||||
remote_read() is stored there.
|
||||
If {timeout} is given the read times out after this many
|
||||
seconds. Otherwise a timeout of 600 seconds is used.
|
||||
See also |clientserver| |RemoteReply|.
|
||||
This function is not available in the |sandbox|.
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
@@ -6201,9 +6255,10 @@ remote_peek({serverid} [, {retvar}]) *remote_peek()*
|
||||
:let repl = ""
|
||||
:echo "PEEK: ".remote_peek(id, "repl").": ".repl
|
||||
|
||||
remote_read({serverid}) *remote_read()*
|
||||
remote_read({serverid}, [{timeout}]) *remote_read()*
|
||||
Return the oldest available reply from {serverid} and consume
|
||||
it. It blocks until a reply is available.
|
||||
it. Unless a {timeout} in seconds is given, it blocks until a
|
||||
reply is available.
|
||||
See also |clientserver|.
|
||||
This function is not available in the |sandbox|.
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
@@ -6221,6 +6276,7 @@ remote_send({server}, {string} [, {idvar}])
|
||||
See also |clientserver| |RemoteReply|.
|
||||
This function is not available in the |sandbox|.
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
|
||||
Note: Any errors will be reported in the server and may mess
|
||||
up the display.
|
||||
Examples: >
|
||||
@@ -6232,6 +6288,12 @@ remote_send({server}, {string} [, {idvar}])
|
||||
:echo remote_send("gvim", ":sleep 10 | echo ".
|
||||
\ 'server2client(expand("<client>"), "HELLO")<CR>')
|
||||
<
|
||||
*remote_startserver()* *E941* *E942*
|
||||
remote_startserver({name})
|
||||
Become the server {name}. This fails if already running as a
|
||||
server, when |v:servername| is not empty.
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
|
||||
remove({list}, {idx} [, {end}]) *remove()*
|
||||
Without {end}: Remove the item at {idx} from |List| {list} and
|
||||
return the item.
|
||||
@@ -6320,13 +6382,11 @@ rpcstart({prog}[, {argv}]) {Nvim} *rpcstart()*
|
||||
:let id = jobstart(['prog', 'arg1', 'arg2'], {'rpc': v:true})
|
||||
|
||||
rpcstop({channel}) {Nvim} *rpcstop()*
|
||||
Closes an |RPC| {channel}. If the channel is a job
|
||||
started with |jobstart()| the job is killed.
|
||||
It is better to use |jobstop()| in this case, or use
|
||||
|jobclose|(id, "rpc") to only close the channel without
|
||||
killing the job.
|
||||
Closes the socket connection if the channel was opened by
|
||||
connecting to |v:servername|.
|
||||
Deprecated. This function was used to stop a job with |rpc|
|
||||
channel, and additionally closed rpc sockets. Instead use
|
||||
|jobstop()| to stop any job, and |chanclose|(id, "rpc") to close
|
||||
rpc communication without stopping the job. Use |chanclose|(id)
|
||||
to close any socket.
|
||||
|
||||
screenattr({row}, {col}) *screenattr()*
|
||||
Like |screenchar()|, but return the attribute. This is a rather
|
||||
@@ -6594,15 +6654,11 @@ server2client({clientid}, {string}) *server2client()*
|
||||
:echo server2client(expand("<client>"), "HELLO")
|
||||
<
|
||||
serverlist() *serverlist()*
|
||||
Returns a list of available server names in a list.
|
||||
When there are no servers an empty string is returned.
|
||||
Returns a list of server addresses, or empty if all servers
|
||||
were stopped. |serverstart()| |serverstop()|
|
||||
Example: >
|
||||
:echo serverlist()
|
||||
< {Nvim} *--serverlist*
|
||||
The Vim command-line option `--serverlist` was removed from
|
||||
Nvim, but it can be imitated: >
|
||||
nvim --cmd "echo serverlist()" --cmd "q"
|
||||
<
|
||||
|
||||
serverstart([{address}]) *serverstart()*
|
||||
Opens a socket or named pipe at {address} and listens for
|
||||
|RPC| messages. Clients can send |API| commands to the address
|
||||
@@ -6630,13 +6686,9 @@ serverstart([{address}]) *serverstart()*
|
||||
|
||||
< |$NVIM_LISTEN_ADDRESS| is set to {address} if not already set.
|
||||
|
||||
*--servername*
|
||||
The Vim command-line option `--servername` can be imitated: >
|
||||
nvim --cmd "let g:server_addr = serverstart('foo')"
|
||||
<
|
||||
serverstop({address}) *serverstop()*
|
||||
Closes the pipe or socket at {address}. Does nothing if
|
||||
{address} is empty or invalid.
|
||||
Closes the pipe or socket at {address}.
|
||||
Returns TRUE if {address} is valid, else FALSE.
|
||||
If |$NVIM_LISTEN_ADDRESS| is stopped it is unset.
|
||||
If |v:servername| is stopped it is set to the next available
|
||||
address returned by |serverlist()|.
|
||||
@@ -6754,10 +6806,12 @@ setpos({expr}, {list})
|
||||
[bufnum, lnum, col, off, curswant]
|
||||
|
||||
"bufnum" is the buffer number. Zero can be used for the
|
||||
current buffer. Setting the cursor is only possible for
|
||||
the current buffer. To set a mark in another buffer you can
|
||||
use the |bufnr()| function to turn a file name into a buffer
|
||||
number.
|
||||
current buffer. When setting an uppercase mark "bufnum" is
|
||||
used for the mark position. For other marks it specifies the
|
||||
buffer to set the mark in. You can use the |bufnr()| function
|
||||
to turn a file name into a buffer number.
|
||||
For setting the cursor and the ' mark "bufnum" is ignored,
|
||||
since these are associated with a window, not a buffer.
|
||||
Does not change the jumplist.
|
||||
|
||||
"lnum" and "col" are the position in the buffer. The first
|
||||
@@ -6809,6 +6863,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
nr error number
|
||||
text description of the error
|
||||
type single-character error type, 'E', 'W', etc.
|
||||
valid recognized error message
|
||||
|
||||
The "col", "vcol", "nr", "type" and "text" entries are
|
||||
optional. Either "lnum" or "pattern" entry can be used to
|
||||
@@ -6818,21 +6873,26 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
item will not be handled as an error line.
|
||||
If both "pattern" and "lnum" are present then "pattern" will
|
||||
be used.
|
||||
If the "valid" entry is not supplied, then the valid flag is
|
||||
set when "bufnr" is a valid buffer or "filename" exists.
|
||||
If you supply an empty {list}, the quickfix list will be
|
||||
cleared.
|
||||
Note that the list is not exactly the same as what
|
||||
|getqflist()| returns.
|
||||
|
||||
*E927*
|
||||
If {action} is set to 'a', then the items from {list} are
|
||||
added to the existing quickfix list. If there is no existing
|
||||
list, then a new list is created.
|
||||
{action} values: *E927*
|
||||
'a' The items from {list} are added to the existing
|
||||
quickfix list. If there is no existing list, then a
|
||||
new list is created.
|
||||
|
||||
If {action} is set to 'r', then the items from the current
|
||||
quickfix list are replaced with the items from {list}. This
|
||||
can also be used to clear the list: >
|
||||
'r' The items from the current quickfix list are replaced
|
||||
with the items from {list}. This can also be used to
|
||||
clear the list: >
|
||||
:call setqflist([], 'r')
|
||||
<
|
||||
'f' All the quickfix lists in the quickfix stack are
|
||||
freed.
|
||||
|
||||
If {action} is not present or is set to ' ', then a new list
|
||||
is created.
|
||||
|
||||
@@ -6843,7 +6903,12 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
only the items listed in {what} are set. The first {list}
|
||||
argument is ignored. The following items can be specified in
|
||||
{what}:
|
||||
nr list number in the quickfix stack
|
||||
context any Vim type can be stored as a context
|
||||
items list of quickfix entries. Same as the {list}
|
||||
argument.
|
||||
nr list number in the quickfix stack; zero
|
||||
means the current quickfix list and '$' means
|
||||
the last quickfix list
|
||||
title quickfix list title text
|
||||
Unsupported keys in {what} are ignored.
|
||||
If the "nr" item is not present, then the current quickfix list
|
||||
@@ -6948,18 +7013,22 @@ shellescape({string} [, {special}]) *shellescape()*
|
||||
quotes within {string}.
|
||||
Otherwise, it will enclose {string} in single quotes and
|
||||
replace all "'" with "'\''".
|
||||
|
||||
When the {special} argument is present and it's a non-zero
|
||||
Number or a non-empty String (|non-zero-arg|), then special
|
||||
items such as "!", "%", "#" and "<cword>" will be preceded by
|
||||
a backslash. This backslash will be removed again by the |:!|
|
||||
command.
|
||||
|
||||
The "!" character will be escaped (again with a |non-zero-arg|
|
||||
{special}) when 'shell' contains "csh" in the tail. That is
|
||||
because for csh and tcsh "!" is used for history replacement
|
||||
even when inside single quotes.
|
||||
The <NL> character is also escaped. With a |non-zero-arg|
|
||||
{special} and 'shell' containing "csh" in the tail it's
|
||||
|
||||
With a |non-zero-arg| {special} the <NL> character is also
|
||||
escaped. When 'shell' containing "csh" in the tail it's
|
||||
escaped a second time.
|
||||
|
||||
Example of use with a |:!| command: >
|
||||
:exe '!dir ' . shellescape(expand('<cfile>'), 1)
|
||||
< This results in a directory listing for the file under the
|
||||
@@ -7026,15 +7095,20 @@ sockconnect({mode}, {address}, {opts}) *sockconnect()*
|
||||
{address} should be the path of a named pipe. If {mode} is
|
||||
"tcp" then {address} should be of the form "host:port" where
|
||||
the host should be an ip adderess or host name, and port the
|
||||
port number. Currently only rpc sockets are supported, so
|
||||
{opts} must be passed with "rpc" set to |TRUE|.
|
||||
port number.
|
||||
|
||||
Returns a |channel| ID. Close the socket with |chanclose()|.
|
||||
Use |chansend()| to send data over a bytes socket, and
|
||||
|rpcrequest()| and |rpcnotify()| to communicate with a RPC
|
||||
socket.
|
||||
|
||||
{opts} is a dictionary with these keys:
|
||||
|on_data| : callback invoked when data was read from socket
|
||||
data_buffered : read data from socket in |buffered| mode.
|
||||
rpc : If set, |msgpack-rpc| will be used to communicate
|
||||
over the socket.
|
||||
Returns:
|
||||
- The channel ID on success, which is used by
|
||||
|rpcnotify()| and |rpcrequest()| and |rpcstop()|.
|
||||
- The channel ID on success (greater than zero)
|
||||
- 0 on invalid arguments or connection failure.
|
||||
|
||||
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
@@ -7186,6 +7260,42 @@ sqrt({expr}) *sqrt()*
|
||||
"nan" may be different, it depends on system libraries.
|
||||
|
||||
|
||||
stdioopen({opts}) *stdioopen()*
|
||||
In a nvim launched with the |--headless| option, this opens
|
||||
stdin and stdout as a |channel|. This function can only be
|
||||
invoked once per instance. See |channel-stdio| for more
|
||||
information and examples. Note that stderr is not handled by
|
||||
this function, see |v:stderr|.
|
||||
|
||||
Returns a |channel| ID. Close the stdio descriptors with |chanclose()|.
|
||||
Use |chansend()| to send data to stdout, and
|
||||
|rpcrequest()| and |rpcnotify()| to communicate over RPC.
|
||||
|
||||
{opts} is a dictionary with these keys:
|
||||
|on_stdin| : callback invoked when stdin is written to.
|
||||
stdin_buffered : read stdin in |buffered| mode.
|
||||
rpc : If set, |msgpack-rpc| will be used to communicate
|
||||
over stdio
|
||||
Returns:
|
||||
- The channel ID on success (this is always 1)
|
||||
- 0 on invalid arguments
|
||||
|
||||
|
||||
stdpath({what}) *stdpath()* *E6100*
|
||||
Returns |standard-path| locations of various default files and
|
||||
directories.
|
||||
|
||||
{what} Type Description ~
|
||||
cache String Cache directory. Useful for plugins
|
||||
that need temporary files to work.
|
||||
config String User configuration directory. The
|
||||
|init.vim| is stored here.
|
||||
config_dirs List Additional configuration directories.
|
||||
data String User data directory. The |shada-file|
|
||||
is stored here.
|
||||
data_dirs List Additional data directories.
|
||||
|
||||
|
||||
str2float({expr}) *str2float()*
|
||||
Convert String {expr} to a Float. This mostly works the same
|
||||
as when using a floating point number in an expression, see
|
||||
@@ -7517,17 +7627,29 @@ synIDtrans({synID}) *synIDtrans()*
|
||||
":highlight link" are followed.
|
||||
|
||||
synconcealed({lnum}, {col}) *synconcealed()*
|
||||
The result is a List. The first item in the list is 0 if the
|
||||
character at the position {lnum} and {col} is not part of a
|
||||
concealable region, 1 if it is. The second item in the list is
|
||||
a string. If the first item is 1, the second item contains the
|
||||
text which will be displayed in place of the concealed text,
|
||||
depending on the current setting of 'conceallevel'. The third
|
||||
and final item in the list is a unique number representing the
|
||||
specific syntax region matched. This allows detection of the
|
||||
beginning of a new concealable region if there are two
|
||||
consecutive regions with the same replacement character.
|
||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
||||
The result is a List with currently three items:
|
||||
1. The first item in the list is 0 if the character at the
|
||||
position {lnum} and {col} is not part of a concealable
|
||||
region, 1 if it is.
|
||||
2. The second item in the list is a string. If the first item
|
||||
is 1, the second item contains the text which will be
|
||||
displayed in place of the concealed text, depending on the
|
||||
current setting of 'conceallevel' and 'listchars'.
|
||||
3. The third and final item in the list is a number
|
||||
representing the specific syntax region matched in the
|
||||
line. When the character is not concealed the value is
|
||||
zero. This allows detection of the beginning of a new
|
||||
concealable region if there are two consecutive regions
|
||||
with the same replacement character. For an example, if
|
||||
the text is "123456" and both "23" and "45" are concealed
|
||||
and replace by the character "X", then:
|
||||
call returns ~
|
||||
synconcealed(lnum, 1) [0, '', 0]
|
||||
synconcealed(lnum, 2) [1, 'X', 1]
|
||||
synconcealed(lnum, 3) [1, 'X', 1]
|
||||
synconcealed(lnum, 4) [1, 'X', 2]
|
||||
synconcealed(lnum, 5) [1, 'X', 2]
|
||||
synconcealed(lnum, 6) [0, '', 0]
|
||||
|
||||
|
||||
synstack({lnum}, {col}) *synstack()*
|
||||
@@ -7560,6 +7682,9 @@ system({cmd} [, {input}]) *system()* *E677*
|
||||
|writefile()| does with {binary} set to "b" (i.e. with
|
||||
a newline between each list item, and newlines inside list
|
||||
items converted to NULs).
|
||||
When {input} is given and is a valid buffer id, the content of
|
||||
the buffer is written to the file line by line, each line
|
||||
terminated by a NL (and NUL where the text has NL).
|
||||
*E5677*
|
||||
Note: system() cannot write to or read from backgrounded ("&")
|
||||
shell commands, e.g.: >
|
||||
@@ -8335,6 +8460,8 @@ termresponse Compiled with support for |t_RV| and |v:termresponse|.
|
||||
textobjects Compiled with support for |text-objects|.
|
||||
timers Compiled with |timer_start()| support.
|
||||
title Compiled with window title support |'title'|.
|
||||
ttyin input is a terminal (tty)
|
||||
ttyout output is a terminal (tty)
|
||||
unix Unix version of Vim.
|
||||
unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
|
||||
user_commands User-defined commands.
|
||||
@@ -8352,6 +8479,7 @@ win32 Windows version of Vim (32 or 64 bit).
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
windows Compiled with support for more than one window.
|
||||
writebackup Compiled with 'writebackup' default on.
|
||||
wsl WSL (Windows Subsystem for Linux) version of Vim.
|
||||
|
||||
*string-match*
|
||||
Matching a pattern in a String
|
||||
@@ -8447,6 +8575,9 @@ See |:verbose-cmd| for more information.
|
||||
not used an error message is given. When [!] is used,
|
||||
an existing function is silently replaced. Unless it
|
||||
is currently being executed, that is an error.
|
||||
NOTE: Use ! wisely. If used without care it can cause
|
||||
an existing function to be replaced unexpectedly,
|
||||
which is hard to debug.
|
||||
|
||||
For the {arguments} see |function-argument|.
|
||||
|
||||
@@ -8496,18 +8627,36 @@ See |:verbose-cmd| for more information.
|
||||
implies that the effect of |:nohlsearch| is undone
|
||||
when the function returns.
|
||||
|
||||
*:endf* *:endfunction* *E126* *E193*
|
||||
:endf[unction] The end of a function definition. Must be on a line
|
||||
by its own, without other commands.
|
||||
*:endf* *:endfunction* *E126* *E193* *W22*
|
||||
:endf[unction] [argument]
|
||||
The end of a function definition. Best is to put it
|
||||
on a line by its own, without [argument].
|
||||
|
||||
[argument] can be:
|
||||
| command command to execute next
|
||||
\n command command to execute next
|
||||
" comment always ignored
|
||||
anything else ignored, warning given when
|
||||
'verbose' is non-zero
|
||||
The support for a following command was added in Vim
|
||||
8.0.0654, before that any argument was silently
|
||||
ignored.
|
||||
|
||||
To be able to define a function inside an `:execute`
|
||||
command, use line breaks instead of |:bar|: >
|
||||
:exe "func Foo()\necho 'foo'\nendfunc"
|
||||
<
|
||||
*:delf* *:delfunction* *E130* *E131* *E933*
|
||||
:delf[unction] {name} Delete function {name}.
|
||||
:delf[unction][!] {name}
|
||||
Delete function {name}.
|
||||
{name} can also be a |Dictionary| entry that is a
|
||||
|Funcref|: >
|
||||
:delfunc dict.init
|
||||
< This will remove the "init" entry from "dict". The
|
||||
function is deleted if there are no more references to
|
||||
it.
|
||||
With the ! there is no error if the function does not
|
||||
exist.
|
||||
*:retu* *:return* *E133*
|
||||
:retu[rn] [expr] Return from a function. When "[expr]" is given, it is
|
||||
evaluated and returned as the result of the function.
|
||||
@@ -8827,11 +8976,6 @@ This does NOT work: >
|
||||
value and the global value are changed.
|
||||
Example: >
|
||||
:let &path = &path . ',/usr/local/include'
|
||||
< This also works for terminal codes in the form t_xx.
|
||||
But only for alphanumerical names. Example: >
|
||||
:let &t_k1 = "\<Esc>[234;"
|
||||
< When the code does not exist yet it will be created as
|
||||
a terminal key code, there is no error.
|
||||
|
||||
:let &{option-name} .= {expr1}
|
||||
For a string option: Append {expr1} to the value.
|
||||
@@ -10443,18 +10587,19 @@ missing: >
|
||||
|
||||
To execute a command only when the |+eval| feature is disabled requires a trick,
|
||||
as this example shows: >
|
||||
if 1
|
||||
nnoremap : :"
|
||||
endif
|
||||
normal :set history=111<CR>
|
||||
if 1
|
||||
nunmap :
|
||||
endif
|
||||
|
||||
silent! while 0
|
||||
set history=111
|
||||
silent! endwhile
|
||||
|
||||
When the |+eval| feature is available the command is skipped because of the
|
||||
"while 0". Without the |+eval| feature the "while 0" is an error, which is
|
||||
silently ignored, and the command is executed.
|
||||
|
||||
The "<CR>" here is a real CR character, type CTRL-V Enter to get it.
|
||||
|
||||
When the |+eval| feature is available the ":" is remapped to add a double
|
||||
quote, which has the effect of commenting-out the command. without the
|
||||
quote, which has the effect of commenting-out the command. Without the
|
||||
|+eval| feature the nnoremap command is skipped and the command is executed.
|
||||
|
||||
==============================================================================
|
||||
@@ -10511,5 +10656,123 @@ This is not allowed when the textlock is active:
|
||||
- closing a window or quitting Vim
|
||||
- etc.
|
||||
|
||||
==============================================================================
|
||||
13. Command-line expressions highlighting *expr-highlight*
|
||||
|
||||
Expressions entered by the user in |i_CTRL-R_=|, |c_CTRL-\_e|, |quote=| are
|
||||
highlighted by the built-in expressions parser. It uses highlight groups
|
||||
described in the table below, which may be overriden by colorschemes.
|
||||
*hl-NvimInvalid*
|
||||
Besides the "Nvim"-prefixed highlight groups described below, there are
|
||||
"NvimInvalid"-prefixed highlight groups which have the same meaning but
|
||||
indicate that the token contains an error or that an error occurred just
|
||||
before it. They have mostly the same hierarchy, except that (by default) in
|
||||
place of any non-Nvim-prefixed group NvimInvalid linking to `Error` is used
|
||||
and some other intermediate groups are present.
|
||||
|
||||
Group Default link Colored expression ~
|
||||
*hl-NvimInternalError* None, red/red Parser bug
|
||||
|
||||
*hl-NvimAssignment* Operator Generic assignment
|
||||
*hl-NvimPlainAssignment* NvimAssignment `=` in |:let|
|
||||
*hl-NvimAugmentedAssignment* NvimAssignment Generic, `+=`/`-=`/`.=`
|
||||
*hl-NvimAssignmentWithAddition* NvimAugmentedAssignment `+=` in |:let+=|
|
||||
*hl-NvimAssignmentWithSubtraction* NvimAugmentedAssignment `-=` in |:let-=|
|
||||
*hl-NvimAssignmentWithConcatenation* NvimAugmentedAssignment `.=` in |:let.=|
|
||||
|
||||
*hl-NvimOperator* Operator Generic operator
|
||||
|
||||
*hl-NvimUnaryOperator* NvimOperator Generic unary op
|
||||
*hl-NvimUnaryPlus* NvimUnaryOperator |expr-unary-+|
|
||||
*hl-NvimUnaryMinus* NvimUnaryOperator |expr-unary--|
|
||||
*hl-NvimNot* NvimUnaryOperator |expr-!|
|
||||
|
||||
*hl-NvimBinaryOperator* NvimOperator Generic binary op
|
||||
*hl-NvimComparison* NvimBinaryOperator Any |expr4| operator
|
||||
*hl-NvimComparisonModifier* NvimComparison `#`/`?` near |expr4| op
|
||||
*hl-NvimBinaryPlus* NvimBinaryOperator |expr-+|
|
||||
*hl-NvimBinaryMinus* NvimBinaryOperator |expr--|
|
||||
*hl-NvimConcat* NvimBinaryOperator |expr-.|
|
||||
*hl-NvimConcatOrSubscript* NvimConcat |expr-.| or |expr-entry|
|
||||
*hl-NvimOr* NvimBinaryOperator |expr-barbar|
|
||||
*hl-NvimAnd* NvimBinaryOperator |expr-&&|
|
||||
*hl-NvimMultiplication* NvimBinaryOperator |expr-star|
|
||||
*hl-NvimDivision* NvimBinaryOperator |expr-/|
|
||||
*hl-NvimMod* NvimBinaryOperator |expr-%|
|
||||
|
||||
*hl-NvimTernary* NvimOperator `?` in |expr1|
|
||||
*hl-NvimTernaryColon* NvimTernary `:` in |expr1|
|
||||
|
||||
*hl-NvimParenthesis* Delimiter Generic bracket
|
||||
*hl-NvimLambda* NvimParenthesis `{`/`}` in |lambda|
|
||||
*hl-NvimNestingParenthesis* NvimParenthesis `(`/`)` in |expr-nesting|
|
||||
*hl-NvimCallingParenthesis* NvimParenthesis `(`/`)` in |expr-function|
|
||||
|
||||
*hl-NvimSubscript* NvimParenthesis Generic subscript
|
||||
*hl-NvimSubscriptBracket* NvimSubscript `[`/`]` in |expr-[]|
|
||||
*hl-NvimSubscriptColon* NvimSubscript `:` in |expr-[:]|
|
||||
*hl-NvimCurly* NvimSubscript `{`/`}` in
|
||||
|curly-braces-names|
|
||||
|
||||
*hl-NvimContainer* NvimParenthesis Generic container
|
||||
*hl-NvimDict* NvimContainer `{`/`}` in |dict| literal
|
||||
*hl-NvimList* NvimContainer `[`/`]` in |list| literal
|
||||
|
||||
*hl-NvimIdentifier* Identifier Generic identifier
|
||||
*hl-NvimIdentifierScope* NvimIdentifier Namespace: letter
|
||||
before `:` in
|
||||
|internal-variables|
|
||||
*hl-NvimIdentifierScopeDelimiter* NvimIdentifier `:` after namespace
|
||||
letter
|
||||
*hl-NvimIdentifierName* NvimIdentifier Rest of the ident
|
||||
*hl-NvimIdentifierKey* NvimIdentifier Identifier after
|
||||
|expr-entry|
|
||||
|
||||
*hl-NvimColon* Delimiter `:` in |dict| literal
|
||||
*hl-NvimComma* Delimiter `,` in |dict|/|list|
|
||||
literal or
|
||||
|expr-function|
|
||||
*hl-NvimArrow* Delimiter `->` in |lambda|
|
||||
|
||||
*hl-NvimRegister* SpecialChar |expr-register|
|
||||
*hl-NvimNumber* Number Non-prefix digits
|
||||
in integer
|
||||
|expr-number|
|
||||
*hl-NvimNumberPrefix* Type `0` for |octal-number|
|
||||
`0x` for |hex-number|
|
||||
`0b` for |binary-number|
|
||||
*hl-NvimFloat* NvimNumber Floating-point
|
||||
number
|
||||
|
||||
*hl-NvimOptionSigil* Type `&` in |expr-option|
|
||||
*hl-NvimOptionScope* NvimIdentifierScope Option scope if any
|
||||
*hl-NvimOptionScopeDelimiter* NvimIdentifierScopeDelimiter
|
||||
`:` after option scope
|
||||
*hl-NvimOptionName* NvimIdentifier Option name
|
||||
|
||||
*hl-NvimEnvironmentSigil* NvimOptionSigil `$` in |expr-env|
|
||||
*hl-NvimEnvironmentName* NvimIdentifier Env variable name
|
||||
|
||||
*hl-NvimString* String Generic string
|
||||
*hl-NvimStringBody* NvimString Generic string
|
||||
literal body
|
||||
*hl-NvimStringQuote* NvimString Generic string quote
|
||||
*hl-NvimStringSpecial* SpecialChar Generic string
|
||||
non-literal body
|
||||
|
||||
*hl-NvimSingleQuote* NvimStringQuote `'` in |expr-'|
|
||||
*hl-NvimSingleQuotedBody* NvimStringBody Literal part of
|
||||
|expr-'| string body
|
||||
*hl-NvimSingleQuotedQuote* NvimStringSpecial `''` inside |expr-'|
|
||||
string body
|
||||
|
||||
*hl-NvimDoubleQuote* NvimStringQuote `"` in |expr-quote|
|
||||
*hl-NvimDoubleQuotedBody* NvimStringBody Literal part of
|
||||
|expr-quote| body
|
||||
*hl-NvimDoubleQuotedEscape* NvimStringSpecial Valid |expr-quote|
|
||||
escape sequence
|
||||
*hl-NvimDoubleQuotedUnknownEscape* NvimInvalidValue Unrecognized
|
||||
|expr-quote| escape
|
||||
sequence
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@@ -24,10 +24,8 @@ Each time a new or existing file is edited, Vim will try to recognize the type
|
||||
of the file and set the 'filetype' option. This will trigger the FileType
|
||||
event, which can be used to set the syntax highlighting, set options, etc.
|
||||
|
||||
Detail: The ":filetype on" command will load one of these files:
|
||||
Mac $VIMRUNTIME/filetype.vim
|
||||
MS-DOS $VIMRUNTIME\filetype.vim
|
||||
Unix $VIMRUNTIME/filetype.vim
|
||||
Detail: The ":filetype on" command will load this file:
|
||||
$VIMRUNTIME/filetype.vim
|
||||
This file is a Vim script that defines autocommands for the
|
||||
BufNewFile and BufRead events. If the file type is not found by the
|
||||
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
|
||||
|
@@ -4,42 +4,19 @@
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
|
||||
*cscope* *Cscope*
|
||||
This document explains how to use Vim's cscope interface.
|
||||
Cscope is a "code intelligence" tool that helps you navigate C programs. It
|
||||
can also perform some refactoring tasks, such as renaming a global variable in
|
||||
all source files. Think of it as "ctags on steroids".
|
||||
|
||||
Cscope is a tool like ctags, but think of it as ctags on steroids since it
|
||||
does a lot more than what ctags provides. In Vim, jumping to a result from
|
||||
a cscope query is just like jumping to any tag; it is saved on the tag stack
|
||||
so that with the right keyboard mappings, you can jump back and forth between
|
||||
functions as you normally would with |tags|.
|
||||
See |cscope-usage| for a quickstart.
|
||||
|
||||
Type |gO| to see the table of contents.
|
||||
|
||||
==============================================================================
|
||||
1. Cscope introduction *cscope-intro*
|
||||
Cscope introduction *cscope-intro*
|
||||
|
||||
The following text is taken from a version of the cscope man page:
|
||||
|
||||
-----
|
||||
|
||||
Cscope is an interactive screen-oriented tool that helps you:
|
||||
|
||||
Learn how a C program works without endless flipping through a thick
|
||||
listing.
|
||||
|
||||
Locate the section of code to change to fix a bug without having to
|
||||
learn the entire program.
|
||||
|
||||
Examine the effect of a proposed change such as adding a value to an
|
||||
enum variable.
|
||||
|
||||
Verify that a change has been made in all source files such as adding
|
||||
an argument to an existing function.
|
||||
|
||||
Rename a global variable in all source files.
|
||||
|
||||
Change a constant to a preprocessor symbol in selected lines of files.
|
||||
|
||||
It is designed to answer questions like:
|
||||
Cscope is designed to answer questions like:
|
||||
Where is this symbol used?
|
||||
Where is it defined?
|
||||
Where did this variable get its value?
|
||||
@@ -51,35 +28,17 @@ The following text is taken from a version of the cscope man page:
|
||||
Where is this source file in the directory structure?
|
||||
What files include this header file?
|
||||
|
||||
Cscope answers these questions from a symbol database that it builds the
|
||||
first time it is used on the source files. On a subsequent call, cscope
|
||||
rebuilds the database only if a source file has changed or the list of
|
||||
source files is different. When the database is rebuilt the data for the
|
||||
unchanged files is copied from the old database, which makes rebuilding
|
||||
much faster than the initial build.
|
||||
|
||||
-----
|
||||
|
||||
When cscope is normally invoked, you will get a full-screen selection
|
||||
screen allowing you to make a query for one of the above questions.
|
||||
However, once a match is found to your query and you have entered your
|
||||
text editor to edit the source file containing match, you cannot simply
|
||||
jump from tag to tag as you normally would with vi's Ctrl-] or :tag
|
||||
command.
|
||||
|
||||
Vim's cscope interface is done by invoking cscope with its line-oriented
|
||||
interface, and then parsing the output returned from a query. The end
|
||||
result is that cscope query results become just like regular tags, so
|
||||
you can jump to them just like you do with normal tags (Ctrl-] or :tag)
|
||||
and then go back by popping off the tagstack with Ctrl-T. (Please note
|
||||
however, that you don't actually jump to a cscope tag simply by doing
|
||||
Ctrl-] or :tag without remapping these commands or setting an option.
|
||||
See the remaining sections on how the cscope interface works and for
|
||||
suggested use.)
|
||||
Cscope answers these questions from a symbol database that it builds the first
|
||||
time it is used on the source files. On a subsequent call, cscope rebuilds
|
||||
the database only if a source file has changed or the list of source files is
|
||||
different. When the database is rebuilt the data for the unchanged files is
|
||||
copied from the old database, which makes rebuilding much faster than the
|
||||
initial build.
|
||||
|
||||
See |cscope-usage| to get started.
|
||||
|
||||
==============================================================================
|
||||
2. Cscope related commands *cscope-commands*
|
||||
Cscope commands *cscope-commands*
|
||||
|
||||
*:cscope* *:cs* *:scs* *:scscope* *E259* *E262* *E561* *E560*
|
||||
All cscope commands are accessed through suboptions to the cscope commands.
|
||||
@@ -232,7 +191,7 @@ through your tags file(s).
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Cscope options *cscope-options*
|
||||
Cscope options *cscope-options*
|
||||
|
||||
Use the |:set| command to set all cscope options. Ideally, you would do
|
||||
this in one of your startup files (e.g., vimrc). Some cscope related
|
||||
@@ -245,7 +204,6 @@ started will have no effect!
|
||||
:set csprg=/usr/local/bin/cscope
|
||||
<
|
||||
*cscopequickfix* *csqf* *E469*
|
||||
{not available when compiled without the |+quickfix| feature}
|
||||
'cscopequickfix' specifies whether to use quickfix window to show cscope
|
||||
results. This is a list of comma-separated values. Each item consists of
|
||||
|cscope-find| command (s, g, d, c, t, e, f, i or a) and flag (+, - or 0).
|
||||
@@ -260,81 +218,56 @@ seems to be useful: >
|
||||
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
|
||||
will always use |:cstag| instead of the default :tag behavior. Effectively,
|
||||
by setting 'cst', you will always search your cscope databases as well as
|
||||
your tag files. The default is off. Examples: >
|
||||
:set cst
|
||||
:set nocst
|
||||
<
|
||||
your tag files. The default is off.
|
||||
|
||||
*cscoperelative* *csre*
|
||||
If 'cscoperelative' is set, then in absence of a prefix given to cscope
|
||||
(prefix is the argument of -P option of cscope), basename of cscope.out
|
||||
location (usually the project root directory) will be used as the prefix
|
||||
to construct an absolute path. The default is off. Note: This option is
|
||||
only effective when cscope (cscopeprg) is initialized without a prefix
|
||||
path (-P). Examples: >
|
||||
:set csre
|
||||
:set nocsre
|
||||
<
|
||||
path (-P).
|
||||
|
||||
*cscopetagorder* *csto*
|
||||
The value of 'csto' determines the order in which |:cstag| performs a search.
|
||||
If 'csto' is set to zero, cscope database(s) are searched first, followed
|
||||
by tag file(s) if cscope did not return any matches. If 'csto' is set to
|
||||
one, tag file(s) are searched before cscope database(s). The default is zero.
|
||||
Examples: >
|
||||
:set csto=0
|
||||
:set csto=1
|
||||
<
|
||||
*cscopeverbose* *csverb*
|
||||
If 'cscopeverbose' is not set (the default), messages will not be printed
|
||||
indicating success or failure when adding a cscope database. Ideally, you
|
||||
should reset this option in your |init.vim| before adding any cscope
|
||||
databases, and after adding them, set it. From then on, when you add more
|
||||
databases within Vim, you will get a (hopefully) useful message should the
|
||||
database fail to be added. Examples: >
|
||||
:set csverb
|
||||
:set nocsverb
|
||||
<
|
||||
|
||||
*cscopepathcomp* *cspc*
|
||||
The value of 'cspc' determines how many components of a file's path to
|
||||
display. With the default value of zero the entire path will be displayed.
|
||||
'cscopepathcomp' determines how many components of a file's path to display.
|
||||
With the default value of zero the entire path will be displayed.
|
||||
The value one will display only the filename with no path. Other values
|
||||
display that many components. For example: >
|
||||
:set cspc=3
|
||||
:set cscopepathcomp=3
|
||||
will display the last 3 components of the file's path, including the file
|
||||
name itself.
|
||||
|
||||
==============================================================================
|
||||
4. How to use cscope in Vim *cscope-howtouse*
|
||||
Using cscope in Nvim *cscope-usage* *cscope-howtouse*
|
||||
|
||||
The first thing you need to do is to build a cscope database for your
|
||||
source files. For the most basic case, simply do "cscope -b". Please
|
||||
refer to the cscope man page for more details.
|
||||
To get started, build the cscope database in your project root directory: >
|
||||
cscope -bcqR
|
||||
|
||||
Assuming you have a cscope database, you need to "add" the database to Vim.
|
||||
This establishes a cscope "connection" and makes it available for Vim to use.
|
||||
You can do this in your vimrc file, or you can do it manually after starting
|
||||
vim. For example, to add the cscope database "cscope.out", you would do:
|
||||
See the cscope manpage for details: >
|
||||
:Man cscope
|
||||
|
||||
:cs add cscope.out
|
||||
By default the cscope database file is named "cscope.out". After building the
|
||||
database, connect to it from Nvim: >
|
||||
:cscope add cscope.out
|
||||
|
||||
You can double-check the result of this by executing ":cs show". This will
|
||||
produce output which looks like this:
|
||||
That establishes a cscope connection for Nvim to use. You can check the
|
||||
result with ":cs show". It will show something like:
|
||||
|
||||
# pid database name prepend path
|
||||
0 28806 cscope.out <none>
|
||||
|
||||
Note:
|
||||
Because of the Microsoft RTL limitations, Win32 version shows 0 instead
|
||||
of the real pid.
|
||||
|
||||
Once a cscope connection is established, you can make queries to cscope and
|
||||
the results will be printed to you. Queries are made using the command
|
||||
":cs find". For example:
|
||||
|
||||
the results will be printed. Queries are made using the command ":cs find".
|
||||
For example: >
|
||||
:cs find g ALIGN_SIZE
|
||||
|
||||
This can get a little cumbersome since one ends up doing a significant
|
||||
amount of typing. Fortunately, there are ways around this by mapping
|
||||
shortcut keys. See |cscope-suggestions| for suggested usage.
|
||||
To make this easier you can configure mappings, see |cscope-suggestions|.
|
||||
|
||||
If the results return only one match, you will automatically be taken to it.
|
||||
If there is more than one match, you will be given a selection screen to pick
|
||||
@@ -343,39 +276,28 @@ simply hit Ctrl-T to get back to the previous one.
|
||||
|
||||
|
||||
==============================================================================
|
||||
5. Limitations *cscope-limitations*
|
||||
|
||||
Cscope support for Vim is only available on systems that support these four
|
||||
system calls: fork(), pipe(), execl(), waitpid(). This means it is mostly
|
||||
limited to Unix systems.
|
||||
|
||||
Additionally Cscope support works for Win32. For more information and a
|
||||
cscope version for Win32 see:
|
||||
|
||||
http://iamphet.nm.ru/cscope/index.html
|
||||
Limitations *cscope-limitations*
|
||||
|
||||
Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
|
||||
is not configurable (e.g., you can't do a tselect instead).
|
||||
|
||||
==============================================================================
|
||||
6. Suggested usage *cscope-suggestions*
|
||||
|
||||
Put these entries in your vimrc (adjust the pathname accordingly to your
|
||||
setup): >
|
||||
==============================================================================
|
||||
Sample config *cscope-suggestions*
|
||||
|
||||
Copy this into your init.vim (adjust paths for your system): >
|
||||
|
||||
if has("cscope")
|
||||
set csprg=/usr/local/bin/cscope
|
||||
set csto=0
|
||||
set cst
|
||||
set nocsverb
|
||||
" add any database in current directory
|
||||
if filereadable("cscope.out")
|
||||
cs add cscope.out
|
||||
silent cs add cscope.out
|
||||
" else add database pointed to by environment
|
||||
elseif $CSCOPE_DB != ""
|
||||
cs add $CSCOPE_DB
|
||||
silent cs add $CSCOPE_DB
|
||||
endif
|
||||
set csverb
|
||||
endif
|
||||
|
||||
By setting 'cscopetag', we have effectively replaced all instances of the :tag
|
||||
@@ -447,47 +369,6 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-Space><C-Space>a
|
||||
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
==============================================================================
|
||||
7. Cscope availability and information *cscope-info*
|
||||
|
||||
If you do not already have cscope (it did not come with your compiler
|
||||
license or OS distribution), then you can download it for free from:
|
||||
http://cscope.sourceforge.net/
|
||||
This is released by SCO under the BSD license.
|
||||
|
||||
If you want a newer version of cscope, you will probably have to buy it.
|
||||
According to the (old) nvi documentation:
|
||||
|
||||
You can buy version 13.3 source with an unrestricted license
|
||||
for $400 from AT&T Software Solutions by calling +1-800-462-8146.
|
||||
|
||||
Also you can download cscope 13.x and mlcscope 14.x (multi-lingual cscope
|
||||
which supports C, C++, Java, lex, yacc, breakpoint listing, Ingres, and SDL)
|
||||
from World-Wide Exptools Open Source packages page:
|
||||
http://www.bell-labs.com/project/wwexptools/packages.html
|
||||
|
||||
In Solaris 2.x, if you have the C compiler license, you will also have
|
||||
cscope. Both are usually located under /opt/SUNWspro/bin
|
||||
|
||||
SGI developers can also get it. Search for Cscope on this page:
|
||||
http://freeware.sgi.com/index-by-alpha.html
|
||||
https://toolbox.sgi.com/toolbox/utilities/cscope/
|
||||
The second one is for those who have a password for the SGI toolbox.
|
||||
|
||||
There is source to an older version of a cscope clone (called "cs") available
|
||||
on the net. Due to various reasons, this is not supported with Vim.
|
||||
|
||||
The cscope interface/support for Vim was originally written by
|
||||
Andy Kahn <ackahn@netapp.com>. The original structure (as well as a tiny
|
||||
bit of code) was adapted from the cscope interface in nvi. Please report
|
||||
any problems, suggestions, patches, et al., you have for the usage of
|
||||
cscope within Vim to him.
|
||||
*cscope-win32*
|
||||
For a cscope version for Win32 see:
|
||||
http://code.google.com/p/cscope-win32/
|
||||
|
||||
Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
|
||||
him if you have Win32-specific issues.
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -310,14 +310,22 @@ semantically equivalent in Lua to:
|
||||
return chunk(arg) -- return typval
|
||||
end
|
||||
|
||||
Note that "_A" receives the argument to "luaeval". Lua nils, numbers, strings,
|
||||
tables and booleans are converted to their respective VimL types. An error is
|
||||
thrown if conversion of any of the remaining Lua types is attempted.
|
||||
Lua nils, numbers, strings, tables and booleans are converted to their
|
||||
respective VimL types. An error is thrown if conversion of any other Lua types
|
||||
is attempted.
|
||||
|
||||
Note 2: lua tables are used as both dictionaries and lists, thus making it
|
||||
impossible to determine whether empty table is meant to be empty list or empty
|
||||
dictionary. Additionally lua does not have integer numbers. To distinguish
|
||||
between these cases there is the following agreement:
|
||||
The magic global "_A" contains the second argument to luaeval().
|
||||
|
||||
Example: >
|
||||
:echo luaeval('_A[1] + _A[2]', [40, 2])
|
||||
42
|
||||
:echo luaeval('string.match(_A, "[a-z]+")', 'XYXfoo123')
|
||||
foo
|
||||
|
||||
Lua tables are used as both dictionaries and lists, so it is impossible to
|
||||
determine whether empty table is meant to be empty list or empty dictionary.
|
||||
Additionally lua does not have integer numbers. To distinguish between these
|
||||
cases there is the following agreement:
|
||||
|
||||
0. Empty table is empty list.
|
||||
1. Table with N incrementally growing integral numbers, starting from 1 and
|
||||
|
@@ -320,6 +320,21 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
{ {
|
||||
void function(); void function();
|
||||
} }
|
||||
<
|
||||
*cino-E*
|
||||
EN Indent inside C++ linkage specifications (extern "C" or
|
||||
extern "C++") N characters extra compared to a normal block.
|
||||
(default 0).
|
||||
|
||||
cino= cino=E-s >
|
||||
extern "C" { extern "C" {
|
||||
void function(); void function();
|
||||
} }
|
||||
|
||||
extern "C" extern "C"
|
||||
{ {
|
||||
void function(); void function();
|
||||
} }
|
||||
<
|
||||
*cino-p*
|
||||
pN Parameter declarations for K&R-style function declarations will
|
||||
@@ -550,7 +565,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
|
||||
|
||||
The defaults, spelled out in full, are:
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,E0,ps,ts,is,+s,
|
||||
c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
|
||||
|
||||
Vim puts a line in column 1 if:
|
||||
|
@@ -40,10 +40,11 @@ char action ~
|
||||
*i_CTRL-[* *i_<Esc>*
|
||||
<Esc> or CTRL-[ End insert or Replace mode, go back to Normal mode. Finish
|
||||
abbreviation.
|
||||
Note: If your <Esc> key is hard to hit on your keyboard, train
|
||||
yourself to use CTRL-[.
|
||||
If Esc doesn't work and you are using a Mac, try CTRL-Esc.
|
||||
Or disable Listening under Accessibility preferences.
|
||||
Note: If your <Esc> key is hard to hit, try CTRL-[ instead.
|
||||
*i_META* *i_ALT*
|
||||
ALT (|META|) acts like <Esc> if the chord is not mapped.
|
||||
For example <A-x> acts like <Esc>x if <A-x> does not have an
|
||||
insert-mode mapping.
|
||||
*i_CTRL-C*
|
||||
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
|
||||
abbreviations. Does not trigger the |InsertLeave| autocommand
|
||||
@@ -1077,6 +1078,8 @@ items:
|
||||
item with the same word is already present.
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
user_data custom data which is associated with the item and
|
||||
available in |v:completed_item|
|
||||
|
||||
All of these except "icase", "dup" and "empty" must be a string. If an item
|
||||
does not meet these requirements then an error message is given and further
|
||||
@@ -1170,6 +1173,8 @@ The menu is used when:
|
||||
|
||||
The 'pumheight' option can be used to set a maximum height. The default is to
|
||||
use all space available.
|
||||
The 'pumwidth' option can be used to set a minimum width. The default is 15
|
||||
characters.
|
||||
|
||||
There are three states:
|
||||
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P.
|
||||
|
@@ -642,28 +642,12 @@ The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when
|
||||
make sure Vim is in the mode indicated by 'insertmode', without knowing in
|
||||
what mode Vim currently is.
|
||||
|
||||
*Q* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*
|
||||
Q Switch to "Ex" mode. This is a bit like typing ":"
|
||||
commands one after another, except:
|
||||
*gQ* *Q* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*
|
||||
Q or gQ Switch to Ex mode. This is like typing ":" commands
|
||||
one after another, except:
|
||||
- You don't have to keep pressing ":".
|
||||
- The screen doesn't get updated after each command.
|
||||
- There is no normal command-line editing.
|
||||
- Mappings and abbreviations are not used.
|
||||
In fact, you are editing the lines with the "standard"
|
||||
line-input editing commands (<Del> or <BS> to erase,
|
||||
CTRL-U to kill the whole line).
|
||||
Vim will enter this mode by default if it's invoked as
|
||||
"ex" on the command-line.
|
||||
Use the ":vi" command |:visual| to exit "Ex" mode.
|
||||
Note: In older versions of Vim "Q" formatted text,
|
||||
that is now done with |gq|. But if you use the
|
||||
|vimrc_example.vim| script "Q" works like "gq".
|
||||
|
||||
*gQ*
|
||||
gQ Switch to "Ex" mode like with "Q", but really behave
|
||||
like typing ":" commands after another. All command
|
||||
line editing, completion etc. is available.
|
||||
Use the ":vi" command |:visual| to exit "Ex" mode.
|
||||
Use the ":vi" command |:visual| to exit this mode.
|
||||
|
||||
==============================================================================
|
||||
7. The window contents *window-contents*
|
||||
|
@@ -20,6 +20,8 @@ When a job starts it is assigned a number, unique for the life of the current
|
||||
Nvim session. Functions like |jobstart()| return job ids. Functions like
|
||||
|jobsend()|, |jobstop()|, |rpcnotify()|, and |rpcrequest()| take job ids.
|
||||
|
||||
The job's stdio streams are represented as a |channel|. It is possible to send
|
||||
and recieve raw bytes, or use |msgpack-rpc|.
|
||||
==============================================================================
|
||||
Usage *job-control-usage*
|
||||
|
||||
@@ -28,7 +30,7 @@ To control jobs, use the "job…" family of functions: |jobstart()|,
|
||||
|
||||
Example: >
|
||||
|
||||
function! s:JobHandler(job_id, data, event) dict
|
||||
function! s:OnEvent(job_id, data, event) dict
|
||||
if a:event == 'stdout'
|
||||
let str = self.shell.' stdout: '.join(a:data)
|
||||
elseif a:event == 'stderr'
|
||||
@@ -40,9 +42,9 @@ Example: >
|
||||
call append(line('$'), str)
|
||||
endfunction
|
||||
let s:callbacks = {
|
||||
\ 'on_stdout': function('s:JobHandler'),
|
||||
\ 'on_stderr': function('s:JobHandler'),
|
||||
\ 'on_exit': function('s:JobHandler')
|
||||
\ 'on_stdout': function('s:OnEvent'),
|
||||
\ 'on_stderr': function('s:OnEvent'),
|
||||
\ 'on_exit': function('s:OnEvent')
|
||||
\ }
|
||||
let job1 = jobstart(['bash'], extend({'shell': 'shell 1'}, s:callbacks))
|
||||
let job2 = jobstart(['bash', '-c', 'for i in {1..10}; do echo hello $i!; sleep 1; done'], extend({'shell': 'shell 2'}, s:callbacks))
|
||||
@@ -56,29 +58,17 @@ Description of what happens:
|
||||
- The first shell is idle, waiting to read commands from its stdin.
|
||||
- The second shell is started with -c which executes the command (a for-loop
|
||||
printing 0 through 9) and then exits.
|
||||
- `JobHandler()` callback is passed to |jobstart()| to handle various job
|
||||
- `OnEvent()` callback is passed to |jobstart()| to handle various job
|
||||
events. It displays stdout/stderr data received from the shells.
|
||||
|
||||
*on_stdout*
|
||||
Arguments passed to on_stdout callback:
|
||||
0: |job-id|
|
||||
1: List of lines read from the stream. If the last item is not "" (empty
|
||||
string), then it is an incomplete line that might be continued at the
|
||||
next on_stdout invocation. See Note 2 below.
|
||||
2: Event type: "stdout"
|
||||
*on_stderr*
|
||||
Arguments passed to on_stderr callback:
|
||||
0: |job-id|
|
||||
1: List of lines read from the stream. If the last item is not "" (empty
|
||||
string), then it is an incomplete line that might be continued at the
|
||||
next on_stderr invocation. See Note 2 below.
|
||||
2: Event type: "stderr"
|
||||
For |on_stdout| and |on_stderr| see |channel-callback|.
|
||||
*on_exit*
|
||||
Arguments passed to on_exit callback:
|
||||
0: |job-id|
|
||||
1: Exit-code of the process.
|
||||
2: Event type: "exit"
|
||||
|
||||
|
||||
Note: Buffered stdout/stderr data which has not been flushed by the sender
|
||||
will not trigger the on_stdout/on_stderr callback (but if the process
|
||||
ends, the on_exit callback will be invoked).
|
||||
@@ -137,13 +127,19 @@ The above example could be written in this "object-oriented" style: >
|
||||
let instance = Shell.new('bomb',
|
||||
\ 'for i in $(seq 9 -1 1); do echo $i 1>&$((i % 2 + 1)); sleep 1; done')
|
||||
<
|
||||
To send data to the job's stdin, use |jobsend()|: >
|
||||
:call jobsend(job1, "ls\n")
|
||||
:call jobsend(job1, "invalid-command\n")
|
||||
:call jobsend(job1, "exit\n")
|
||||
To send data to the job's stdin, use |chansend()|: >
|
||||
:call chansend(job1, "ls\n")
|
||||
:call chansend(job1, "invalid-command\n")
|
||||
:call chansend(job1, "exit\n")
|
||||
<
|
||||
A job may be killed with |jobstop()|: >
|
||||
:call jobstop(job1)
|
||||
<
|
||||
A job may be killed at any time with the |jobstop()| function:
|
||||
>
|
||||
:call jobstop(job1)
|
||||
<
|
||||
Individual streams can be closed without killing the job, see |chanclose()|.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@@ -232,8 +232,9 @@ For this reason the following is blocked:
|
||||
- Editing another buffer.
|
||||
- The |:normal| command.
|
||||
- Moving the cursor is allowed, but it is restored afterwards.
|
||||
- If the cmdline is changed, the old text and cursor position are restored.
|
||||
If you want the mapping to do any of these let the returned characters do
|
||||
that.
|
||||
that. Or use a |<Cmd>| mapping (which doesn't have these restrictions).
|
||||
|
||||
You can use getchar(), it consumes typeahead if there is any. E.g., if you
|
||||
have these mappings: >
|
||||
@@ -272,6 +273,30 @@ again for using <expr>. This does work: >
|
||||
Using 0x80 as a single byte before other text does not work, it will be seen
|
||||
as a special key.
|
||||
|
||||
*<Cmd>* *:map-cmd*
|
||||
The <Cmd> pseudokey may be used to define a "command mapping", which executes
|
||||
the command directly (without changing modes, etc.). Where you might use
|
||||
":...<CR>" in the {lhs} of a mapping, you can instead use "<Cmd>...<CR>".
|
||||
Example: >
|
||||
noremap x <Cmd>echo mode(1)<cr>
|
||||
<
|
||||
This is more flexible than `:<C-U>` in visual and operator-pending mode, or
|
||||
`<C-O>:` in insert-mode, because the commands are executed directly in the
|
||||
current mode (instead of always going to normal-mode). Visual-mode is
|
||||
preserved, so tricks with |gv| are not needed. Commands can be invoked
|
||||
directly in cmdline-mode (which otherwise would require timer hacks).
|
||||
|
||||
Unlike <expr> mappings, there are no special restrictions on the <Cmd>
|
||||
command: it is executed as if an (unrestricted) |autocmd| was invoked or an
|
||||
async event event was processed.
|
||||
|
||||
In select-mode, |:map| and |:vmap| command mappings are executed in
|
||||
visual-mode. Use |:smap| to handle select-mode.
|
||||
|
||||
*E5520*
|
||||
<Cmd> commands must terminate, that is, they must be followed by <CR> in the
|
||||
{lhs} of the mapping definition. |Command-line| mode is never entered.
|
||||
|
||||
|
||||
1.3 MAPPING AND MODES *:map-modes*
|
||||
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o* *mapmode-t*
|
||||
@@ -386,7 +411,8 @@ state for Insert mode is also used when typing a character as an argument to
|
||||
command like "f" or "t".
|
||||
Language mappings will never be applied to already mapped characters. They
|
||||
are only used for typed characters. This assumes that the language mapping
|
||||
was already done when typing the mapping.
|
||||
was already done when typing the mapping. Correspondingly, language mappings
|
||||
are applied when recording macros, rather than when applying them.
|
||||
|
||||
|
||||
1.4 LISTING MAPPINGS *map-listing*
|
||||
|
@@ -834,7 +834,7 @@ keyboards and encodings.
|
||||
The actual mappings are in the lines below "loadkeymap". In the example "a"
|
||||
is mapped to "A" and "b" to "B". Thus the first item is mapped to the second
|
||||
item. This is done for each line, until the end of the file.
|
||||
These items are exactly the same as what can be used in a |:lnoremap| command,
|
||||
These items are exactly the same as what can be used in a |:lmap| command,
|
||||
using "<buffer>" to make the mappings local to the buffer.
|
||||
You can check the result with this command: >
|
||||
:lmap
|
||||
@@ -849,8 +849,9 @@ Since Vim doesn't know if the next character after a quote is really an "a",
|
||||
it will wait for the next character. To be able to insert a single quote,
|
||||
also add this line: >
|
||||
'' '
|
||||
Since the mapping is defined with |:lnoremap| the resulting quote will not be
|
||||
used for the start of another character.
|
||||
Since the mapping is defined with |:lmap| the resulting quote will not be
|
||||
used for the start of another character defined in the 'keymap'.
|
||||
It can be used in a standard |:imap| mapping.
|
||||
The "accents" keymap uses this. *keymap-accents*
|
||||
|
||||
The first column can also be in |<>| form:
|
||||
@@ -1058,8 +1059,7 @@ widespread as file format.
|
||||
A composing or combining character is used to change the meaning of the
|
||||
character before it. The combining characters are drawn on top of the
|
||||
preceding character.
|
||||
Up to two combining characters can be used by default. This can be changed
|
||||
with the 'maxcombine' option.
|
||||
Up to six combining characters can be displayed.
|
||||
When editing text a composing character is mostly considered part of the
|
||||
preceding character. For example "x" will delete a character and its
|
||||
following composing characters by default.
|
||||
|
@@ -761,9 +761,8 @@ g'{mark} g`{mark}
|
||||
Jump to the {mark}, but don't change the jumplist when
|
||||
jumping within the current buffer. Example: >
|
||||
g`"
|
||||
< jumps to the last known position in a file. See
|
||||
$VIMRUNTIME/vimrc_example.vim.
|
||||
Also see |:keepjumps|.
|
||||
< jumps to the last known position in a file.
|
||||
See also |:keepjumps|.
|
||||
|
||||
*:marks*
|
||||
:marks List all the current marks (not a motion command).
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*msgpack_rpc.txt* Nvim
|
||||
|
||||
|
||||
NVIM REFERENCE MANUAL by Thiago de Arruda
|
||||
@@ -61,24 +60,23 @@ To get a formatted dump of the API using python (requires the `pyyaml` and
|
||||
==============================================================================
|
||||
3. Connecting *rpc-connecting*
|
||||
|
||||
There are several ways to open a msgpack-rpc channel to an Nvim instance:
|
||||
See |channel-intro|, for various ways to open a channel. Most of the channel
|
||||
opening functions take an `rpc` key in the options dictionary, to enable rpc.
|
||||
|
||||
1. Through stdin/stdout when `nvim` is started with `--embed`. This is how
|
||||
applications can embed Nvim.
|
||||
Additionally, rpc channels can be opened by other processes connecting to
|
||||
TCP/IP sockets or named pipes listened to by nvim.
|
||||
|
||||
2. Through stdin/stdout of some other process spawned by |jobstart()|.
|
||||
Set the "rpc" key to |v:true| in the options dict to use the job's stdin
|
||||
and stdout as a single msgpack channel that is processed directly by
|
||||
Nvim. Then it is not possible to process raw data to or from the
|
||||
process's stdin and stdout. stderr can still be used, though.
|
||||
An rpc socket is automatically created with each instance. The socket
|
||||
location is stored in |v:servername|. By default this is a named pipe
|
||||
with an automatically generated address. See |XXX|.
|
||||
|
||||
3. Through the socket automatically created with each instance. The socket
|
||||
location is stored in |v:servername|.
|
||||
To make Nvim listen on a TCP/IP socket instead, specify |--listen|: >
|
||||
nvim --listen 127.0.0.1:6666
|
||||
<Also, more sockets and named pipes can be listened on using |serverstart()|.
|
||||
|
||||
Note that localhost TCP sockets are generally less secure than named pipes,
|
||||
and can lead to vunerabilities like remote code execution.
|
||||
|
||||
4. Through a TCP/IP socket. To make Nvim listen on a TCP/IP socket, set the
|
||||
|$NVIM_LISTEN_ADDRESS| environment variable before starting Nvim: >
|
||||
NVIM_LISTEN_ADDRESS=127.0.0.1:6666 nvim
|
||||
<
|
||||
Connecting to the socket is the easiest way a programmer can test the API,
|
||||
which can be done through any msgpack-rpc client library or full-featured
|
||||
|api-client|. Here's a Ruby script that prints 'hello world!' in the current
|
||||
@@ -192,10 +190,10 @@ prefix is stripped off.
|
||||
5. Types *rpc-types*
|
||||
|
||||
The Nvim C API uses custom types for all functions. |api-types|
|
||||
At the RPC layer, the types can be split into two groups:
|
||||
At the RPC layer, types form two groups:
|
||||
|
||||
- Basic types that map natively to msgpack (and probably have a default
|
||||
representation in msgpack-supported programming languages)
|
||||
- Basic types that map natively to msgpack (and have a default
|
||||
representation in most msgpack-supported programming languages)
|
||||
- Special Nvim types that map to msgpack EXT with custom type codes.
|
||||
|
||||
Basic types ~
|
||||
@@ -208,6 +206,8 @@ Basic types ~
|
||||
Array -> msgpack array
|
||||
Dictionary -> msgpack map
|
||||
|
||||
Note: in function calls, empty Array is accepted for Dictionary parameter.
|
||||
|
||||
Special types (msgpack EXT) ~
|
||||
|
||||
Buffer -> enum value kObjectTypeBuffer
|
||||
@@ -243,4 +243,4 @@ Even for statically compiled clients it is good practice to avoid hardcoding
|
||||
the type codes, because a client may be built against one Nvim version but
|
||||
connect to another with different type codes.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -20,15 +20,24 @@ differences from Vim.
|
||||
==============================================================================
|
||||
Transitioning from Vim *nvim-from-vim*
|
||||
|
||||
To start the transition, create ~/.config/nvim/init.vim with these contents:
|
||||
To start the transition, create init.vim in the correct directory for your
|
||||
platform.
|
||||
|
||||
For Linux, macOS and other Unixes, create the file at ~/.config/nvim/init.vim.
|
||||
|
||||
For Windows, create the file at %LOCALAPPDATA%\nvim\init.vim. `%LOCALAPPDATA%`
|
||||
usually expands to `C:\Users\<username>\AppData\Local`.
|
||||
|
||||
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
|
||||
or `%LOCALAPPDATA%` in the paths above. Nvim follows the XDG |base-directories|
|
||||
convention.
|
||||
|
||||
Next, add these contents to the file:
|
||||
>
|
||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||
let &packpath = &runtimepath
|
||||
source ~/.vimrc
|
||||
<
|
||||
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
|
||||
in the code above. Nvim follows the XDG |base-directories| convention.
|
||||
|
||||
See |provider-python| and |provider-clipboard| for additional software you
|
||||
might need to use some features.
|
||||
|
||||
|
@@ -96,7 +96,6 @@ global configuration.
|
||||
|
||||
- 'list' is disabled
|
||||
- 'wrap' is disabled
|
||||
- 'relativenumber' is disabled in |Terminal-mode| (and cannot be enabled)
|
||||
|
||||
You can change the defaults with a TermOpen autocommand: >
|
||||
au TermOpen * setlocal list
|
||||
@@ -117,10 +116,8 @@ variables:
|
||||
- *b:term_title* The settable title of the terminal, typically displayed in
|
||||
the window title or tab title of a graphical terminal emulator. Programs
|
||||
running in the terminal can set this title via an escape sequence.
|
||||
- *b:terminal_job_id* The nvim job ID of the job running in the terminal. See
|
||||
|job-control| for more information.
|
||||
- *b:terminal_job_pid* The PID of the top-level process running in the
|
||||
terminal.
|
||||
- |'channel'| The nvim channel ID for the underlying PTY.
|
||||
|chansend()| can be used to send input to the terminal.
|
||||
|
||||
These variables are initialized before TermOpen, so you can use them in
|
||||
a local 'statusline'. Example: >
|
||||
|
@@ -1213,6 +1213,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< |Nvi| also has this option, but it only uses the first character.
|
||||
See |cmdwin|.
|
||||
|
||||
*'channel'*
|
||||
'channel' number (default: 0)
|
||||
local to buffer
|
||||
|Channel| connected to the buffer. Currently only used by
|
||||
|terminal-emulator|. Is 0 if no terminal is open. Cannot be changed.
|
||||
|
||||
*'charconvert'* *'ccv'* *E202* *E214* *E513*
|
||||
'charconvert' 'ccv' string (default "")
|
||||
global
|
||||
@@ -1319,27 +1325,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
will additionally copy the text into register
|
||||
'*'. See |clipboard|.
|
||||
|
||||
*clipboard-autoselect*
|
||||
autoselect Works like the 'a' flag in 'guioptions': If present,
|
||||
then whenever Visual mode is started, or the Visual
|
||||
area extended, Vim tries to become the owner of the
|
||||
windowing system's global selection or put the
|
||||
selected text on the clipboard used by the selection
|
||||
register "*. See |guioptions_a| and |quotestar| for
|
||||
details. When the GUI is active, the 'a' flag in
|
||||
'guioptions' is used, when the GUI is not active, this
|
||||
"autoselect" flag is used.
|
||||
Also applies to the modeless selection.
|
||||
|
||||
*clipboard-autoselectplus*
|
||||
autoselectplus Like "autoselect" but using the + register instead of
|
||||
the * register. Compare to the 'P' flag in
|
||||
'guioptions'.
|
||||
|
||||
*clipboard-autoselectml*
|
||||
autoselectml Like "autoselect", but for the modeless selection
|
||||
only. Compare to the 'A' flag in 'guioptions'.
|
||||
|
||||
*'cmdheight'* *'ch'*
|
||||
'cmdheight' 'ch' number (default 1)
|
||||
global
|
||||
@@ -1822,12 +1807,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Determines the order in which ":cstag" performs a search. See
|
||||
|cscopetagorder|.
|
||||
|
||||
*'cscopeverbose'* *'csverb'*
|
||||
*'nocscopeverbose'* *'nocsverb'*
|
||||
'cscopeverbose' 'csverb' boolean (default off)
|
||||
global
|
||||
Give messages when adding a cscope database. See |cscopeverbose|.
|
||||
|
||||
*'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'*
|
||||
'cursorbind' 'crb' boolean (default off)
|
||||
local to window
|
||||
@@ -2045,7 +2024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'display'* *'dy'*
|
||||
'display' 'dy' string (default "lastline", Vi default: "")
|
||||
'display' 'dy' string (default "lastline,msgsep", Vi default: "")
|
||||
global
|
||||
Change the way text is displayed. This is comma separated list of
|
||||
flags:
|
||||
@@ -2057,6 +2036,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
column of the last screen line. Overrules "lastline".
|
||||
uhex Show unprintable characters hexadecimal as <xx>
|
||||
instead of using ^C and ~C.
|
||||
msgsep When showing messages longer than 'cmdheight', only
|
||||
scroll the message lines, not the entire screen. The
|
||||
separator line is decorated by |MsgSeparator| and the
|
||||
"msgsep" flag of 'fillchars'.
|
||||
|
||||
When neither "lastline" nor "truncate" is included, a last line that
|
||||
doesn't fit is replaced with "@" lines.
|
||||
@@ -2079,13 +2062,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
|
||||
*'encoding'* *'enc'* *E543*
|
||||
'encoding' 'enc' Removed. |vim-differences| {Nvim}
|
||||
Nvim always uses UTF-8 internally. RPC communication
|
||||
(remote plugins/GUIs) must use UTF-8 strings.
|
||||
'encoding' 'enc'
|
||||
String-encoding used internally and for |RPC| communication.
|
||||
Always UTF-8.
|
||||
|
||||
The character encoding of files can be different than UTF-8.
|
||||
This is specified with 'fileencoding'. The conversion is done with
|
||||
iconv() or as specified with 'charconvert'.
|
||||
See 'fileencoding' to control file-content encoding.
|
||||
|
||||
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
|
||||
'endofline' 'eol' boolean (default on)
|
||||
@@ -2201,14 +2182,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'fileencoding'* *'fenc'* *E213*
|
||||
'fileencoding' 'fenc' string (default: "")
|
||||
local to buffer
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
Sets the character encoding for the file of this buffer.
|
||||
File-content encoding for the current buffer. Conversion is done with
|
||||
iconv() or as specified with 'charconvert'.
|
||||
|
||||
When 'fileencoding' is not UTF-8, conversion will be done when
|
||||
writing the file. For reading see below.
|
||||
When 'fileencoding' is empty, the file will be saved with UTF-8
|
||||
encoding (no conversion when reading or writing a file).
|
||||
|
||||
When 'fileencoding' is different from "utf-8", conversion will be
|
||||
done when writing the file. For reading see below.
|
||||
When 'fileencoding' is empty, the file will be saved with utf-8
|
||||
encoding. (no conversion when reading or writing a file).
|
||||
WARNING: Conversion to a non-Unicode encoding can cause loss of
|
||||
information!
|
||||
|
||||
@@ -2237,7 +2218,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
written. If you do set 'fenc' in a modeline, you might want to set
|
||||
'nomodified' to avoid not being able to ":q".
|
||||
|
||||
This option can not be changed when 'modifiable' is off.
|
||||
This option cannot be changed when 'modifiable' is off.
|
||||
|
||||
*'fileencodings'* *'fencs'*
|
||||
'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1")
|
||||
@@ -2310,7 +2291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'fileformats' is not empty and 'binary' is off.
|
||||
When this option is set, after starting to edit a file, the 'modified'
|
||||
option is set, because the file would be different when written.
|
||||
This option can not be changed when 'modifiable' is off.
|
||||
This option cannot be changed when 'modifiable' is off.
|
||||
|
||||
*'fileformats'* *'ffs'*
|
||||
'fileformats' 'ffs' string (default:
|
||||
@@ -2398,7 +2379,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
|
||||
*'fillchars'* *'fcs'*
|
||||
'fillchars' 'fcs' string (default "vert:|,fold:-")
|
||||
'fillchars' 'fcs' string (default "")
|
||||
global
|
||||
{not available when compiled without the |+windows|
|
||||
and |+folding| features}
|
||||
@@ -2408,16 +2389,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
item default Used for ~
|
||||
stl:c ' ' or '^' statusline of the current window
|
||||
stlnc:c ' ' or '=' statusline of the non-current windows
|
||||
vert:c '|' vertical separators |:vsplit|
|
||||
fold:c '-' filling 'foldtext'
|
||||
vert:c '│' or '|' vertical separators |:vsplit|
|
||||
fold:c '·' or '-' filling 'foldtext'
|
||||
diff:c '-' deleted lines of the 'diff' option
|
||||
msgsep:c ' ' message separator 'display'
|
||||
eob:c '~' empty lines at the end of a buffer
|
||||
|
||||
Any one that is omitted will fall back to the default. For "stl" and
|
||||
"stlnc" the space will be used when there is highlighting, '^' or '='
|
||||
otherwise.
|
||||
|
||||
If 'ambiwidth' is "double" then "vert" and "fold" default to
|
||||
single-byte alternatives.
|
||||
|
||||
Example: >
|
||||
:set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
|
||||
:set fillchars=stl:^,stlnc:=,vert:│,fold:·,diff:-
|
||||
< This is similar to the default, except that these characters will also
|
||||
be used when there is highlighting.
|
||||
|
||||
@@ -2430,6 +2416,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
vert:c VertSplit |hl-VertSplit|
|
||||
fold:c Folded |hl-Folded|
|
||||
diff:c DiffDelete |hl-DiffDelete|
|
||||
eob:c EndOfBuffer |hl-EndOfBuffer|
|
||||
|
||||
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
|
||||
'fixendofline' 'fixeol' boolean (default on)
|
||||
@@ -2702,17 +2689,19 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'fsync'* *'fs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
'fsync' 'fs' boolean (default off)
|
||||
global
|
||||
When on, the library function fsync() will be called after writing a
|
||||
file. This will flush a file to disk, ensuring that it is safely
|
||||
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.
|
||||
When on, the OS function fsync() will be called after saving a file
|
||||
(|:write|, |writefile()|, …), |swap-file| and |shada-file|. This
|
||||
flushes the file to disk, ensuring that it is safely written.
|
||||
Slow on some systems: writing buffers, quitting Nvim, and other
|
||||
operations may sometimes take a few seconds.
|
||||
|
||||
Currently applies only to writing the buffer with e.g. |:w| and
|
||||
|writefile()|.
|
||||
Files are ALWAYS flushed ('fsync' is ignored) when:
|
||||
- |CursorHold| event is triggered
|
||||
- |:preserve| is called
|
||||
- system signals low battery life
|
||||
- Nvim exits abnormally
|
||||
|
||||
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
|
||||
'gdefault' 'gd' boolean (default off)
|
||||
@@ -2727,6 +2716,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:s///g subst. one subst. all
|
||||
:s///gg subst. all subst. one
|
||||
|
||||
DEPRECATED: Setting this option may break plugins that are not aware
|
||||
of this option. Also, many users get confused that adding the /g flag
|
||||
has the opposite effect of that it normally does.
|
||||
|
||||
*'grepformat'* *'gfm'*
|
||||
'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
|
||||
global
|
||||
@@ -3316,7 +3309,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
pattern and/or a lot of text the match may not be found. This is to
|
||||
avoid that Vim hangs while you are typing the pattern.
|
||||
The |hl-IncSearch| highlight group determines the highlighting.
|
||||
See also: 'hlsearch'.
|
||||
When 'hlsearch' is on, all matched strings are highlighted too while typing
|
||||
a search command. See also: 'hlsearch'.
|
||||
If you don't want turn 'hlsearch' on, but want to highlight all matches
|
||||
while searching, you can turn on and off 'hlsearch' with autocmd.
|
||||
Example: >
|
||||
augroup vimrc-incsearch-highlight
|
||||
autocmd!
|
||||
autocmd CmdlineEnter /,\? :set hlsearch
|
||||
autocmd CmdlineLeave /,\? :set nohlsearch
|
||||
augroup END
|
||||
<
|
||||
CTRL-L can be used to add one character from after the current match
|
||||
to the command line. If 'ignorecase' and 'smartcase' are set and the
|
||||
command line has no uppercase characters, the added character is
|
||||
@@ -3687,7 +3690,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< Minimum value is 2, maximum value is 1000.
|
||||
|
||||
*'linespace'* *'lsp'*
|
||||
'linespace' 'lsp' number (default 0, 1 for Win32 GUI)
|
||||
'linespace' 'lsp' number (default 0)
|
||||
global
|
||||
{only in the GUI}
|
||||
Number of pixel lines inserted between characters. Useful if the font
|
||||
@@ -3824,6 +3827,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'makeencoding'* *'menc'*
|
||||
'makeencoding' 'menc' string (default "")
|
||||
global or local to buffer |global-local|
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
{not in Vi}
|
||||
Encoding used for reading the output of external commands. When empty,
|
||||
encoding is not converted.
|
||||
This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`,
|
||||
`:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`,
|
||||
and `:laddfile`.
|
||||
|
||||
This would be mostly useful when you use MS-Windows. If |+iconv| is
|
||||
enabled and GNU libiconv is used, setting 'makeencoding' to "char" has
|
||||
the same effect as setting to the system locale encoding. Example: >
|
||||
:set makeencoding=char " system locale is used
|
||||
<
|
||||
*'makeprg'* *'mp'*
|
||||
'makeprg' 'mp' string (default "make")
|
||||
global or local to buffer |global-local|
|
||||
@@ -3870,16 +3890,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set a time. This is to be compatible with Nvi.
|
||||
|
||||
*'maxcombine'* *'mco'*
|
||||
'maxcombine' 'mco' number (default 2)
|
||||
global
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
The maximum number of combining characters supported for displaying.
|
||||
The default is OK for most languages. Hebrew may require 4.
|
||||
Maximum value is 6.
|
||||
Even when this option is set to 2 you can still edit text with more
|
||||
combining characters, you just can't see them. Use |g8| or |ga|.
|
||||
See |mbyte-combining|.
|
||||
'maxcombine' 'mco' Removed. |vim-differences| {Nvim}
|
||||
Nvim always displays up to 6 combining characters. You can still edit
|
||||
text with more than 6 combining characters, you just can't see them.
|
||||
Use |g8| or |ga|. See |mbyte-combining|.
|
||||
|
||||
*'maxfuncdepth'* *'mfd'*
|
||||
'maxfuncdepth' 'mfd' number (default 100)
|
||||
@@ -3903,16 +3917,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
because the 'w' is used before the next mapping is done. See also
|
||||
|key-mapping|.
|
||||
|
||||
*'maxmem'* *'mm'*
|
||||
'maxmem' 'mm' number (default between 256 to 5120 (system
|
||||
dependent) or half the amount of memory
|
||||
available)
|
||||
global
|
||||
Maximum amount of memory (in Kbyte) to use for one buffer. When this
|
||||
limit is reached allocating extra memory for a buffer will cause
|
||||
other memory to be freed. The maximum usable value is about 2000000.
|
||||
Use this to work without a limit. Also see 'maxmemtot'.
|
||||
|
||||
*'maxmempattern'* *'mmp'*
|
||||
'maxmempattern' 'mmp' number (default 1000)
|
||||
global
|
||||
@@ -3926,20 +3930,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"\(.\)*" on a very long line. ".*" works much better.
|
||||
Vim may run out of memory before hitting the 'maxmempattern' limit.
|
||||
|
||||
*'maxmemtot'* *'mmt'*
|
||||
'maxmemtot' 'mmt' number (default between 2048 and 10240 (system
|
||||
dependent) or half the amount of memory
|
||||
available)
|
||||
global
|
||||
Maximum amount of memory in Kbyte to use for all buffers together.
|
||||
The maximum usable value is about 2000000 (2 Gbyte). Use this to work
|
||||
without a limit.
|
||||
On 64 bit machines higher values might work. But hey, do you really
|
||||
need more than 2 Gbyte for text editing? Keep in mind that text is
|
||||
stored in the swap file, one can edit files > 2 Gbyte anyway. We do
|
||||
need the memory to store undo info.
|
||||
Also see 'maxmem'.
|
||||
|
||||
*'menuitems'* *'mis'*
|
||||
'menuitems' 'mis' number (default 25)
|
||||
global
|
||||
@@ -4810,7 +4800,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
height with ":set scroll=0".
|
||||
|
||||
*'scrollback'* *'scbk'*
|
||||
'scrollback' 'scbk' number (default: 1000
|
||||
'scrollback' 'scbk' number (default: 10000
|
||||
in normal buffers: -1)
|
||||
local to buffer
|
||||
Maximum number of lines kept beyond the visible screen. Lines at the
|
||||
@@ -5142,15 +5132,19 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
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.
|
||||
*shell-powershell*
|
||||
To use powershell (on Windows): >
|
||||
set shell=powershell shellquote=( shellpipe=\| shellredir=> shellxquote=
|
||||
set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
< This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellcmdflag'* *'shcf'*
|
||||
'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/c")
|
||||
'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/s /c")
|
||||
global
|
||||
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
|
||||
"bash.exe -c ls" or "cmd.exe /c dir". For Windows
|
||||
`bash.exe -c ls` or `cmd.exe /s /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
|
||||
@@ -5271,7 +5265,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
to execute most external commands with cmd.exe.
|
||||
|
||||
*'shellxquote'* *'sxq'*
|
||||
'shellxquote' 'sxq' string (default: "")
|
||||
'shellxquote' 'sxq' string (default: "", Windows: "\"")
|
||||
global
|
||||
Quoting character(s), put around the command passed to the shell, for
|
||||
the "!" and ":!" commands. Includes the redirection. See
|
||||
@@ -5299,7 +5293,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
function to get the effective shiftwidth value.
|
||||
|
||||
*'shortmess'* *'shm'*
|
||||
'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "")
|
||||
'shortmess' 'shm' string (Vim default "filnxtToOF", Vi default: "")
|
||||
global
|
||||
This option helps to avoid all the |hit-enter| prompts caused by file
|
||||
messages, for example with CTRL-G, and to avoid some other messages.
|
||||
@@ -5435,14 +5429,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See |tab-page| for more information about tab pages.
|
||||
|
||||
*'sidescroll'* *'ss'*
|
||||
'sidescroll' 'ss' number (default 0)
|
||||
'sidescroll' 'ss' number (default 1)
|
||||
global
|
||||
The minimal number of columns to scroll horizontally. Used only when
|
||||
the 'wrap' option is off and the cursor is moved off of the screen.
|
||||
When it is zero the cursor will be put in the middle of the screen.
|
||||
When using a slow terminal set it to a large number or 0. When using
|
||||
a fast terminal use a small number or 1. Not used for "zh" and "zl"
|
||||
commands.
|
||||
When using a slow terminal set it to a large number or 0. Not used
|
||||
for "zh" and "zl" commands.
|
||||
|
||||
*'sidescrolloff'* *'siso'*
|
||||
'sidescrolloff' 'siso' number (default 0)
|
||||
@@ -6207,7 +6200,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
|
||||
the terminal (thus using 24-bit color). Requires a ISO-8613-3
|
||||
compatible terminal.
|
||||
Must be set at startup (in your |init.vim| or |--cmd|).
|
||||
|
||||
*'terse'* *'noterse'*
|
||||
'terse' boolean (default off)
|
||||
@@ -6273,15 +6265,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'timeoutlen'* *'tm'*
|
||||
'timeoutlen' 'tm' number (default 1000)
|
||||
global
|
||||
The time in milliseconds that is waited for a mapped sequence to
|
||||
complete.
|
||||
Time in milliseconds to wait for a mapped sequence to complete.
|
||||
|
||||
*'ttimeoutlen'* *'ttm'*
|
||||
'ttimeoutlen' 'ttm' number (default 50)
|
||||
global
|
||||
The time in milliseconds that is waited for a key code
|
||||
sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G
|
||||
when part of a command has been typed.
|
||||
Time in milliseconds to wait for a key code sequence to complete. Also
|
||||
used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has
|
||||
been typed.
|
||||
|
||||
*'title'* *'notitle'*
|
||||
'title' boolean (default off)
|
||||
@@ -6439,6 +6430,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Currently, these messages are given:
|
||||
>= 1 When the shada file is read or written.
|
||||
>= 2 When a file is ":source"'ed.
|
||||
>= 3 UI info, terminal capabilities
|
||||
>= 5 Every searched tags file and include file.
|
||||
>= 8 Files for which a group of autocommands is executed.
|
||||
>= 9 Every executed autocommand.
|
||||
@@ -6474,7 +6466,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'viewoptions'* *'vop'*
|
||||
'viewoptions' 'vop' string (default: "folds,options,cursor")
|
||||
'viewoptions' 'vop' string (default: "folds,options,cursor,curdir")
|
||||
global
|
||||
{not available when compiled without the |+mksession|
|
||||
feature}
|
||||
@@ -6482,6 +6474,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
list of words. Each word enables saving and restoring something:
|
||||
word save and restore ~
|
||||
cursor cursor position in file and in window
|
||||
curdir local current directory, if set with |:lcd|
|
||||
folds manually created folds, opened/closed folds and local
|
||||
fold options
|
||||
options options and mappings local to a window or buffer (not
|
||||
@@ -6909,7 +6902,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'writedelay' 'wd' number (default 0)
|
||||
global
|
||||
The number of milliseconds to wait for each character sent to the
|
||||
screen. When non-zero, characters are sent to the terminal one by
|
||||
one. For debugging purposes.
|
||||
screen. When positive, characters are sent to the UI one by one.
|
||||
When negative, all redrawn characters cause a delay, even if the
|
||||
character already was displayed by the UI. For debugging purposes.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:noet:norl:
|
||||
|
@@ -1071,21 +1071,23 @@ x A single character, with no special meaning, matches itself
|
||||
- A character class expression is evaluated to the set of characters
|
||||
belonging to that character class. The following character classes
|
||||
are supported:
|
||||
Name Contents ~
|
||||
*[:alnum:]* [:alnum:] ASCII letters and digits
|
||||
*[:alpha:]* [:alpha:] ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab characters
|
||||
*[:cntrl:]* [:cntrl:] control characters
|
||||
*[:digit:]* [:digit:] decimal digits
|
||||
*[:graph:]* [:graph:] printable characters excluding space
|
||||
*[:lower:]* [:lower:] lowercase letters (all letters when
|
||||
Name Func Contents ~
|
||||
*[:alnum:]* [:alnum:] isalnum ASCII letters and digits
|
||||
*[:alpha:]* [:alpha:] isalpha ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab
|
||||
*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters
|
||||
*[:digit:]* [:digit:] decimal digits '0' to '9'
|
||||
*[:graph:]* [:graph:] isgraph ASCII printable characters excluding
|
||||
space
|
||||
*[:lower:]* [:lower:] (1) lowercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:print:]* [:print:] printable characters including space
|
||||
*[:punct:]* [:punct:] ASCII punctuation characters
|
||||
*[:space:]* [:space:] whitespace characters
|
||||
*[:upper:]* [:upper:] uppercase letters (all letters when
|
||||
*[:print:]* [:print:] (2) printable characters including space
|
||||
*[:punct:]* [:punct:] ispunct ASCII punctuation characters
|
||||
*[:space:]* [:space:] whitespace characters: space, tab, CR,
|
||||
NL, vertical tab, form feed
|
||||
*[:upper:]* [:upper:] (3) uppercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F
|
||||
*[:return:]* [:return:] the <CR> character
|
||||
*[:tab:]* [:tab:] the <Tab> character
|
||||
*[:escape:]* [:escape:] the <Esc> character
|
||||
@@ -1100,6 +1102,13 @@ x A single character, with no special meaning, matches itself
|
||||
regexp engine. See |two-engines|. In the future these items may
|
||||
work for multi-byte characters. For now, to get all "alpha"
|
||||
characters you can use: [[:lower:][:upper:]].
|
||||
|
||||
The "Func" column shows what library function is used. The
|
||||
implementation depends on the system. Otherwise:
|
||||
(1) Uses islower() for ASCII and Vim builtin rules for other
|
||||
characters when built with the |+multi_byte| feature.
|
||||
(2) Uses Vim builtin rules
|
||||
(3) As with (1) but using isupper()
|
||||
*/[[=* *[==]*
|
||||
- An equivalence class. This means that characters are matched that
|
||||
have almost the same meaning, e.g., when ignoring accents. This
|
||||
|
@@ -23,11 +23,11 @@ Commands *health-commands*
|
||||
*:checkhealth* *:CheckHealth*
|
||||
:checkhealth Run all healthchecks.
|
||||
*E5009*
|
||||
Nvim depends on the |$VIMRUNTIME| environment variable
|
||||
to find the standard "runtime files" for syntax
|
||||
highlighting, filetype-specific behavior, and standard
|
||||
plugins such as :checkhealth. If $VIMRUNTIME is invalid
|
||||
then those features will not work.
|
||||
Nvim depends on |$VIMRUNTIME| and 'runtimepath' to find
|
||||
the standard "runtime files" for syntax highlighting,
|
||||
filetype-specific behavior, and standard plugins
|
||||
(including :checkhealth). If the runtime files cannot
|
||||
be found then those features will not work.
|
||||
|
||||
:checkhealth {plugins}
|
||||
Run healthcheck(s) for one or more plugins. E.g. to run
|
||||
|
@@ -6,7 +6,7 @@
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
|
||||
Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
|
||||
The VIM LICENSE applies to the files in this package, including
|
||||
netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
|
||||
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
|
||||
@@ -17,6 +17,7 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
holder be liable for any damages resulting from the use of this
|
||||
software. Use at your own risk!
|
||||
|
||||
|
||||
*netrw*
|
||||
*dav* *ftp* *netrw-file* *rcp* *scp*
|
||||
*davs* *http* *netrw.vim* *rsync* *sftp*
|
||||
@@ -72,7 +73,7 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Improving Browsing..................................|netrw-ssh-hack|
|
||||
Listing Bookmarks And History.......................|netrw-qb|
|
||||
Making A New Directory..............................|netrw-d|
|
||||
Making The Browsing Directory The Current Directory.|netrw-cd|
|
||||
Making The Browsing Directory The Current Directory.|netrw-c|
|
||||
Marking Files.......................................|netrw-mf|
|
||||
Unmarking Files.....................................|netrw-mF|
|
||||
Marking Files By Location List......................|netrw-qL|
|
||||
@@ -82,7 +83,6 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX|
|
||||
Marked Files: Arbitrary Vim Command.................|netrw-mv|
|
||||
Marked Files: Argument List.........................|netrw-ma| |netrw-mA|
|
||||
Marked Files: Buffer List...........................|netrw-cb| |netrw-cB|
|
||||
Marked Files: Compression And Decompression.........|netrw-mz|
|
||||
Marked Files: Copying...............................|netrw-mc|
|
||||
Marked Files: Diff..................................|netrw-md|
|
||||
@@ -153,7 +153,7 @@ Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: >
|
||||
|
||||
let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE'
|
||||
<
|
||||
Netrw will substitute the host's machine name for "MACHINE" from the URL it is
|
||||
Netrw will substitute the host's machine name for "MACHINE" from the url it is
|
||||
attempting to open, and so one may specify >
|
||||
userid
|
||||
password
|
||||
@@ -210,7 +210,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
||||
http: g:netrw_http_cmd = "fetch" elseif fetch is available
|
||||
http: *g:netrw_http_put_cmd* = "curl -T"
|
||||
rcp: *g:netrw_rcp_cmd* = "rcp"
|
||||
rsync: *g:netrw_rsync_cmd* = "rsync" (see |g:netrw_rsync_sep|)
|
||||
rsync: *g:netrw_rsync_cmd* = "rsync -a"
|
||||
scp: *g:netrw_scp_cmd* = "scp -q"
|
||||
sftp: *g:netrw_sftp_cmd* = "sftp"
|
||||
file: *g:netrw_file_cmd* = "elinks" or "links"
|
||||
@@ -221,7 +221,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
||||
|
||||
elinks : "-source >"
|
||||
links : "-dump >"
|
||||
curl : "-L -o"
|
||||
curl : "-o"
|
||||
wget : "-q -O"
|
||||
fetch : "-o"
|
||||
<
|
||||
@@ -236,7 +236,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
||||
|
||||
READING *netrw-read* *netrw-nread* {{{2
|
||||
|
||||
Generally, one may just use the URL notation with a normal editing
|
||||
Generally, one may just use the url notation with a normal editing
|
||||
command, such as >
|
||||
|
||||
:e ftp://[user@]machine/path
|
||||
@@ -258,7 +258,7 @@ READING *netrw-read* *netrw-nread* {{{2
|
||||
|
||||
WRITING *netrw-write* *netrw-nwrite* {{{2
|
||||
|
||||
One may just use the URL notation with a normal file writing
|
||||
One may just use the url notation with a normal file writing
|
||||
command, such as >
|
||||
|
||||
:w ftp://[user@]machine/path
|
||||
@@ -279,7 +279,7 @@ WRITING *netrw-write* *netrw-nwrite* {{{2
|
||||
|
||||
SOURCING *netrw-source* {{{2
|
||||
|
||||
One may just use the URL notation with the normal file sourcing
|
||||
One may just use the url notation with the normal file sourcing
|
||||
command, such as >
|
||||
|
||||
:so ftp://[user@]machine/path
|
||||
@@ -477,7 +477,7 @@ file using root-relative paths, use the full path:
|
||||
==============================================================================
|
||||
4. Network-Oriented File Transfer *netrw-xfer* {{{1
|
||||
|
||||
Network-oriented file transfer under Vim is implemented by a vim script
|
||||
Network-oriented file transfer under Vim is implemented by a VimL-based script
|
||||
(<netrw.vim>) using plugin techniques. It currently supports both reading and
|
||||
writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
|
||||
dav/cadaver, rsync, or sftp.
|
||||
@@ -530,7 +530,7 @@ variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
|
||||
let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
|
||||
<
|
||||
(note: it has been reported that windows 7 with putty v0.6's "-batch" option
|
||||
doesn't work, so its best to leave it off for that system)
|
||||
doesn't work, so it's best to leave it off for that system)
|
||||
|
||||
See |netrw-p8| for more about putty, pscp, psftp, etc.
|
||||
|
||||
@@ -732,11 +732,11 @@ such as netrw.
|
||||
The usual read/write commands are supported. There are also a few
|
||||
additional commands available. Often you won't need to use Nwrite or
|
||||
Nread as shown in |netrw-transparent| (ie. simply use >
|
||||
:e URL
|
||||
:r URL
|
||||
:w URL
|
||||
:e url
|
||||
:r url
|
||||
:w url
|
||||
instead, as appropriate) -- see |netrw-urls|. In the explanations
|
||||
below, a {netfile} is a URL to a remote file.
|
||||
below, a {netfile} is an url to a remote file.
|
||||
|
||||
*:Nwrite* *:Nw*
|
||||
:[range]Nw[rite] Write the specified lines to the current
|
||||
@@ -868,9 +868,7 @@ variables listed below, and may be modified by the user.
|
||||
g:netrw_http_put_cmd var ="curl -T"
|
||||
|g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa"
|
||||
g:netrw_rcp_cmd var ="rcp"
|
||||
g:netrw_rsync_cmd var ="rsync"
|
||||
*g:netrw_rsync_sep* var ="/" used to separate the hostname
|
||||
from the file spec
|
||||
g:netrw_rsync_cmd var ="rsync -a"
|
||||
g:netrw_scp_cmd var ="scp -q"
|
||||
g:netrw_sftp_cmd var ="sftp" >
|
||||
-------------------------------------------------------------------------
|
||||
@@ -1007,7 +1005,7 @@ where [protocol] is typically scp or ftp. As an example, try: >
|
||||
vim ftp://ftp.home.vim.org/pub/vim/
|
||||
<
|
||||
For local directories, the trailing slash is not required. Again, because it's
|
||||
easy to miss: to browse remote directories, the URL must terminate with a
|
||||
easy to miss: to browse remote directories, the url must terminate with a
|
||||
slash!
|
||||
|
||||
If you'd like to avoid entering the password repeatedly for remote directory
|
||||
@@ -1077,9 +1075,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
<c-r> Browse using a gvim server |netrw-ctrl-r|
|
||||
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
|
||||
- Makes Netrw go up one directory |netrw--|
|
||||
a Cycles between normal display, |netrw-a|
|
||||
a Toggles between normal display, |netrw-a|
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
and showing (display only files which match g:netrw_list_hide)
|
||||
showing (display only files which match g:netrw_list_hide)
|
||||
c Make browsing directory the current directory |netrw-c|
|
||||
C Setting the editing window |netrw-C|
|
||||
d Make a directory |netrw-d|
|
||||
@@ -1090,7 +1088,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
gh Quick hide/unhide of dot-files |netrw-gh|
|
||||
gn Make top of tree the directory below the cursor |netrw-gn|
|
||||
i Cycle between thin, long, wide, and tree listings |netrw-i|
|
||||
I Toggle the displaying of the banner |netrw-I|
|
||||
mb Bookmark current directory |netrw-mb|
|
||||
mc Copy marked files to marked-file target directory |netrw-mc|
|
||||
md Apply diff to marked files (up to 3) |netrw-md|
|
||||
@@ -1170,7 +1167,7 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
|
||||
|
||||
BANNER DISPLAY *netrw-I*
|
||||
|
||||
One may toggle the displaying of the banner by pressing "I".
|
||||
One may toggle the banner display on and off by pressing "I".
|
||||
|
||||
Also See: |g:netrw_banner|
|
||||
|
||||
@@ -1182,14 +1179,13 @@ One may easily "bookmark" the currently browsed directory by using >
|
||||
mb
|
||||
<
|
||||
*.netrwbook*
|
||||
Bookmarks are retained in between sessions of vim in a file called .netrwbook
|
||||
as a |List|, which is typically stored in the first directory on the user's
|
||||
'|runtimepath|'; entries are kept in sorted order.
|
||||
Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
|
||||
kept in sorted order.
|
||||
|
||||
If there are marked files and/or directories, mb will add them to the bookmark
|
||||
list.
|
||||
|
||||
*netrw-:NetrwMB*
|
||||
*netrw-:NetrwMB*
|
||||
Addtionally, one may use :NetrwMB to bookmark files or directories. >
|
||||
|
||||
:NetrwMB[!] [files/directories]
|
||||
@@ -1208,7 +1204,7 @@ The :NetrwMB command is available outside of netrw buffers (once netrw has been
|
||||
invoked in the session).
|
||||
|
||||
The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By
|
||||
default, its stored on the first directory on the user's |'runtimepath'|.
|
||||
default, it's stored on the first directory on the user's |'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
|netrw-gb| how to return (go) to a bookmark
|
||||
@@ -1420,20 +1416,20 @@ Related Topics:
|
||||
|
||||
CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
|
||||
|
||||
Every time you change to a new directory (new for the current session), netrw
|
||||
will save the directory in a recently-visited directory history list (unless
|
||||
|g:netrw_dirhistmax| is zero; by default, it holds ten entries). With the "u"
|
||||
map, one can change to an earlier directory (predecessor). To do the
|
||||
opposite, see |netrw-U|.
|
||||
Every time you change to a new directory (new for the current session),
|
||||
netrw will save the directory in a recently-visited directory history
|
||||
list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
|
||||
"u" map, one can change to an earlier directory (predecessor). To do
|
||||
the opposite, see |netrw-U|.
|
||||
|
||||
The "u" map also accepts counts to go back in the history several slots. For
|
||||
your convenience, qb (see |netrw-qb|) lists the history number which may be
|
||||
used in that count.
|
||||
The "u" map also accepts counts to go back in the history several slots.
|
||||
For your convenience, qb (see |netrw-qb|) lists the history number which may
|
||||
be used in that count.
|
||||
|
||||
*.netrwhist*
|
||||
See |g:netrw_dirhistmax| for how to control the quantity of history stack
|
||||
slots. The file ".netrwhist" holds history when netrw (and vim) is not
|
||||
active. By default, its stored on the first directory on the user's
|
||||
active. By default, it's stored on the first directory on the user's
|
||||
|'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
@@ -1469,10 +1465,10 @@ changing the top of the tree listing.
|
||||
|
||||
NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2
|
||||
|
||||
With :NetrwClean one may easily remove netrw from one's home directory;
|
||||
With NetrwClean one may easily remove netrw from one's home directory;
|
||||
more precisely, from the first directory on your |'runtimepath'|.
|
||||
|
||||
With :NetrwClean!, netrw will attempt to remove netrw from all directories on
|
||||
With NetrwClean!, netrw will attempt to remove netrw from all directories on
|
||||
your |'runtimepath'|. Of course, you have to have write/delete permissions
|
||||
correct to do this.
|
||||
|
||||
@@ -1504,7 +1500,7 @@ Netrw determines which special handler by the following method:
|
||||
If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be
|
||||
used instead (see |netrw_filehandler|).
|
||||
|
||||
* for Windows 32 or 64, the URL and FileProtocolHandler dlls are used.
|
||||
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
|
||||
* for Gnome (with gnome-open): gnome-open is used.
|
||||
* for KDE (with kfmclient) : kfmclient is used
|
||||
* for Mac OS X : open is used.
|
||||
@@ -1520,10 +1516,9 @@ will apply a special handler to it (like "x" works when in a netrw buffer).
|
||||
One may also use visual mode (see |visual-start|) to select the text that the
|
||||
special handler will use. Normally gx uses expand("<cfile>") to pick up the
|
||||
text under the cursor; one may change what |expand()| uses via the
|
||||
|g:netrw_gx| variable (options include "<cword>", "<cWORD>"). Note that
|
||||
expand("<cfile>") depends on the |'isfname'| setting. Alternatively, one may
|
||||
select the text to be used by gx by making a visual selection (see
|
||||
|visual-block|) and then pressing gx.
|
||||
|g:netrw_gx| variable. Alternatively, one may select the text to be used by
|
||||
gx via first making a visual selection (see |visual-block|) or by changing
|
||||
the |'isfname'| option (which is global, so netrw doesn't modify it).
|
||||
|
||||
Associated setting variables:
|
||||
|g:netrw_gx| control how gx picks up the text under the cursor
|
||||
@@ -1615,11 +1610,6 @@ A further approach is to delete files which match a pattern.
|
||||
This will cause the matching files to be marked. Then,
|
||||
press "D".
|
||||
|
||||
If your vim has 7.4 with patch#1107, then |g:netrw_localrmdir| no longer
|
||||
is used to remove directories; instead, vim's |delete()| is used with
|
||||
the "d" option. Please note that only empty directories may be deleted
|
||||
with the "D" mapping. Regular files are deleted with |delete()|, too.
|
||||
|
||||
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
|
||||
used to control the attempts to remove remote files and directories. The
|
||||
g:netrw_rm_cmd is used with files, and its default value is:
|
||||
@@ -1683,18 +1673,17 @@ DIRECTORY EXPLORATION COMMANDS {{{2
|
||||
The [N] specifies a |g:netrw_winsize| just for the new :Lexplore
|
||||
window.
|
||||
|
||||
Those who like this method often also like tree style displays;
|
||||
Those who like this method often also often like tree style displays;
|
||||
see |g:netrw_liststyle|.
|
||||
|
||||
:[N]Lexplore! [dir] is similar to :Lexplore, except that the full-height
|
||||
Explorer window will open on the right hand side and an
|
||||
uninitialized |g:netrw_chgwin| will be set to 1 (eg. edits will
|
||||
preferentially occur in the leftmost window).
|
||||
|
||||
Also see: |netrw-C| |g:netrw_browse_split| |g:netrw_wiw|
|
||||
|netrw-p| |netrw-P| |g:netrw_chgwin|
|
||||
|netrw-c-tab| |g:netrw_winsize|
|
||||
|
||||
:[N]Lexplore! is like :Lexplore, except that the full-height Explorer window
|
||||
will open on the right hand side and an uninitialized |g:netrw_chgwin|
|
||||
will be set to 1.
|
||||
|
||||
*netrw-:Sexplore*
|
||||
:[N]Sexplore will always split the window before invoking the local-directory
|
||||
browser. As with Explore, the splitting is normally done
|
||||
@@ -1856,11 +1845,9 @@ EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* {{{2
|
||||
|
||||
Pressing X while the cursor is atop an executable file will yield a prompt
|
||||
using the filename asking for any arguments. Upon pressing a [return], netrw
|
||||
will then call |system()| with that command and arguments. The result will be
|
||||
displayed by |:echomsg|, and so |:messages| will repeat display of the result.
|
||||
Ansi escape sequences will be stripped out.
|
||||
|
||||
See |cmdline-window| for directions for more on how to edit the arguments.
|
||||
will then call |system()| with that command and arguments. The result will
|
||||
be displayed by |:echomsg|, and so |:messages| will repeat display of the
|
||||
result. Ansi escape sequences will be stripped out.
|
||||
|
||||
|
||||
FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
|
||||
@@ -2083,7 +2070,7 @@ Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd|
|
||||
|g:netrw_remote_mkdir| |netrw-%|
|
||||
|
||||
|
||||
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-cd* {{{2
|
||||
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
|
||||
|
||||
By default, |g:netrw_keepdir| is 1. This setting means that the current
|
||||
directory will not track the browsing directory. (done for backwards
|
||||
@@ -2098,9 +2085,6 @@ the two directories the same, use the "c" map (just type c). That map will
|
||||
set Vim's notion of the current directory to netrw's current browsing
|
||||
directory.
|
||||
|
||||
*netrw-c* : This map's name has been changed from "c" to cd (see |netrw-cd|).
|
||||
This change was done to allow for |netrw-cb| and |netrw-cB| maps.
|
||||
|
||||
Associated setting variable: |g:netrw_keepdir|
|
||||
|
||||
MARKING FILES *netrw-:MF* *netrw-mf* {{{2
|
||||
@@ -2145,7 +2129,6 @@ The following netrw maps make use of marked files:
|
||||
|netrw-mg| Apply vimgrep to marked files
|
||||
|netrw-mm| Move marked files to target
|
||||
|netrw-mp| Print marked files
|
||||
|netrw-ms| Netrw will source marked files
|
||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||
|netrw-mT| Generate tags using marked files
|
||||
|netrw-mv| Apply vim command to marked files
|
||||
@@ -2220,9 +2203,6 @@ converts "*" into ".*" (see |regexp|) and marks files based on that. In the
|
||||
future I may make it possible to use |regexp|s instead of glob()-style
|
||||
expressions (yet-another-option).
|
||||
|
||||
See |cmdline-window| for directions on more on how to edit the regular
|
||||
expression.
|
||||
|
||||
|
||||
MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
@@ -2236,9 +2216,8 @@ the local marked file list, individually:
|
||||
* run vim command
|
||||
* sil! keepalt wq!
|
||||
|
||||
A prompt, "Enter vim command: ", will be issued to elicit the vim command you
|
||||
wish used. See |cmdline-window| for directions for more on how to edit the
|
||||
command.
|
||||
A prompt, "Enter vim command: ", will be issued to elicit the vim command
|
||||
you wish used.
|
||||
|
||||
|
||||
MARKED FILES, ARBITRARY SHELL COMMAND *netrw-mx* {{{2
|
||||
@@ -2289,17 +2268,7 @@ MARKED FILES: ARGUMENT LIST *netrw-ma* *netrw-mA*
|
||||
Using ma, one moves filenames from the marked file list to the argument list.
|
||||
Using mA, one moves filenames from the argument list to the marked file list.
|
||||
|
||||
See Also: |netrw-cb| |netrw-cB| |netrw-qF| |argument-list| |:args|
|
||||
|
||||
|
||||
MARKED FILES: BUFFER LIST *netrw-cb* *netrw-cB*
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the global marked-file list)
|
||||
|
||||
Using cb, one moves filenames from the marked file list to the buffer list.
|
||||
Using cB, one copies filenames from the buffer list to the marked file list.
|
||||
|
||||
See Also: |netrw-ma| |netrw-mA| |netrw-qF| |buffer-list| |:buffers|
|
||||
See Also: |netrw-qF| |argument-list| |:args|
|
||||
|
||||
|
||||
MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
|
||||
@@ -2335,8 +2304,8 @@ One may also copy directories and their contents (local only) to a target
|
||||
directory.
|
||||
|
||||
Associated setting variables:
|
||||
|g:netrw_localcopycmd| |g:netrw_localcopycmdopt|
|
||||
|g:netrw_localcopydircmd| |g:netrw_localcopydircmdopt|
|
||||
|g:netrw_localcopycmd|
|
||||
|g:netrw_localcopydircmd|
|
||||
|g:netrw_ssh_cmd|
|
||||
|
||||
MARKED FILES: DIFF *netrw-md* {{{2
|
||||
@@ -2481,8 +2450,8 @@ When a remote set of files are tagged, the resulting tags file is "obtained";
|
||||
ie. a copy is transferred to the local system's directory. The now local tags
|
||||
file is then modified so that one may use it through the network. The
|
||||
modification made concerns the names of the files in the tags; each filename is
|
||||
preceded by the netrw-compatible URL used to obtain it. When one subsequently
|
||||
uses one of the go to tag actions (|tags|), the URL will be used by netrw to
|
||||
preceded by the netrw-compatible url used to obtain it. When one subsequently
|
||||
uses one of the go to tag actions (|tags|), the url will be used by netrw to
|
||||
edit the desired file and go to the tag.
|
||||
|
||||
Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
|
||||
@@ -2584,8 +2553,8 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
editing. It will also use the specified tab
|
||||
and window numbers to perform editing
|
||||
(see |clientserver|, |netrw-ctrl-r|)
|
||||
This option does not affect the production of
|
||||
|:Lexplore| windows.
|
||||
This option does not affect |:Lexplore|
|
||||
windows.
|
||||
|
||||
Related topics:
|
||||
|g:netrw_alto| |g:netrw_altv|
|
||||
@@ -2744,7 +2713,6 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
*g:netrw_home* The home directory for where bookmarks and
|
||||
history are saved (as .netrwbook and
|
||||
.netrwhist).
|
||||
Netrw uses |expand()|on the string.
|
||||
default: the first directory on the
|
||||
|'runtimepath'|
|
||||
|
||||
@@ -2792,51 +2760,25 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
default: ""
|
||||
|
||||
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
="copy" Windows
|
||||
Copies marked files (|netrw-mf|) to target
|
||||
directory (|netrw-mt|, |netrw-mc|)
|
||||
|
||||
*g:netrw_localcopycmdopt* ='' Linux/Unix/MacOS/Cygwin
|
||||
=' \c copy' Windows
|
||||
Options for the |g:netrw_localcopycmd|
|
||||
|
||||
*g:netrw_localcopydircmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
*g:netrw_localcopydircmd* ="cp -R" Linux/Unix/MacOS/Cygwin
|
||||
="xcopy /e /c /h/ /i /k" Windows
|
||||
Copies directories to target directory.
|
||||
(|netrw-mc|, |netrw-mt|)
|
||||
|
||||
*g:netrw_localcopydircmdopt* =" -R" Linux/Unix/MacOS/Cygwin
|
||||
=" /c xcopy /e /c /h/ /i /k" Windows
|
||||
Options for |g:netrw_localcopydircmd|
|
||||
|
||||
*g:netrw_localmkdir* ="mkdir" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
command for making a local directory
|
||||
|
||||
*g:netrw_localmkdiropt* ="" Linux/Unix/MacOS/Cygwin
|
||||
=" /c mkdir" Windows
|
||||
Options for |g:netrw_localmkdir|
|
||||
*g:netrw_localmkdir* command for making a local directory
|
||||
default: "mkdir"
|
||||
|
||||
*g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
="move" Windows
|
||||
Moves marked files (|netrw-mf|) to target
|
||||
directory (|netrw-mt|, |netrw-mm|)
|
||||
|
||||
*g:netrw_localmovecmdopt* ="" Linux/Unix/MacOS/Cygwin
|
||||
=" /c move" Windows
|
||||
Options for |g:netrw_localmovecmd|
|
||||
|
||||
*g:netrw_localrmdir* ="rmdir" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
Remove directory command (rmdir)
|
||||
This variable is only used if your vim is
|
||||
earlier than 7.4 or if your vim doesn't
|
||||
have patch#1107. Otherwise, |delete()|
|
||||
is used with the "d" option.
|
||||
|
||||
*g:netrw_localrmdiropt* ="" Linux/Unix/MacOS/Cygwin
|
||||
=" /c rmdir" Windows
|
||||
Options for |g:netrw_localrmdir|
|
||||
*g:netrw_localrmdir* remove directory command (rmdir)
|
||||
default: "rmdir"
|
||||
|
||||
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
|
||||
listings fit on 80 column displays.
|
||||
@@ -2949,23 +2891,17 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
netrwTilde : *
|
||||
netrwTmp : tmp* *tmp
|
||||
|
||||
In addition, those groups mentioned in
|
||||
|'suffixes'| are also added to the special
|
||||
file highlighting group.
|
||||
These syntax highlighting groups are linked
|
||||
to netrwGray or Folded by default
|
||||
(see |hl-Folded|), but one may put lines like >
|
||||
to Folded or DiffChange by default
|
||||
(see |hl-Folded| and |hl-DiffChange|), but
|
||||
one may put lines like >
|
||||
hi link netrwCompress Visual
|
||||
< into one's <.vimrc> to use one's own
|
||||
preferences. Alternatively, one may
|
||||
put such specifications into >
|
||||
put such specifications into
|
||||
.vim/after/syntax/netrw.vim.
|
||||
< The netrwGray highlighting is set up by
|
||||
netrw when >
|
||||
* netrwGray has not been previously
|
||||
defined
|
||||
* the gui is running
|
||||
< As an example, I myself use a dark-background
|
||||
|
||||
As an example, I myself use a dark-background
|
||||
colorscheme with the following in
|
||||
.vim/after/syntax/netrw.vim: >
|
||||
|
||||
@@ -3200,8 +3136,8 @@ If there are no marked files: (see |netrw-mf|)
|
||||
|
||||
Renaming files and directories involves moving the cursor to the
|
||||
file/directory to be moved (renamed) and pressing "R". You will then be
|
||||
queried for what you want the file/directory to be renamed to. You may
|
||||
select a range of lines with the "V" command (visual selection), and then
|
||||
queried for what you want the file/directory to be renamed to You may select
|
||||
a range of lines with the "V" command (visual selection), and then
|
||||
press "R"; you will be queried for each file as to what you want it
|
||||
renamed to.
|
||||
|
||||
@@ -3233,20 +3169,16 @@ If there are marked files: (see |netrw-mf|)
|
||||
|
||||
Note that moving files is a dangerous operation; copies are safer. That's
|
||||
because a "move" for remote files is actually a copy + delete -- and if
|
||||
the copy fails and the delete succeeds you may lose the file.
|
||||
the copy fails and the delete does not, you may lose the file.
|
||||
Use at your own risk.
|
||||
|
||||
The *g:netrw_rename_cmd* variable is used to implement remote renaming. By
|
||||
default its value is: >
|
||||
The g:netrw_rename_cmd variable is used to implement remote renaming. By
|
||||
default its value is:
|
||||
|
||||
ssh HOSTNAME mv
|
||||
<
|
||||
One may rename a block of files and directories by selecting them with
|
||||
V (|linewise-visual|) when using thin style.
|
||||
|
||||
See |cmdline-editing| for more on how to edit the command line; in particular,
|
||||
you'll find <ctrl-f> (initiates cmdline window editing) and <ctrl-c> (uses the
|
||||
command line under the cursor) useful in conjunction with the R command.
|
||||
One may rename a block of files and directories by selecting them with
|
||||
V (|linewise-visual|) when using thin style
|
||||
|
||||
|
||||
SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
|
||||
@@ -3267,8 +3199,8 @@ number. Subsequent selection of a file to edit (|netrw-cr|) will use that
|
||||
window.
|
||||
|
||||
* C : by itself, will select the current window holding a netrw buffer
|
||||
for subsequent editing via |netrw-cr|. The C mapping is only available
|
||||
while in netrw buffers.
|
||||
for editing via |netrw-cr|. The C mapping is only available while in
|
||||
netrw buffers.
|
||||
|
||||
* [count]C : the count will be used as the window number to be used
|
||||
for subsequent editing via |netrw-cr|.
|
||||
@@ -3281,7 +3213,7 @@ window.
|
||||
Using >
|
||||
let g:netrw_chgwin= -1
|
||||
will restore the default editing behavior
|
||||
(ie. subsequent editing will use the current window).
|
||||
(ie. editing will use the current window).
|
||||
|
||||
Related topics: |netrw-cr| |g:netrw_browse_split|
|
||||
Associated setting variables: |g:netrw_chgwin|
|
||||
@@ -3302,9 +3234,9 @@ only if your terminal supports differentiating <c-tab> from a plain
|
||||
|
||||
* Else bring up a |:Lexplore| window
|
||||
|
||||
If |g:netrw_usetab| exists and is zero, or if there is a pre-existing mapping
|
||||
If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping
|
||||
for <c-tab>, then the <c-tab> will not be mapped. One may map something other
|
||||
than a <c-tab>, too: (but you'll still need to have had |g:netrw_usetab| set). >
|
||||
than a <c-tab>, too: (but you'll still need to have had g:netrw_usetab set) >
|
||||
|
||||
nmap <unique> (whatever) <Plug>NetrwShrink
|
||||
<
|
||||
@@ -3337,10 +3269,9 @@ The user function is passed one argument; it resembles >
|
||||
|
||||
fun! ExampleUserMapFunc(islocal)
|
||||
<
|
||||
where a:islocal is 1 if its a local-directory system call or 0 when
|
||||
where a:islocal is 1 if it's a local-directory system call or 0 when
|
||||
remote-directory system call.
|
||||
|
||||
*netrw-call* *netrw-expose* *netrw-modify*
|
||||
Use netrw#Expose("varname") to access netrw-internal (script-local)
|
||||
variables.
|
||||
Use netrw#Modify("varname",newvalue) to change netrw-internal variables.
|
||||
@@ -3662,7 +3593,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
|
||||
*netrw-p16*
|
||||
P16. When editing remote files (ex. :e ftp://hostname/path/file),
|
||||
under Windows I get an |E303| message complaining that its unable
|
||||
under Windows I get an |E303| message complaining that it's unable
|
||||
to open a swap file.
|
||||
|
||||
(romainl) It looks like you are starting Vim from a protected
|
||||
@@ -3716,7 +3647,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
P21. I've made a directory (or file) with an accented character, but
|
||||
netrw isn't letting me enter that directory/read that file:
|
||||
|
||||
Its likely that the shell or o/s is using a different encoding
|
||||
It's likely that the shell or o/s is using a different encoding
|
||||
than you have vim (netrw) using. A patch to vim supporting
|
||||
"systemencoding" may address this issue in the future; for
|
||||
now, just have netrw use the proper encoding. For example: >
|
||||
@@ -3832,102 +3763,6 @@ netrw:
|
||||
==============================================================================
|
||||
12. History *netrw-history* {{{1
|
||||
|
||||
v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors
|
||||
with a patch; these are now fixed.
|
||||
Oct 26, 2016 * I started using mate-terminal and found that
|
||||
x and gx (|netrw-x| and |netrw-gx|) were no
|
||||
longer working. Fixed (using atril when
|
||||
$DESKTOP_SESSION is "mate").
|
||||
Nov 04, 2016 * (Martin Vuille) pointed out that @+ was
|
||||
being restored with keepregstar rather than
|
||||
keepregplus.
|
||||
Nov 09, 2016 * Broke apart the command from the options,
|
||||
mostly for Windows. Introduced new netrw
|
||||
settings: |g:netrw_localcopycmdopt|
|
||||
|g:netrw_localcopydircmdopt| |g:netrw_localmkdiropt|
|
||||
|g:netrw_localmovecmdopt| |g:netrw_localrmdiropt|
|
||||
Nov 21, 2016 * (mattn) provided a patch for preview; swapped
|
||||
winwidth() with winheight()
|
||||
Nov 22, 2016 * (glacambre) reported that files containing
|
||||
spaces weren't being obtained properly via
|
||||
scp. Fix: apparently using single quotes
|
||||
such as with 'file name' wasn't enough; the
|
||||
spaces inside the quotes also had to be
|
||||
escaped (ie. 'file\ name').
|
||||
* Also fixed obtain (|netrw-O|) to be able to
|
||||
obtain files with spaces in their names
|
||||
Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|)
|
||||
when atop "Hiding" in the banner also caused
|
||||
the active-banner hiding control to occur
|
||||
Jan 03, 2017 * (Enno Nagel) reported that attempting to
|
||||
apply netrw to a directory that was without
|
||||
read permission caused a syntax error.
|
||||
Jan 13, 2017 * (Ingo Karkat) provided a patch which makes
|
||||
using netrw#Call() better. Now returns
|
||||
value of internal routines return, for example.
|
||||
Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to
|
||||
use |:edit| instead of |:read|. I also
|
||||
changed the routine name to netrw#FileUrlEdit.
|
||||
Jan 16, 2017 * (Sayem) reported a problem where :Lexplore
|
||||
could generate a new listing buffer and
|
||||
window instead of toggling the netrw display.
|
||||
Unfortunately, the directions for eliciting
|
||||
the problem weren't complete, so I may or
|
||||
may not have fixed that issue.
|
||||
Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd".
|
||||
(see |netrw-cb|, |netrw-cB|, and |netrw-cd|)
|
||||
Mar 21, 2017 * previously, netrw would specify (safe) settings
|
||||
even when the setting was already safe for
|
||||
netrw. Netrw now attempts to leave such
|
||||
already-netrw-safe settings alone.
|
||||
(affects s:NetrwOptionRestore() and
|
||||
s:NetrwSafeOptions(); also introduced
|
||||
s:NetrwRestoreSetting())
|
||||
Jun 26, 2017 * (Christian Brabandt) provided a patch to
|
||||
allow curl to follow redirects (ie. -L
|
||||
option)
|
||||
Jun 26, 2017 * (Callum Howard) reported a problem with
|
||||
:Lexpore not removing the Lexplore window
|
||||
after a change-directory
|
||||
Aug 30, 2017 * (Ingo Karkat) one cannot switch to the
|
||||
previously edited file (e.g. with CTRL-^)
|
||||
after editing a file:// URL. Patch to
|
||||
have a "keepalt" included.
|
||||
Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|)
|
||||
did not work on directories in the current
|
||||
tree
|
||||
v157: Apr 20, 2016 * (Nicola) had set up a "nmap <expr> ..." with
|
||||
a function that returned a 0 while silently
|
||||
invoking a shell command. The shell command
|
||||
activated a ShellCmdPost event which in turn
|
||||
called s:LocalBrowseRefresh(). That looks
|
||||
over all netrw buffers for changes needing
|
||||
refreshes. However, inside a |:map-<expr>|,
|
||||
tab and window changes are disallowed. Fixed.
|
||||
(affects netrw's s:LocalBrowseRefresh())
|
||||
* |g:netrw_localrmdir| not used any more, but
|
||||
the relevant patch that causes |delete()| to
|
||||
take over was #1107 (not #1109).
|
||||
* |expand()| is now used on |g:netrw_home|;
|
||||
consequently, g:netrw_home may now use
|
||||
environment variables
|
||||
* s:NetrwLeftmouse and s:NetrwCLeftmouse will
|
||||
return without doing anything if invoked
|
||||
when inside a non-netrw window
|
||||
Jun 15, 2016 * gx now calls netrw#GX() which returns
|
||||
the word under the cursor. The new
|
||||
wrinkle: if one is in a netrw buffer,
|
||||
then netrw's s:NetrwGetWord().
|
||||
Jun 22, 2016 * Netrw was executing all its associated
|
||||
Filetype commands silently; I'm going
|
||||
to try doing that "noisily" and see if
|
||||
folks have a problem with that.
|
||||
Aug 12, 2016 * Changed order of tool selection for
|
||||
handling http://... viewing.
|
||||
(Nikolay Aleksandrovich Pavlov)
|
||||
Aug 21, 2016 * Included hiding/showing/all for tree
|
||||
listings
|
||||
* Fixed refresh (^L) for tree listings
|
||||
v156: Feb 18, 2016 * Changed =~ to =~# where appropriate
|
||||
Feb 23, 2016 * s:ComposePath(base,subdir) now uses
|
||||
fnameescape() on the base portion
|
||||
@@ -3959,9 +3794,9 @@ netrw:
|
||||
tell me how they're useful and should be
|
||||
retained?
|
||||
Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support
|
||||
Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the
|
||||
Nov 20, 2015 * gx (|netrw-gx|) on an url downloaded the
|
||||
file in addition to simply bringing up the
|
||||
URL in a browser. Fixed.
|
||||
url in a browser. Fixed.
|
||||
Nov 23, 2015 * Added |g:netrw_sizestyle| support
|
||||
Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw
|
||||
maps.
|
||||
|
@@ -13,40 +13,36 @@ Nvim delegates some features to dynamic "providers".
|
||||
==============================================================================
|
||||
Python integration *provider-python*
|
||||
|
||||
Nvim supports the Vim legacy |python-vim| and |python3| interfaces via
|
||||
external Python interpreters connected via |RPC|.
|
||||
Nvim supports Python |remote-plugin|s and the Vim legacy |python-vim| and
|
||||
|python3| interfaces (which are implemented as remote-plugins).
|
||||
Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
|
||||
|
||||
PYTHON QUICKSTART ~
|
||||
|
||||
If you used a package manager to install Nvim, you might already have the
|
||||
required `neovim` Python package. Run |:checkhealth| to see if your system is
|
||||
up-to-date.
|
||||
required "neovim" Python package. Run |:checkhealth| to verify.
|
||||
|
||||
Following are steps to install the package with Python's `pip` tool.
|
||||
To install the package with "pip":
|
||||
|
||||
Note: Depending on your system, `pip` might refer to Python 2 or Python 3,
|
||||
which is why the following instructions mention `pip2` or `pip3`
|
||||
explicitly. If one of these is not available, try `pip`.
|
||||
|
||||
To use Vim Python 2/3 plugins with Nvim:
|
||||
|
||||
- For Python 2 plugins, make sure an interpreter for Python 2.6 or 2.7 is
|
||||
available in your `$PATH`, then install the `neovim` Python package systemwide: >
|
||||
$ sudo pip2 install --upgrade neovim
|
||||
- For Python 2 plugins, make sure Python 2.7 is available in your $PATH, then
|
||||
install the "neovim" Python package systemwide: >
|
||||
sudo pip2 install --upgrade neovim
|
||||
<
|
||||
or for the current user: >
|
||||
$ pip2 install --user --upgrade neovim
|
||||
pip2 install --user --upgrade neovim
|
||||
<
|
||||
- For Python 3 plugins, make sure an interpreter for Python 3.3 or above is
|
||||
available in your `$PATH`, then install the `neovim` Python package systemwide: >
|
||||
$ sudo pip3 install --upgrade neovim
|
||||
- For Python 3 plugins, make sure Python 3.4+ is available in your $PATH, then
|
||||
install the "neovim" Python package systemwide: >
|
||||
sudo pip3 install --upgrade neovim
|
||||
<
|
||||
or for the current user: >
|
||||
$ pip3 install --user --upgrade neovim
|
||||
pip3 install --user --upgrade neovim
|
||||
<
|
||||
Note: "pip" may refer to Python 2 or Python 3, so the steps above mention
|
||||
"pip2" and "pip3" explicitly. If one is missing, try "pip".
|
||||
|
||||
Note: The `--upgrade` flag ensures you have the latest version even if
|
||||
a previous version was already installed.
|
||||
a previous version was already installed.
|
||||
|
||||
PYTHON PROVIDER CONFIGURATION ~
|
||||
*g:python_host_prog*
|
||||
@@ -85,15 +81,15 @@ https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
|
||||
==============================================================================
|
||||
Ruby integration *provider-ruby*
|
||||
|
||||
Nvim supports the Vim legacy |ruby-vim| interface via external Ruby
|
||||
interpreters connected via |RPC|.
|
||||
Nvim supports Ruby |remote-plugin|s and the Vim legacy |ruby-vim| interface
|
||||
(which is itself implemented as a Nvim remote-plugin).
|
||||
|
||||
Run |:checkhealth| to see if your system is up-to-date.
|
||||
|
||||
RUBY QUICKSTART ~
|
||||
|
||||
To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: >
|
||||
$ gem install neovim
|
||||
To use Ruby plugins with Nvim, install the latest "neovim" RubyGem: >
|
||||
gem install neovim
|
||||
|
||||
RUBY PROVIDER CONFIGURATION ~
|
||||
*g:loaded_ruby_provider*
|
||||
@@ -101,9 +97,9 @@ To disable Ruby support: >
|
||||
let g:loaded_ruby_provider = 1
|
||||
<
|
||||
*g:ruby_host_prog*
|
||||
Command to start the Ruby host. By default this is `neovim-ruby-host`. For users
|
||||
who use per-project Ruby versions with tools like RVM or rbenv, setting this can
|
||||
prevent the need to install the `neovim` gem in every project.
|
||||
Command to start the Ruby host. By default this is "neovim-ruby-host". With
|
||||
project-local Ruby versions (via tools like RVM or rbenv) setting this can
|
||||
avoid the need to install the "neovim" gem in every project.
|
||||
|
||||
To use an absolute path (e.g. to an rbenv installation): >
|
||||
let g:ruby_host_prog = '~/.rbenv/versions/2.4.1/bin/neovim-ruby-host'
|
||||
@@ -112,7 +108,31 @@ To use an absolute path (e.g. to an rbenv installation): >
|
||||
To use the RVM "system" Ruby installation: >
|
||||
let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
|
||||
<
|
||||
==============================================================================
|
||||
Node.js integration *provider-nodejs*
|
||||
|
||||
Nvim supports Node.js |remote-plugin|s.
|
||||
https://github.com/neovim/node-client/
|
||||
|
||||
NODEJS QUICKSTART~
|
||||
|
||||
To use javascript remote-plugins with Nvim, install the "neovim" npm package: >
|
||||
npm install -g neovim
|
||||
|
||||
Run |:checkhealth| to see if your system is up-to-date.
|
||||
|
||||
NODEJS PROVIDER CONFIGURATION~
|
||||
*g:loaded_node_provider*
|
||||
To disable Node.js support: >
|
||||
:let g:loaded_node_provider = 1
|
||||
<
|
||||
*g:node_host_prog*
|
||||
Command to start the Node.js host. Setting this makes startup faster.
|
||||
|
||||
By default, Nvim searches for "neovim-node-host" using "npm root -g", which
|
||||
can be slow. To avoid this, set g:node_host_prog to an absolute path: >
|
||||
let g:node_host_prog = '/usr/local/bin/neovim-node-host'
|
||||
<
|
||||
==============================================================================
|
||||
Clipboard integration *provider-clipboard* *clipboard*
|
||||
|
||||
@@ -122,9 +142,8 @@ system clipboard or any other clipboard "backend".
|
||||
|
||||
To ALWAYS use the clipboard for ALL operations (instead of interacting with
|
||||
the '+' and/or '*' registers explicitly): >
|
||||
|
||||
set clipboard+=unnamedplus
|
||||
<
|
||||
|
||||
See 'clipboard' for details and options.
|
||||
|
||||
*clipboard-tool*
|
||||
|
@@ -165,6 +165,9 @@ processing a quickfix or location list command, it will be aborted.
|
||||
keep Vim running while compiling. If you give the
|
||||
name of the errorfile, the 'errorfile' option will
|
||||
be set to [errorfile]. See |:cc| for [!].
|
||||
If the encoding of the error file differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
*:lf* *:lfile*
|
||||
:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
|
||||
@@ -176,6 +179,9 @@ processing a quickfix or location list command, it will be aborted.
|
||||
:cg[etfile] [errorfile] *:cg* *:cgetfile*
|
||||
Read the error file. Just like ":cfile" but don't
|
||||
jump to the first error.
|
||||
If the encoding of the error file differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
|
||||
:lg[etfile] [errorfile] *:lg* *:lgetfile*
|
||||
@@ -186,6 +192,9 @@ processing a quickfix or location list command, it will be aborted.
|
||||
:caddf[ile] [errorfile] Read the error file and add the errors from the
|
||||
errorfile to the current quickfix list. If a quickfix
|
||||
list is not present, then a new list is created.
|
||||
If the encoding of the error file differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
*:laddf* *:laddfile*
|
||||
:laddf[ile] [errorfile] Same as ":caddfile", except the location list for the
|
||||
@@ -322,6 +331,7 @@ use this code: >
|
||||
endfunction
|
||||
|
||||
au QuickfixCmdPost make call QfMakeConv()
|
||||
Another option is using 'makeencoding'.
|
||||
|
||||
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
|
||||
*:cdo*
|
||||
@@ -460,7 +470,11 @@ keep its height, ignoring 'winheight' and 'equalalways'. You can change the
|
||||
height manually (e.g., by dragging the status line above it with the mouse).
|
||||
|
||||
In the quickfix window, each line is one error. The line number is equal to
|
||||
the error number. You can use ":.cc" to jump to the error under the cursor.
|
||||
the error number. The current entry is highlighted with the QuickFixLine
|
||||
highlighting. You can change it to your liking, e.g.: >
|
||||
:hi QuickFixLine ctermbg=Yellow guibg=Yellow
|
||||
|
||||
You can use ":.cc" to jump to the error under the cursor.
|
||||
Hitting the <Enter> key or double-clicking the mouse on a line has the same
|
||||
effect. The file containing the error is opened in the window above the
|
||||
quickfix window. If there already is a window for that file, it is used
|
||||
@@ -586,6 +600,9 @@ lists, use ":cnewer 99" first.
|
||||
like |:cnext| and |:cprevious|, see above.
|
||||
This command does not accept a comment, any "
|
||||
characters are considered part of the arguments.
|
||||
If the encoding of the program output differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
*:lmak* *:lmake*
|
||||
:lmak[e][!] [arguments]
|
||||
@@ -645,6 +662,7 @@ read the error messages: >
|
||||
au QuickfixCmdPost make call QfMakeConv()
|
||||
|
||||
(Example by Faque Cheng)
|
||||
Another option is using 'makeencoding'.
|
||||
|
||||
==============================================================================
|
||||
5. Using :vimgrep and :grep *grep* *lid*
|
||||
@@ -759,6 +777,9 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
|
||||
When 'grepprg' is "internal" this works like
|
||||
|:vimgrep|. Note that the pattern needs to be
|
||||
enclosed in separator characters then.
|
||||
If the encoding of the program output differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
*:lgr* *:lgrep*
|
||||
:lgr[ep][!] [arguments] Same as ":grep", except the location list for the
|
||||
@@ -783,6 +804,10 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
|
||||
\ | catch /E480:/
|
||||
\ | endtry"
|
||||
<
|
||||
If the encoding of the program output differs from the
|
||||
'encoding' option, you can use the 'makeencoding'
|
||||
option to specify the encoding.
|
||||
|
||||
*:lgrepa* *:lgrepadd*
|
||||
:lgrepa[dd][!] [arguments]
|
||||
Same as ":grepadd", except the location list for the
|
||||
|
@@ -655,7 +655,6 @@ Short explanation of each option: *option-list*
|
||||
'cscoperelative' 'csre' Use cscope.out path basename as prefix
|
||||
'cscopetag' 'cst' use cscope for tag commands
|
||||
'cscopetagorder' 'csto' determines ":cstag" search order
|
||||
'cscopeverbose' 'csverb' give messages when adding a cscope database
|
||||
'cursorbind' 'crb' move cursor in window as it moves in other windows
|
||||
'cursorcolumn' 'cuc' highlight the screen column of the cursor
|
||||
'cursorline' 'cul' highlight the screen line of the cursor
|
||||
@@ -762,15 +761,14 @@ Short explanation of each option: *option-list*
|
||||
'loadplugins' 'lpl' load plugin scripts when starting up
|
||||
'magic' changes special characters in search patterns
|
||||
'makeef' 'mef' name of the errorfile for ":make"
|
||||
'makeencoding' 'menc' encoding of external make/grep commands
|
||||
'makeprg' 'mp' program to use for the ":make" command
|
||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
||||
'matchtime' 'mat' tenths of a second to show matching paren
|
||||
'maxcombine' 'mco' maximum nr of combining characters displayed
|
||||
'maxfuncdepth' 'mfd' maximum recursive depth for user functions
|
||||
'maxmapdepth' 'mmd' maximum recursive depth for mapping
|
||||
'maxmem' 'mm' maximum memory (in Kbyte) used for one buffer
|
||||
'maxmempattern' 'mmp' maximum memory (in Kbyte) used for pattern search
|
||||
'maxmemtot' 'mmt' maximum memory (in Kbyte) used for all buffers
|
||||
'menuitems' 'mis' maximum number of items in a menu
|
||||
'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
|
||||
'modeline' 'ml' recognize modelines at start or end of file
|
||||
|
@@ -63,10 +63,8 @@ following ones in your vimrc:
|
||||
This is also very handy when editing files on floppy. Of course you will have
|
||||
to create that "tmp" directory for this to work!
|
||||
|
||||
For read-only files, a swap file is not used. Unless the file is big, causing
|
||||
the amount of memory used to be higher than given with 'maxmem' or
|
||||
'maxmemtot'. And when making a change to a read-only file, the swap file is
|
||||
created anyway.
|
||||
For read-only files, a swap file is not used right away. The swap file is
|
||||
created only when making changes.
|
||||
|
||||
The 'swapfile' option can be reset to avoid creating a swapfile. And the
|
||||
|:noswapfile| modifier can be used to not create a swapfile for a new buffer.
|
||||
|
@@ -37,7 +37,7 @@ of area is used, see |visual-repeat|.
|
||||
==============================================================================
|
||||
2. Multiple repeats *multi-repeat*
|
||||
|
||||
*:g* *:global* *E147* *E148*
|
||||
*:g* *:global* *E148*
|
||||
:[range]g[lobal]/{pattern}/[cmd]
|
||||
Execute the Ex command [cmd] (default ":p") on the
|
||||
lines within [range] where {pattern} matches.
|
||||
@@ -70,8 +70,15 @@ The default for [range] is the whole buffer (1,$). Use "CTRL-C" to interrupt
|
||||
the command. If an error message is given for a line, the command for that
|
||||
line is aborted and the global command continues with the next marked or
|
||||
unmarked line.
|
||||
*E147*
|
||||
When the command is used recursively, it only works on one line. Giving a
|
||||
range is then not allowed. This is useful to find all lines that match a
|
||||
pattern and do not match another pattern: >
|
||||
:g/found/v/notfound/{cmd}
|
||||
This first finds all lines containing "found", but only executes {cmd} when
|
||||
there is no match for "notfound".
|
||||
|
||||
To repeat a non-Ex command, you can use the ":normal" command: >
|
||||
To execute a non-Ex command, you can use the `:normal` command: >
|
||||
:g/pat/normal {commands}
|
||||
Make sure that {commands} ends with a whole command, otherwise Vim will wait
|
||||
for you to type the rest of the command for each match. The screen will not
|
||||
|
@@ -22,8 +22,7 @@ More generally, Vim is started with:
|
||||
Option arguments and file name arguments can be mixed, and any number of them
|
||||
can be given. However, watch out for options that take an argument.
|
||||
|
||||
Exactly one out of the following five items may be used to choose how to
|
||||
start editing:
|
||||
The following items may be used to choose how to start editing:
|
||||
|
||||
*-file* *---*
|
||||
filename One or more file names. The first one will be the current
|
||||
@@ -34,26 +33,25 @@ filename One or more file names. The first one will be the current
|
||||
nvim -- -filename
|
||||
< All arguments after the "--" will be interpreted as file names,
|
||||
no other options or "+command" argument can follow.
|
||||
For behavior of quotes on MS-Windows, see |win32-quotes|.
|
||||
|
||||
*--*
|
||||
- This argument can mean two things, depending on whether Ex
|
||||
mode is to be used.
|
||||
|
||||
Starting in Normal mode: >
|
||||
nvim -
|
||||
< Start editing a new buffer, which is filled with text
|
||||
that is read from stdin. The commands that would normally be
|
||||
read from stdin will now be read from stderr. Example: >
|
||||
find . -name "*.c" -print | nvim -
|
||||
- Alias for stdin (standard input).
|
||||
Example: >
|
||||
echo text | nvim - file
|
||||
< "text" is read into buffer 1, "file" is opened as buffer 2.
|
||||
In most cases (except -s, -es, |--embed|, --headless) if stdin
|
||||
is not a TTY then it is read as text, so "-" is implied: >
|
||||
echo text | nvim file
|
||||
< The buffer will be marked modified, because it contains text
|
||||
that needs to be saved. Except when in readonly mode, then
|
||||
the buffer is not marked modified. Example: >
|
||||
ls | nvim -R -
|
||||
< Starting in Ex mode: >
|
||||
nvim -e -
|
||||
nvim -E
|
||||
< Start editing in |silent-mode|.
|
||||
that needs to be saved (except for readonly |-R| mode).
|
||||
|
||||
To read stdin as Normal commands use |-s| with "-": >
|
||||
echo "ifoo" | nvim -s -
|
||||
< To read stdin as Ex commands use |-es| or |-e|: >
|
||||
echo "echo getpid()" | nvim -e - -V1
|
||||
< To open a file literally named "-", put it after "--": >
|
||||
echo foo | nvim -- -
|
||||
< To read stdin as text with |--headless| use "-".
|
||||
|
||||
*-t* *-tag*
|
||||
-t {tag} A tag. "tag" is looked up in the tags file, the associated
|
||||
@@ -104,13 +102,6 @@ argument.
|
||||
(Only available when compiled with the |+startuptime|
|
||||
feature).
|
||||
|
||||
*--literal*
|
||||
--literal Take file names literally, don't expand wildcards. Not needed
|
||||
for Unix, because Vim always takes file names literally (the
|
||||
shell expands wildcards).
|
||||
Applies to all the names, also the ones that come before this
|
||||
argument.
|
||||
|
||||
*-+*
|
||||
+[num] The cursor will be positioned on line "num" for the first
|
||||
file being edited. If "num" is missing, the cursor will be
|
||||
@@ -194,34 +185,36 @@ argument.
|
||||
delete(), rename(), mkdir(), writefile(), libcall(),
|
||||
jobstart(), etc.
|
||||
|
||||
*-e*
|
||||
-e Start Vim in Ex mode |Q|.
|
||||
-e *-e* *-E*
|
||||
-E Start Nvim in Ex mode |gQ|.
|
||||
|
||||
*-E*
|
||||
-E Start Vim in improved Ex mode |gQ|.
|
||||
If stdin is not a TTY:
|
||||
-e reads stdin as Ex commands.
|
||||
-E reads stdin as text (into buffer 1).
|
||||
|
||||
*-s-ex* *silent-mode*
|
||||
-s Silent or batch mode. Only when "-s" is preceded by the "-e"
|
||||
argument. Otherwise see |-s|, which does take an argument
|
||||
while this use of "-s" doesn't. To be used when Vim is used
|
||||
to execute Ex commands from a file instead of a terminal.
|
||||
Switches off most prompts and informative messages. Also
|
||||
warnings and error messages. The output of these commands is
|
||||
displayed (to stdout):
|
||||
*-es* *-Es*
|
||||
-es *-s-ex* *silent-mode*
|
||||
-Es Silent or batch mode: execute Ex commands from a file instead
|
||||
of a terminal. Special case of |-s| (which takes an argument
|
||||
while "-es" doesn't). Disables most prompts, messages,
|
||||
warnings and errors.
|
||||
Output of these commands is displayed (to stdout):
|
||||
:print
|
||||
:list
|
||||
:number
|
||||
:set to display option values.
|
||||
When 'verbose' is non-zero messages are printed (for
|
||||
debugging, to stderr).
|
||||
When 'verbose' is set messages are printed to stderr, e.g.: >
|
||||
echo foo | nvim -V1 -es
|
||||
<
|
||||
User |init.vim| is skipped (unless given with |-u|).
|
||||
|$TERM| is not used.
|
||||
If Vim appears to be stuck try typing "qa!<Enter>". You don't
|
||||
get a prompt thus you can't see Vim is waiting for you to type
|
||||
something.
|
||||
Initializations are skipped (except the ones given with the
|
||||
"-u" argument).
|
||||
|
||||
If stdin is not a TTY:
|
||||
-es reads stdin as Ex commands.
|
||||
-Es reads stdin as text (into buffer 1).
|
||||
|
||||
Example: >
|
||||
vim -es < thefilter thefile
|
||||
printf "put ='foo'\n%%print\n" | nvim -es
|
||||
<
|
||||
*-b*
|
||||
-b Binary mode. File I/O will only recognize <NL> to separate
|
||||
@@ -249,14 +242,14 @@ argument.
|
||||
for reading or writing a ShaDa file. Can be used to find
|
||||
out what is happening upon startup and exit.
|
||||
Example: >
|
||||
vim -V8 foobar
|
||||
nvim -V8
|
||||
|
||||
-V[N]{filename}
|
||||
Like -V and set 'verbosefile' to {filename}. The result is
|
||||
that messages are not displayed but written to the file
|
||||
{filename}. {filename} must not start with a digit.
|
||||
Like -V and set 'verbosefile' to {filename}. Messages are not
|
||||
displayed; instead they are written to the file {filename}.
|
||||
{filename} must not start with a digit.
|
||||
Example: >
|
||||
vim -V20vimlog foobar
|
||||
nvim -V20vimlog
|
||||
<
|
||||
*-D*
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
@@ -324,12 +317,15 @@ argument.
|
||||
":rsh" or ":wsh" are used. See also |shada-file|.
|
||||
|
||||
*-s*
|
||||
-s {scriptin} The script file "scriptin" is read. The characters in the
|
||||
file are interpreted as if you had typed them. The same can
|
||||
be done with the command ":source! {scriptin}". If the end
|
||||
of the file is reached before the editor exits, further
|
||||
characters are read from the keyboard. Only works when not
|
||||
started in Ex mode, see |-s-ex|. See also |complex-repeat|.
|
||||
-s {scriptin} Read script file {scriptin}, interpreting characters as
|
||||
Normal-mode input. The same can be done with ":source!": >
|
||||
:source! {scriptin}
|
||||
< Reads from stdin if {scriptin} is "-": >
|
||||
echo "ifoo" | nvim -s -
|
||||
< If the end of the file is reached before Nvim exits, further
|
||||
characters are read from the keyboard.
|
||||
|
||||
Does not work with |-es|. See also |complex-repeat|.
|
||||
|
||||
*-w_nr*
|
||||
-w {number}
|
||||
@@ -349,9 +345,34 @@ argument.
|
||||
*--api-info*
|
||||
--api-info Print msgpack-encoded |api-metadata| and exit.
|
||||
|
||||
*--embed*
|
||||
--embed Use stdin/stdout as a msgpack-RPC channel, so applications can
|
||||
embed and control Nvim via the |rpc-api|. Implies |--headless|.
|
||||
Equivalent to: >
|
||||
nvim --headless --cmd "call stdioopen({'rpc': v:true})"
|
||||
<
|
||||
See also |channel-stdio|.
|
||||
|
||||
*--headless*
|
||||
--headless Do not start the built-in UI.
|
||||
See also |silent-mode|, which does start a (limited) UI.
|
||||
--headless Do not start the default UI, so stdio can be used as an
|
||||
arbitrary communication channel. |channel-stdio|
|
||||
|
||||
Also useful for scripting (tests) to see messages that would
|
||||
not be printed by |-es|.
|
||||
|
||||
To detect if a UI is available, check if |nvim_list_uis()| is
|
||||
empty after |VimEnter|.
|
||||
|
||||
To read stdin as text, "-" must be given explicitly:
|
||||
--headless cannot assume that stdin is just text. >
|
||||
echo foo | nvim --headless +"%print" +"q!" -
|
||||
<
|
||||
See also |--embed|.
|
||||
See also |-es|, which also disables most messages.
|
||||
|
||||
--listen {addr} *--listen*
|
||||
Start |RPC| server on pipe or TCP address {addr}. Sets the
|
||||
primary listen address |v:servername| to {addr}. |serverstart()|
|
||||
|
||||
==============================================================================
|
||||
2. Initialization *initialization* *startup*
|
||||
@@ -437,15 +458,14 @@ accordingly. Vim proceeds in this order:
|
||||
:runtime! filetype.vim
|
||||
:runtime! ftplugin.vim
|
||||
:runtime! indent.vim
|
||||
< This step is skipped if ":filetype ..." was called before now or if
|
||||
the "-u NONE" command line argument was given.
|
||||
< Skipped if ":filetype … off" was called or if the "-u NONE" command
|
||||
line argument was given.
|
||||
|
||||
5. Enable syntax highlighting.
|
||||
This does the same as the command: >
|
||||
:runtime! syntax/syntax.vim
|
||||
< Note: This enables filetype detection even if ":filetype off" was
|
||||
called before now.
|
||||
This step is skipped if the "-u NONE" command line argument was given.
|
||||
< Skipped if ":syntax off" was called or if the "-u NONE" command
|
||||
line argument was given.
|
||||
|
||||
6. Load the plugin scripts. *load-plugins*
|
||||
This does the same as the command: >
|
||||
@@ -608,27 +628,15 @@ there is not enough room, you will see only part of it).
|
||||
To avoid the intro message on startup, add the 'I' flag to 'shortmess'.
|
||||
|
||||
*info-message*
|
||||
The |--help| and |--version| arguments cause Vim to print a message and then
|
||||
The |--help| and |--version| arguments cause Nvim to print a message and then
|
||||
exit. Normally the message is sent to stdout, thus can be redirected to a
|
||||
file with: >
|
||||
|
||||
vim --help >file
|
||||
nvim --help >file
|
||||
|
||||
From inside Vim: >
|
||||
From inside Nvim: >
|
||||
|
||||
:read !vim --help
|
||||
|
||||
When using gvim, it detects that it might have been started from the desktop,
|
||||
without a terminal to show messages on. This is detected when both stdout and
|
||||
stderr are not a tty. This breaks the ":read" command, as used in the example
|
||||
above. To make it work again, set 'shellredir' to ">" instead of the default
|
||||
">&": >
|
||||
|
||||
:set shellredir=>
|
||||
:read !gvim --help
|
||||
|
||||
This still won't work for systems where gvim does not use stdout at all
|
||||
though.
|
||||
:read !nvim --help
|
||||
|
||||
==============================================================================
|
||||
3. $VIM and $VIMRUNTIME
|
||||
@@ -682,25 +690,17 @@ CTRL-Z Suspend Vim, like ":stop".
|
||||
Command-line mode, the CTRL-Z is inserted as a normal
|
||||
character. In Visual mode Vim goes back to Normal
|
||||
mode.
|
||||
Note: if CTRL-Z undoes a change see |mswin.vim|.
|
||||
|
||||
|
||||
:sus[pend][!] or *:sus* *:suspend* *:st* *:stop*
|
||||
:st[op][!] Suspend Vim.
|
||||
:st[op][!] Suspend Vim. Vim will continue if you make it the
|
||||
foreground job again.
|
||||
If the '!' is not given and 'autowrite' is set, every
|
||||
buffer with changes and a file name is written out.
|
||||
If the '!' is given or 'autowrite' is not set, changed
|
||||
buffers are not written, don't forget to bring Vim
|
||||
back to the foreground later!
|
||||
|
||||
In the GUI, suspending is implemented as iconising gvim. In Windows 95/NT,
|
||||
gvim is minimized.
|
||||
|
||||
On many Unix systems, it is possible to suspend Vim with CTRL-Z. This is only
|
||||
possible in Normal and Visual mode (see next chapter, |vim-modes|). Vim will
|
||||
continue if you make it the foreground job again. On other systems, CTRL-Z
|
||||
will start a new shell. This is the same as the ":sh" command. Vim will
|
||||
continue if you exit from the shell.
|
||||
In the GUI, suspending is implementation-defined.
|
||||
|
||||
In X-windows the selection is disowned when Vim suspends. this means you
|
||||
can't paste it in another application (since Vim is going to sleep an attempt
|
||||
@@ -885,7 +885,7 @@ The output of ":mkview" contains these items:
|
||||
5. The scroll position and the cursor position in the file. Doesn't work very
|
||||
well when there are closed folds.
|
||||
6. The local current directory, if it is different from the global current
|
||||
directory.
|
||||
directory and 'viewoptions' contains "curdir".
|
||||
|
||||
Note that Views and Sessions are not perfect:
|
||||
- They don't restore everything. For example, defined functions, autocommands
|
||||
@@ -1356,7 +1356,7 @@ file when reading and include:
|
||||
complete MessagePack object.
|
||||
|
||||
==============================================================================
|
||||
9. Standard Paths
|
||||
9. Standard Paths *standard-path*
|
||||
|
||||
Nvim stores configuration and data in standard locations. Plugins are strongly
|
||||
encouraged to follow this pattern also.
|
||||
@@ -1380,14 +1380,11 @@ DATA DIRECTORY *$XDG_DATA_HOME*
|
||||
Unix: ~/.local/share ~/.local/share/nvim
|
||||
Windows: ~/AppData/Local ~/AppData/Local/nvim-data
|
||||
|
||||
STANDARD PATHS *standard-path*
|
||||
|
||||
*$NVIM_LOG_FILE*
|
||||
Besides 'debug' and 'verbose', Nvim has a low-level "log of last resort" that
|
||||
is written directly to the filesystem. This log may also be used by plugins or
|
||||
RPC clients for debugging. $NVIM_LOG_FILE contains the log file path: >
|
||||
LOG FILE *$NVIM_LOG_FILE*
|
||||
Besides 'debug' and 'verbose', Nvim keeps a general log file for internal
|
||||
debugging, plugins and RPC clients. >
|
||||
:echo $NVIM_LOG_FILE
|
||||
Usually the file is ~/.local/share/nvim/log unless that path is inaccessible
|
||||
or if $NVIM_LOG_FILE was set before |startup|.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:noet:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -1727,7 +1727,7 @@ Functions and variable names are the same color by default, because VIM
|
||||
doesn't specify different colors for Functions and Identifiers. To change
|
||||
this (which is recommended if you want function names to be recognizable in a
|
||||
different color) you need to add the following line to your vimrc: >
|
||||
:hi Function term=underline cterm=bold ctermfg=LightGray
|
||||
:hi Function cterm=bold ctermfg=LightGray
|
||||
|
||||
Of course, the ctermfg can be a different color if you choose.
|
||||
|
||||
@@ -2183,9 +2183,8 @@ with the correct typesetting of your file, is to define an eye-catching
|
||||
highlighting definition for the syntax groups "nroffDefinition" and
|
||||
"nroffDefSpecial" in your configuration files. For example: >
|
||||
|
||||
hi def nroffDefinition term=italic cterm=italic gui=reverse
|
||||
hi def nroffDefSpecial term=italic,bold cterm=italic,bold
|
||||
\ gui=reverse,bold
|
||||
hi def nroffDefinition cterm=italic gui=reverse
|
||||
hi def nroffDefSpecial cterm=italic,bold gui=reverse,bold
|
||||
|
||||
If you want to navigate preprocessor entries in your source file as easily as
|
||||
with section markers, you can activate the following option in your vimrc
|
||||
@@ -4628,37 +4627,36 @@ a file with ":highlight" commands such as this: >
|
||||
Note that all settings that are not included remain the same, only the
|
||||
specified field is used, and settings are merged with previous ones. So, the
|
||||
result is like this single command has been used: >
|
||||
:hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold
|
||||
:hi Comment ctermfg=Cyan guifg=#80a0ff gui=bold
|
||||
<
|
||||
*:highlight-verbose*
|
||||
When listing a highlight group and 'verbose' is non-zero, the listing will
|
||||
also tell where it was last set. Example: >
|
||||
:verbose hi Comment
|
||||
< Comment xxx term=bold ctermfg=4 guifg=Blue ~
|
||||
< Comment xxx ctermfg=4 guifg=Blue ~
|
||||
Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~
|
||||
|
||||
When ":hi clear" is used then the script where this command is used will be
|
||||
mentioned for the default values. See |:verbose-cmd| for more information.
|
||||
|
||||
*highlight-args* *E416* *E417* *E423*
|
||||
There are three types of terminals for highlighting:
|
||||
term a normal terminal (vt100, xterm)
|
||||
cterm a color terminal (Windows console, color-xterm)
|
||||
gui the GUI
|
||||
There are two types of UIs for highlighting:
|
||||
cterm terminal UI (|TUI|)
|
||||
gui GUI or RGB-capable TUI ('termguicolors')
|
||||
|
||||
For each type the highlighting can be given. This makes it possible to use
|
||||
the same syntax file on all terminals, and use the optimal highlighting.
|
||||
the same syntax file on all UIs.
|
||||
|
||||
1. highlight arguments for normal terminals
|
||||
1. TUI highlight arguments
|
||||
|
||||
*bold* *underline* *undercurl*
|
||||
*inverse* *italic* *standout*
|
||||
term={attr-list} *attr-list* *highlight-term* *E418*
|
||||
cterm={attr-list} *attr-list* *highlight-cterm* *E418*
|
||||
attr-list is a comma separated list (without spaces) of the
|
||||
following items (in any order):
|
||||
bold
|
||||
underline
|
||||
undercurl a curly underline
|
||||
undercurl curly underline
|
||||
reverse
|
||||
inverse same as reverse
|
||||
italic
|
||||
@@ -4689,17 +4687,6 @@ stop={term-list} *term-list* *highlight-stop*
|
||||
like "<Esc>" and "<Space>". Example:
|
||||
start=<Esc>[27h;<Esc>[<Space>r;
|
||||
|
||||
|
||||
2. highlight arguments for color terminals
|
||||
|
||||
cterm={attr-list} *highlight-cterm*
|
||||
See above for the description of {attr-list} |attr-list|.
|
||||
The "cterm" argument is likely to be different from "term", when
|
||||
colors are used. For example, in a normal terminal comments could
|
||||
be underlined, in a color terminal they can be made Blue.
|
||||
Note: Many terminals (e.g., DOS console) can't mix these attributes
|
||||
with coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=".
|
||||
|
||||
ctermfg={color-nr} *highlight-ctermfg* *E421*
|
||||
ctermbg={color-nr} *highlight-ctermbg*
|
||||
The {color-nr} argument is a color number. Its range is zero to
|
||||
@@ -4709,17 +4696,7 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
"cterm". For example, on some systems "cterm=bold ctermfg=3" gives
|
||||
another color, on others you just get color 3.
|
||||
|
||||
For an xterm this depends on your resources, and is a bit
|
||||
unpredictable. See your xterm documentation for the defaults. The
|
||||
colors for a color-xterm can be changed from the .Xdefaults file.
|
||||
Unfortunately this means that it's not possible to get the same colors
|
||||
for each user.
|
||||
|
||||
The MSDOS standard colors are fixed (in a console window), so these
|
||||
have been used for the names. But the meaning of color names in X11
|
||||
are fixed, so these color settings have been used, to make the
|
||||
highlighting settings portable (complicated, isn't it?). The
|
||||
following names are recognized, with the color number used:
|
||||
The following (case-insensitive) names are recognized:
|
||||
|
||||
*cterm-colors*
|
||||
NR-16 NR-8 COLOR NAME ~
|
||||
@@ -4750,7 +4727,6 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
"cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument. Or use
|
||||
a number instead of a color name.
|
||||
|
||||
The case of the color names is ignored.
|
||||
Note that for 16 color ansi style terminals (including xterms), the
|
||||
numbers in the NR-8 column is used. Here '*' means 'add 8' so that Blue
|
||||
is 12, DarkGray is 8 etc.
|
||||
@@ -4789,7 +4765,7 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
"fg" and "bg" colors will not be adjusted.
|
||||
|
||||
|
||||
3. highlight arguments for the GUI
|
||||
2. GUI highlight arguments
|
||||
|
||||
gui={attr-list} *highlight-gui*
|
||||
These give the attributes to use in the GUI mode.
|
||||
@@ -4865,15 +4841,14 @@ ColorColumn used for the columns set with 'colorcolumn'
|
||||
Conceal placeholder characters substituted for concealed
|
||||
text (see 'conceallevel')
|
||||
*hl-Cursor*
|
||||
Cursor the character under the cursor
|
||||
Cursor character under the cursor
|
||||
*hl-CursorIM*
|
||||
CursorIM like Cursor, but used when in IME mode |CursorIM|
|
||||
*hl-CursorColumn*
|
||||
CursorColumn the screen column that the cursor is in when 'cursorcolumn' is
|
||||
set
|
||||
CursorColumn Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||
*hl-CursorLine*
|
||||
CursorLine the screen line that the cursor is in when 'cursorline' is
|
||||
set
|
||||
CursorLine Screen-line at the cursor, when 'cursorline' is set.
|
||||
Low-priority if foreground (ctermfg OR guifg) is not set.
|
||||
*hl-Directory*
|
||||
Directory directory names (and other special names in listings)
|
||||
*hl-DiffAdd*
|
||||
@@ -4919,6 +4894,8 @@ MatchParen The character under the cursor or just before it, if it
|
||||
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --")
|
||||
*hl-MsgSeparator*
|
||||
MsgSeparator Separator for scrolled messages, `msgsep` flag of 'display'
|
||||
*hl-MoreMsg*
|
||||
MoreMsg |more-prompt|
|
||||
*hl-NonText*
|
||||
@@ -4929,7 +4906,7 @@ NonText '@' at the end of the window, characters from 'showbreak'
|
||||
*hl-Normal*
|
||||
Normal normal text
|
||||
*hl-NormalNC*
|
||||
NormalNC normal text in non-current window
|
||||
NormalNC normal text in non-current windows
|
||||
*hl-Pmenu*
|
||||
Pmenu Popup menu: normal item.
|
||||
*hl-PmenuSel*
|
||||
|
@@ -4,7 +4,7 @@
|
||||
NVIM REFERENCE MANUAL
|
||||
|
||||
|
||||
Terminal UI *tui*
|
||||
Terminal UI *TUI* *tui*
|
||||
|
||||
Nvim (except in |--headless| mode) uses information about the terminal you are
|
||||
using to present a built-in UI. If that information is not correct, the
|
||||
@@ -38,13 +38,13 @@ Otherwise Nvim cannot know what sequences your terminal expects, and weird
|
||||
or sub-optimal behavior will result (scrolling quirks, wrong colors, etc.).
|
||||
|
||||
$TERM is also important because it is mirrored by SSH to the remote session,
|
||||
unlike other common client-end environment variables ($COLORTERM,
|
||||
$XTERM_VERSION, $VTE_VERSION, $KONSOLE_PROFILE_NAME, $TERM_PROGRAM, ...).
|
||||
unlike most other environment variables.
|
||||
|
||||
For this terminal Set $TERM to |builtin-terms|
|
||||
-------------------------------------------------------------------------
|
||||
iTerm (original) iterm, iTerm.app N
|
||||
iTerm2 (new capabilities) iterm2, iTerm2.app Y
|
||||
Konsole konsole-256color N
|
||||
anything libvte-based vte, vte-256color Y
|
||||
(e.g. GNOME Terminal) (aliases: gnome, gnome-256color)
|
||||
tmux tmux, tmux-256color Y
|
||||
@@ -232,11 +232,6 @@ correct values. See |:mode|.
|
||||
Slow and fast terminals *slow-fast-terminal*
|
||||
*slow-terminal*
|
||||
|
||||
If you have a fast terminal you may like to set the 'ruler' option. The
|
||||
cursor position is shown in the status line. If you are using horizontal
|
||||
scrolling ('wrap' option off) consider setting 'sidescroll' to a small
|
||||
number.
|
||||
|
||||
If you have a slow terminal you may want to reset the 'showcmd' and 'ruler'
|
||||
options. The command characters and cursor positions will not be shown in the
|
||||
status line (which involves a lot of cursor motions and attribute changes for
|
||||
|
@@ -9,7 +9,7 @@ Nvim UI protocol *ui*
|
||||
Type |gO| to see the table of contents.
|
||||
|
||||
==============================================================================
|
||||
Introduction *ui-intro*
|
||||
UI Events *ui-events*
|
||||
|
||||
GUIs can be implemented as external processes communicating with Nvim over the
|
||||
RPC API. The UI model consists of a terminal-like grid with a single,
|
||||
@@ -30,26 +30,35 @@ a dictionary with these (optional) keys:
|
||||
`ext_cmdline` Externalize the cmdline. |ui-cmdline|
|
||||
`ext_wildmenu` Externalize the wildmenu. |ui-ext-wildmenu|
|
||||
|
||||
Nvim will then send msgpack-rpc notifications, with the method name "redraw"
|
||||
and a single argument, an array of screen update events.
|
||||
Update events are tuples whose first element is the event name and remaining
|
||||
elements the event parameters.
|
||||
Specifying a non-existent option is an error. UIs can check the |api-metadata|
|
||||
`ui_options` key for supported options. Additionally Nvim (currently) requires
|
||||
that all connected UIs use the same set of widgets. Therefore the active
|
||||
widgets will be the intersection of the requested widget sets of all connected
|
||||
UIs. The "option_set" event announces which widgets actually are active.
|
||||
|
||||
Events must be handled in order. The user should only see the updated screen
|
||||
Nvim sends msgpack-rpc notifications to all attached UIs, with method name
|
||||
"redraw" and a single argument: an array (batch) of screen "update events".
|
||||
Each update event is itself an array whose first element is the event name and
|
||||
remaining elements are event-parameter tuples. This allows multiple events of
|
||||
the same kind to be sent in a row without the event name being repeated. This
|
||||
batching is mostly used for "put", because each "put" event puts contents in
|
||||
one screen cell, but clients must be prepared for multiple argument sets being
|
||||
batched for all event kinds.
|
||||
|
||||
Events must be handled in-order. The user should only see the updated screen
|
||||
state after all events in the same "redraw" batch are processed (not any
|
||||
intermediate state after processing only part of the array).
|
||||
|
||||
Nvim sends |ui-global| and |ui-grid| events unconditionally; these suffice to
|
||||
implement a terminal-like interface.
|
||||
implement a terminal-like layout.
|
||||
|
||||
Nvim optionally sends screen elements "semantically" as structured events
|
||||
instead of raw grid-lines. Then the UI must decide how to present those
|
||||
elements itself; Nvim will not draw those elements on the grid. This is
|
||||
controlled by the |ui-ext-options|.
|
||||
instead of raw grid-lines, controlled by |ui-ext-options|. The UI must present
|
||||
those elements itself; Nvim will not draw those elements on the |ui-grid|.
|
||||
|
||||
Future versions of Nvim may add new update kinds and may append new parameters
|
||||
to existing update kinds. Clients must be prepared to ignore such extensions
|
||||
to be forward-compatible. |api-contract|
|
||||
to existing update kinds. Clients must be prepared to ignore such extensions,
|
||||
for forward-compatibility. |api-contract|
|
||||
|
||||
==============================================================================
|
||||
Global Events *ui-global*
|
||||
@@ -80,6 +89,31 @@ Global Events *ui-global*
|
||||
|
||||
Some keys are missing in some modes.
|
||||
|
||||
["option_set", name, value]
|
||||
UI-related option changed, where `name` is one of:
|
||||
|
||||
'arabicshape'
|
||||
'ambiwidth'
|
||||
'emoji'
|
||||
'guifont'
|
||||
'guifontset'
|
||||
'guifontwide'
|
||||
'linespace'
|
||||
'showtabline'
|
||||
'termguicolors'
|
||||
"ext_*" (all |ui-ext-options|)
|
||||
|
||||
Triggered when the UI first connects to Nvim, and whenever an option
|
||||
is changed by the user or a plugin.
|
||||
|
||||
Options are not represented here if their effects are communicated in
|
||||
other UI events. For example, instead of forwarding the 'mouse' option
|
||||
value, the "mouse_on" and "mouse_off" UI events directly indicate if
|
||||
mouse support is active. Some options like 'ambiwidth' have already
|
||||
taken effect on the grid, where appropriate empty cells are added,
|
||||
however a UI might still use such options when rendering raw text
|
||||
sent from Nvim, like for |ui-ext-cmdline|.
|
||||
|
||||
["mode_change", mode, mode_idx]
|
||||
The mode changed. The first parameter `mode` is a string representing
|
||||
the current mode. `mode_idx` is an index into the array received in
|
||||
|
@@ -57,12 +57,11 @@ make them visible with: >
|
||||
==============================================================================
|
||||
*01.2* Vim installed *setup-vimrc_example*
|
||||
|
||||
It's not required for this tutorial, but we provide an example vimrc you may
|
||||
use:
|
||||
To create an empty vimrc: >
|
||||
|
||||
:!cp -i $VIMRUNTIME/vimrc_example.vim ~/.config/nvim/init.vim
|
||||
|
||||
If the file already exists you probably want to keep it.
|
||||
:call mkdir(stdpath('config'),'p')
|
||||
:exe 'edit' stdpath('config').'/init.vim'
|
||||
:write
|
||||
|
||||
For more info see |vimrc|.
|
||||
|
||||
|
@@ -58,10 +58,9 @@ to write a Vim script file: |usr_41.txt|.
|
||||
==============================================================================
|
||||
*05.2* The example vimrc file explained *vimrc_example.vim*
|
||||
|
||||
In the first chapter was explained how the example vimrc file can be used.
|
||||
The file can be found here:
|
||||
In the first chapter was explained how to create a vimrc file. >
|
||||
|
||||
$VIMRUNTIME/vimrc_example.vim ~
|
||||
:exe 'edit' stdpath('config').'/init.vim'
|
||||
|
||||
In this section we will explain the various commands used in this file. This
|
||||
will give you hints about how to set up your own preferences. Not everything
|
||||
|
@@ -294,8 +294,6 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
||||
disk.
|
||||
'updatetime' Timeout after which the swap file is flushed to disk.
|
||||
'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.
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
@@ -207,21 +207,18 @@ g8 Print the hex values of the bytes used in the
|
||||
:sh[ell] Removed. |vim-differences| {Nvim}
|
||||
|
||||
*:terminal* *:te*
|
||||
:te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal| buffer.
|
||||
Equivalent to: >
|
||||
:enew
|
||||
:call termopen('{cmd}')
|
||||
<
|
||||
See |termopen()|.
|
||||
:te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal-emulator|
|
||||
buffer. Without {cmd}, start an interactive 'shell'.
|
||||
|
||||
Without {cmd}, start an interactive shell.
|
||||
Type |i| to enter |Terminal-mode|, then keys are sent to
|
||||
the job running in the terminal. Type <C-\><C-N> to
|
||||
leave Terminal-mode. |CTRL-\_CTRL-N|
|
||||
|
||||
Creating the terminal buffer fails when changes have been
|
||||
made to the current buffer, unless 'hidden' is set.
|
||||
Fails if changes have been made to the current buffer,
|
||||
unless 'hidden' is set.
|
||||
|
||||
To enter |Terminal-mode| automatically: >
|
||||
autocmd BufEnter term://* startinsert
|
||||
autocmd BufLeave term://* stopinsert
|
||||
autocmd TermOpen * startinsert
|
||||
<
|
||||
*:!cmd* *:!* *E34*
|
||||
:!{cmd} Execute {cmd} with 'shell'. See also |:terminal|.
|
||||
@@ -256,8 +253,6 @@ g8 Print the hex values of the bytes used in the
|
||||
to a pipe (not a terminal). Use |:terminal| to run an
|
||||
interactive shell connected to a terminal.
|
||||
|
||||
For Win32 also see |:!start|.
|
||||
|
||||
After the command has been executed, the timestamp and
|
||||
size of the current file is checked |timestamp|.
|
||||
|
||||
@@ -274,21 +269,6 @@ g8 Print the hex values of the bytes used in the
|
||||
< The screen is not redrawn then, thus you have to use
|
||||
CTRL-L or ":redraw!" if the command did display
|
||||
something.
|
||||
*:!start*
|
||||
:!start {cmd} (Windows only). Special-case of |:!| which works
|
||||
asynchronously, for running a program that does not
|
||||
affect the files you are editing.
|
||||
Optional arguments (can only use one at a time):
|
||||
/min window will be minimized
|
||||
/b no console window will be opened
|
||||
Note: If the process requires input, /b will get an
|
||||
EOF error because its input stream (stdin) would be
|
||||
redirected to \\.\NUL (stdout and stderr too).
|
||||
|
||||
Programs begun with :!start do not get passed Vim's
|
||||
open file handles, which means they do not have to be
|
||||
closed before Vim. To avoid this special treatment,
|
||||
use ":! start".
|
||||
|
||||
*:!!*
|
||||
:!! Repeat last ":!{cmd}".
|
||||
|
@@ -38,18 +38,6 @@ Information for undo and text in registers is kept in memory, thus when making
|
||||
undo levels and the text that can be kept in registers. Other things are also
|
||||
kept in memory: Command-line history, error messages for Quickfix mode, etc.
|
||||
|
||||
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.
|
||||
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
|
||||
don't want a swap file at all, set 'updatecount' to 0, or use the "-n"
|
||||
argument when starting Vim.
|
||||
|
||||
==============================================================================
|
||||
2. The most interesting additions *vim-additions*
|
||||
|
||||
|
@@ -14,11 +14,10 @@ a complete and centralized reference of those differences.
|
||||
==============================================================================
|
||||
1. Configuration *nvim-configuration*
|
||||
|
||||
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for storing
|
||||
configuration.
|
||||
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for configuration.
|
||||
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
|
||||
- Use `$XDG_DATA_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent
|
||||
session information.
|
||||
session information. |shada|
|
||||
|
||||
==============================================================================
|
||||
2. Defaults *nvim-defaults*
|
||||
@@ -32,8 +31,12 @@ a complete and centralized reference of those differences.
|
||||
- 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|)
|
||||
- 'belloff' defaults to "all"
|
||||
- 'complete' doesn't include "i"
|
||||
- 'cscopeverbose' is enabled
|
||||
- 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created
|
||||
- 'display' defaults to "lastline"
|
||||
- 'display' defaults to "lastline,msgsep"
|
||||
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
|
||||
- 'fillchars' defaults (in effect) to "vert:│,fold:·"
|
||||
- 'fsync' is disabled
|
||||
- 'formatoptions' defaults to "tcqj"
|
||||
- 'history' defaults to 10000 (the maximum)
|
||||
- 'hlsearch' is set by default
|
||||
@@ -46,7 +49,9 @@ a complete and centralized reference of those differences.
|
||||
- 'nrformats' defaults to "bin,hex"
|
||||
- 'ruler' is set by default
|
||||
- 'sessionoptions' doesn't include "options"
|
||||
- 'shortmess' sets "F" flag
|
||||
- 'showcmd' is set by default
|
||||
- 'sidescroll' defaults to 1
|
||||
- 'smarttab' is set by default
|
||||
- 'tabpagemax' defaults to 50
|
||||
- 'tags' defaults to "./tags;,tags"
|
||||
@@ -66,10 +71,12 @@ Job control |job-control|
|
||||
Remote plugins |remote-plugin|
|
||||
Providers
|
||||
Clipboard |provider-clipboard|
|
||||
Node.js plugins |provider-nodejs|
|
||||
Python plugins |provider-python|
|
||||
Ruby plugins |provider-ruby|
|
||||
Shared data |shada|
|
||||
Embedded terminal |terminal|
|
||||
VimL parser |nvim_parse_expression()|
|
||||
XDG base directories |xdg|
|
||||
|
||||
USER EXPERIENCE ~
|
||||
@@ -113,20 +120,69 @@ by Nvim developers.
|
||||
|
||||
FEATURES ~
|
||||
|
||||
"Outline": Type |gO| in |:Man| and |:help| pages to see a document outline.
|
||||
Command-line highlighting:
|
||||
The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
|
||||
using a built-in VimL expression parser. |expr-highlight|
|
||||
*E5408* *E5409*
|
||||
|input()|, |inputdialog()| support custom highlighting. |input()-highlight|
|
||||
*g:Nvim_color_cmdline*
|
||||
(Experimental) Command-line (|:|) is colored by callback defined in
|
||||
`g:Nvim_color_cmdline` (this callback is for testing only, and will be
|
||||
removed in the future).
|
||||
|
||||
|META| (ALT) chords are recognized, even in the terminal. Any |<M-| mapping
|
||||
will work. Some examples: <M-1>, <M-2>, <M-BS>, <M-Del>, <M-Ins>, <M-/>,
|
||||
<M-\>, <M-Space>, <M-Enter>, <M-=>, <M-->, <M-?>, <M-$>, ...
|
||||
META chords are case-sensitive: <M-a> and <M-A> are two different keycodes.
|
||||
Commands:
|
||||
|:checkhealth|
|
||||
|:cquit| can use [count] to set the exit code
|
||||
|:drop| is always available
|
||||
|:Man| is available by default, with many improvements such as completion
|
||||
|:tchdir| tab-local |current-directory|
|
||||
|
||||
Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants
|
||||
(even in the terminal). Specifically, the following are known to work:
|
||||
<C-Tab>, <C-S-Tab>, <C-BS>, <C-S-BS>, <C-Enter>, <C-S-Enter>
|
||||
Events:
|
||||
|DirChanged|
|
||||
|TabNewEntered|
|
||||
|TermClose|
|
||||
|TermOpen|
|
||||
|TextYankPost|
|
||||
|VimResume|
|
||||
|VimSuspend|
|
||||
|
||||
Functions:
|
||||
|dictwatcheradd()| notifies a callback whenever a |Dict| is modified
|
||||
|dictwatcherdel()|
|
||||
|menu_get()|
|
||||
|msgpackdump()|, |msgpackparse()| provide msgpack de/serialization
|
||||
|stdpath()|
|
||||
|system()|, |systemlist()| can run {cmd} directly (without 'shell')
|
||||
|
||||
Highlight groups:
|
||||
|expr-highlight| highlight groups (prefixed with "Nvim")
|
||||
|hl-NormalNC| highlights non-current windows
|
||||
|hl-MsgSeparator| highlights separator for scrolled messages
|
||||
|hl-QuickFixLine|
|
||||
|hl-Substitute|
|
||||
|hl-TermCursor|
|
||||
|hl-TermCursorNC|
|
||||
|hl-Whitespace| highlights 'listchars' whitespace
|
||||
|
||||
Input:
|
||||
ALT (|META|) chords always work (even in the |TUI|). Map |<M-| with any key:
|
||||
<M-1>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, etc.
|
||||
Case-sensitive: <M-a> and <M-A> are two different keycodes.
|
||||
|
||||
ALT in insert-mode behaves like <Esc> if not mapped. |i_ALT|
|
||||
|
||||
Mappings:
|
||||
|<Cmd>| pseudokey
|
||||
|
||||
Normal commands:
|
||||
"Outline": Type |gO| in |:Man| and |:help| pages to see a document outline.
|
||||
|
||||
Options:
|
||||
'cpoptions' flags: |cpo-_|
|
||||
'display' flag `msgsep` to minimize scrolling when showing messages
|
||||
'guicursor' works in the terminal
|
||||
'fillchars' flags: `msgsep` (see 'display' above)
|
||||
and `eob` for |EndOfBuffer| marker
|
||||
'inccommand' shows interactive results for |:substitute|-like commands
|
||||
'scrollback'
|
||||
'statusline' supports unlimited alignment sections
|
||||
@@ -139,65 +195,20 @@ Variables:
|
||||
|v:progpath| is always absolute ("full")
|
||||
|v:windowid| is always available (for use by external UIs)
|
||||
|
||||
Commands:
|
||||
|:checkhealth|
|
||||
|:drop| is available on all platforms
|
||||
|:Man| is available by default, with many improvements such as completion
|
||||
|:tchdir| tab-local |current-directory|
|
||||
|
||||
Functions:
|
||||
|dictwatcheradd()| notifies a callback whenever a |Dict| is modified
|
||||
|dictwatcherdel()|
|
||||
|menu_get()|
|
||||
|msgpackdump()|, |msgpackparse()| provide msgpack de/serialization
|
||||
|
||||
Events:
|
||||
|DirChanged|
|
||||
|TabNewEntered|
|
||||
|TermClose|
|
||||
|TermOpen|
|
||||
|TextYankPost|
|
||||
|
||||
Highlight groups:
|
||||
|hl-QuickFixLine|
|
||||
|hl-Substitute|
|
||||
|hl-TermCursor|
|
||||
|hl-TermCursorNC|
|
||||
|hl-Whitespace| highlights 'listchars' whitespace
|
||||
|
||||
UI:
|
||||
*E5408* *E5409* *g:Nvim_color_expr* *g:Nvim_color_cmdline*
|
||||
Command-line coloring is supported. Only |input()| and |inputdialog()| may
|
||||
be colored. For testing purposes expressions (e.g. |i_CTRL-R_=|) and regular
|
||||
command-line (|:|) are colored by callbacks defined in `g:Nvim_color_expr`
|
||||
and `g:Nvim_color_cmdline` respectively (these callbacks are for testing
|
||||
only, and will be removed in a future version).
|
||||
|
||||
==============================================================================
|
||||
4. Changed features *nvim-features-changed*
|
||||
|
||||
Nvim always builds with all features, in contrast to Vim which may have
|
||||
certain features removed/added at compile-time. This is like if Vim's "HUGE"
|
||||
build was the only Vim release type (except Nvim is smaller than Vim's "HUGE"
|
||||
build).
|
||||
certain features removed/added at compile-time. |feature-compile|
|
||||
|
||||
If a Python interpreter is available on your `$PATH`, |:python| and |:python3|
|
||||
are always available and may be used simultaneously in separate plugins. The
|
||||
`neovim` pip package must be installed to use Python plugins in Nvim (see
|
||||
|provider-python|).
|
||||
|
||||
Because of general |256-color| usage whereever possible, Nvim will even use
|
||||
256-colour capability on Linux virtual terminals. Vim uses only 8 colours
|
||||
plus bright foreground on Linux VTs.
|
||||
|
||||
Vim combines what is in its |builtin-terms| with what it reads from termcap,
|
||||
and has a |ttybuiltin| setting to control how that combination works. Nvim
|
||||
uses either one or the other of an external |terminfo| entry or the built-in
|
||||
one. It does not attempt to mix data from the two.
|
||||
are always available and may be used simultaneously. See |provider-python|.
|
||||
|
||||
|:!| does not support "interactive" commands. Use |:terminal| instead.
|
||||
(GUI Vim has a similar limitation, see ":help gui-pty" in Vim.)
|
||||
|
||||
:!start is not special-cased on Windows.
|
||||
|
||||
|system()| does not support writing/reading "backgrounded" commands. |E5677|
|
||||
|
||||
|:redir| nested in |execute()| works.
|
||||
@@ -214,8 +225,6 @@ makes things faster. |:terminal| output is never throttled.
|
||||
'p')) mkdir() will silently exit. In Vim this was an error.
|
||||
3. mkdir() error messages now include strerror() text when mkdir fails.
|
||||
|
||||
'encoding' is always "utf-8".
|
||||
|
||||
|string()| and |:echo| behaviour changed:
|
||||
1. No maximum recursion depth limit is applied to nested container
|
||||
structures.
|
||||
@@ -297,6 +306,52 @@ other arguments if used).
|
||||
Highlight groups:
|
||||
|hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
|
||||
groups
|
||||
|hl-CursorLine| is low-priority unless foreground color is set
|
||||
|
||||
Macro/|recording| behavior
|
||||
Replay of a macro recorded during :lmap produces the same actions as when it
|
||||
was recorded. In Vim if a macro is recorded while using :lmap'ped keys then
|
||||
the behaviour during record and replay differs.
|
||||
|
||||
'keymap' is implemented via :lmap instead of :lnoremap so that you can use
|
||||
macros and 'keymap' at the same time. This also means you can use |:imap| on
|
||||
the results of keys from 'keymap'.
|
||||
|
||||
Normal commands:
|
||||
|Q| is the same as |gQ|
|
||||
|
||||
Options:
|
||||
'ttimeout', 'ttimeoutlen' behavior was simplified
|
||||
|
||||
Startup:
|
||||
|-e| and |-es| invoke the same "improved Ex mode" as -E and -Es.
|
||||
|-E| and |-Es| reads stdin as text (into buffer 1).
|
||||
|-s| reads Normal commands from stdin if the script name is "-".
|
||||
Reading text (instead of commands) from stdin |--|:
|
||||
- works by default: "-" file is optional
|
||||
- works in more cases: |-Es|, file args
|
||||
|
||||
TUI:
|
||||
*:set-termcap*
|
||||
Start Nvim with 'verbose' level 3 to show terminal capabilities: >
|
||||
nvim -V3
|
||||
<
|
||||
*'term'* *E529* *E530* *E531*
|
||||
'term' reflects the terminal type derived from |$TERM| and other environment
|
||||
checks. For debugging only; not reliable during startup. >
|
||||
:echo &term
|
||||
< "builtin_x" means one of the |builtin-terms| was chosen, because the expected
|
||||
terminfo file was not found on the system.
|
||||
|
||||
Nvim will use 256-colour capability on Linux virtual terminals. Vim uses
|
||||
only 8 colours plus bright foreground on Linux VTs.
|
||||
|
||||
Vim combines what is in its |builtin-terms| with what it reads from terminfo,
|
||||
and has a |ttybuiltin| setting to control how that combination works. Nvim
|
||||
uses one or the other, it does not attempt to merge the two.
|
||||
|
||||
VimL (Vim script) compatibility:
|
||||
`count` does not alias to |v:count|
|
||||
|
||||
==============================================================================
|
||||
5. Missing legacy features *nvim-features-missing*
|
||||
@@ -304,7 +359,7 @@ Highlight groups:
|
||||
Some legacy Vim features are not implemented:
|
||||
|
||||
- |if_py|: vim.bindeval() and vim.Function() are not supported
|
||||
- |if_lua|: the `vim` object is missing most legacy methods
|
||||
- |if_lua|: the `vim` object is missing some legacy methods
|
||||
- *if_perl*
|
||||
- *if_mzscheme*
|
||||
- *if_tcl*
|
||||
@@ -314,65 +369,43 @@ Some legacy Vim features are not implemented:
|
||||
|
||||
These Vim features were intentionally removed from Nvim.
|
||||
|
||||
*'cp'* *'nocompatible'* *'nocp'* *'compatible'*
|
||||
Nvim is always "non-compatible" with Vi.
|
||||
":set nocompatible" is ignored
|
||||
":set compatible" is an error
|
||||
Aliases:
|
||||
ex (alias for "nvim -e")
|
||||
exim (alias for "nvim -E")
|
||||
gex (GUI)
|
||||
gview (GUI)
|
||||
gvim (GUI)
|
||||
gvimdiff (GUI)
|
||||
rgview (GUI)
|
||||
rgvim (GUI)
|
||||
rview (alias for "nvim -RZ")
|
||||
rvim (alias for "nvim -Z")
|
||||
view (alias for "nvim -R")
|
||||
vimdiff (alias for "nvim -d" |diff-mode|)
|
||||
|
||||
*'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
|
||||
Ed-compatible mode:
|
||||
":set noedcompatible" is ignored
|
||||
":set edcompatible" is an error
|
||||
Commands:
|
||||
:fixdel
|
||||
:helpfind
|
||||
:mode (no longer accepts an argument)
|
||||
:open
|
||||
:Print
|
||||
:shell
|
||||
:smile
|
||||
:tearoff
|
||||
|
||||
*t_xx* *:set-termcap* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
||||
Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
|
||||
terminal capabilities. Instead Nvim treats the terminal as any other UI. For
|
||||
example, 'guicursor' sets the terminal cursor style if possible.
|
||||
Compile-time features:
|
||||
EBCDIC
|
||||
Emacs tags support
|
||||
X11 integration (see |x11-selection|)
|
||||
|
||||
*'term'* *E529* *E530* *E531*
|
||||
The 'term' option has a fixed value, present only for script compatibility and
|
||||
intentionally not the same as any known terminal type name. It should be a
|
||||
rare case in Nvim where one needs |term-dependent-settings|.
|
||||
|
||||
*termcap*
|
||||
Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.
|
||||
|
||||
*xterm-8bit* *xterm-8-bit*
|
||||
Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this
|
||||
requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
|
||||
mode, as the 8-bit CSI character has to be written differently in each case.
|
||||
Vim issues a "request version" sequence to the terminal at startup and looks
|
||||
at how the terminal is sending CSI. Nvim does not issue such a sequence and
|
||||
always uses 7-bit control sequences.
|
||||
|
||||
'ttyfast':
|
||||
":set ttyfast" is ignored
|
||||
":set nottyfast" is an error
|
||||
|
||||
Encryption support:
|
||||
*'cryptmethod'* *'cm'*
|
||||
*'key'*
|
||||
|
||||
MS-DOS support:
|
||||
'bioskey'
|
||||
'conskey'
|
||||
|
||||
Test functions:
|
||||
test_alloc_fail()
|
||||
test_autochdir()
|
||||
test_disable_char_avail()
|
||||
test_garbagecollect_now()
|
||||
test_null_channel()
|
||||
test_null_dict()
|
||||
test_null_job()
|
||||
test_null_list()
|
||||
test_null_partial()
|
||||
test_null_string()
|
||||
test_settime()
|
||||
|
||||
Other options:
|
||||
Options:
|
||||
'antialias'
|
||||
'cpoptions' (g j k H w < * - and all POSIX flags were removed)
|
||||
'bioskey' (MS-DOS)
|
||||
'conskey' (MS-DOS)
|
||||
*'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".)
|
||||
'cpoptions' (gjkHw<*- and all POSIX flags were removed)
|
||||
*'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation)
|
||||
*'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
|
||||
'encoding' ("utf-8" is always used)
|
||||
'esckeys'
|
||||
'guioptions' "t" flag was removed
|
||||
@@ -382,6 +415,9 @@ Other options:
|
||||
*'imactivatekey'* *'imak'*
|
||||
*'imstatusfunc'* *'imsf'*
|
||||
*'macatsui'*
|
||||
'maxmem' Nvim delegates memory-management to the OS.
|
||||
'maxmemtot' Nvim delegates memory-management to the OS.
|
||||
'maxcombine' (6 is always used)
|
||||
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
|
||||
'shelltype'
|
||||
*'shortname'* *'sn'* *'noshortname'* *'nosn'*
|
||||
@@ -395,38 +431,45 @@ Other options:
|
||||
*'ttymouse'* *'ttym'*
|
||||
*'ttyscroll'* *'tsl'*
|
||||
*'ttytype'* *'tty'*
|
||||
'ttyfast'
|
||||
'weirdinvert'
|
||||
|
||||
Other commands:
|
||||
:Print
|
||||
:fixdel
|
||||
:helpfind
|
||||
:mode (no longer accepts an argument)
|
||||
:open
|
||||
:shell
|
||||
:smile
|
||||
:tearoff
|
||||
Startup:
|
||||
--literal (file args are always literal; to expand wildcards on Windows, use
|
||||
|:n| e.g. `nvim +"n *"`)
|
||||
Easy mode: eview, evim, nvim -y
|
||||
Vi mode: nvim -v
|
||||
|
||||
Other compile-time features:
|
||||
EBCDIC
|
||||
Emacs tags support
|
||||
X11 integration (see |x11-selection|)
|
||||
Test functions:
|
||||
test_alloc_fail()
|
||||
test_autochdir()
|
||||
test_disable_char_avail()
|
||||
test_garbagecollect_now()
|
||||
test_null_channel()
|
||||
test_null_dict()
|
||||
test_null_job()
|
||||
test_null_list()
|
||||
test_null_partial()
|
||||
test_null_string()
|
||||
test_override()
|
||||
test_settime()
|
||||
|
||||
Nvim does not have a built-in GUI and hence the following aliases have been
|
||||
removed: gvim, gex, gview, rgvim, rgview
|
||||
TUI:
|
||||
*t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
||||
Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
|
||||
terminal capabilities. Instead Nvim treats the terminal as any other UI,
|
||||
e.g. 'guicursor' sets the terminal cursor style if possible.
|
||||
|
||||
"Easy mode" (eview, evim, nvim -y)
|
||||
"(g)vimdiff" (alias for "(g)nvim -d" |diff-mode|)
|
||||
"Vi mode" (nvim -v)
|
||||
*termcap*
|
||||
Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.
|
||||
|
||||
The ability to start nvim via the following aliases has been removed in favor
|
||||
of just using their command line arguments:
|
||||
|
||||
ex nvim -e
|
||||
exim nvim -E
|
||||
view nvim -R
|
||||
rvim nvim -Z
|
||||
rview nvim -RZ
|
||||
*xterm-8bit* *xterm-8-bit*
|
||||
Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this
|
||||
requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
|
||||
mode, as the 8-bit CSI character has to be written differently in each case.
|
||||
Vim issues a "request version" sequence to the terminal at startup and looks
|
||||
at how the terminal is sending CSI. Nvim does not issue such a sequence and
|
||||
always uses 7-bit control sequences.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
vim:tw=78:ts=8:sw=2:noet:ft=help:norl:
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@ if exists('b:did_ftplugin') || &filetype !=# 'man'
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:pager = !exists('b:man_sect')
|
||||
let s:pager = get(s:, 'pager', 0) || !exists('b:man_sect')
|
||||
|
||||
if s:pager
|
||||
call man#init_pager()
|
||||
@@ -35,7 +35,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
|
||||
nnoremap <silent> <buffer> <C-]> :Man<CR>
|
||||
nnoremap <silent> <buffer> K :Man<CR>
|
||||
nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
|
||||
if s:pager
|
||||
if 1 == bufnr('%') || s:pager
|
||||
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
|
||||
else
|
||||
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c
|
||||
|
168
runtime/lua/man.lua
Normal file
168
runtime/lua/man.lua
Normal file
@@ -0,0 +1,168 @@
|
||||
local buf_hls = {}
|
||||
|
||||
local function highlight_line(line, linenr)
|
||||
local chars = {}
|
||||
local prev_char = ''
|
||||
local overstrike, escape = false, false
|
||||
local hls = {} -- Store highlight groups as { attr, start, final }
|
||||
local NONE, BOLD, UNDERLINE, ITALIC = 0, 1, 2, 3
|
||||
local hl_groups = {[BOLD]="manBold", [UNDERLINE]="manUnderline", [ITALIC]="manItalic"}
|
||||
local attr = NONE
|
||||
local byte = 0 -- byte offset
|
||||
|
||||
local function end_attr_hl(attr)
|
||||
for i, hl in ipairs(hls) do
|
||||
if hl.attr == attr and hl.final == -1 then
|
||||
hl.final = byte
|
||||
hls[i] = hl
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function add_attr_hl(code)
|
||||
local continue_hl = true
|
||||
if code == 0 then
|
||||
attr = NONE
|
||||
continue_hl = false
|
||||
elseif code == 1 then
|
||||
attr = BOLD
|
||||
elseif code == 22 then
|
||||
attr = BOLD
|
||||
continue_hl = false
|
||||
elseif code == 3 then
|
||||
attr = ITALIC
|
||||
elseif code == 23 then
|
||||
attr = ITALIC
|
||||
continue_hl = false
|
||||
elseif code == 4 then
|
||||
attr = UNDERLINE
|
||||
elseif code == 24 then
|
||||
attr = UNDERLINE
|
||||
continue_hl = false
|
||||
else
|
||||
attr = NONE
|
||||
return
|
||||
end
|
||||
|
||||
if continue_hl then
|
||||
hls[#hls + 1] = {attr=attr, start=byte, final=-1}
|
||||
else
|
||||
if attr == NONE then
|
||||
for a, _ in pairs(hl_groups) do
|
||||
end_attr_hl(a)
|
||||
end
|
||||
else
|
||||
end_attr_hl(attr)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Break input into UTF8 code points. ASCII code points (from 0x00 to 0x7f)
|
||||
-- can be represented in one byte. Any code point above that is represented by
|
||||
-- a leading byte (0xc0 and above) and continuation bytes (0x80 to 0xbf, or
|
||||
-- decimal 128 to 191).
|
||||
for char in line:gmatch("[^\128-\191][\128-\191]*") do
|
||||
if overstrike then
|
||||
local last_hl = hls[#hls]
|
||||
if char == prev_char then
|
||||
if char == '_' and attr == UNDERLINE and last_hl and last_hl.final == byte then
|
||||
-- This underscore is in the middle of an underlined word
|
||||
attr = UNDERLINE
|
||||
else
|
||||
attr = BOLD
|
||||
end
|
||||
elseif prev_char == '_' then
|
||||
-- char is underlined
|
||||
attr = UNDERLINE
|
||||
elseif prev_char == '+' and char == 'o' then
|
||||
-- bullet (overstrike text '+^Ho')
|
||||
attr = BOLD
|
||||
char = '·'
|
||||
elseif prev_char == '·' and char == 'o' then
|
||||
-- bullet (additional handling for '+^H+^Ho^Ho')
|
||||
attr = BOLD
|
||||
char = '·'
|
||||
else
|
||||
-- use plain char
|
||||
attr = NONE
|
||||
end
|
||||
|
||||
-- Grow the previous highlight group if possible
|
||||
if last_hl and last_hl.attr == attr and last_hl.final == byte then
|
||||
last_hl.final = byte + #char
|
||||
else
|
||||
hls[#hls + 1] = {attr=attr, start=byte, final=byte + #char}
|
||||
end
|
||||
|
||||
overstrike = false
|
||||
prev_char = ''
|
||||
byte = byte + #char
|
||||
chars[#chars + 1] = char
|
||||
elseif escape then
|
||||
-- Use prev_char to store the escape sequence
|
||||
prev_char = prev_char .. char
|
||||
-- We only want to match against SGR sequences, which consist of ESC
|
||||
-- followed by '[', then a series of parameter and intermediate bytes in
|
||||
-- the range 0x20 - 0x3f, then 'm'. (See ECMA-48, sections 5.4 & 8.3.117)
|
||||
local sgr = prev_char:match("^%[([\032-\063]*)m$")
|
||||
if sgr then
|
||||
local match = ''
|
||||
while sgr and #sgr > 0 do
|
||||
-- Match against SGR parameters, which may be separated by ';'
|
||||
match, sgr = sgr:match("^(%d*);?(.*)")
|
||||
add_attr_hl(match + 0) -- coerce to number
|
||||
end
|
||||
escape = false
|
||||
elseif not prev_char:match("^%[[\032-\063]*$") then
|
||||
-- Stop looking if this isn't a partial CSI sequence
|
||||
escape = false
|
||||
end
|
||||
elseif char == "\027" then
|
||||
escape = true
|
||||
prev_char = ''
|
||||
elseif char == "\b" then
|
||||
overstrike = true
|
||||
prev_char = chars[#chars]
|
||||
byte = byte - #prev_char
|
||||
chars[#chars] = nil
|
||||
else
|
||||
byte = byte + #char
|
||||
chars[#chars + 1] = char
|
||||
end
|
||||
end
|
||||
|
||||
for _, hl in ipairs(hls) do
|
||||
if hl.attr ~= NONE then
|
||||
buf_hls[#buf_hls + 1] = {
|
||||
0,
|
||||
-1,
|
||||
hl_groups[hl.attr],
|
||||
linenr - 1,
|
||||
hl.start,
|
||||
hl.final
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return table.concat(chars, '')
|
||||
end
|
||||
|
||||
local function highlight_man_page()
|
||||
local mod = vim.api.nvim_buf_get_option(0, "modifiable")
|
||||
vim.api.nvim_buf_set_option(0, "modifiable", true)
|
||||
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
for i, line in ipairs(lines) do
|
||||
lines[i] = highlight_line(line, i)
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(0, 0, -1, false, lines)
|
||||
|
||||
for _, args in ipairs(buf_hls) do
|
||||
vim.api.nvim_buf_add_highlight(unpack(args))
|
||||
end
|
||||
buf_hls = {}
|
||||
|
||||
vim.api.nvim_buf_set_option(0, "modifiable", mod)
|
||||
end
|
||||
|
||||
return { highlight_man_page = highlight_man_page }
|
@@ -1,7 +1,7 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2012 Jul 25
|
||||
" Last change: 2017 Oct 28
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
@@ -23,20 +23,22 @@ set backspace=indent,eol,start whichwrap+=<,>,[,]
|
||||
" backspace in Visual mode deletes selection
|
||||
vnoremap <BS> d
|
||||
|
||||
" CTRL-X and SHIFT-Del are Cut
|
||||
vnoremap <C-X> "+x
|
||||
vnoremap <S-Del> "+x
|
||||
if has("clipboard")
|
||||
" CTRL-X and SHIFT-Del are Cut
|
||||
vnoremap <C-X> "+x
|
||||
vnoremap <S-Del> "+x
|
||||
|
||||
" CTRL-C and CTRL-Insert are Copy
|
||||
vnoremap <C-C> "+y
|
||||
vnoremap <C-Insert> "+y
|
||||
" CTRL-C and CTRL-Insert are Copy
|
||||
vnoremap <C-C> "+y
|
||||
vnoremap <C-Insert> "+y
|
||||
|
||||
" CTRL-V and SHIFT-Insert are Paste
|
||||
map <C-V> "+gP
|
||||
map <S-Insert> "+gP
|
||||
" CTRL-V and SHIFT-Insert are Paste
|
||||
map <C-V> "+gP
|
||||
map <S-Insert> "+gP
|
||||
|
||||
cmap <C-V> <C-R>+
|
||||
cmap <S-Insert> <C-R>+
|
||||
cmap <C-V> <C-R>+
|
||||
cmap <S-Insert> <C-R>+
|
||||
endif
|
||||
|
||||
" Pasting blockwise and linewise selections is not possible in Insert and
|
||||
" Visual mode without the +virtualedit feature. They are pasted as if they
|
||||
@@ -44,8 +46,10 @@ cmap <S-Insert> <C-R>+
|
||||
" Uses the paste.vim autoload script.
|
||||
" Use CTRL-G u to have CTRL-Z only undo the paste.
|
||||
|
||||
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
|
||||
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
|
||||
if 1
|
||||
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
|
||||
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
|
||||
endif
|
||||
|
||||
imap <S-Insert> <C-V>
|
||||
vmap <S-Insert> <C-V>
|
||||
@@ -99,6 +103,19 @@ inoremap <C-F4> <C-O><C-W>c
|
||||
cnoremap <C-F4> <C-C><C-W>c
|
||||
onoremap <C-F4> <C-C><C-W>c
|
||||
|
||||
if has("gui")
|
||||
" CTRL-F is the search dialog
|
||||
noremap <expr> <C-F> has("gui_running") ? ":promptfind\<CR>" : "/"
|
||||
inoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-O>:promptfind\<CR>" : "\<C-\>\<C-O>/"
|
||||
cnoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-C>:promptfind\<CR>" : "\<C-\>\<C-O>/"
|
||||
|
||||
" CTRL-H is the replace dialog,
|
||||
" but in console, it might be backspace, so don't map it there
|
||||
nnoremap <expr> <C-H> has("gui_running") ? ":promptrepl\<CR>" : "\<C-H>"
|
||||
inoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-O>:promptrepl\<CR>" : "\<C-H>"
|
||||
cnoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-C>:promptrepl\<CR>" : "\<C-H>"
|
||||
endif
|
||||
|
||||
" restore 'cpoptions'
|
||||
set cpo&
|
||||
if 1
|
||||
|
@@ -996,10 +996,6 @@ call append("$", "updatecount\tnumber of characters typed to cause a swap file u
|
||||
call append("$", " \tset uc=" . &uc)
|
||||
call append("$", "updatetime\ttime in msec after which the swap file will be updated")
|
||||
call append("$", " \tset ut=" . &ut)
|
||||
call append("$", "maxmem\tmaximum amount of memory in Kbyte used for one buffer")
|
||||
call append("$", " \tset mm=" . &mm)
|
||||
call append("$", "maxmemtot\tmaximum amount of memory in Kbyte used for all buffers")
|
||||
call append("$", " \tset mmt=" . &mmt)
|
||||
|
||||
|
||||
call <SID>Header("command line editing")
|
||||
@@ -1087,6 +1083,9 @@ if has("quickfix")
|
||||
call <SID>OptionG("gp", &gp)
|
||||
call append("$", "grepformat\tlist of formats for output of 'grepprg'")
|
||||
call <SID>OptionG("gfm", &gfm)
|
||||
call append("$", "makeencoding\tencoding of the \":make\" and \":grep\" output")
|
||||
call append("$", "\t(global or local to buffer)")
|
||||
call <SID>OptionG("menc", &menc)
|
||||
endif
|
||||
|
||||
|
||||
|
@@ -1,81 +0,0 @@
|
||||
" A Neovim plugin that implements GUI helper commands
|
||||
if !has('win32') || !has('nvim') || exists('g:GuiLoaded')
|
||||
finish
|
||||
endif
|
||||
let g:GuiLoaded = 1
|
||||
|
||||
" Close the GUI
|
||||
function! GuiClose() abort
|
||||
call rpcnotify(0, 'Gui', 'Close')
|
||||
endfunction
|
||||
|
||||
" Notify the GUI when exiting Neovim
|
||||
autocmd VimLeave * call GuiClose()
|
||||
|
||||
" A replacement for foreground()
|
||||
function! GuiForeground() abort
|
||||
call rpcnotify(0, 'Gui', 'Foreground')
|
||||
endfunction
|
||||
|
||||
" Set maximized state for GUI window (1 is enabled, 0 disabled)
|
||||
function! GuiWindowMaximized(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'WindowMaximized', a:enabled)
|
||||
endfunction
|
||||
|
||||
" Set fullscreen state for GUI window (1 is enabled, 0 disabled)
|
||||
function! GuiWindowFullScreen(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'WindowFullScreen', a:enabled)
|
||||
endfunction
|
||||
|
||||
" Set GUI font
|
||||
function! GuiFont(fname, ...) abort
|
||||
let force = get(a:000, 0, 0)
|
||||
call rpcnotify(0, 'Gui', 'Font', a:fname, force)
|
||||
endfunction
|
||||
|
||||
" Set additional linespace
|
||||
function! GuiLinespace(height) abort
|
||||
call rpcnotify(0, 'Gui', 'Linespace', a:height)
|
||||
endfunction
|
||||
|
||||
" Configure mouse hide behaviour (1 is enabled, 0 disabled)
|
||||
function! GuiMousehide(enabled) abort
|
||||
call rpcnotify(0, 'Gui', 'Mousehide', a:enabled)
|
||||
endfunction
|
||||
|
||||
" The GuiFont command. For compatibility there is also Guifont
|
||||
function s:GuiFontCommand(fname, bang) abort
|
||||
if a:fname ==# ''
|
||||
if exists('g:GuiFont')
|
||||
echo g:GuiFont
|
||||
else
|
||||
echo 'No GuiFont is set'
|
||||
endif
|
||||
else
|
||||
call GuiFont(a:fname, a:bang ==# '!')
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=? -bang Guifont call s:GuiFontCommand("<args>", "<bang>")
|
||||
command! -nargs=? -bang GuiFont call s:GuiFontCommand("<args>", "<bang>")
|
||||
|
||||
function s:GuiLinespaceCommand(height) abort
|
||||
if a:height ==# ''
|
||||
if exists('g:GuiLinespace')
|
||||
echo g:GuiLinespace
|
||||
else
|
||||
echo 'No GuiLinespace is set'
|
||||
endif
|
||||
else
|
||||
call GuiLinespace(a:height)
|
||||
endif
|
||||
endfunction
|
||||
command! -nargs=? GuiLinespace call s:GuiLinespaceCommand("<args>")
|
||||
|
||||
" GuiDrop('file1', 'file2', ...) is similar to :drop file1 file2 ...
|
||||
" but it calls fnameescape() over all arguments
|
||||
function GuiDrop(...)
|
||||
let l:fnames = deepcopy(a:000)
|
||||
let l:args = map(l:fnames, 'fnameescape(v:val)')
|
||||
exec 'drop '.join(l:args, ' ')
|
||||
doautocmd BufEnter
|
||||
endfunction
|
@@ -1,8 +1 @@
|
||||
function! s:complete(lead, _line, _pos) abort
|
||||
return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1),
|
||||
\ 'fnamemodify(v:val, ":t:r")'),
|
||||
\ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead'))
|
||||
endfunction
|
||||
|
||||
command! -nargs=* -complete=customlist,s:complete CheckHealth
|
||||
\ call health#check([<f-args>])
|
||||
autocmd CmdUndefined CheckHealth checkhealth
|
||||
|
@@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v162"
|
||||
let g:loaded_netrwPlugin = "v156"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoRemOn
|
||||
@@ -42,8 +42,8 @@ augroup END
|
||||
" Network Browsing Reading Writing: {{{2
|
||||
augroup Network
|
||||
au!
|
||||
au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
|
||||
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
|
||||
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
|
||||
@@ -59,7 +59,7 @@ com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(
|
||||
com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
|
||||
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
|
||||
com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
|
||||
com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
|
||||
com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
|
||||
|
||||
" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
|
||||
com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
|
||||
@@ -81,7 +81,7 @@ if !exists("g:netrw_nogx")
|
||||
if !hasmapto('<Plug>NetrwBrowseX')
|
||||
nmap <unique> gx <Plug>NetrwBrowseX
|
||||
endif
|
||||
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
|
||||
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
|
||||
endif
|
||||
if maparg('gx','v') == ""
|
||||
if !hasmapto('<Plug>NetrwBrowseXVis')
|
||||
@@ -129,15 +129,19 @@ fun! s:LocalBrowse(dirname)
|
||||
elseif isdirectory(a:dirname)
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
|
||||
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
|
||||
" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
|
||||
exe w:netrw_bannercnt
|
||||
" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
endif
|
||||
|
||||
else
|
||||
" not a directory, ignore it
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
|
||||
endif
|
||||
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
|
||||
|
||||
" call Dret("s:LocalBrowse")
|
||||
endfun
|
||||
|
@@ -56,6 +56,6 @@ function! s:LoadRemotePlugins() abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! UpdateRemotePlugins call remote#host#UpdateRemotePlugins()
|
||||
command! -bar UpdateRemotePlugins call remote#host#UpdateRemotePlugins()
|
||||
|
||||
call s:LoadRemotePlugins()
|
||||
|
@@ -1,11 +1,15 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2017 Aug 27
|
||||
" Last change: 2017 Nov 11
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
" the file contents. The autocommand is in $VIMRUNTIME/filetype.vim.
|
||||
"
|
||||
" Note that the pattern matches are done with =~# to avoid the value of the
|
||||
" 'ignorecase' option making a difference. Where case is to be ignored use
|
||||
" =~? instead. Do not use =~ anywhere.
|
||||
|
||||
|
||||
" Only do the rest when the FileType autocommand has not been triggered yet.
|
||||
@@ -28,12 +32,12 @@ set cpo&vim
|
||||
|
||||
let s:line1 = getline(1)
|
||||
|
||||
if s:line1 =~ "^#!"
|
||||
if s:line1 =~# "^#!"
|
||||
" A script that starts with "#!".
|
||||
|
||||
" Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into
|
||||
" "#!/usr/bin/bash" to make matching easier.
|
||||
if s:line1 =~ '^#!\s*\S*\<env\s'
|
||||
if s:line1 =~# '^#!\s*\S*\<env\s'
|
||||
let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
|
||||
let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
|
||||
endif
|
||||
@@ -44,11 +48,11 @@ if s:line1 =~ "^#!"
|
||||
" "#!/usr/bin/env perl [path/args]"
|
||||
" If there is no path use the first word: "#!perl [path/args]".
|
||||
" Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
|
||||
if s:line1 =~ '^#!\s*\a:[/\\]'
|
||||
if s:line1 =~# '^#!\s*\a:[/\\]'
|
||||
let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
|
||||
elseif s:line1 =~ '^#!.*\<env\>'
|
||||
elseif s:line1 =~# '^#!.*\<env\>'
|
||||
let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
|
||||
elseif s:line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
|
||||
elseif s:line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
|
||||
let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
|
||||
else
|
||||
let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
|
||||
@@ -56,116 +60,116 @@ if s:line1 =~ "^#!"
|
||||
|
||||
" tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
|
||||
" third line. Suggested by Steven Atkinson.
|
||||
if getline(3) =~ '^exec wish'
|
||||
if getline(3) =~# '^exec wish'
|
||||
let s:name = 'wish'
|
||||
endif
|
||||
|
||||
" Bourne-like shell scripts: bash bash2 ksh ksh93 sh
|
||||
if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
|
||||
call SetFileTypeSH(s:line1) " defined in filetype.vim
|
||||
if s:name =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>'
|
||||
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
|
||||
|
||||
" csh scripts
|
||||
elseif s:name =~ '^csh\>'
|
||||
elseif s:name =~# '^csh\>'
|
||||
if exists("g:filetype_csh")
|
||||
call SetFileTypeShell(g:filetype_csh)
|
||||
call dist#ft#SetFileTypeShell(g:filetype_csh)
|
||||
else
|
||||
call SetFileTypeShell("csh")
|
||||
call dist#ft#SetFileTypeShell("csh")
|
||||
endif
|
||||
|
||||
" tcsh scripts
|
||||
elseif s:name =~ '^tcsh\>'
|
||||
call SetFileTypeShell("tcsh")
|
||||
elseif s:name =~# '^tcsh\>'
|
||||
call dist#ft#SetFileTypeShell("tcsh")
|
||||
|
||||
" Z shell scripts
|
||||
elseif s:name =~ '^zsh\>'
|
||||
elseif s:name =~# '^zsh\>'
|
||||
set ft=zsh
|
||||
|
||||
" TCL scripts
|
||||
elseif s:name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
|
||||
elseif s:name =~# '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
|
||||
set ft=tcl
|
||||
|
||||
" Expect scripts
|
||||
elseif s:name =~ '^expect\>'
|
||||
elseif s:name =~# '^expect\>'
|
||||
set ft=expect
|
||||
|
||||
" Gnuplot scripts
|
||||
elseif s:name =~ '^gnuplot\>'
|
||||
elseif s:name =~# '^gnuplot\>'
|
||||
set ft=gnuplot
|
||||
|
||||
" Makefiles
|
||||
elseif s:name =~ 'make\>'
|
||||
elseif s:name =~# 'make\>'
|
||||
set ft=make
|
||||
|
||||
" Lua
|
||||
elseif s:name =~ 'lua'
|
||||
elseif s:name =~# 'lua'
|
||||
set ft=lua
|
||||
|
||||
" Perl 6
|
||||
elseif s:name =~ 'perl6'
|
||||
elseif s:name =~# 'perl6'
|
||||
set ft=perl6
|
||||
|
||||
" Perl
|
||||
elseif s:name =~ 'perl'
|
||||
elseif s:name =~# 'perl'
|
||||
set ft=perl
|
||||
|
||||
" PHP
|
||||
elseif s:name =~ 'php'
|
||||
elseif s:name =~# 'php'
|
||||
set ft=php
|
||||
|
||||
" Python
|
||||
elseif s:name =~ 'python'
|
||||
elseif s:name =~# 'python'
|
||||
set ft=python
|
||||
|
||||
" Groovy
|
||||
elseif s:name =~ '^groovy\>'
|
||||
elseif s:name =~# '^groovy\>'
|
||||
set ft=groovy
|
||||
|
||||
" Ruby
|
||||
elseif s:name =~ 'ruby'
|
||||
elseif s:name =~# 'ruby'
|
||||
set ft=ruby
|
||||
|
||||
" JavaScript
|
||||
elseif s:name =~ 'node\(js\)\=\>' || s:name =~ 'rhino\>'
|
||||
elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>'
|
||||
set ft=javascript
|
||||
|
||||
" BC calculator
|
||||
elseif s:name =~ '^bc\>'
|
||||
elseif s:name =~# '^bc\>'
|
||||
set ft=bc
|
||||
|
||||
" sed
|
||||
elseif s:name =~ 'sed\>'
|
||||
elseif s:name =~# 'sed\>'
|
||||
set ft=sed
|
||||
|
||||
" OCaml-scripts
|
||||
elseif s:name =~ 'ocaml'
|
||||
elseif s:name =~# 'ocaml'
|
||||
set ft=ocaml
|
||||
|
||||
" Awk scripts
|
||||
elseif s:name =~ 'awk\>'
|
||||
elseif s:name =~# 'awk\>'
|
||||
set ft=awk
|
||||
|
||||
" Website MetaLanguage
|
||||
elseif s:name =~ 'wml'
|
||||
elseif s:name =~# 'wml'
|
||||
set ft=wml
|
||||
|
||||
" Scheme scripts
|
||||
elseif s:name =~ 'scheme'
|
||||
elseif s:name =~# 'scheme'
|
||||
set ft=scheme
|
||||
|
||||
" CFEngine scripts
|
||||
elseif s:name =~ 'cfengine'
|
||||
elseif s:name =~# 'cfengine'
|
||||
set ft=cfengine
|
||||
|
||||
" Erlang scripts
|
||||
elseif s:name =~ 'escript'
|
||||
elseif s:name =~# 'escript'
|
||||
set ft=erlang
|
||||
|
||||
" Haskell
|
||||
elseif s:name =~ 'haskell'
|
||||
elseif s:name =~# 'haskell'
|
||||
set ft=haskell
|
||||
|
||||
" Scala
|
||||
elseif s:name =~ 'scala\>'
|
||||
elseif s:name =~# 'scala\>'
|
||||
set ft=scala
|
||||
|
||||
endif
|
||||
@@ -180,28 +184,28 @@ else
|
||||
let s:line5 = getline(5)
|
||||
|
||||
" Bourne-like shell scripts: sh ksh bash bash2
|
||||
if s:line1 =~ '^:$'
|
||||
call SetFileTypeSH(s:line1) " defined in filetype.vim
|
||||
if s:line1 =~# '^:$'
|
||||
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
|
||||
|
||||
" Z shell scripts
|
||||
elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>' ||
|
||||
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
|
||||
elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' ||
|
||||
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
|
||||
set ft=zsh
|
||||
|
||||
" ELM Mail files
|
||||
elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
|
||||
elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
|
||||
set ft=mail
|
||||
|
||||
" Mason
|
||||
elseif s:line1 =~ '^<[%&].*>'
|
||||
elseif s:line1 =~# '^<[%&].*>'
|
||||
set ft=mason
|
||||
|
||||
" Vim scripts (must have '" vim' as the first line to trigger this)
|
||||
elseif s:line1 =~ '^" *[vV]im$'
|
||||
elseif s:line1 =~# '^" *[vV]im$'
|
||||
set ft=vim
|
||||
|
||||
" MOO
|
||||
elseif s:line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
|
||||
elseif s:line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
|
||||
set ft=moo
|
||||
|
||||
" Diff file:
|
||||
@@ -215,40 +219,45 @@ else
|
||||
" - "=== ", "--- ", "+++ " (bzr diff, common case)
|
||||
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
|
||||
" - "# HG changeset patch" in first line (Mercurial export format)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|
||||
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
|
||||
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
|
||||
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
|
||||
\ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ ')))
|
||||
\ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
|
||||
elseif s:line1 =~# '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|
||||
\ || (s:line1 =~# '^--- ' && s:line2 =~# '^+++ ')
|
||||
\ || (s:line1 =~# '^\* looking for ' && s:line2 =~# '^\* comparing to ')
|
||||
\ || (s:line1 =~# '^\*\*\* ' && s:line2 =~# '^--- ')
|
||||
\ || (s:line1 =~# '^=== ' && ((s:line2 =~# '^=\{66\}' && s:line3 =~# '^--- ' && s:line4 =~# '^+++') || (s:line2 =~# '^--- ' && s:line3 =~# '^+++ ')))
|
||||
\ || (s:line1 =~# '^=== \(removed\|added\|renamed\|modified\)')
|
||||
set ft=diff
|
||||
|
||||
" PostScript Files (must have %!PS as the first line, like a2ps output)
|
||||
elseif s:line1 =~ '^%![ \t]*PS'
|
||||
elseif s:line1 =~# '^%![ \t]*PS'
|
||||
set ft=postscr
|
||||
|
||||
" M4 scripts: Guess there is a line that starts with "dnl".
|
||||
elseif s:line1 =~ '^\s*dnl\>'
|
||||
\ || s:line2 =~ '^\s*dnl\>'
|
||||
\ || s:line3 =~ '^\s*dnl\>'
|
||||
\ || s:line4 =~ '^\s*dnl\>'
|
||||
\ || s:line5 =~ '^\s*dnl\>'
|
||||
elseif s:line1 =~# '^\s*dnl\>'
|
||||
\ || s:line2 =~# '^\s*dnl\>'
|
||||
\ || s:line3 =~# '^\s*dnl\>'
|
||||
\ || s:line4 =~# '^\s*dnl\>'
|
||||
\ || s:line5 =~# '^\s*dnl\>'
|
||||
set ft=m4
|
||||
|
||||
" AmigaDos scripts
|
||||
elseif $TERM == "amiga"
|
||||
\ && (s:line1 =~# "^;" || s:line1 =~? '^\.bra')
|
||||
set ft=amiga
|
||||
|
||||
" SiCAD scripts (must have procn or procd as the first line to trigger this)
|
||||
elseif s:line1 =~? '^ *proc[nd] *$'
|
||||
set ft=sicad
|
||||
|
||||
" Purify log files start with "**** Purify"
|
||||
elseif s:line1 =~ '^\*\*\*\* Purify'
|
||||
elseif s:line1 =~# '^\*\*\*\* Purify'
|
||||
set ft=purifylog
|
||||
|
||||
" XML
|
||||
elseif s:line1 =~ '<?\s*xml.*?>'
|
||||
elseif s:line1 =~# '<?\s*xml.*?>'
|
||||
set ft=xml
|
||||
|
||||
" XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
|
||||
elseif s:line1 =~ '\<DTD\s\+XHTML\s'
|
||||
elseif s:line1 =~# '\<DTD\s\+XHTML\s'
|
||||
set ft=xhtml
|
||||
|
||||
" HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
|
||||
@@ -257,43 +266,43 @@ else
|
||||
set ft=html
|
||||
|
||||
" PDF
|
||||
elseif s:line1 =~ '^%PDF-'
|
||||
elseif s:line1 =~# '^%PDF-'
|
||||
set ft=pdf
|
||||
|
||||
" XXD output
|
||||
elseif s:line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
|
||||
elseif s:line1 =~# '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
|
||||
set ft=xxd
|
||||
|
||||
" RCS/CVS log output
|
||||
elseif s:line1 =~ '^RCS file:' || s:line2 =~ '^RCS file:'
|
||||
elseif s:line1 =~# '^RCS file:' || s:line2 =~# '^RCS file:'
|
||||
set ft=rcslog
|
||||
|
||||
" CVS commit
|
||||
elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
|
||||
elseif s:line2 =~# '^CVS:' || getline("$") =~# '^CVS: '
|
||||
set ft=cvs
|
||||
|
||||
" Prescribe
|
||||
elseif s:line1 =~ '^!R!'
|
||||
elseif s:line1 =~# '^!R!'
|
||||
set ft=prescribe
|
||||
|
||||
" Send-pr
|
||||
elseif s:line1 =~ '^SEND-PR:'
|
||||
elseif s:line1 =~# '^SEND-PR:'
|
||||
set ft=sendpr
|
||||
|
||||
" SNNS files
|
||||
elseif s:line1 =~ '^SNNS network definition file'
|
||||
elseif s:line1 =~# '^SNNS network definition file'
|
||||
set ft=snnsnet
|
||||
elseif s:line1 =~ '^SNNS pattern definition file'
|
||||
elseif s:line1 =~# '^SNNS pattern definition file'
|
||||
set ft=snnspat
|
||||
elseif s:line1 =~ '^SNNS result file'
|
||||
elseif s:line1 =~# '^SNNS result file'
|
||||
set ft=snnsres
|
||||
|
||||
" Virata
|
||||
elseif s:line1 =~ '^%.\{-}[Vv]irata'
|
||||
\ || s:line2 =~ '^%.\{-}[Vv]irata'
|
||||
\ || s:line3 =~ '^%.\{-}[Vv]irata'
|
||||
\ || s:line4 =~ '^%.\{-}[Vv]irata'
|
||||
\ || s:line5 =~ '^%.\{-}[Vv]irata'
|
||||
elseif s:line1 =~# '^%.\{-}[Vv]irata'
|
||||
\ || s:line2 =~# '^%.\{-}[Vv]irata'
|
||||
\ || s:line3 =~# '^%.\{-}[Vv]irata'
|
||||
\ || s:line4 =~# '^%.\{-}[Vv]irata'
|
||||
\ || s:line5 =~# '^%.\{-}[Vv]irata'
|
||||
set ft=virata
|
||||
|
||||
" Strace
|
||||
@@ -301,17 +310,17 @@ else
|
||||
set ft=strace
|
||||
|
||||
" VSE JCL
|
||||
elseif s:line1 =~ '^\* $$ JOB\>' || s:line1 =~ '^// *JOB\>'
|
||||
elseif s:line1 =~# '^\* $$ JOB\>' || s:line1 =~# '^// *JOB\>'
|
||||
set ft=vsejcl
|
||||
|
||||
" TAK and SINDA
|
||||
elseif s:line4 =~ 'K & K Associates' || s:line2 =~ 'TAK 2000'
|
||||
elseif s:line4 =~# 'K & K Associates' || s:line2 =~# 'TAK 2000'
|
||||
set ft=takout
|
||||
elseif s:line3 =~ 'S Y S T E M S I M P R O V E D '
|
||||
elseif s:line3 =~# 'S Y S T E M S I M P R O V E D '
|
||||
set ft=sindaout
|
||||
elseif getline(6) =~ 'Run Date: '
|
||||
elseif getline(6) =~# 'Run Date: '
|
||||
set ft=takcmp
|
||||
elseif getline(9) =~ 'Node File 1'
|
||||
elseif getline(9) =~# 'Node File 1'
|
||||
set ft=sindacmp
|
||||
|
||||
" DNS zone files
|
||||
@@ -319,34 +328,34 @@ else
|
||||
set ft=bindzone
|
||||
|
||||
" BAAN
|
||||
elseif s:line1 =~ '|\*\{1,80}' && s:line2 =~ 'VRC '
|
||||
\ || s:line2 =~ '|\*\{1,80}' && s:line3 =~ 'VRC '
|
||||
elseif s:line1 =~# '|\*\{1,80}' && s:line2 =~# 'VRC '
|
||||
\ || s:line2 =~# '|\*\{1,80}' && s:line3 =~# 'VRC '
|
||||
set ft=baan
|
||||
|
||||
" Valgrind
|
||||
elseif s:line1 =~ '^==\d\+== valgrind' || s:line3 =~ '^==\d\+== Using valgrind'
|
||||
elseif s:line1 =~# '^==\d\+== valgrind' || s:line3 =~# '^==\d\+== Using valgrind'
|
||||
set ft=valgrind
|
||||
|
||||
" Go docs
|
||||
elseif s:line1 =~ '^PACKAGE DOCUMENTATION$'
|
||||
elseif s:line1 =~# '^PACKAGE DOCUMENTATION$'
|
||||
set ft=godoc
|
||||
|
||||
" Renderman Interface Bytestream
|
||||
elseif s:line1 =~ '^##RenderMan'
|
||||
elseif s:line1 =~# '^##RenderMan'
|
||||
set ft=rib
|
||||
|
||||
" Scheme scripts
|
||||
elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme'
|
||||
elseif s:line1 =~# 'exec\s\+\S*scheme' || s:line2 =~# 'exec\s\+\S*scheme'
|
||||
set ft=scheme
|
||||
|
||||
" Git output
|
||||
elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
|
||||
elseif s:line1 =~# '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
|
||||
set ft=git
|
||||
|
||||
" Gprof (gnu profiler)
|
||||
elseif s:line1 == 'Flat profile:'
|
||||
\ && s:line2 == ''
|
||||
\ && s:line3 =~ '^Each sample counts as .* seconds.$'
|
||||
\ && s:line3 =~# '^Each sample counts as .* seconds.$'
|
||||
set ft=gprof
|
||||
|
||||
" Erlang terms
|
||||
@@ -357,18 +366,18 @@ else
|
||||
" CVS diff
|
||||
else
|
||||
let s:lnum = 1
|
||||
while getline(s:lnum) =~ "^? " && s:lnum < line("$")
|
||||
while getline(s:lnum) =~# "^? " && s:lnum < line("$")
|
||||
let s:lnum += 1
|
||||
endwhile
|
||||
if getline(s:lnum) =~ '^Index:\s\+\f\+$'
|
||||
if getline(s:lnum) =~# '^Index:\s\+\f\+$'
|
||||
set ft=diff
|
||||
|
||||
" locale input files: Formal Definitions of Cultural Conventions
|
||||
" filename must be like en_US, fr_FR@euro or en_US.UTF-8
|
||||
elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
|
||||
elseif expand("%") =~# '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
|
||||
let s:lnum = 1
|
||||
while s:lnum < 100 && s:lnum < line("$")
|
||||
if getline(s:lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
|
||||
if getline(s:lnum) =~# '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
|
||||
setf fdcc
|
||||
break
|
||||
endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user