mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-18 10:31:44 +02:00
Compare commits
1163 Commits
customized
...
customized
Author | SHA1 | Date | |
---|---|---|---|
9101ca1afc
|
|||
7e493e0188
|
|||
78b5540636
|
|||
97ba6ae997
|
|||
9ac1a14604
|
|||
3c20feba8d
|
|||
d23475818a
|
|||
7f5c9b56ef
|
|||
c3f5cb4866
|
|||
7a25fbfd31
|
|||
444880b153
|
|||
0ae06e46da
|
|||
98e085e636
|
|||
67c60ae8cc
|
|||
ffd2433da3
|
|||
cfe219250c
|
|||
68bdae1afc
|
|||
77859e03e7
|
|||
cfd05be288
|
|||
![]() |
c0419d6018 | ||
![]() |
ea98e50f65 | ||
![]() |
168174e383 | ||
![]() |
53cd4e1b88 | ||
![]() |
27e3561bb8 | ||
![]() |
9bb9cb13e3 | ||
![]() |
16455f7241 | ||
![]() |
82225aa519 | ||
![]() |
5f2baefc6c | ||
![]() |
cedcf39723 | ||
![]() |
4925d9aada | ||
![]() |
f3e6df32d0 | ||
![]() |
5aaa8752af | ||
![]() |
a1d214316c | ||
![]() |
8a1e3eb066 | ||
![]() |
75a417773f | ||
![]() |
b3b3ee4f21 | ||
![]() |
07b1db4b28 | ||
![]() |
dc775a0f22 | ||
![]() |
10228f953e | ||
![]() |
afceecadbe | ||
![]() |
b2a4e59571 | ||
![]() |
b0b944bbf3 | ||
![]() |
89a3d74b93 | ||
![]() |
f4eef04750 | ||
![]() |
e62c86b99f | ||
![]() |
82bd792da5 | ||
![]() |
a58c9065e6 | ||
![]() |
e8bf984b76 | ||
![]() |
23e1a3499f | ||
![]() |
6b4e4bacd7 | ||
![]() |
a84c04ca08 | ||
![]() |
e67c71e440 | ||
![]() |
5078ff9c7a | ||
![]() |
647510de5d | ||
![]() |
84e11e4236 | ||
![]() |
9538714af1 | ||
![]() |
ffd832d990 | ||
![]() |
8de2b8976b | ||
![]() |
a6aa26b5d9 | ||
![]() |
2505651c68 | ||
![]() |
e67c7b23ff | ||
![]() |
453cca3b0c | ||
![]() |
6cee04a4be | ||
![]() |
ae8b9b4773 | ||
![]() |
e748b7b265 | ||
![]() |
c2401ec013 | ||
![]() |
8073d7ecd0 | ||
![]() |
64f7859ba7 | ||
![]() |
f1b94d7026 | ||
![]() |
79653b6048 | ||
![]() |
b0e6b72281 | ||
![]() |
e6220e5e53 | ||
![]() |
3c064845b1 | ||
![]() |
736cb219ca | ||
![]() |
fb30e4e387 | ||
![]() |
74550ffa16 | ||
![]() |
d0a0672282 | ||
![]() |
16e92ddf60 | ||
![]() |
4d8e68d800 | ||
![]() |
bbebfaf32a | ||
![]() |
7e56331e47 | ||
![]() |
750db8e71c | ||
![]() |
4255ef68a3 | ||
![]() |
3313464214 | ||
![]() |
683ba32a15 | ||
![]() |
90a60155e5 | ||
![]() |
b25d06ed9e | ||
![]() |
706ae3dd91 | ||
![]() |
9b15ed8181 | ||
![]() |
f355bef36b | ||
![]() |
4391e69c48 | ||
![]() |
0710d80391 | ||
![]() |
cf41a3a76c | ||
![]() |
31b2cd872f | ||
![]() |
2b6945cbb2 | ||
![]() |
ae5f43918f | ||
![]() |
6b6bc2752e | ||
![]() |
4556adae3c | ||
![]() |
1b0886041b | ||
![]() |
16e18f3ca7 | ||
![]() |
ee0d67fbbb | ||
![]() |
450527f172 | ||
![]() |
135518ee39 | ||
![]() |
58715ecb5f | ||
![]() |
75e26b101d | ||
![]() |
6421a6face | ||
![]() |
948520f90a | ||
![]() |
0765118ce2 | ||
![]() |
efd4c7b617 | ||
![]() |
c5346fbece | ||
![]() |
fe8e8ccc3e | ||
![]() |
eae111bc2c | ||
![]() |
6a6c1dc6b4 | ||
![]() |
86bbb282ab | ||
![]() |
28aa156cb7 | ||
![]() |
a7814e69de | ||
![]() |
1452c116cf | ||
![]() |
23dfc4b339 | ||
![]() |
931d4be972 | ||
![]() |
7dceda587b | ||
![]() |
52a969074d | ||
![]() |
e7b87d31cf | ||
![]() |
5eb0fae08f | ||
![]() |
798d805a0f | ||
![]() |
0d4ba06e57 | ||
![]() |
4913b13a2d | ||
![]() |
b0bab992db | ||
![]() |
af5f4227b7 | ||
![]() |
fa6a694ea4 | ||
![]() |
1da7ffc052 | ||
![]() |
c673f5818c | ||
![]() |
ec78a87644 | ||
![]() |
69d14ddcf5 | ||
![]() |
f62819df00 | ||
![]() |
39a85b6bc2 | ||
![]() |
f76ae3e867 | ||
![]() |
3651e5f2f0 | ||
![]() |
89e016ef6c | ||
![]() |
e4996f4c4d | ||
![]() |
c44ed58142 | ||
![]() |
0091af2a41 | ||
![]() |
d1eea68719 | ||
![]() |
133aff7fd8 | ||
![]() |
efde94db7a | ||
![]() |
6ec072b34e | ||
![]() |
4027a21514 | ||
![]() |
3665b1ab00 | ||
![]() |
cf6b292f0c | ||
![]() |
507e4173d3 | ||
![]() |
abc3575d3e | ||
![]() |
2c0ff587e3 | ||
![]() |
26c87535d6 | ||
![]() |
6ac8e672be | ||
![]() |
04ee2dd1e7 | ||
![]() |
3106a98aee | ||
![]() |
73769a3472 | ||
![]() |
085e253d77 | ||
![]() |
b2af8f153e | ||
![]() |
37fb41fca8 | ||
![]() |
e2b05ab639 | ||
![]() |
354fd8fef0 | ||
![]() |
9b97867be1 | ||
![]() |
06685d1721 | ||
![]() |
ae4b88a06b | ||
![]() |
c83ecc46ed | ||
![]() |
c32050a208 | ||
![]() |
4a8c7227e6 | ||
![]() |
55e61a7094 | ||
![]() |
60977d05b6 | ||
![]() |
601747f720 | ||
![]() |
0c91bc3207 | ||
![]() |
f5cd2c173f | ||
![]() |
d00bd8bb25 | ||
![]() |
a66e44d835 | ||
![]() |
ce05317634 | ||
![]() |
33d88d55c9 | ||
![]() |
a31a4a8ca7 | ||
![]() |
c34d000b91 | ||
![]() |
a2bfe950fa | ||
![]() |
b44f40acd6 | ||
![]() |
5169093bbf | ||
![]() |
b15b1cd3f8 | ||
![]() |
f7b6a97435 | ||
![]() |
f64c99c406 | ||
![]() |
f552e43c5b | ||
![]() |
4798198e41 | ||
![]() |
a59de4ce05 | ||
![]() |
2dea525665 | ||
![]() |
8ecb1f7296 | ||
![]() |
9ca9530061 | ||
![]() |
54e27afc3f | ||
![]() |
5e67032655 | ||
![]() |
cb37f6df63 | ||
![]() |
ca3a18cf37 | ||
![]() |
cac36627aa | ||
![]() |
6404e1127e | ||
![]() |
e762a3093b | ||
![]() |
739ac2ae5e | ||
![]() |
77c364a2d0 | ||
![]() |
103cd9f5ce | ||
![]() |
99859fe857 | ||
![]() |
4778995f3b | ||
![]() |
0a14150840 | ||
![]() |
e8ffc0313f | ||
![]() |
7dbd3886b1 | ||
![]() |
8c83164d76 | ||
![]() |
076aab1ccf | ||
![]() |
751f51c88f | ||
![]() |
ab7359ffd3 | ||
![]() |
d795d70041 | ||
![]() |
1320034e7e | ||
![]() |
79a216043f | ||
![]() |
c508a3cc32 | ||
![]() |
d40d8f34c5 | ||
![]() |
b561a13e7c | ||
![]() |
71bcee2a07 | ||
![]() |
6c490b1baa | ||
![]() |
4ab6a36aca | ||
![]() |
c4355841ad | ||
![]() |
f163946e38 | ||
![]() |
7abb1fd630 | ||
![]() |
f78d3387a5 | ||
![]() |
69e2e3c047 | ||
![]() |
52832cbe22 | ||
![]() |
82ca2be51c | ||
![]() |
8552bb8a17 | ||
![]() |
b49a38b6d0 | ||
![]() |
ad0751677a | ||
![]() |
dd8bb20ba9 | ||
![]() |
03f5f27901 | ||
![]() |
9e3ca56afd | ||
![]() |
5379528e3e | ||
![]() |
12201359bc | ||
![]() |
ba50fcf85e | ||
![]() |
24c0db563c | ||
![]() |
33c4905dcb | ||
![]() |
9296c3f9a0 | ||
![]() |
7ecc566169 | ||
![]() |
a918da36d3 | ||
![]() |
91ff5fdb02 | ||
![]() |
4481631547 | ||
![]() |
7865388086 | ||
![]() |
26297bc5a9 | ||
![]() |
9db5cdd8e3 | ||
![]() |
2b17534a08 | ||
![]() |
4e2db68acf | ||
![]() |
ddabf8df5e | ||
![]() |
3f28e197ca | ||
![]() |
3a67524e8a | ||
![]() |
33312d95b0 | ||
![]() |
f554b21cd9 | ||
![]() |
d9fa4e4648 | ||
![]() |
e98a284d40 | ||
![]() |
38ef8c1053 | ||
![]() |
d3f560a31c | ||
![]() |
e2cb3ff284 | ||
![]() |
0f5a3953e1 | ||
![]() |
633667ed7f | ||
![]() |
656e975562 | ||
![]() |
f7fbe89de4 | ||
![]() |
509829b052 | ||
![]() |
efd61e17f2 | ||
![]() |
cf2b021d02 | ||
![]() |
67f10aece5 | ||
![]() |
9b5c777fcf | ||
![]() |
c65e5f8341 | ||
![]() |
053bb603cd | ||
![]() |
93b07bbb90 | ||
![]() |
764a115601 | ||
![]() |
1adfe53f29 | ||
![]() |
bfe0f51cb1 | ||
![]() |
ffce61906a | ||
![]() |
3843a193cb | ||
![]() |
b2410dab0b | ||
![]() |
f382544101 | ||
![]() |
a81d54eb90 | ||
![]() |
23519bbdae | ||
![]() |
73fd25773a | ||
![]() |
746d483179 | ||
![]() |
1a7e90c7d7 | ||
![]() |
8e2fd44f55 | ||
![]() |
1c84917b29 | ||
![]() |
c5522ed19d | ||
![]() |
33a5480456 | ||
![]() |
16cd05fc76 | ||
![]() |
4788dacc86 | ||
![]() |
91e54c8b0d | ||
![]() |
15ccebfe11 | ||
![]() |
5c849c9105 | ||
![]() |
9e99506223 | ||
![]() |
53ea90379f | ||
![]() |
2619d7ebb4 | ||
![]() |
8c8a7aceca | ||
![]() |
726b885b60 | ||
![]() |
a6994a09c3 | ||
![]() |
1616aff5a1 | ||
![]() |
5a82f05be8 | ||
![]() |
3020504cdc | ||
![]() |
d00e802674 | ||
![]() |
c46008dddc | ||
![]() |
755000c376 | ||
![]() |
1e4a60bfe6 | ||
![]() |
c9ee685956 | ||
![]() |
c2b1083836 | ||
![]() |
3518528f22 | ||
![]() |
9bed8fec79 | ||
![]() |
3ffbea7d42 | ||
![]() |
39b42193cb | ||
![]() |
c69e080b05 | ||
![]() |
50b42036d1 | ||
![]() |
340c40ceff | ||
![]() |
6aeffe71de | ||
![]() |
04c33d719e | ||
![]() |
07f1d1e8e6 | ||
![]() |
6c61254c50 | ||
![]() |
c6efea8c34 | ||
![]() |
80f43a7c66 | ||
![]() |
9f5d3a9a28 | ||
![]() |
8800a4f70b | ||
![]() |
990254dcac | ||
![]() |
73a1118e78 | ||
![]() |
d3bedf26cf | ||
![]() |
25b29f429a | ||
![]() |
363f821962 | ||
![]() |
8d873c0bf1 | ||
![]() |
955676ed9e | ||
![]() |
a2439a37e4 | ||
![]() |
7b6daa8e4e | ||
![]() |
fcf782296a | ||
![]() |
44889b635c | ||
![]() |
bc12ba11cd | ||
![]() |
9b08db75e3 | ||
4c3ad3f263 | |||
![]() |
598bcc7edd | ||
![]() |
b86ec03dc4 | ||
![]() |
ae75498f8a | ||
![]() |
9d0b68b0f8 | ||
![]() |
eeb5939e59 | ||
![]() |
ef235a47bf | ||
![]() |
b66da76880 | ||
![]() |
54d6119784 | ||
![]() |
0b8c081425 | ||
![]() |
209052ffa6 | ||
![]() |
fe9a6b5cfb | ||
![]() |
9c0f74369f | ||
![]() |
cd27e5229b | ||
![]() |
472732905c | ||
![]() |
485d9f81cd | ||
![]() |
8cf136ce4c | ||
![]() |
116a8ac9d2 | ||
![]() |
fda310bda6 | ||
![]() |
e55619ea33 | ||
![]() |
b952b20128 | ||
![]() |
62d1f85648 | ||
![]() |
5e3c8c0e92 | ||
![]() |
b58dddf2ff | ||
![]() |
78d351a0b0 | ||
![]() |
61dbc948cc | ||
![]() |
c4d92ebe73 | ||
![]() |
d0cf827638 | ||
![]() |
6a6a92b6b9 | ||
![]() |
9869b8a34e | ||
![]() |
60fbf88322 | ||
![]() |
fae3924062 | ||
![]() |
dc2ce64823 | ||
![]() |
d0d86d9178 | ||
![]() |
f417af6148 | ||
![]() |
2fe2860a09 | ||
![]() |
cb40426976 | ||
![]() |
423ed390a2 | ||
![]() |
7652b16ca6 | ||
![]() |
618a010c15 | ||
![]() |
d44a34ed9b | ||
![]() |
c84fc996db | ||
![]() |
43f232543b | ||
![]() |
3f65d1d99a | ||
![]() |
bfcf706ca7 | ||
![]() |
8c1103c461 | ||
![]() |
ab75ace8db | ||
![]() |
4a58e6a282 | ||
![]() |
ac9e4f69b4 | ||
![]() |
581edba7fd | ||
![]() |
58a8b96c3c | ||
![]() |
0e057ca9ae | ||
![]() |
36bf2639bb | ||
![]() |
0c1326e689 | ||
![]() |
dd74438f68 | ||
![]() |
a9ddfac782 | ||
![]() |
79437df894 | ||
![]() |
b5a04af089 | ||
![]() |
52372ae3d3 | ||
![]() |
65d755d9b2 | ||
![]() |
1f1a8f3395 | ||
![]() |
629e4e7053 | ||
![]() |
c50a299cfd | ||
![]() |
4bad129caf | ||
![]() |
1ffb28e21b | ||
![]() |
c126243367 | ||
![]() |
6da6e461a8 | ||
![]() |
103101bbcb | ||
![]() |
f737fcba1a | ||
![]() |
c5fa0678b8 | ||
![]() |
00ccddf8cf | ||
![]() |
00cbf188fb | ||
![]() |
988ea74461 | ||
![]() |
0914cda7e5 | ||
![]() |
5959e9aaa1 | ||
![]() |
434df565ae | ||
![]() |
c8f36504d8 | ||
![]() |
06e1af371e | ||
![]() |
d744987ac8 | ||
![]() |
b4eef17aaa | ||
![]() |
5c50e8607c | ||
![]() |
9a324ab448 | ||
![]() |
c3978335f5 | ||
![]() |
051296c2aa | ||
![]() |
90f2d2ff29 | ||
![]() |
4c2edab406 | ||
![]() |
76e8fd69bf | ||
![]() |
5dd458bcf7 | ||
![]() |
a94a8b8539 | ||
![]() |
261230b23a | ||
![]() |
b90317e00e | ||
![]() |
21c9dc8785 | ||
![]() |
31bbc60325 | ||
![]() |
fec6e5c189 | ||
![]() |
23c1493f17 | ||
![]() |
00808af569 | ||
![]() |
3c94091d30 | ||
![]() |
b737362aba | ||
![]() |
db722fc4e5 | ||
![]() |
7d679e68dc | ||
![]() |
bc808403fb | ||
![]() |
9d6dc317a4 | ||
![]() |
cf29c50f31 | ||
![]() |
2a3c4cc441 | ||
![]() |
bd192561ae | ||
![]() |
66ff56a05e | ||
![]() |
def86d179e | ||
![]() |
3c9a343f8b | ||
![]() |
10b6b05fab | ||
![]() |
caa4ef736a | ||
![]() |
23702345a9 | ||
![]() |
ba89babd10 | ||
![]() |
2ce3fbd677 | ||
![]() |
d8de73a06d | ||
![]() |
8094e6711a | ||
![]() |
10edccc1d6 | ||
![]() |
247aaed188 | ||
![]() |
1a4333fa1b | ||
![]() |
8eaa6df318 | ||
![]() |
7523db186f | ||
![]() |
4aac113522 | ||
![]() |
795abd77a7 | ||
![]() |
38bc914504 | ||
![]() |
c8113eea83 | ||
![]() |
924b7418e8 | ||
![]() |
a7dfef61e9 | ||
![]() |
db35c979b4 | ||
![]() |
2de933c723 | ||
![]() |
d3704d602f | ||
![]() |
ea62f227bf | ||
![]() |
23fdadc32e | ||
![]() |
e9bf06686f | ||
![]() |
7842b155c1 | ||
![]() |
74a8277e10 | ||
![]() |
ddb1b80463 | ||
![]() |
eea3336934 | ||
![]() |
f801145712 | ||
![]() |
e033b08535 | ||
![]() |
1d9514a205 | ||
![]() |
6741120f19 | ||
![]() |
c501457322 | ||
![]() |
46425a24c3 | ||
![]() |
9826f0a7f0 | ||
![]() |
43175061e0 | ||
![]() |
0ab32cac34 | ||
![]() |
e3ec9c614b | ||
![]() |
f454d60234 | ||
![]() |
19fa00837c | ||
![]() |
275c5d28e1 | ||
![]() |
15ae069f6f | ||
![]() |
00f5541dc6 | ||
![]() |
02540eb303 | ||
![]() |
282e581bdb | ||
![]() |
31e7c49608 | ||
![]() |
7966a6dc91 | ||
![]() |
5fc2f04224 | ||
![]() |
6edfd8ed22 | ||
![]() |
363db05db7 | ||
![]() |
3738012dd6 | ||
![]() |
355cfe035d | ||
![]() |
6d01b5be77 | ||
![]() |
4938957483 | ||
![]() |
46f4fa7cdd | ||
![]() |
f696135f31 | ||
![]() |
52e0fcdc7d | ||
![]() |
ac17518a23 | ||
6dd924b2b2 | |||
![]() |
f439474b73 | ||
![]() |
d6cd92e256 | ||
![]() |
3a294268d9 | ||
![]() |
9b81c7e650 | ||
![]() |
e229fb3ad7 | ||
![]() |
720eae63fa | ||
![]() |
0df96a24bd | ||
![]() |
21a1588ede | ||
![]() |
7970006e8c | ||
![]() |
418d0cff7f | ||
![]() |
7284360774 | ||
![]() |
9fc3fadee8 | ||
![]() |
3d2db56f63 | ||
![]() |
e9c7cb8670 | ||
![]() |
87d19274c5 | ||
![]() |
3161bf8ffd | ||
![]() |
b68865587e | ||
![]() |
7dc0dbe944 | ||
![]() |
f50a363525 | ||
![]() |
57ad4c70d1 | ||
![]() |
d3d93b898f | ||
![]() |
7d8973edb2 | ||
![]() |
2302b576b0 | ||
f4782630d4 | |||
![]() |
8c1a2a686f | ||
32d5e1e6fa | |||
![]() |
a381a1cacc | ||
![]() |
73c3c9f7fe | ||
![]() |
67ef0a75d5 | ||
![]() |
328bc5e95a | ||
![]() |
7f8021e37e | ||
![]() |
9701b7e79b | ||
![]() |
7a52c6fec9 | ||
![]() |
1503639d4b | ||
![]() |
e82f19c852 | ||
![]() |
edd69c9c25 | ||
![]() |
fc61e369fb | ||
![]() |
113586b59b | ||
![]() |
5dbd5e1c89 | ||
![]() |
04b7d9e2c3 | ||
![]() |
5f2743176a | ||
![]() |
3723488617 | ||
![]() |
0cc17a0791 | ||
![]() |
05a21e6091 | ||
![]() |
fc06bc7c6f | ||
![]() |
1bd005adc1 | ||
![]() |
4f208d1577 | ||
![]() |
eb6e0557a7 | ||
![]() |
cf09d66be6 | ||
![]() |
76cd127a8a | ||
![]() |
f6dd2a9968 | ||
![]() |
ae05a33e14 | ||
![]() |
b38fad323b | ||
![]() |
c6027fcf0f | ||
![]() |
f4cf06a50e | ||
![]() |
86bf8dcc60 | ||
![]() |
d37898b6d3 | ||
![]() |
1edd6a9002 | ||
![]() |
f7fa0dcbd1 | ||
![]() |
4f0a95a803 | ||
![]() |
e443cb0d3c | ||
![]() |
6fa228ee08 | ||
![]() |
fb9bfbaeeb | ||
![]() |
09668f4fcb | ||
![]() |
4c7a6165ed | ||
![]() |
12d0d2613f | ||
![]() |
42ee78cd3d | ||
![]() |
58d308c1ed | ||
![]() |
29e1bcc53d | ||
![]() |
3531574e5e | ||
![]() |
b9721218ab | ||
![]() |
a119ea6a29 | ||
![]() |
95ef5f5f32 | ||
![]() |
b81b18645b | ||
![]() |
ce591f1b43 | ||
![]() |
28afa4b3ce | ||
![]() |
89a24d71a6 | ||
f69630b668 | |||
![]() |
a2d34a883b | ||
![]() |
5c79b887d8 | ||
![]() |
d0475bf659 | ||
![]() |
85c9576699 | ||
![]() |
2483450a1f | ||
![]() |
519d5eed06 | ||
![]() |
d87965775a | ||
![]() |
8c6f81aa00 | ||
![]() |
6ea0ab0968 | ||
![]() |
70ab3ecdbe | ||
![]() |
a24ae616df | ||
![]() |
cc838f614f | ||
![]() |
ae62a9f378 | ||
![]() |
1b5778a58c | ||
![]() |
27a689e7b8 | ||
![]() |
8e6c490c62 | ||
![]() |
ccda70fe53 | ||
![]() |
26c42e4f0d | ||
![]() |
3244dd52eb | ||
![]() |
4c6807a0c2 | ||
![]() |
03a6a2749a | ||
![]() |
82f69456e9 | ||
![]() |
6beda371fb | ||
![]() |
5b9cb2efc5 | ||
![]() |
733968723c | ||
![]() |
63c81d67f2 | ||
![]() |
ad8ba1dd24 | ||
![]() |
04f821e3e1 | ||
![]() |
4937985e2c | ||
![]() |
5fd7d83a70 | ||
![]() |
699a19d202 | ||
![]() |
0b42938197 | ||
![]() |
1e2bfb6216 | ||
![]() |
f755a4b23f | ||
![]() |
4f58e12fca | ||
![]() |
588cf89531 | ||
![]() |
4fe2dd2706 | ||
![]() |
11ad605cd6 | ||
![]() |
fa9f160bd1 | ||
![]() |
dae1fad54e | ||
![]() |
52200188d4 | ||
![]() |
0d74b9ef0b | ||
![]() |
549163d274 | ||
![]() |
755018c783 | ||
![]() |
2a1c4b3a1c | ||
![]() |
aae0d825e7 | ||
![]() |
855dbfab16 | ||
![]() |
f3a357c559 | ||
![]() |
63995e8c61 | ||
![]() |
7062d9b8f8 | ||
![]() |
ede62f5c75 | ||
![]() |
6386770ff3 | ||
![]() |
b4e831a81f | ||
![]() |
9b283360ce | ||
![]() |
fabbd4d156 | ||
![]() |
9bea5bf5f7 | ||
![]() |
9fbc990493 | ||
![]() |
b05fdaaa73 | ||
![]() |
52d5d4d64c | ||
![]() |
6ec712466c | ||
![]() |
6616b8dc07 | ||
![]() |
807457c718 | ||
![]() |
13d2a40903 | ||
![]() |
022b196d6a | ||
![]() |
7a64216830 | ||
![]() |
bf7d2bd465 | ||
![]() |
6e97b591de | ||
![]() |
fc7c470966 | ||
![]() |
51492ca121 | ||
![]() |
ce1df84330 | ||
![]() |
9b43e2a715 | ||
![]() |
732cabd6aa | ||
![]() |
7c14801d5c | ||
![]() |
66df09c065 | ||
![]() |
8fd6985316 | ||
![]() |
feac001499 | ||
![]() |
4c47e3a8eb | ||
![]() |
7773b625a5 | ||
![]() |
abe1abec72 | ||
![]() |
023838a96b | ||
![]() |
f4e743acc5 | ||
![]() |
06d58cbda5 | ||
![]() |
d199dea204 | ||
![]() |
5722060ed9 | ||
![]() |
d4f7e727c1 | ||
![]() |
ba9afc3f8e | ||
![]() |
39897bd012 | ||
![]() |
575d563154 | ||
![]() |
2bf46ce2f3 | ||
![]() |
b49a185efc | ||
![]() |
e305ebd1ed | ||
![]() |
6f5c9826f4 | ||
![]() |
6025eaaca9 | ||
![]() |
b2441c3cca | ||
![]() |
a73599e9ee | ||
![]() |
58398f40fa | ||
![]() |
43f5d5a8e8 | ||
![]() |
b20cbd3558 | ||
![]() |
7f835a407c | ||
![]() |
9859974db7 | ||
![]() |
6c24ddd1a0 | ||
![]() |
bd92ef08ec | ||
![]() |
8de6107a17 | ||
![]() |
e639f03ac7 | ||
![]() |
f9aac442c1 | ||
![]() |
5fdf675168 | ||
![]() |
232f81ff48 | ||
![]() |
1c4a6b2274 | ||
![]() |
deb71f8efc | ||
![]() |
4596596d9f | ||
![]() |
bbb6d42f8d | ||
![]() |
01efd0f9f0 | ||
![]() |
2d7597d206 | ||
![]() |
221741c891 | ||
![]() |
9f69beb450 | ||
![]() |
e843d9e9c3 | ||
![]() |
008b3d94fb | ||
![]() |
6756d83c55 | ||
![]() |
b52072a2e3 | ||
![]() |
3afb00d563 | ||
![]() |
a30c94fd2f | ||
![]() |
f50c29a285 | ||
![]() |
f238b0f138 | ||
![]() |
d0a8c98040 | ||
![]() |
b3d161ad97 | ||
![]() |
fce9cf2077 | ||
![]() |
efd0e56697 | ||
![]() |
b94a9bb9d9 | ||
![]() |
c153cc5a29 | ||
![]() |
a680e9a25a | ||
![]() |
3c18c4ef22 | ||
![]() |
c4e11b5976 | ||
![]() |
65be51dd48 | ||
![]() |
9684103f97 | ||
![]() |
f4c647d430 | ||
![]() |
f1eab3b9c1 | ||
![]() |
545d52bd93 | ||
![]() |
4e42198c09 | ||
![]() |
44736a51b9 | ||
![]() |
e675ffd623 | ||
![]() |
1f14e06bd3 | ||
![]() |
9871078269 | ||
![]() |
5e7a7f4d62 | ||
![]() |
7d690c6809 | ||
![]() |
6edb4266d5 | ||
![]() |
799e82d501 | ||
![]() |
a2370bff68 | ||
![]() |
c72f3bcd12 | ||
![]() |
295964a74d | ||
![]() |
d77cda0fae | ||
![]() |
6da072d47d | ||
![]() |
471a5a1b3e | ||
![]() |
cd5da2d237 | ||
![]() |
62f67cd626 | ||
![]() |
70db96d9e5 | ||
![]() |
98470111fb | ||
![]() |
557a3bb01f | ||
![]() |
dee70acdcb | ||
![]() |
862b16879c | ||
![]() |
ed7249558e | ||
![]() |
4f6c6f4d10 | ||
![]() |
650d02d9b3 | ||
![]() |
e4041a2f69 | ||
![]() |
4c284a6d13 | ||
![]() |
e14fc801bd | ||
![]() |
0478d468e0 | ||
![]() |
4ac98710fb | ||
![]() |
f256f6417e | ||
![]() |
ca94d55b62 | ||
![]() |
c11c061113 | ||
![]() |
c15c3eb802 | ||
![]() |
0ce102b782 | ||
![]() |
cc48207a99 | ||
![]() |
353ea5fc5d | ||
![]() |
64138310cc | ||
![]() |
1c4538af72 | ||
![]() |
755b47ef19 | ||
![]() |
c78a5d3cab | ||
![]() |
b9b8d30f3b | ||
![]() |
9be93212c3 | ||
![]() |
89973809af | ||
![]() |
e324af356d | ||
![]() |
f51fc6ed47 | ||
![]() |
ecce98289a | ||
![]() |
23c14aa2e4 | ||
![]() |
678d04c5db | ||
![]() |
691ba75372 | ||
![]() |
d2d7bbc632 | ||
![]() |
b3b1a6bdb9 | ||
![]() |
310125ea01 | ||
![]() |
208d1cbba2 | ||
![]() |
e94154ba80 | ||
![]() |
582fbdd9e7 | ||
![]() |
dd175912f4 | ||
![]() |
a6a0ae7a51 | ||
![]() |
8cdac91a01 | ||
![]() |
4c89f41daa | ||
![]() |
512e826a42 | ||
![]() |
bc0d277a21 | ||
![]() |
169fe5fc5b | ||
![]() |
30867702a4 | ||
![]() |
6131f92ae6 | ||
![]() |
823a52583c | ||
![]() |
e2c6c0539f | ||
![]() |
f7f1c0e90d | ||
![]() |
eca12607dd | ||
![]() |
006e3e11f9 | ||
![]() |
a9982cbdca | ||
![]() |
0fa9c5a2a2 | ||
![]() |
cdcc9729d3 | ||
![]() |
4acf651aa7 | ||
![]() |
4bba791c65 | ||
![]() |
662688d3b9 | ||
![]() |
21a3e8fdc4 | ||
![]() |
3815a1d538 | ||
![]() |
cbe0c5cfec | ||
![]() |
15db9b30e1 | ||
![]() |
e891294c0f | ||
![]() |
f6b9e7cc26 | ||
![]() |
052fd7162f | ||
![]() |
189acb73f5 | ||
![]() |
ec7c1677b4 | ||
![]() |
a9474c8e67 | ||
![]() |
3a70dfc5f3 | ||
![]() |
669177d803 | ||
![]() |
b1f43b061c | ||
![]() |
7ff3c84deb | ||
![]() |
ee642b63ce | ||
![]() |
17315e5096 | ||
![]() |
4e9d52fc62 | ||
![]() |
d7e87f8fc8 | ||
![]() |
3efe11f393 | ||
![]() |
26c6c464d8 | ||
![]() |
4db654e653 | ||
![]() |
048759d374 | ||
![]() |
db2424057f | ||
![]() |
472a53e3b9 | ||
![]() |
9e15d91900 | ||
![]() |
d5cff281c0 | ||
![]() |
57b6c4dffb | ||
![]() |
908a2d1d8c | ||
![]() |
69bdea9273 | ||
![]() |
5b21a653ee | ||
![]() |
cfddcf1630 | ||
![]() |
f009687ddf | ||
![]() |
6ddfe29465 | ||
![]() |
715c51f673 | ||
![]() |
b443e8f06a | ||
![]() |
0bd0466c9c | ||
![]() |
ad5db3c9e5 | ||
![]() |
fa3182cb5e | ||
![]() |
3f44bed66e | ||
![]() |
2a70530d0f | ||
![]() |
7c542d5fc7 | ||
![]() |
638dfb7777 | ||
![]() |
1323536a63 | ||
![]() |
419212e2d4 | ||
![]() |
5f1c234a7d | ||
![]() |
db1e8301cd | ||
![]() |
bf94a3c68d | ||
![]() |
96baa4ffc6 | ||
![]() |
7d472afe61 | ||
![]() |
f32a4d33a7 | ||
![]() |
0722991955 | ||
![]() |
bcc740cdbc | ||
![]() |
5cf46097f7 | ||
![]() |
61dc189f8b | ||
![]() |
23c2b008c9 | ||
![]() |
db14afdf3a | ||
![]() |
b7927336d1 | ||
![]() |
ee23a3d4cd | ||
![]() |
63c0112ffb | ||
![]() |
db08d7d280 | ||
![]() |
9892525fbc | ||
![]() |
34b87ff6bf | ||
![]() |
241ad68bd5 | ||
![]() |
a0ec18921b | ||
![]() |
45e17eb0b2 | ||
![]() |
59f0e9ae67 | ||
![]() |
af24611c73 | ||
![]() |
d4502dda3f | ||
![]() |
c0efa8af5d | ||
![]() |
1c06a3fc89 | ||
![]() |
c19fb38d1c | ||
![]() |
5dc1de9daf | ||
![]() |
6774301938 | ||
![]() |
4ef6cf0428 | ||
![]() |
ca5f8e4b44 | ||
![]() |
1907f03abe | ||
![]() |
6351a4e4f3 | ||
![]() |
fa34c3937f | ||
![]() |
cdac97ebf5 | ||
![]() |
fe958d28b8 | ||
![]() |
f71982e1d5 | ||
![]() |
cb2bfcea53 | ||
![]() |
4a9d5bbceb | ||
![]() |
10809eade6 | ||
![]() |
43d63527f8 | ||
![]() |
df51eb54ed | ||
![]() |
b47109ab4d | ||
![]() |
15b2b68940 | ||
![]() |
62a239f6fe | ||
![]() |
d89bc95a0a | ||
![]() |
2a76f21b31 | ||
![]() |
f07e22d742 | ||
![]() |
058ab7a1ea | ||
![]() |
fae3baa640 | ||
![]() |
2c4da9c634 | ||
![]() |
8de0313aca | ||
![]() |
143c5b17f9 | ||
![]() |
ec32fde60d | ||
![]() |
f2ac5d4995 | ||
![]() |
716962af03 | ||
![]() |
156efde6b9 | ||
![]() |
a9b7716dfe | ||
![]() |
76a67a6715 | ||
![]() |
c3defdcda4 | ||
![]() |
d8092aa916 | ||
![]() |
8b5a3d31aa | ||
![]() |
11761b66b2 | ||
![]() |
f83f107bd1 | ||
![]() |
f1b90857ff | ||
![]() |
5aea4cdd65 | ||
![]() |
1822a59c70 | ||
![]() |
37c6934802 | ||
![]() |
90c7f747a4 | ||
![]() |
b7efa3dcd6 | ||
![]() |
da80f537ac | ||
![]() |
0119912318 | ||
![]() |
5e0b1d0161 | ||
![]() |
35145d100b | ||
![]() |
584dd0ba89 | ||
![]() |
e5f5dc56c9 | ||
![]() |
880efb012a | ||
![]() |
b95308ac24 | ||
![]() |
3b192ad357 | ||
![]() |
b04938ac5e | ||
![]() |
56410ac1f2 | ||
![]() |
45a2eadc58 | ||
![]() |
0e03151505 | ||
![]() |
3e9706e6ce | ||
![]() |
a1646a7a88 | ||
![]() |
434511658b | ||
![]() |
04230fdd9c | ||
![]() |
2e16ad8a2a | ||
![]() |
7fb59b0fa9 | ||
![]() |
24e044bcda | ||
![]() |
1093656ec5 | ||
![]() |
674e997060 | ||
![]() |
37fd124f56 | ||
![]() |
7df2e67312 | ||
![]() |
8ea1f0796c | ||
![]() |
00fb5bc6cf | ||
![]() |
5e01f726d3 | ||
![]() |
e87290aeea | ||
![]() |
e7236beedd | ||
![]() |
5a6f54c96c | ||
![]() |
7769985439 | ||
![]() |
f4afdb21b2 | ||
![]() |
cc1b9e0a50 | ||
![]() |
2c58740cbb | ||
![]() |
808533b110 | ||
![]() |
e04a15bb99 | ||
![]() |
26d4074a61 | ||
![]() |
0137de5ca2 | ||
![]() |
b0a1b2edba | ||
![]() |
355c560ddc | ||
![]() |
72f286d9c6 | ||
![]() |
db6786414a | ||
![]() |
f8f046f193 | ||
![]() |
6c9ad4ded2 | ||
![]() |
32cae8ca11 | ||
![]() |
0cb65279d9 | ||
![]() |
412da06554 | ||
![]() |
247f8a2778 | ||
![]() |
017c9a6a70 | ||
![]() |
eccb2430b5 | ||
![]() |
5c64ebf1cc | ||
![]() |
1d7796805c | ||
![]() |
3479aaf6f6 | ||
![]() |
d2071cf05c | ||
![]() |
fb75508258 | ||
![]() |
0e69168382 | ||
![]() |
9970ab8643 | ||
![]() |
7ff82010c3 | ||
![]() |
1da8cd53d2 | ||
![]() |
9337a89eac | ||
![]() |
510564dd91 | ||
![]() |
a9ededc997 | ||
![]() |
722cffbd48 | ||
![]() |
a787befd72 | ||
![]() |
8ddd71a65a | ||
![]() |
280e1ec16d | ||
![]() |
52cf10cb2e | ||
![]() |
c12082affc | ||
![]() |
c0d7d74dac | ||
![]() |
df72b24ad2 | ||
![]() |
26bdd15400 | ||
![]() |
e13310b4e0 | ||
![]() |
e9d4218705 | ||
![]() |
56b80e4e60 | ||
![]() |
679f6471e6 | ||
![]() |
984179695c | ||
![]() |
5cca484a82 | ||
![]() |
d91e2296b0 | ||
![]() |
59768c16e2 | ||
![]() |
580efeae1a | ||
![]() |
0a3b508c8a | ||
![]() |
5e2f590b76 | ||
![]() |
ee94396afa | ||
![]() |
98764b6356 | ||
![]() |
f01cc4d0d0 | ||
![]() |
4c0f17429b | ||
![]() |
6a2ae1c572 | ||
![]() |
a2681ce6cc | ||
![]() |
4e43606932 | ||
![]() |
28c0c3207a | ||
![]() |
ecfa0e2b49 | ||
![]() |
ec3122f320 | ||
![]() |
7e4b4c973c | ||
![]() |
64753df2dd | ||
![]() |
75b36ab886 | ||
![]() |
208a78c748 | ||
![]() |
027249c575 | ||
![]() |
5ceb960205 | ||
![]() |
1cea156c5a | ||
![]() |
e1efa1ecbc | ||
![]() |
517de5e179 | ||
![]() |
825b62a2a9 | ||
![]() |
5ec817776c | ||
![]() |
3ad0519add | ||
![]() |
9868522341 | ||
![]() |
5b8d8c617f | ||
![]() |
a1f66061e3 | ||
![]() |
d8811933c9 | ||
![]() |
c9864dde8d | ||
![]() |
ca849d6649 | ||
![]() |
95a2354a86 | ||
![]() |
538e0ac48c | ||
![]() |
1c17411f04 | ||
![]() |
cbe0f89548 | ||
![]() |
615b071dcb | ||
![]() |
2d74f121aa | ||
![]() |
f65c180b8f | ||
![]() |
eb389c472d | ||
![]() |
befdf08035 | ||
![]() |
7a43ac865e | ||
![]() |
c43fcf9fbf | ||
![]() |
472a633010 | ||
![]() |
fc46acb2e4 | ||
![]() |
7fde66eb40 | ||
![]() |
b3cea3997d | ||
![]() |
2f20193086 | ||
![]() |
601e207f04 | ||
![]() |
f0d3d8b276 | ||
![]() |
e02d34f023 | ||
![]() |
0504be84b6 | ||
![]() |
216f020b70 | ||
![]() |
66505eedfa | ||
![]() |
b307c7d88b | ||
![]() |
47d4445fa8 | ||
![]() |
7098d2633a | ||
![]() |
61b5393b54 | ||
![]() |
6fe2cf13b6 | ||
![]() |
cc971eb2df | ||
![]() |
a260987f5c | ||
![]() |
5eb8f44dfc | ||
![]() |
e36131b38b | ||
![]() |
b67868afde | ||
![]() |
328fdee281 | ||
![]() |
8ab43e98fe | ||
![]() |
4f407ccc03 | ||
![]() |
5f3fddd3e4 | ||
![]() |
392f3b536d | ||
![]() |
155de2b396 | ||
![]() |
6c9930ac2a | ||
![]() |
9dddf4f4bc | ||
![]() |
314506c15c | ||
673222da6c | |||
![]() |
58b97e6361 | ||
![]() |
8bc2032b07 | ||
![]() |
40d4354dfc | ||
![]() |
27f2f5bb2b | ||
![]() |
490b934269 | ||
![]() |
e2e2b4d176 | ||
![]() |
7a1763bbee | ||
![]() |
ca8904b6bb | ||
![]() |
6384b28689 | ||
![]() |
e661466558 | ||
![]() |
8faf2beba4 | ||
![]() |
fb29319ec6 | ||
![]() |
7779d7d193 | ||
![]() |
2c5246b62f | ||
![]() |
e43a3f4518 | ||
![]() |
b5716f7a6d | ||
![]() |
fac5a3cc6f | ||
![]() |
671793078a | ||
![]() |
4f5ea1696f | ||
![]() |
b3e47e3bac | ||
![]() |
d67e990065 | ||
![]() |
7fb6f4b47f | ||
![]() |
df3b435a1f | ||
![]() |
5b65f1b544 | ||
![]() |
e159866d3b | ||
![]() |
aa0ce71612 | ||
![]() |
522e547f99 | ||
![]() |
9430341d4e | ||
![]() |
95838d045d | ||
![]() |
20832f11b6 | ||
![]() |
258203f400 | ||
![]() |
3b1768fa4e | ||
![]() |
23a3085bad | ||
![]() |
78c12e0ea6 | ||
![]() |
997cb85663 | ||
![]() |
968d5eabfa | ||
![]() |
590ce1f7ed | ||
![]() |
416a8838e4 | ||
![]() |
f6c349ac31 | ||
![]() |
517c6b40b5 | ||
![]() |
1fa78935a6 | ||
![]() |
4ddcd56740 | ||
![]() |
e5a2f33584 | ||
![]() |
c17cf3256a | ||
![]() |
5415bda02d | ||
![]() |
07cbaeb7aa | ||
![]() |
9d5aa83786 | ||
![]() |
463164cb88 | ||
![]() |
4809742088 | ||
![]() |
9cf0e285b4 | ||
![]() |
a6ca6f1cf9 | ||
![]() |
bd7479e1c0 | ||
![]() |
b35b51c203 | ||
![]() |
5652774888 | ||
![]() |
836e9a2fbc | ||
![]() |
64538c255d | ||
![]() |
62a9293dcf | ||
![]() |
1faae92f33 | ||
![]() |
dee808752f | ||
![]() |
5590af6995 | ||
![]() |
5afd161fba | ||
![]() |
336efa1e8b | ||
![]() |
568d5ca4ff | ||
![]() |
a9991f2a50 | ||
![]() |
1c8096444a | ||
![]() |
f424de46e6 | ||
![]() |
8fcca05565 | ||
![]() |
ed1f3cec59 | ||
![]() |
c29a409f28 | ||
![]() |
1a46936ad6 | ||
![]() |
e82abfb948 | ||
![]() |
c3409be780 | ||
![]() |
1557ab3474 | ||
![]() |
75fdda4fbf | ||
![]() |
4d75ef2849 | ||
![]() |
a1da23d1ba | ||
![]() |
c4bc751df7 | ||
![]() |
972d89ec6e | ||
![]() |
70f040e104 | ||
![]() |
d4de0b49c8 | ||
![]() |
2a42d58361 | ||
![]() |
14308956d7 | ||
![]() |
71339a66d7 | ||
![]() |
85f0664b56 | ||
![]() |
2f86ac0dfa | ||
![]() |
79d7b7a08d | ||
![]() |
b550d1990e | ||
![]() |
22062f0c77 | ||
![]() |
515f613a53 | ||
![]() |
615ed6b713 | ||
![]() |
f6eab62c3c | ||
![]() |
7d1e00ff0d | ||
![]() |
692439953c | ||
![]() |
6960a34d02 | ||
![]() |
b3662d4e6e | ||
![]() |
50c9b7c352 | ||
![]() |
f395d3b2bf | ||
![]() |
4fbf6cbc50 | ||
![]() |
9916958d6c | ||
![]() |
184a069c7f | ||
![]() |
0b65346633 | ||
![]() |
11f23dcc9e | ||
![]() |
f80d1defcb | ||
![]() |
e95d6343cb | ||
![]() |
a9052a068f | ||
![]() |
b1323c0d67 | ||
![]() |
87ceb8fb58 |
6
.github/workflows/closeYoutrackOnCommit.yml
vendored
6
.github/workflows/closeYoutrackOnCommit.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
|||||||
fetch-depth: 300
|
fetch-depth: 300
|
||||||
- name: Get tags
|
- name: Get tags
|
||||||
run: git fetch --tags origin
|
run: git fetch --tags origin
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
echo "LAST_COMMIT=$(git rev-list -n 1 tags/workflow-close-youtrack)" >> $GITHUB_ENV
|
echo "LAST_COMMIT=$(git rev-list -n 1 tags/workflow-close-youtrack)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update YouTrack
|
- name: Update YouTrack
|
||||||
run: ./gradlew updateYoutrackOnCommit
|
run: ./gradlew --no-configuration-cache updateYoutrackOnCommit
|
||||||
env:
|
env:
|
||||||
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
||||||
YOUTRACK_TOKEN: ${{ secrets.YOUTRACK_TOKEN }}
|
YOUTRACK_TOKEN: ${{ secrets.YOUTRACK_TOKEN }}
|
||||||
|
4
.github/workflows/integrationsTest.yml
vendored
4
.github/workflows/integrationsTest.yml
vendored
@@ -18,10 +18,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 300
|
fetch-depth: 300
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
4
.github/workflows/kover.yml
vendored
4
.github/workflows/kover.yml
vendored
@@ -18,10 +18,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 300
|
fetch-depth: 300
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
8
.github/workflows/mergePr.yml
vendored
8
.github/workflows/mergePr.yml
vendored
@@ -11,7 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
if: github.event.pull_request.merged == true && github.repository == 'JetBrains/ideavim'
|
if: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -20,17 +20,17 @@ jobs:
|
|||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
# See end of file updateChangeslog.yml for explanation of this secret
|
# See end of file updateChangeslog.yml for explanation of this secret
|
||||||
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
|
||||||
- name: Update authors
|
- name: Update authors
|
||||||
id: update_authors
|
id: update_authors
|
||||||
run: ./gradlew updateMergedPr -PprId=${{ github.event.number }}
|
run: ./gradlew --no-configuration-cache updateMergedPr -PprId=${{ github.event.number }}
|
||||||
env:
|
env:
|
||||||
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
81
.github/workflows/runUiOctopusTests.yml
vendored
Normal file
81
.github/workflows/runUiOctopusTests.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
name: Run Non Octopus UI Tests
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 12 * * *'
|
||||||
|
jobs:
|
||||||
|
build-for-ui-test-mac-os:
|
||||||
|
if: github.repository == 'JetBrains/ideavim'
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: zulu
|
||||||
|
java-version: 17
|
||||||
|
- name: Setup FFmpeg
|
||||||
|
run: brew install ffmpeg
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2.4.2
|
||||||
|
- name: Build Plugin
|
||||||
|
run: gradle :buildPlugin
|
||||||
|
- name: Run Idea
|
||||||
|
run: |
|
||||||
|
mkdir -p build/reports
|
||||||
|
gradle runIdeForUiTests -Doctopus.handler=false > build/reports/idea.log &
|
||||||
|
- name: Wait for Idea started
|
||||||
|
uses: jtalk/url-health-check-action@v3
|
||||||
|
with:
|
||||||
|
url: http://127.0.0.1:8082
|
||||||
|
max-attempts: 20
|
||||||
|
retry-delay: 10s
|
||||||
|
- name: Tests
|
||||||
|
run: gradle :tests:ui-ij-tests:testUi
|
||||||
|
- name: Move video
|
||||||
|
if: always()
|
||||||
|
run: mv tests/ui-ij-tests/video build/reports
|
||||||
|
- name: Move sandbox logs
|
||||||
|
if: always()
|
||||||
|
run: mv build/idea-sandbox/system/log sandbox-idea-log
|
||||||
|
- name: Save report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ui-test-fails-report-mac
|
||||||
|
path: |
|
||||||
|
build/reports
|
||||||
|
tests/ui-ij-tests/build/reports
|
||||||
|
sandbox-idea-log
|
||||||
|
# build-for-ui-test-linux:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# - name: Setup Java
|
||||||
|
# uses: actions/setup-java@v2.1.0
|
||||||
|
# with:
|
||||||
|
# distribution: zulu
|
||||||
|
# java-version: 11
|
||||||
|
# - name: Build Plugin
|
||||||
|
# run: gradle :buildPlugin
|
||||||
|
# - name: Run Idea
|
||||||
|
# run: |
|
||||||
|
# export DISPLAY=:99.0
|
||||||
|
# Xvfb -ac :99 -screen 0 1920x1080x16 &
|
||||||
|
# mkdir -p build/reports
|
||||||
|
# gradle :runIdeForUiTests #> build/reports/idea.log
|
||||||
|
# - name: Wait for Idea started
|
||||||
|
# uses: jtalk/url-health-check-action@1.5
|
||||||
|
# with:
|
||||||
|
# url: http://127.0.0.1:8082
|
||||||
|
# max-attempts: 15
|
||||||
|
# retry-delay: 30s
|
||||||
|
# - name: Tests
|
||||||
|
# run: gradle :testUi
|
||||||
|
# - name: Save fails report
|
||||||
|
# if: ${{ failure() }}
|
||||||
|
# uses: actions/upload-artifact@v2
|
||||||
|
# with:
|
||||||
|
# name: ui-test-fails-report-linux
|
||||||
|
# path: |
|
||||||
|
# ui-test-example/build/reports
|
52
.github/workflows/runUiPyTests.yml
vendored
Normal file
52
.github/workflows/runUiPyTests.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
name: Run UI PyCharm Tests
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 12 * * *'
|
||||||
|
jobs:
|
||||||
|
build-for-ui-test-mac-os:
|
||||||
|
if: github.repository == 'JetBrains/ideavim'
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: zulu
|
||||||
|
java-version: 17
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
- name: Setup FFmpeg
|
||||||
|
run: brew install ffmpeg
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2.4.2
|
||||||
|
- name: Build Plugin
|
||||||
|
run: gradle :buildPlugin
|
||||||
|
- name: Run Idea
|
||||||
|
run: |
|
||||||
|
mkdir -p build/reports
|
||||||
|
gradle :runIdeForUiTests -PideaType=PC > build/reports/idea.log &
|
||||||
|
- name: Wait for Idea started
|
||||||
|
uses: jtalk/url-health-check-action@v3
|
||||||
|
with:
|
||||||
|
url: http://127.0.0.1:8082
|
||||||
|
max-attempts: 20
|
||||||
|
retry-delay: 10s
|
||||||
|
- name: Tests
|
||||||
|
run: gradle :tests:ui-py-tests:testUi
|
||||||
|
- name: Move video
|
||||||
|
if: always()
|
||||||
|
run: mv tests/ui-py-tests/video build/reports
|
||||||
|
- name: Move sandbox logs
|
||||||
|
if: always()
|
||||||
|
run: mv build/idea-sandbox/system/log sandbox-idea-log
|
||||||
|
- name: Save report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ui-test-fails-report-mac
|
||||||
|
path: |
|
||||||
|
build/reports
|
||||||
|
tests/ui-py-tests/build/reports
|
||||||
|
sandbox-idea-log
|
35
.github/workflows/runUiTests.yml
vendored
35
.github/workflows/runUiTests.yml
vendored
@@ -8,42 +8,45 @@ jobs:
|
|||||||
if: github.repository == 'JetBrains/ideavim'
|
if: github.repository == 'JetBrains/ideavim'
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v2.1.0
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: zulu
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- name: Setup FFmpeg
|
- name: Setup FFmpeg
|
||||||
uses: FedericoCarboni/setup-ffmpeg@v1
|
run: brew install ffmpeg
|
||||||
with:
|
- name: Setup Gradle
|
||||||
# Not strictly necessary, but it may prevent rate limit
|
uses: gradle/gradle-build-action@v2.4.2
|
||||||
# errors especially on GitHub-hosted macos machines.
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Build Plugin
|
- name: Build Plugin
|
||||||
run: gradle :buildPlugin
|
run: gradle :buildPlugin
|
||||||
- name: Run Idea
|
- name: Run Idea
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build/reports
|
mkdir -p build/reports
|
||||||
gradle :runIdeForUiTests > build/reports/idea.log &
|
gradle runIdeForUiTests > build/reports/idea.log &
|
||||||
- name: Wait for Idea started
|
- name: Wait for Idea started
|
||||||
uses: jtalk/url-health-check-action@1.5
|
uses: jtalk/url-health-check-action@v3
|
||||||
with:
|
with:
|
||||||
url: http://127.0.0.1:8082
|
url: http://127.0.0.1:8082
|
||||||
max-attempts: 20
|
max-attempts: 20
|
||||||
retry-delay: 10s
|
retry-delay: 10s
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: gradle :testUi
|
run: gradle :tests:ui-ij-tests:testUi
|
||||||
- name: Move video
|
- name: Move video
|
||||||
if: ${{ failure() }}
|
if: always()
|
||||||
run: mv video build/reports
|
run: mv tests/ui-ij-tests/video build/reports
|
||||||
- name: Save fails report
|
- name: Move sandbox logs
|
||||||
if: ${{ failure() }}
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
run: mv build/idea-sandbox/system/log sandbox-idea-log
|
||||||
|
- name: Save report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ui-test-fails-report-mac
|
name: ui-test-fails-report-mac
|
||||||
path: |
|
path: |
|
||||||
build/reports
|
build/reports
|
||||||
|
tests/ui-ij-tests/build/reports
|
||||||
|
sandbox-idea-log
|
||||||
# build-for-ui-test-linux:
|
# build-for-ui-test-linux:
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# steps:
|
# steps:
|
||||||
|
34
.github/workflows/updateAffectedRate.yml
vendored
34
.github/workflows/updateAffectedRate.yml
vendored
@@ -1,34 +0,0 @@
|
|||||||
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
|
|
||||||
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
|
|
||||||
|
|
||||||
# This workflow syncs changes from the docs folder of IdeaVim to the IdeaVim.wiki repository
|
|
||||||
|
|
||||||
name: Update Affected Rate field on YouTrack
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 8 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'JetBrains/ideavim'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Fetch origin repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'adopt'
|
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
|
||||||
|
|
||||||
- name: Update YouTrack
|
|
||||||
run: ./gradlew scripts:updateAffectedRates
|
|
||||||
env:
|
|
||||||
YOUTRACK_TOKEN: ${{ secrets.YOUTRACK_TOKEN }}
|
|
6
.github/workflows/updateAuthors.yml
vendored
6
.github/workflows/updateAuthors.yml
vendored
@@ -25,10 +25,10 @@ jobs:
|
|||||||
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
||||||
- name: Get tags
|
- name: Get tags
|
||||||
run: git fetch --tags origin
|
run: git fetch --tags origin
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Update authors
|
- name: Update authors
|
||||||
id: update_authors
|
id: update_authors
|
||||||
run: ./gradlew updateAuthors --stacktrace
|
run: ./gradlew --no-configuration-cache updateAuthors --stacktrace
|
||||||
env:
|
env:
|
||||||
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
||||||
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
13
.github/workflows/updateChangelog.yml
vendored
13
.github/workflows/updateChangelog.yml
vendored
@@ -7,15 +7,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 10 * * *'
|
- cron: '0 10 * * *'
|
||||||
# Workflow run on push is disabled to avoid conflicts when merging PR
|
|
||||||
# push:
|
|
||||||
# branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'JetBrains/ideavim'
|
if: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -25,10 +22,10 @@ jobs:
|
|||||||
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
||||||
- name: Get tags
|
- name: Get tags
|
||||||
run: git fetch --tags origin
|
run: git fetch --tags origin
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
@@ -39,7 +36,7 @@ jobs:
|
|||||||
echo "LAST_COMMIT=$(git rev-list -n 1 tags/workflow-changelog)" >> $GITHUB_ENV
|
echo "LAST_COMMIT=$(git rev-list -n 1 tags/workflow-changelog)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update changelog
|
- name: Update changelog
|
||||||
run: ./gradlew updateChangelog
|
run: ./gradlew --no-configuration-cache updateChangelog
|
||||||
env:
|
env:
|
||||||
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
SUCCESS_COMMIT: ${{ env.LAST_COMMIT }}
|
||||||
|
|
||||||
@@ -63,4 +60,4 @@ jobs:
|
|||||||
# dependabot updates. See mergeDependatobPR.yml file.
|
# dependabot updates. See mergeDependatobPR.yml file.
|
||||||
# However, it turned out that GitHub accepts pushes from the actions as a PR and requires checks, that are always
|
# However, it turned out that GitHub accepts pushes from the actions as a PR and requires checks, that are always
|
||||||
# false for pushing from actions.
|
# false for pushing from actions.
|
||||||
# This secret is created to implement the workaround described in https://stackoverflow.com/a/76135647/3124227
|
# This secret is created to implement the workaround described in https://stackoverflow.com/a/76135647/3124227
|
||||||
|
4
.github/workflows/updateFormatting.yml
vendored
4
.github/workflows/updateFormatting.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
|||||||
fetch-depth: 50
|
fetch-depth: 50
|
||||||
# See end of file updateChangeslog.yml for explanation of this secret
|
# See end of file updateChangeslog.yml for explanation of this secret
|
||||||
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -10,6 +10,8 @@
|
|||||||
!/.idea/runConfigurations
|
!/.idea/runConfigurations
|
||||||
!/.idea/codeStyles
|
!/.idea/codeStyles
|
||||||
!/.idea/vcs.xml
|
!/.idea/vcs.xml
|
||||||
|
!/.idea/misc.xml
|
||||||
|
!/.idea/.name
|
||||||
|
|
||||||
**/build/
|
**/build/
|
||||||
**/out/
|
**/out/
|
||||||
@@ -22,7 +24,8 @@
|
|||||||
.teamcity/*.iml
|
.teamcity/*.iml
|
||||||
|
|
||||||
# Generated by gradle task "generateGrammarSource"
|
# Generated by gradle task "generateGrammarSource"
|
||||||
src/main/java/com/maddyhome/idea/vim/vimscript/parser/generated
|
vim-engine/src/main/java/com/maddyhome/idea/vim/parser/generated
|
||||||
|
vim-engine/src/main/java/com/maddyhome/idea/vim/regexp/parser/generated
|
||||||
# Generated JSONs for lazy classloading
|
# Generated JSONs for lazy classloading
|
||||||
/vim-engine/src/main/resources/ksp-generated
|
/vim-engine/src/main/resources/ksp-generated
|
||||||
/src/main/resources/ksp-generated
|
/src/main/resources/ksp-generated
|
||||||
|
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
IdeaVim
|
2
.idea/copyright/IdeaVim.xml
generated
2
.idea/copyright/IdeaVim.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<component name="CopyrightManager">
|
<component name="CopyrightManager">
|
||||||
<copyright>
|
<copyright>
|
||||||
<option name="notice" value="Copyright 2003-2023 The IdeaVim authors Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt file or at https://opensource.org/licenses/MIT." />
|
<option name="notice" value="Copyright 2003-&#36;today.year The IdeaVim authors Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt file or at https://opensource.org/licenses/MIT." />
|
||||||
<option name="myName" value="IdeaVim" />
|
<option name="myName" value="IdeaVim" />
|
||||||
</copyright>
|
</copyright>
|
||||||
</component>
|
</component>
|
22
.idea/misc.xml
generated
Normal file
22
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="EntryPointsManager">
|
||||||
|
<list size="3">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="com.intellij.vim.annotations.CommandOrMotion" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="com.intellij.vim.annotations.ExCommand" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="com.intellij.vim.annotations.VimscriptFunction" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/.teamcity/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
25
.idea/runConfigurations/Start_IJ_with_IdeaVim__Split_Mode_.xml
generated
Normal file
25
.idea/runConfigurations/Start_IJ_with_IdeaVim__Split_Mode_.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Start IJ with IdeaVim (Split Mode)" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="runIdeSplitMode" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -11,6 +11,6 @@
|
|||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
16
.teamcity/_Self/Constants.kt
vendored
16
.teamcity/_Self/Constants.kt
vendored
@@ -5,13 +5,13 @@ object Constants {
|
|||||||
const val EAP_CHANNEL = "eap"
|
const val EAP_CHANNEL = "eap"
|
||||||
const val DEV_CHANNEL = "Dev"
|
const val DEV_CHANNEL = "Dev"
|
||||||
|
|
||||||
const val GITHUB_TESTS = "2023.1.2"
|
const val GITHUB_TESTS = "2024.1.1"
|
||||||
const val NVIM_TESTS = "2023.1.2"
|
const val NVIM_TESTS = "2024.1.1"
|
||||||
const val PROPERTY_TESTS = "2023.1.2"
|
const val PROPERTY_TESTS = "2024.1.1"
|
||||||
const val LONG_RUNNING_TESTS = "2023.1.2"
|
const val LONG_RUNNING_TESTS = "2024.1.1"
|
||||||
const val QODANA_TESTS = "2023.1.2"
|
const val QODANA_TESTS = "2024.1.1"
|
||||||
const val RELEASE = "2023.1.2"
|
const val RELEASE = "2024.1.1"
|
||||||
|
|
||||||
const val RELEASE_DEV = "2023.1.2"
|
const val RELEASE_DEV = "2024.1.1"
|
||||||
const val RELEASE_EAP = "2023.1.2"
|
const val RELEASE_EAP = "2024.1.1"
|
||||||
}
|
}
|
||||||
|
12
.teamcity/_Self/Project.kt
vendored
12
.teamcity/_Self/Project.kt
vendored
@@ -11,21 +11,22 @@ import _Self.subprojects.GitHub
|
|||||||
import _Self.subprojects.OldTests
|
import _Self.subprojects.OldTests
|
||||||
import _Self.subprojects.Releases
|
import _Self.subprojects.Releases
|
||||||
import _Self.vcsRoots.GitHubPullRequest
|
import _Self.vcsRoots.GitHubPullRequest
|
||||||
|
import _Self.vcsRoots.ReleasesVcsRoot
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
|
||||||
object Project : Project({
|
object Project : Project({
|
||||||
description = "Vim engine for IDEs based on the IntelliJ platform"
|
description = "Vim engine for JetBrains IDEs"
|
||||||
|
|
||||||
subProjects(Releases, OldTests, GitHub)
|
subProjects(Releases, OldTests, GitHub)
|
||||||
|
|
||||||
// VCS roots
|
// VCS roots
|
||||||
vcsRoot(GitHubPullRequest)
|
vcsRoot(GitHubPullRequest)
|
||||||
|
vcsRoot(ReleasesVcsRoot)
|
||||||
|
|
||||||
// Active tests
|
// Active tests
|
||||||
buildType(TestingBuildType("2023.2", "<default>", version = "2023.2.3"))
|
|
||||||
buildType(TestingBuildType("2023.1", "<default>", version = "2023.1.5"))
|
|
||||||
buildType(TestingBuildType("Latest EAP", "<default>", version = "LATEST-EAP-SNAPSHOT"))
|
buildType(TestingBuildType("Latest EAP", "<default>", version = "LATEST-EAP-SNAPSHOT"))
|
||||||
|
buildType(TestingBuildType("2024.1.1", "<default>"))
|
||||||
buildType(TestingBuildType("Latest EAP With Xorg", "<default>", version = "LATEST-EAP-SNAPSHOT"))
|
buildType(TestingBuildType("Latest EAP With Xorg", "<default>", version = "LATEST-EAP-SNAPSHOT"))
|
||||||
|
|
||||||
buildType(PropertyBased)
|
buildType(PropertyBased)
|
||||||
@@ -40,6 +41,11 @@ object Project : Project({
|
|||||||
|
|
||||||
// Common build type for all configurations
|
// Common build type for all configurations
|
||||||
abstract class IdeaVimBuildType(init: BuildType.() -> Unit) : BuildType({
|
abstract class IdeaVimBuildType(init: BuildType.() -> Unit) : BuildType({
|
||||||
|
artifactRules = """
|
||||||
|
+:build/reports => build/reports
|
||||||
|
+:/mnt/agent/temp/buildTmp/ => /mnt/agent/temp/buildTmp/
|
||||||
|
""".trimIndent()
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
|
||||||
requirements {
|
requirements {
|
||||||
|
1
.teamcity/_Self/buildTypes/Compatibility.kt
vendored
1
.teamcity/_Self/buildTypes/Compatibility.kt
vendored
@@ -34,7 +34,6 @@ object Compatibility : IdeaVimBuildType({
|
|||||||
|
|
||||||
java --version
|
java --version
|
||||||
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}org.jetbrains.IdeaVim-EasyMotion' [latest-IU] -team-city
|
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}org.jetbrains.IdeaVim-EasyMotion' [latest-IU] -team-city
|
||||||
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}io.github.mishkun.ideavimsneak' [latest-IU] -team-city
|
|
||||||
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}eu.theblob42.idea.whichkey' [latest-IU] -team-city
|
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}eu.theblob42.idea.whichkey' [latest-IU] -team-city
|
||||||
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}IdeaVimExtension' [latest-IU] -team-city
|
java -jar verifier1/verifier-cli-dev-all-1.jar check-plugin '${'$'}IdeaVimExtension' [latest-IU] -team-city
|
||||||
# Outdated java -jar verifier/verifier-cli-dev-all.jar check-plugin '${'$'}github.zgqq.intellij-enhance' [latest-IU] -team-city
|
# Outdated java -jar verifier/verifier-cli-dev-all.jar check-plugin '${'$'}github.zgqq.intellij-enhance' [latest-IU] -team-city
|
||||||
|
72
.teamcity/_Self/buildTypes/CreateNewReleaseBranchFromMaster.kt
vendored
Normal file
72
.teamcity/_Self/buildTypes/CreateNewReleaseBranchFromMaster.kt
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2003-2024 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE.txt file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.IdeaVimBuildType
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||||
|
|
||||||
|
object CreateNewReleaseBranchFromMaster : IdeaVimBuildType({
|
||||||
|
name = "EXP: Create new release branch from master"
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(DslContext.settingsRoot)
|
||||||
|
branchFilter = "+:<default>"
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.AUTO
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
name = "Calculate next potential release version"
|
||||||
|
scriptContent = """
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fetch all remote branches
|
||||||
|
git fetch --all
|
||||||
|
|
||||||
|
# Get a list of all branches matching the pattern releases/x.y.z
|
||||||
|
branches=${'$'}(git branch -r | grep -oE 'releases/[0-9]+\.[0-9]+\.x')
|
||||||
|
|
||||||
|
# If no matching branches are found, print a message and exit
|
||||||
|
if [[ -z "${'$'}branches" ]]; then
|
||||||
|
echo "No release branches found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find the largest release version
|
||||||
|
largest_release=${'$'}(echo "${'$'}branches" | sort -V | tail -n 1)
|
||||||
|
|
||||||
|
# Print the largest release
|
||||||
|
echo "Largest release branch: ${'$'}largest_release"
|
||||||
|
echo "##teamcity[setParameter name='env.POTENTIAL_VERSION' value='${'$'}largest_release']"
|
||||||
|
""".trimIndent()
|
||||||
|
}
|
||||||
|
|
||||||
|
script {
|
||||||
|
name = "Show potential release version"
|
||||||
|
scriptContent = """
|
||||||
|
#!/bin/bash
|
||||||
|
echo "Calculated or user-provided parameter value is: %env.POTENTIAL_VERSION%"
|
||||||
|
""".trimIndent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.POTENTIAL_VERSION", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
features {
|
||||||
|
sshAgent {
|
||||||
|
teamcitySshKey = "IdeaVim ssh keys"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
2
.teamcity/_Self/buildTypes/LongRunning.kt
vendored
2
.teamcity/_Self/buildTypes/LongRunning.kt
vendored
@@ -25,7 +25,7 @@ object LongRunning : IdeaVimBuildType({
|
|||||||
|
|
||||||
steps {
|
steps {
|
||||||
gradle {
|
gradle {
|
||||||
tasks = "clean testLongRunning"
|
tasks = "clean :tests:long-running-tests:testLongRunning"
|
||||||
buildFile = ""
|
buildFile = ""
|
||||||
enableStacktrace = true
|
enableStacktrace = true
|
||||||
}
|
}
|
||||||
|
2
.teamcity/_Self/buildTypes/Nvim.kt
vendored
2
.teamcity/_Self/buildTypes/Nvim.kt
vendored
@@ -39,7 +39,7 @@ object Nvim : IdeaVimBuildType({
|
|||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
gradle {
|
gradle {
|
||||||
tasks = "clean testWithNeovim"
|
tasks = "clean test -Dnvim"
|
||||||
buildFile = ""
|
buildFile = ""
|
||||||
enableStacktrace = true
|
enableStacktrace = true
|
||||||
}
|
}
|
||||||
|
42
.teamcity/_Self/buildTypes/PrintReleaseBranch.kt
vendored
Normal file
42
.teamcity/_Self/buildTypes/PrintReleaseBranch.kt
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2003-2024 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE.txt file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.IdeaVimBuildType
|
||||||
|
import _Self.vcsRoots.ReleasesVcsRoot
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||||
|
|
||||||
|
object PrintReleaseBranch : IdeaVimBuildType({
|
||||||
|
name = "EXP: Print release branch"
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(ReleasesVcsRoot)
|
||||||
|
branchFilter = "+:heads/releases/*"
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.AUTO
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
|
||||||
|
script {
|
||||||
|
name = "Print current branch"
|
||||||
|
scriptContent = """
|
||||||
|
echo "Current branch is: %teamcity.build.branch%"
|
||||||
|
""".trimIndent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
features {
|
||||||
|
sshAgent {
|
||||||
|
teamcitySshKey = "IdeaVim ssh keys"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
2
.teamcity/_Self/buildTypes/PropertyBased.kt
vendored
2
.teamcity/_Self/buildTypes/PropertyBased.kt
vendored
@@ -24,7 +24,7 @@ object PropertyBased : IdeaVimBuildType({
|
|||||||
|
|
||||||
steps {
|
steps {
|
||||||
gradle {
|
gradle {
|
||||||
tasks = "clean testPropertyBased"
|
tasks = "clean :tests:property-tests:testPropertyBased"
|
||||||
buildFile = ""
|
buildFile = ""
|
||||||
enableStacktrace = true
|
enableStacktrace = true
|
||||||
}
|
}
|
||||||
|
@@ -20,13 +20,13 @@ object PublishVimEngine : IdeaVimBuildType({
|
|||||||
params {
|
params {
|
||||||
param("env.ORG_GRADLE_PROJECT_engineVersion", "%build.number%")
|
param("env.ORG_GRADLE_PROJECT_engineVersion", "%build.number%")
|
||||||
param("env.ORG_GRADLE_PROJECT_uploadUrl", "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
|
param("env.ORG_GRADLE_PROJECT_uploadUrl", "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
|
||||||
password("env.ORG_GRADLE_PROJECT_spacePassword", "credentialsJSON:790b4e43-ee83-4184-b81b-678afab60409", display = ParameterDisplay.HIDDEN)
|
password("env.ORG_GRADLE_PROJECT_spacePassword", "credentialsJSON:5ea56f8c-efe7-4e1e-83de-0c02bcc39d0b", display = ParameterDisplay.HIDDEN)
|
||||||
param("env.ORG_GRADLE_PROJECT_spaceUsername", "Aleksei.Plate")
|
param("env.ORG_GRADLE_PROJECT_spaceUsername", "a121c67e-39ac-40e6-bf82-649855ec27b6")
|
||||||
}
|
}
|
||||||
|
|
||||||
vcs {
|
vcs {
|
||||||
root(DslContext.settingsRoot)
|
root(DslContext.settingsRoot)
|
||||||
branchFilter = "+:<default>"
|
branchFilter = "+:fleet"
|
||||||
|
|
||||||
checkoutMode = CheckoutMode.AUTO
|
checkoutMode = CheckoutMode.AUTO
|
||||||
}
|
}
|
||||||
|
3
.teamcity/_Self/buildTypes/Qodana.kt
vendored
3
.teamcity/_Self/buildTypes/Qodana.kt
vendored
@@ -46,8 +46,8 @@ object Qodana : IdeaVimBuildType({
|
|||||||
version = Qodana.JVMVersion.LATEST
|
version = Qodana.JVMVersion.LATEST
|
||||||
}
|
}
|
||||||
reportAsTests = true
|
reportAsTests = true
|
||||||
additionalDockerArguments = "-e QODANA_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb24iOiIzUFZrQSIsInByb2plY3QiOiIzN1FlQSIsInRva2VuIjoiM0t2bXoifQ.uohp81tM7iAfvvB6k8faarfpV-OjusAaEbWQ8iNrOgs"
|
|
||||||
additionalQodanaArguments = "--baseline qodana.sarif.json"
|
additionalQodanaArguments = "--baseline qodana.sarif.json"
|
||||||
|
cloudToken = "credentialsJSON:6b79412e-9198-4862-9223-c5019488f903"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,6 @@ object Qodana : IdeaVimBuildType({
|
|||||||
timezone = "SERVER"
|
timezone = "SERVER"
|
||||||
}
|
}
|
||||||
param("dayOfWeek", "Sunday")
|
param("dayOfWeek", "Sunday")
|
||||||
enabled = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
20
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
@@ -5,6 +5,7 @@ import _Self.Constants.RELEASE_EAP
|
|||||||
import _Self.IdeaVimBuildType
|
import _Self.IdeaVimBuildType
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||||
@@ -30,6 +31,11 @@ object ReleaseEap : IdeaVimBuildType({
|
|||||||
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||||
label = "Slack Token"
|
label = "Slack Token"
|
||||||
)
|
)
|
||||||
|
password(
|
||||||
|
"env.YOUTRACK_TOKEN",
|
||||||
|
"credentialsJSON:2479995b-7b60-4fbb-b095-f0bafae7f622",
|
||||||
|
display = ParameterDisplay.HIDDEN
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
vcs {
|
vcs {
|
||||||
@@ -61,26 +67,26 @@ object ReleaseEap : IdeaVimBuildType({
|
|||||||
tasks = "scripts:addReleaseTag"
|
tasks = "scripts:addReleaseTag"
|
||||||
}
|
}
|
||||||
gradle {
|
gradle {
|
||||||
|
name = "Publish plugin"
|
||||||
tasks = "publishPlugin"
|
tasks = "publishPlugin"
|
||||||
}
|
}
|
||||||
// Same as the script below. However, jgit can't find ssh keys on TeamCity
|
|
||||||
// gradle {
|
|
||||||
// name = "Push changes to the repo"
|
|
||||||
// tasks = "scripts:pushChanges"
|
|
||||||
// }
|
|
||||||
script {
|
script {
|
||||||
name = "Push changes to the repo"
|
name = "Push changes to the repo"
|
||||||
scriptContent = """
|
scriptContent = """
|
||||||
branch=$(git branch --show-current)
|
branch=$(git branch --show-current)
|
||||||
echo current branch is ${'$'}branch
|
echo current branch is ${'$'}branch
|
||||||
if [ "master" != "${'$'}branch" ];
|
if [ "master" != "${'$'}branch" ];
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git push origin %build.number%
|
git push origin %build.number%
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
|
gradle {
|
||||||
|
name = "YouTrack post release actions"
|
||||||
|
tasks = "scripts:eapReleaseActions"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
features {
|
features {
|
||||||
|
106
.teamcity/_Self/buildTypes/ReleaseEapFromBranch.kt
vendored
Normal file
106
.teamcity/_Self/buildTypes/ReleaseEapFromBranch.kt
vendored
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.Constants.EAP_CHANNEL
|
||||||
|
import _Self.Constants.RELEASE_EAP
|
||||||
|
import _Self.IdeaVimBuildType
|
||||||
|
import _Self.vcsRoots.ReleasesVcsRoot
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange
|
||||||
|
|
||||||
|
object ReleaseEapFromBranch : IdeaVimBuildType({
|
||||||
|
name = "EXP: Publish EAP Build from branch"
|
||||||
|
description = "Build and publish EAP of IdeaVim plugin"
|
||||||
|
|
||||||
|
artifactRules = "build/distributions/*"
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", RELEASE_EAP)
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
|
label = "Password"
|
||||||
|
)
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishChannels", EAP_CHANNEL)
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_slackUrl",
|
||||||
|
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||||
|
label = "Slack Token"
|
||||||
|
)
|
||||||
|
password(
|
||||||
|
"env.YOUTRACK_TOKEN",
|
||||||
|
"credentialsJSON:2479995b-7b60-4fbb-b095-f0bafae7f622",
|
||||||
|
display = ParameterDisplay.HIDDEN
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(ReleasesVcsRoot)
|
||||||
|
branchFilter = """
|
||||||
|
+:heads/(releases/*)
|
||||||
|
""".trimIndent()
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.AUTO
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
name = "Pull git tags"
|
||||||
|
scriptContent = "git fetch --tags origin"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
name = "Pull git history"
|
||||||
|
scriptContent = "git fetch --unshallow"
|
||||||
|
}
|
||||||
|
gradle {
|
||||||
|
name = "Calculate new eap version from branch"
|
||||||
|
tasks = "scripts:calculateNewEapVersionFromBranch"
|
||||||
|
}
|
||||||
|
gradle {
|
||||||
|
name = "Set TeamCity build number"
|
||||||
|
tasks = "scripts:setTeamCityBuildNumber"
|
||||||
|
}
|
||||||
|
gradle {
|
||||||
|
name = "Add release tag"
|
||||||
|
tasks = "scripts:addReleaseTag"
|
||||||
|
}
|
||||||
|
gradle {
|
||||||
|
name = "Publish plugin"
|
||||||
|
tasks = "publishPlugin"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
name = "Push changes to the repo"
|
||||||
|
scriptContent = """
|
||||||
|
branch=$(git branch --show-current)
|
||||||
|
echo current branch is ${'$'}branch
|
||||||
|
git push origin %build.number%
|
||||||
|
""".trimIndent()
|
||||||
|
}
|
||||||
|
gradle {
|
||||||
|
name = "YouTrack post release actions"
|
||||||
|
tasks = "scripts:eapReleaseActions"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
features {
|
||||||
|
sshAgent {
|
||||||
|
teamcitySshKey = "IdeaVim ssh keys"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
failureConditions {
|
||||||
|
failOnMetricChange {
|
||||||
|
metric = BuildFailureOnMetric.MetricType.ARTIFACT_SIZE
|
||||||
|
threshold = 5
|
||||||
|
units = BuildFailureOnMetric.MetricUnit.PERCENTS
|
||||||
|
comparison = BuildFailureOnMetric.MetricComparison.DIFF
|
||||||
|
compareTo = build {
|
||||||
|
buildRule = lastSuccessful()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
113
.teamcity/_Self/buildTypes/ReleasePlugin.kt
vendored
113
.teamcity/_Self/buildTypes/ReleasePlugin.kt
vendored
@@ -19,8 +19,6 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
|
|||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.sshAgent
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric
|
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange
|
|
||||||
|
|
||||||
object ReleaseMajor : ReleasePlugin("major")
|
object ReleaseMajor : ReleasePlugin("major")
|
||||||
object ReleaseMinor : ReleasePlugin("minor")
|
object ReleaseMinor : ReleasePlugin("minor")
|
||||||
@@ -45,7 +43,11 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
|
|||||||
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||||
label = "Slack Token"
|
label = "Slack Token"
|
||||||
)
|
)
|
||||||
password("env.ORG_GRADLE_PROJECT_youtrackToken", "credentialsJSON:3cd3e867-282c-451f-b958-bc95d56a8450", display = ParameterDisplay.HIDDEN)
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_youtrackToken",
|
||||||
|
"credentialsJSON:7bc0eb3a-b86a-4ebd-b622-d4ef12d7e1d3",
|
||||||
|
display = ParameterDisplay.HIDDEN
|
||||||
|
)
|
||||||
param("env.ORG_GRADLE_PROJECT_releaseType", releaseType)
|
param("env.ORG_GRADLE_PROJECT_releaseType", releaseType)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,9 +67,25 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
|
|||||||
name = "Pull git history"
|
name = "Pull git history"
|
||||||
scriptContent = "git fetch --unshallow"
|
scriptContent = "git fetch --unshallow"
|
||||||
}
|
}
|
||||||
gradle {
|
script {
|
||||||
name = "Select branch"
|
name = "Reset release branch"
|
||||||
tasks = "scripts:selectBranch"
|
scriptContent = """
|
||||||
|
if [ "major" = "$releaseType" ] || [ "minor" = "$releaseType" ]
|
||||||
|
then
|
||||||
|
echo Resetting the release branch because the release type is $releaseType
|
||||||
|
git checkout master
|
||||||
|
latest_eap=${'$'}(git describe --tags --match="[0-9].[0-9]*.[0-9]-eap.[0-9]*" --abbrev=0 HEAD)
|
||||||
|
echo Latest EAP: ${'$'}latest_eap
|
||||||
|
commit_of_latest_eap=${'$'}(git rev-list -n 1 ${'$'}latest_eap)
|
||||||
|
echo Commit of latest EAP: ${'$'}commit_of_latest_eap
|
||||||
|
git checkout release
|
||||||
|
git reset --hard ${'$'}commit_of_latest_eap
|
||||||
|
else
|
||||||
|
git checkout release
|
||||||
|
echo Do not reset the release branch because the release type is $releaseType
|
||||||
|
fi
|
||||||
|
echo Checked out release branch
|
||||||
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
gradle {
|
gradle {
|
||||||
name = "Calculate new version"
|
name = "Calculate new version"
|
||||||
@@ -77,63 +95,60 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
|
|||||||
name = "Set TeamCity build number"
|
name = "Set TeamCity build number"
|
||||||
tasks = "scripts:setTeamCityBuildNumber"
|
tasks = "scripts:setTeamCityBuildNumber"
|
||||||
}
|
}
|
||||||
gradle {
|
// gradle {
|
||||||
name = "Update change log"
|
// name = "Update change log"
|
||||||
tasks = "scripts:changelogUpdateUnreleased"
|
// tasks = "scripts:changelogUpdateUnreleased"
|
||||||
}
|
// }
|
||||||
gradle {
|
// gradle {
|
||||||
name = "Commit preparation changes"
|
// name = "Commit preparation changes"
|
||||||
tasks = "scripts:commitChanges"
|
// tasks = "scripts:commitChanges"
|
||||||
}
|
// }
|
||||||
gradle {
|
gradle {
|
||||||
name = "Add release tag"
|
name = "Add release tag"
|
||||||
tasks = "scripts:addReleaseTag"
|
tasks = "scripts:addReleaseTag"
|
||||||
}
|
}
|
||||||
gradle {
|
script {
|
||||||
name = "Reset release branch"
|
name = "Run tests"
|
||||||
tasks = "scripts:resetReleaseBranch"
|
scriptContent = "./gradlew test"
|
||||||
}
|
}
|
||||||
gradle {
|
gradle {
|
||||||
name = "Publish release"
|
name = "Publish release"
|
||||||
tasks = "publishPlugin"
|
tasks = "publishPlugin"
|
||||||
}
|
}
|
||||||
|
// script {
|
||||||
|
// name = "Checkout master branch"
|
||||||
|
// scriptContent = """
|
||||||
|
// echo Checkout master
|
||||||
|
// git checkout master
|
||||||
|
// """.trimIndent()
|
||||||
|
// }
|
||||||
// gradle {
|
// gradle {
|
||||||
// name = "Push changes to the repo"
|
// name = "Update change log in master"
|
||||||
// tasks = "scripts:pushChangesWithReleaseBranch"
|
// tasks = "scripts:changelogUpdateUnreleased"
|
||||||
|
// }
|
||||||
|
// gradle {
|
||||||
|
// name = "Commit preparation changes in master"
|
||||||
|
// tasks = "scripts:commitChanges"
|
||||||
// }
|
// }
|
||||||
script {
|
script {
|
||||||
name = "Push changes to the repo"
|
name = "Push changes to the repo"
|
||||||
scriptContent = """
|
scriptContent = """
|
||||||
branch=$(git branch --show-current)
|
git checkout release
|
||||||
echo current branch is ${'$'}branch
|
echo checkout release branch
|
||||||
if [ "master" != "${'$'}branch" ];
|
git branch --set-upstream-to=origin/release release
|
||||||
then
|
git push origin --force
|
||||||
git checkout master
|
# Push tag
|
||||||
fi
|
git push origin %build.number%
|
||||||
|
|
||||||
git push origin --tags
|
|
||||||
git push origin
|
|
||||||
|
|
||||||
if [ "patch" != $releaseType ];
|
|
||||||
then
|
|
||||||
git checkout release
|
|
||||||
echo checkout release branch
|
|
||||||
git branch --set-upstream-to=origin/release release
|
|
||||||
git push --tags
|
|
||||||
git push origin --force
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout ${'$'}branch
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
gradle {
|
gradle {
|
||||||
name = "Run Integrations"
|
name = "Run Integrations"
|
||||||
tasks = "releaseActions"
|
tasks = "releaseActions"
|
||||||
}
|
}
|
||||||
gradle {
|
// gradle {
|
||||||
name = "Slack Notification"
|
// name = "Slack Notification"
|
||||||
tasks = "slackNotification"
|
// tasks = "slackNotification"
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
features {
|
features {
|
||||||
@@ -141,16 +156,4 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
|
|||||||
teamcitySshKey = "IdeaVim ssh keys"
|
teamcitySshKey = "IdeaVim ssh keys"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
failureConditions {
|
|
||||||
failOnMetricChange {
|
|
||||||
metric = BuildFailureOnMetric.MetricType.ARTIFACT_SIZE
|
|
||||||
threshold = 5
|
|
||||||
units = BuildFailureOnMetric.MetricUnit.PERCENTS
|
|
||||||
comparison = BuildFailureOnMetric.MetricComparison.DIFF
|
|
||||||
compareTo = build {
|
|
||||||
buildRule = lastSuccessful()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
4
.teamcity/_Self/subprojects/GitHub.kt
vendored
4
.teamcity/_Self/subprojects/GitHub.kt
vendored
@@ -16,10 +16,10 @@ object GitHub : Project({
|
|||||||
name = "Pull Requests checks"
|
name = "Pull Requests checks"
|
||||||
description = "Automatic checking of GitHub Pull Requests"
|
description = "Automatic checking of GitHub Pull Requests"
|
||||||
|
|
||||||
buildType(Github("clean test", "Tests"))
|
buildType(GithubBuildType("clean test", "Tests"))
|
||||||
})
|
})
|
||||||
|
|
||||||
class Github(command: String, desc: String) : IdeaVimBuildType({
|
class GithubBuildType(command: String, desc: String) : IdeaVimBuildType({
|
||||||
name = "GitHub Pull Requests $desc"
|
name = "GitHub Pull Requests $desc"
|
||||||
description = "Test GitHub pull requests $desc"
|
description = "Test GitHub pull requests $desc"
|
||||||
|
|
||||||
|
2
.teamcity/_Self/subprojects/OldTests.kt
vendored
2
.teamcity/_Self/subprojects/OldTests.kt
vendored
@@ -20,4 +20,6 @@ object OldTests : Project({
|
|||||||
buildType(TestingBuildType("IC-2021.2.2", "203-212", javaVersion = "1.8", javaPlugin = false))
|
buildType(TestingBuildType("IC-2021.2.2", "203-212", javaVersion = "1.8", javaPlugin = false))
|
||||||
buildType(TestingBuildType("IC-2021.3.2", "213-221", javaVersion = "1.8", javaPlugin = false))
|
buildType(TestingBuildType("IC-2021.3.2", "213-221", javaVersion = "1.8", javaPlugin = false))
|
||||||
buildType(TestingBuildType("IC-2022.2.3", branch = "222", javaPlugin = false))
|
buildType(TestingBuildType("IC-2022.2.3", branch = "222", javaPlugin = false))
|
||||||
|
buildType(TestingBuildType("IC-2023.1", "231-232", javaPlugin = false))
|
||||||
|
buildType(TestingBuildType("IC-2023.2", "231-232", javaPlugin = false))
|
||||||
})
|
})
|
||||||
|
7
.teamcity/_Self/subprojects/Releases.kt
vendored
7
.teamcity/_Self/subprojects/Releases.kt
vendored
@@ -1,8 +1,11 @@
|
|||||||
package _Self.subprojects
|
package _Self.subprojects
|
||||||
|
|
||||||
|
import _Self.buildTypes.CreateNewReleaseBranchFromMaster
|
||||||
|
import _Self.buildTypes.PrintReleaseBranch
|
||||||
import _Self.buildTypes.PublishVimEngine
|
import _Self.buildTypes.PublishVimEngine
|
||||||
import _Self.buildTypes.ReleaseDev
|
import _Self.buildTypes.ReleaseDev
|
||||||
import _Self.buildTypes.ReleaseEap
|
import _Self.buildTypes.ReleaseEap
|
||||||
|
import _Self.buildTypes.ReleaseEapFromBranch
|
||||||
import _Self.buildTypes.ReleaseMajor
|
import _Self.buildTypes.ReleaseMajor
|
||||||
import _Self.buildTypes.ReleaseMinor
|
import _Self.buildTypes.ReleaseMinor
|
||||||
import _Self.buildTypes.ReleasePatch
|
import _Self.buildTypes.ReleasePatch
|
||||||
@@ -38,4 +41,8 @@ object Releases : Project({
|
|||||||
buildType(ReleaseEap)
|
buildType(ReleaseEap)
|
||||||
buildType(ReleaseDev)
|
buildType(ReleaseDev)
|
||||||
buildType(PublishVimEngine)
|
buildType(PublishVimEngine)
|
||||||
|
|
||||||
|
buildType(CreateNewReleaseBranchFromMaster)
|
||||||
|
buildType(PrintReleaseBranch)
|
||||||
|
buildType(ReleaseEapFromBranch)
|
||||||
})
|
})
|
||||||
|
13
.teamcity/_Self/vcsRoots/Releases.kt
vendored
Normal file
13
.teamcity/_Self/vcsRoots/Releases.kt
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package _Self.vcsRoots
|
||||||
|
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||||
|
|
||||||
|
object ReleasesVcsRoot : GitVcsRoot({
|
||||||
|
name = "IdeaVim Releases"
|
||||||
|
url = "git@github.com:JetBrains/ideavim.git"
|
||||||
|
branch = "refs/heads/master"
|
||||||
|
branchSpec = "+:refs/(*)"
|
||||||
|
authMethod = uploadedKey {
|
||||||
|
uploadedKey = "IdeaVim ssh keys"
|
||||||
|
}
|
||||||
|
})
|
39
.teamcity/patches/buildTypes/IdeaVimTests_Latest_EAP.kts
vendored
Normal file
39
.teamcity/patches/buildTypes/IdeaVimTests_Latest_EAP.kts
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package patches.buildTypes
|
||||||
|
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.GradleBuildStep
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
|
||||||
|
|
||||||
|
/*
|
||||||
|
This patch script was generated by TeamCity on settings change in UI.
|
||||||
|
To apply the patch, change the buildType with id = 'IdeaVimTests_Latest_EAP'
|
||||||
|
accordingly, and delete the patch script.
|
||||||
|
*/
|
||||||
|
changeBuildType(RelativeId("IdeaVimTests_Latest_EAP")) {
|
||||||
|
check(artifactRules == """
|
||||||
|
+:build/reports => build/reports
|
||||||
|
+:/mnt/agent/temp/buildTmp/ => /mnt/agent/temp/buildTmp/
|
||||||
|
""".trimIndent()) {
|
||||||
|
"Unexpected option value: artifactRules = $artifactRules"
|
||||||
|
}
|
||||||
|
artifactRules = """
|
||||||
|
+:build/reports => build/reports
|
||||||
|
+:/mnt/agent/temp/buildTmp/ => /mnt/agent/temp/buildTmp/
|
||||||
|
+:tests/java-tests/build/reports => tests/java-tests/build/reports
|
||||||
|
""".trimIndent()
|
||||||
|
|
||||||
|
expectSteps {
|
||||||
|
gradle {
|
||||||
|
tasks = "clean test"
|
||||||
|
buildFile = ""
|
||||||
|
enableStacktrace = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
update<GradleBuildStep>(0) {
|
||||||
|
clearConditions()
|
||||||
|
jdkHome = "/usr/lib/jvm/java-17-amazon-corretto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
.teamcity/patches/buildTypes/ReleaseEapFromBranch.kts
vendored
Normal file
19
.teamcity/patches/buildTypes/ReleaseEapFromBranch.kts
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package patches.buildTypes
|
||||||
|
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
|
||||||
|
|
||||||
|
/*
|
||||||
|
This patch script was generated by TeamCity on settings change in UI.
|
||||||
|
To apply the patch, change the buildType with id = 'ReleaseEapFromBranch'
|
||||||
|
accordingly, and delete the patch script.
|
||||||
|
*/
|
||||||
|
changeBuildType(RelativeId("ReleaseEapFromBranch")) {
|
||||||
|
vcs {
|
||||||
|
|
||||||
|
check(branchFilter == "+:heads/(releases/*)") {
|
||||||
|
"Unexpected option value: branchFilter = $branchFilter"
|
||||||
|
}
|
||||||
|
branchFilter = "heads/releases/*"
|
||||||
|
}
|
||||||
|
}
|
20
.teamcity/patches/buildTypes/ReleaseMinor.kts
vendored
20
.teamcity/patches/buildTypes/ReleaseMinor.kts
vendored
@@ -1,20 +0,0 @@
|
|||||||
package patches.buildTypes
|
|
||||||
|
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
|
|
||||||
|
|
||||||
/*
|
|
||||||
This patch script was generated by TeamCity on settings change in UI.
|
|
||||||
To apply the patch, change the buildType with id = 'ReleaseMinor'
|
|
||||||
accordingly, and delete the patch script.
|
|
||||||
*/
|
|
||||||
changeBuildType(RelativeId("ReleaseMinor")) {
|
|
||||||
params {
|
|
||||||
expect {
|
|
||||||
password("env.ORG_GRADLE_PROJECT_youtrackToken", "credentialsJSON:3cd3e867-282c-451f-b958-bc95d56a8450", display = ParameterDisplay.HIDDEN)
|
|
||||||
}
|
|
||||||
update {
|
|
||||||
password("env.ORG_GRADLE_PROJECT_youtrackToken", "credentialsJSON:7bc0eb3a-b86a-4ebd-b622-d4ef12d7e1d3", display = ParameterDisplay.HIDDEN)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
20
.teamcity/patches/buildTypes/ReleasePatch.kts
vendored
20
.teamcity/patches/buildTypes/ReleasePatch.kts
vendored
@@ -1,20 +0,0 @@
|
|||||||
package patches.buildTypes
|
|
||||||
|
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
|
|
||||||
|
|
||||||
/*
|
|
||||||
This patch script was generated by TeamCity on settings change in UI.
|
|
||||||
To apply the patch, change the buildType with id = 'ReleasePatch'
|
|
||||||
accordingly, and delete the patch script.
|
|
||||||
*/
|
|
||||||
changeBuildType(RelativeId("ReleasePatch")) {
|
|
||||||
params {
|
|
||||||
expect {
|
|
||||||
password("env.ORG_GRADLE_PROJECT_youtrackToken", "credentialsJSON:3cd3e867-282c-451f-b958-bc95d56a8450", display = ParameterDisplay.HIDDEN)
|
|
||||||
}
|
|
||||||
update {
|
|
||||||
password("env.ORG_GRADLE_PROJECT_youtrackToken", "credentialsJSON:7bc0eb3a-b86a-4ebd-b622-d4ef12d7e1d3", display = ParameterDisplay.HIDDEN)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
2
.teamcity/settings.kts
vendored
2
.teamcity/settings.kts
vendored
@@ -30,5 +30,5 @@ node (Plugins -> teamcity-configs -> teamcity-configs:generate),
|
|||||||
the 'Debug' option is available in the context menu for the task.
|
the 'Debug' option is available in the context menu for the task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
version = "2023.05"
|
version = "2024.03"
|
||||||
project(_Self.Project)
|
project(_Self.Project)
|
||||||
|
36
AUTHORS.md
36
AUTHORS.md
@@ -487,6 +487,42 @@ Contributors:
|
|||||||
[![icon][github]](https://github.com/pWydmuch)
|
[![icon][github]](https://github.com/pWydmuch)
|
||||||
|
|
||||||
pWydmuch
|
pWydmuch
|
||||||
|
* [![icon][mail]](mailto:leonid989@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/Infonautica)
|
||||||
|
|
||||||
|
Leonid Danilov
|
||||||
|
* [![icon][mail]](mailto:emanuel-367@hotmail.com)
|
||||||
|
[![icon][github]](https://github.com/emanuelgestosa)
|
||||||
|
|
||||||
|
Emanuel Gestosa
|
||||||
|
* [![icon][mail]](mailto:81118900+lippfi@users.noreply.github.com)
|
||||||
|
[![icon][github]](https://github.com/lippfi)
|
||||||
|
|
||||||
|
lippfi,
|
||||||
|
* [![icon][mail]](mailto:fillipser143@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/Parker7123)
|
||||||
|
|
||||||
|
FilipParker
|
||||||
|
* [![icon][mail]](mailto:7138209+duhaesbaert@users.noreply.github.com)
|
||||||
|
[![icon][github]](https://github.com/duhaesbaert)
|
||||||
|
|
||||||
|
Eduardo Haesbaert
|
||||||
|
* [![icon][mail]](mailto:nikolaevsky.egor@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/Aisper)
|
||||||
|
|
||||||
|
Egor Nikolaevsky
|
||||||
|
* [![icon][mail]](mailto:77796630+throwaway69420-69420@users.noreply.github.com)
|
||||||
|
[![icon][github]](https://github.com/kun-codes)
|
||||||
|
|
||||||
|
Bishwa Saha,
|
||||||
|
* [![icon][mail]](mailto:alexfu@fastmail.com)
|
||||||
|
[![icon][github]](https://github.com/alexfu)
|
||||||
|
|
||||||
|
Alex Fu
|
||||||
|
* [![icon][mail]](mailto:jakepeters199@hotmail.com)
|
||||||
|
[![icon][github]](https://github.com/LazyScaper)
|
||||||
|
|
||||||
|
Jake
|
||||||
|
|
||||||
Previous contributors:
|
Previous contributors:
|
||||||
|
|
||||||
|
39
CHANGES.md
39
CHANGES.md
@@ -23,7 +23,22 @@ It is important to distinguish EAP from traditional pre-release software.
|
|||||||
Please note that the quality of EAP versions may at times be way below even
|
Please note that the quality of EAP versions may at times be way below even
|
||||||
usual beta standards.
|
usual beta standards.
|
||||||
|
|
||||||
## To Be Released
|
## End of changelog file maintenance
|
||||||
|
|
||||||
|
Since version 2.9.0, the changelog can be found on YouTrack
|
||||||
|
|
||||||
|
To Be Released: https://youtrack.jetbrains.com/issues/VIM?q=%23%7BReady%20To%20Release%7D%20
|
||||||
|
Latest Fixes: https://youtrack.jetbrains.com/issues/VIM?q=State:%20Fixed%20sort%20by:%20updated%20
|
||||||
|
|
||||||
|
## 2.9.0, 2024-02-20
|
||||||
|
|
||||||
|
### Fixes:
|
||||||
|
* [VIM-3055](https://youtrack.jetbrains.com/issue/VIM-3055) Fix the issue with double deleting after dot
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [805](https://github.com/JetBrains/ideavim/pull/805) by [chylex](https://github.com/chylex): VIM-3238 Fix recording a macro that replays another macro
|
||||||
|
|
||||||
|
## 2.8.0, 2024-01-30
|
||||||
|
|
||||||
### Fixes:
|
### Fixes:
|
||||||
* [VIM-3130](https://youtrack.jetbrains.com/issue/VIM-3130) Change the build version to 2023.1.2
|
* [VIM-3130](https://youtrack.jetbrains.com/issue/VIM-3130) Change the build version to 2023.1.2
|
||||||
@@ -31,6 +46,28 @@ usual beta standards.
|
|||||||
* [VIM-3165](https://youtrack.jetbrains.com/issue/VIM-3165) Do not process enter key as IdeaVim shortcut if it's not an actual keypress
|
* [VIM-3165](https://youtrack.jetbrains.com/issue/VIM-3165) Do not process enter key as IdeaVim shortcut if it's not an actual keypress
|
||||||
* [VIM-3159](https://youtrack.jetbrains.com/issue/VIM-3159) Shift-enter now works in normal mode again
|
* [VIM-3159](https://youtrack.jetbrains.com/issue/VIM-3159) Shift-enter now works in normal mode again
|
||||||
* [VIM-3157](https://youtrack.jetbrains.com/issue/VIM-3157) Do not invoke enter in invokeLater for python console
|
* [VIM-3157](https://youtrack.jetbrains.com/issue/VIM-3157) Do not invoke enter in invokeLater for python console
|
||||||
|
* [VIM-3195](https://youtrack.jetbrains.com/issue/VIM-3195) Fix escape in injected editor
|
||||||
|
* [VIM-3190](https://youtrack.jetbrains.com/issue/VIM-3190) Do not use octopus handler if the enter key is used with modifiers like shift or control
|
||||||
|
* [VIM-3203](https://youtrack.jetbrains.com/issue/VIM-3203) Split action not works in normal mode
|
||||||
|
* [VIM-3184](https://youtrack.jetbrains.com/issue/VIM-3184) Revert "VIM-3184: Temporally disable new handlers for the thin client"
|
||||||
|
* [VIM-3186](https://youtrack.jetbrains.com/issue/VIM-3186) Do not multiply the enter action by the amount of carets
|
||||||
|
* [VIM-3177](https://youtrack.jetbrains.com/issue/VIM-3177) Formatting of commit message works again
|
||||||
|
* [VIM-1611](https://youtrack.jetbrains.com/issue/VIM-1611) actions related to resolving conflicts doesn't seem to work
|
||||||
|
* [VIM-3204](https://youtrack.jetbrains.com/issue/VIM-3204) Add checker that verifies the configuratin of the keymap
|
||||||
|
* [VIM-3084](https://youtrack.jetbrains.com/issue/VIM-3084) Double update for the status bar icon
|
||||||
|
* [VIM-3176](https://youtrack.jetbrains.com/issue/VIM-3176) Reselecting visual selection after pasting above it select wrong lines
|
||||||
|
* [VIM-3206](https://youtrack.jetbrains.com/issue/VIM-3206) Disable both copilot suggestion and insert mode on a single escape
|
||||||
|
* [VIM-3090](https://youtrack.jetbrains.com/issue/VIM-3090) Cmd line mode saves the visual mode
|
||||||
|
* [VIM-3085](https://youtrack.jetbrains.com/issue/VIM-3085) Open access to VimTypedActionHandler and VimShortcutKeyAction
|
||||||
|
* [VIM-3260](https://youtrack.jetbrains.com/issue/VIM-3260) Processing the offsets at the file end
|
||||||
|
* [VIM-3183](https://youtrack.jetbrains.com/issue/VIM-3183) Execute .ideavimrc on pooled thread
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [763](https://github.com/JetBrains/ideavim/pull/763) by [Sam Ng](https://github.com/samabcde): Fix(VIM-3176) add test for restore selection after pasting in/below s…
|
||||||
|
* [772](https://github.com/JetBrains/ideavim/pull/772) by [chylex](https://github.com/chylex): Prevent code completion popup from appearing after running a macro
|
||||||
|
* [787](https://github.com/JetBrains/ideavim/pull/787) by [Leonid Danilov](https://github.com/Infonautica): Added "Which-Key" to Plugins
|
||||||
|
* [778](https://github.com/JetBrains/ideavim/pull/778) by [lippfi](https://github.com/lippfi): Showmode
|
||||||
|
* [788](https://github.com/JetBrains/ideavim/pull/788) by [Matt Ellis](https://github.com/citizenmatt): Refactor VimOptionGroupBase
|
||||||
|
|
||||||
## 2.7.0, 2023-11-07
|
## 2.7.0, 2023-11-07
|
||||||
|
|
||||||
|
@@ -324,7 +324,7 @@ IdeaVim tips and tricks
|
|||||||
- Use the power of IJ and Vim:
|
- Use the power of IJ and Vim:
|
||||||
- `set ideajoin` to enable join via the IDE. See the [examples](https://jb.gg/f9zji9).
|
- `set ideajoin` to enable join via the IDE. See the [examples](https://jb.gg/f9zji9).
|
||||||
- Make sure `ideaput` is enabled for `clipboard` to enable native IJ insertion in Vim.
|
- Make sure `ideaput` is enabled for `clipboard` to enable native IJ insertion in Vim.
|
||||||
- Sync IJ bookmarks and Vim marks: `set ideamarks`
|
- Sync IJ bookmarks and IdeaVim global marks: `set ideamarks` (works for marks with capital letters only)
|
||||||
- Check out more [ex commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
- Check out more [ex commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||||
|
|
||||||
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
IdeaVim project is licensed under MIT license except the following parts of it:
|
IdeaVim project is licensed under MIT license except the following parts of it:
|
||||||
|
|
||||||
* File [RegExp.kt](src/main/java/com/maddyhome/idea/vim/regexp/RegExp.kt) is licensed under Vim License.
|
|
||||||
* File [ScrollViewHelper.kt](com/maddyhome/idea/vim/helper/ScrollViewHelper.kt) is licensed under Vim License.
|
* File [ScrollViewHelper.kt](com/maddyhome/idea/vim/helper/ScrollViewHelper.kt) is licensed under Vim License.
|
||||||
* File [Tutor.kt](src/main/java/com/maddyhome/idea/vim/ui/Tutor.kt) is licensed under Vim License.
|
* File [Tutor.kt](src/main/java/com/maddyhome/idea/vim/ui/Tutor.kt) is licensed under Vim License.
|
||||||
|
|
||||||
@@ -84,3 +83,8 @@ IV) It is not allowed to remove this license from the distribution of the Vim
|
|||||||
license for previous Vim releases instead of the license that they came
|
license for previous Vim releases instead of the license that they came
|
||||||
with, at your option.
|
with, at your option.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
File [sneakIcon.png](doc/images/sneakIcon.svg), which is originally an icon of the ideavim-sneak plugin,
|
||||||
|
is merged icons of IdeaVim plugin and a random sneaker by FreePic from flaticon.com.
|
||||||
|
@@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
kotlin("plugin.serialization") version "1.8.21"
|
kotlin("plugin.serialization") version "1.9.22"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val kotlinxSerializationVersion: String by project
|
||||||
|
|
||||||
group = "com.intellij"
|
group = "com.intellij"
|
||||||
version = "SNAPSHOT"
|
version = "SNAPSHOT"
|
||||||
|
|
||||||
@@ -19,6 +21,10 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14")
|
compileOnly("com.google.devtools.ksp:symbol-processing-api:2.0.0-1.0.22")
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.0")
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:$kotlinxSerializationVersion") {
|
||||||
|
// kotlin stdlib is provided by IJ, so there is no need to include it into the distribution
|
||||||
|
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
|
||||||
|
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ enum class Mode(val abbrev: Char) {
|
|||||||
OP_PENDING('O'),
|
OP_PENDING('O'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates this key mapping applies to Insert mode
|
* Indicates this key mapping applies to Insert or Replace modes
|
||||||
*/
|
*/
|
||||||
INSERT('I'),
|
INSERT('I'),
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
|
|||||||
import com.google.devtools.ksp.processing.SymbolProcessorProvider
|
import com.google.devtools.ksp.processing.SymbolProcessorProvider
|
||||||
import com.intellij.vim.processors.VimscriptFunctionProcessor
|
import com.intellij.vim.processors.VimscriptFunctionProcessor
|
||||||
|
|
||||||
public class VimscriptFunctionProcessorProvider : SymbolProcessorProvider {
|
class VimscriptFunctionProcessorProvider : SymbolProcessorProvider {
|
||||||
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
|
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
|
||||||
return VimscriptFunctionProcessor(environment)
|
return VimscriptFunctionProcessor(environment)
|
||||||
}
|
}
|
||||||
|
1515
build.gradle.kts
1515
build.gradle.kts
File diff suppressed because it is too large
Load Diff
@@ -44,16 +44,21 @@ All commands with the mappings are supported. See the [full list of supported co
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><h2>sneak</h2></summary>
|
<summary><h2>sneak</h2></summary>
|
||||||
|
|
||||||
|
<img src="images/sneakIcon.svg" width="80" height="80" alt="icon"/>
|
||||||
|
|
||||||
|
By [Mikhail Levchenko](https://github.com/Mishkun)
|
||||||
|
Original repository with the plugin: https://github.com/Mishkun/ideavim-sneak
|
||||||
Original plugin: [vim-sneak](https://github.com/justinmk/vim-sneak).
|
Original plugin: [vim-sneak](https://github.com/justinmk/vim-sneak).
|
||||||
|
|
||||||
### Setup:
|
### Setup:
|
||||||
- Install [IdeaVim-sneak](https://plugins.jetbrains.com/plugin/15348-ideavim-sneak) plugin.
|
- Add the following command to `~/.ideavimrc`: `Plug 'justinmk/vim-sneak'`
|
||||||
- Add the following command to `~/.ideavimrc`: `set sneak`
|
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
See the [docs](https://github.com/Mishkun/ideavim-sneak#usage)
|
* Type `s` and two chars to start sneaking in forward direction
|
||||||
|
* Type `S` and two chars to start sneaking in backward direction
|
||||||
|
* Type `;` or `,` to proceed with sneaking just as if you were using `f` or `t` commands
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -124,8 +129,26 @@ Original plugin: [vim-multiple-cursors](https://github.com/terryma/vim-multiple-
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
https://github.com/terryma/vim-multiple-cursors/blob/master/doc/multiple_cursors.txt
|
At the moment, the default key binds for this plugin do not get mapped correctly in IdeaVim (see [VIM-2178](https://youtrack.jetbrains.com/issue/VIM-2178)). To enable the default key binds, add the following to your `.ideavimrc` file...
|
||||||
|
|
||||||
|
```
|
||||||
|
" Remap multiple-cursors shortcuts to match terryma/vim-multiple-cursors
|
||||||
|
nmap <C-n> <Plug>NextWholeOccurrence
|
||||||
|
xmap <C-n> <Plug>NextWholeOccurrence
|
||||||
|
nmap g<C-n> <Plug>NextOccurrence
|
||||||
|
xmap g<C-n> <Plug>NextOccurrence
|
||||||
|
xmap <C-x> <Plug>SkipOccurrence
|
||||||
|
xmap <C-p> <Plug>RemoveOccurrence
|
||||||
|
|
||||||
|
" Note that the default <A-n> and g<A-n> shortcuts don't work on Mac due to dead keys.
|
||||||
|
" <A-n> is used to enter accented text e.g. ñ
|
||||||
|
" Feel free to pick your own mappings that are not affected. I like to use <leader>
|
||||||
|
nmap <leader><C-n> <Plug>AllWholeOccurrences
|
||||||
|
xmap <leader><C-n> <Plug>AllWholeOccurrences
|
||||||
|
nmap <leader>g<C-n> <Plug>AllOccurrences
|
||||||
|
xmap <leader>g<C-n> <Plug>AllOccurrences
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -396,3 +419,19 @@ Original plugin: [quick-scope](https://github.com/unblevable/quick-scope).
|
|||||||
https://plugins.jetbrains.com/plugin/19417-ideavim-quickscope
|
https://plugins.jetbrains.com/plugin/19417-ideavim-quickscope
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h2>Which-Key</h2></summary>
|
||||||
|
|
||||||
|
Original plugin: [vim-which-key](https://github.com/liuchengxu/vim-which-key).
|
||||||
|
|
||||||
|
### Setup:
|
||||||
|
- Install [Which-Key](https://plugins.jetbrains.com/plugin/15976-which-key) plugin.
|
||||||
|
- Add the following command to `~/.ideavimrc`: `set which-key`
|
||||||
|
|
||||||
|
### Instructions
|
||||||
|
|
||||||
|
https://github.com/TheBlob42/idea-which-key?tab=readme-ov-file#installation
|
||||||
|
|
||||||
|
</details>
|
||||||
|
@@ -27,7 +27,7 @@ Plug 'nerdtree'
|
|||||||
### Preview
|
### Preview
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Click to the the preview</summary>
|
<summary>Click for the preview</summary>
|
||||||
<img src="images/nerdtree.gif" alt="NERDTree example"/>
|
<img src="images/nerdtree.gif" alt="NERDTree example"/>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -40,30 +40,33 @@ Plug 'nerdtree'
|
|||||||
- `:NERDTreeFind`
|
- `:NERDTreeFind`
|
||||||
- `:NERDTreeRefreshRoot`
|
- `:NERDTreeRefreshRoot`
|
||||||
|
|
||||||
| Key | Description | Map Setting |
|
| Key | Description | Map Setting |
|
||||||
|---------|---------------------------------------------------------|--------------------------------|
|
|---------|--------------------------------------------------------|--------------------------------|
|
||||||
| `o` | Open files, directories and bookmarks | `g:NERDTreeMapActivateNode` |
|
| `o` | Open files, directories and bookmarks | `g:NERDTreeMapActivateNode` |
|
||||||
| `go` | Open selected file, but leave cursor in the NERDTree | `g:NERDTreeMapPreview` |
|
| `go` | Open selected file, but leave cursor in the NERDTree | `g:NERDTreeMapPreview` |
|
||||||
| `t` | Open selected node/bookmark in a new tab | `g:NERDTreeMapOpenInTab` |
|
| `t` | Open selected node/bookmark in a new tab | `g:NERDTreeMapOpenInTab` |
|
||||||
| `T` | Same as 't' but keep the focus on the current tab | `g:NERDTreeMapOpenInTabSilent` |
|
| `T` | Same as 't' but keep the focus on the current tab | `g:NERDTreeMapOpenInTabSilent` |
|
||||||
| `i` | Open selected file in a split window | `g:NERDTreeMapOpenSplit` |
|
| `i` | Open selected file in a split window | `g:NERDTreeMapOpenSplit` |
|
||||||
| `gi` | Same as i, but leave the cursor on the NERDTree | `g:NERDTreeMapPreviewSplit` |
|
| `gi` | Same as i, but leave the cursor on the NERDTree | `g:NERDTreeMapPreviewSplit` |
|
||||||
| `s` | Open selected file in a new vsplit | `g:NERDTreeMapOpenVSplit` |
|
| `s` | Open selected file in a new vsplit | `g:NERDTreeMapOpenVSplit` |
|
||||||
| `gs` | Same as s, but leave the cursor on the NERDTree | `g:NERDTreeMapPreviewVSplit` |
|
| `gs` | Same as s, but leave the cursor on the NERDTree | `g:NERDTreeMapPreviewVSplit` |
|
||||||
| `O` | Recursively open the selected directory | `g:NERDTreeMapOpenRecursively` |
|
| `O` | Recursively open the selected directory | `g:NERDTreeMapOpenRecursively` |
|
||||||
| `x` | Close the current nodes parent | `g:NERDTreeMapCloseDir` |
|
| `x` | Close the current nodes parent | `g:NERDTreeMapCloseDir` |
|
||||||
| `X` | Recursively close all children of the current node | `g:NERDTreeMapCloseChildren` |
|
| `X` | Recursively close all children of the current node | `g:NERDTreeMapCloseChildren` |
|
||||||
| `P` | Jump to the root node | `g:NERDTreeMapJumpRoot` |
|
| `P` | Jump to the root node | `g:NERDTreeMapJumpRoot` |
|
||||||
| `p` | Jump to current nodes parent | `g:NERDTreeMapJumpParent` |
|
| `p` | Jump to current nodes parent | `g:NERDTreeMapJumpParent` |
|
||||||
| `K` | Jump up inside directories at the current tree depth | `g:NERDTreeMapJumpFirstChild` |
|
| `K` | Jump up inside directories at the current tree depth | `g:NERDTreeMapJumpFirstChild` |
|
||||||
| `J` | Jump down inside directories at the current tree depth | `g:NERDTreeMapJumpLastChild` |
|
| `J` | Jump down inside directories at the current tree depth | `g:NERDTreeMapJumpLastChild` |
|
||||||
| `<C-J>` | Jump down to next sibling of the current directory | `g:NERDTreeMapJumpNextSibling` |
|
| `<C-J>` | Jump down to next sibling of the current directory | `g:NERDTreeMapJumpNextSibling` |
|
||||||
| `<C-K>` | Jump up to previous sibling of the current directory | `g:NERDTreeMapJumpPrevSibling` |
|
| `<C-K>` | Jump up to previous sibling of the current directory | `g:NERDTreeMapJumpPrevSibling` |
|
||||||
| `r` | Recursively refresh the current directory | `g:NERDTreeMapRefresh` |
|
| `r` | Recursively refresh the current directory | `g:NERDTreeMapRefresh` |
|
||||||
| `R` | Recursively refresh the current root | `g:NERDTreeMapRefreshRoot` |
|
| `R` | Recursively refresh the current root | `g:NERDTreeMapRefreshRoot` |
|
||||||
| `m` | Display the NERDTree menu | `g:NERDTreeMapMenu` |
|
| `m` | Display the NERDTree menu | `g:NERDTreeMapMenu` |
|
||||||
| `q` | Close the NERDTree window | `g:NERDTreeMapQuit` |
|
| `q` | Close the NERDTree window | `g:NERDTreeMapQuit` |
|
||||||
| `A` | Zoom (maximize/minimize) the NERDTree window | `g:NERDTreeMapToggleZoom` |
|
| `A` | Zoom (maximize/minimize) the NERDTree window | `g:NERDTreeMapToggleZoom` |
|
||||||
|
| `d` | Delete file or directory | `g:NERDTreeMapDelete` |
|
||||||
|
| `n` | Create File | `g:NERDTreeMapNewFile` |
|
||||||
|
| `N` | Create Directory | `g:NERDTreeMapNewDir` |
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
@@ -3,6 +3,11 @@ Put `set ideajoin` to your `~/.ideavimrc` to enable this functionality.
|
|||||||
|
|
||||||
Now, you can press `J` (`shift+j`) on a line or a selected block of text to join the lines together.
|
Now, you can press `J` (`shift+j`) on a line or a selected block of text to join the lines together.
|
||||||
|
|
||||||
|
:warning: This feature is language-specific. This means that the IDE should implement this feature for a particular
|
||||||
|
language in order for the IDE to work as described below. If any of the examples provided below don't match your case,
|
||||||
|
please file an issue in the project related to your IDE: https://youtrack.jetbrains.com/.
|
||||||
|
Here is a list of known requests: https://youtrack.jetbrains.com/issues?q=links:VIM-3214.
|
||||||
|
|
||||||
* Automatic join concatenated lines:
|
* Automatic join concatenated lines:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
28
doc/images/sneakIcon.svg
Normal file
28
doc/images/sneakIcon.svg
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg viewBox="386.498 234 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="ideavim_plugin-a" x1="-6.748%" x2="47.286%" y1="33.61%" y2="85.907%">
|
||||||
|
<stop offset="0" stop-color="#3BEA62"/>
|
||||||
|
<stop offset="1" stop-color="#087CFA"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g transform="matrix(1.238978, 0.90017, -0.90017, 1.238978, 131.776901, -422.953003)" style="">
|
||||||
|
<path d="M 399.962 247.648 C 399.207 246.894 399.147 246.318 399.692 245.453 C 400.237 244.588 401.955 245.886 401.955 245.886 L 401.955 250.737" style="fill: rgb(248, 245, 231);"/>
|
||||||
|
<path d="M 413.846 253.602 C 413.846 255.077 411.827 256.134 409.392 256.134 L 396.381 256.134 C 395.211 256.134 394.232 256.003 393.433 255.817 C 391.496 255.367 390.613 254.596 390.613 254.596 L 391.478 252.513 L 393.607 252.617 Z M 413.846 253.602" fill="#cce6f6" style=""/>
|
||||||
|
<path d="M 413.846 253.602 C 413.846 253.602 411.475 254.468 408.27 254.468 C 405.94 254.468 398.116 253.433 394.023 252.869 C 392.488 252.658 391.478 252.512 391.478 252.512 C 390.864 251.662 392.078 248.741 392.758 247.263 C 393.118 246.484 393.85 245.929 394.703 245.83 C 394.782 245.82 394.861 245.815 394.939 245.815 C 395.369 245.815 395.645 246.532 396.059 247.225 C 396.446 247.877 396.955 248.507 397.823 248.507 C 399.617 248.507 401.955 245.886 401.955 245.886 C 406.544 249.03 410.097 250.43 410.097 250.43 C 410.097 250.43 413.061 250.446 413.782 251.167 C 414.503 251.888 414.422 253.218 413.846 253.602 Z M 413.846 253.602" style="fill: rgb(8, 124, 250);"/>
|
||||||
|
<path d="M 394.023 252.869 L 393.433 255.817 C 391.496 255.367 390.613 254.596 390.613 254.596 L 391.478 252.513 L 393.607 252.617 Z M 394.023 252.869" fill="#9dcae0" style=""/>
|
||||||
|
<path d="M 396.059 247.225 C 395.073 245.986 393.193 250.255 394.023 252.869 C 392.488 252.658 391.478 252.513 391.478 252.513 C 390.864 251.662 392.078 248.741 392.758 247.263 C 393.118 246.484 393.85 245.929 394.703 245.83 C 394.782 245.82 394.861 245.815 394.939 245.815 C 395.369 245.815 395.645 246.532 396.059 247.225 Z M 396.059 247.225" style="fill: rgb(14, 112, 142);"/>
|
||||||
|
<path d="M 403.527 246.924 L 399.174 251.768 C 397.7 250.892 395.578 250.174 394.016 249.717 C 392.843 249.372 391.985 249.174 391.959 249.168 C 392.108 248.769 392.268 248.379 392.421 248.022 L 394.341 248.65 L 394.884 248.827 C 395.509 249.031 396.192 248.95 396.753 248.608 L 397.153 248.363 C 397.35 248.454 397.572 248.507 397.823 248.507 C 399.617 248.507 401.955 245.886 401.955 245.886 C 402.494 246.256 403.02 246.601 403.527 246.924 Z M 403.527 246.924" style="fill: rgb(59, 234, 98);"/>
|
||||||
|
<path d="M 413.847 253.602 C 413.847 253.602 411.475 254.468 408.27 254.468 C 407.586 254.468 406.426 254.378 405.025 254.238 L 405.025 254.237 C 405.025 253.495 406.924 251.743 408.366 251.616 C 408.623 252.865 410.097 252.512 411.219 252.128 C 412.341 251.743 413.783 251.167 413.783 251.167 C 414.503 251.888 414.422 253.218 413.847 253.602 Z M 413.847 253.602" style="fill: rgb(8, 124, 250);"/>
|
||||||
|
<path d="M 394.341 248.65 C 394.214 248.978 394.103 249.339 394.016 249.717 C 392.843 249.372 391.985 249.174 391.959 249.168 C 392.108 248.769 392.268 248.379 392.421 248.022 Z M 394.341 248.65" style="fill: rgb(37, 187, 163);"/>
|
||||||
|
<path d="M 408.366 251.616 C 406.924 251.743 405.025 253.495 405.025 254.237 L 405.025 254.238 C 403.784 254.113 402.355 253.948 400.899 253.77 C 400.899 253.051 400.191 252.372 399.174 251.768 L 399.174 251.768 L 403.528 246.924 C 407.331 249.34 410.097 250.43 410.097 250.43 C 410.77 251.102 409.809 251.487 408.366 251.616 Z M 408.366 251.616" style="fill: rgb(248, 245, 231);"/>
|
||||||
|
<polygon fill="url(#ideavim_plugin-a)" fill-rule="evenodd" points="406.356 248.463 403.261 252.616 402.183 248.212 400.984 249.899 401.999 254.236 403.927 254.176 407.639 249.062" style="" transform="matrix(0.994522, 0.104529, -0.104529, 0.994522, 28.475005, -40.88594)"/>
|
||||||
|
<g fill="#fb6572" transform="matrix(0.046265, 0, 0, 0.046265, 390.612823, 245.155533)" style="">
|
||||||
|
<path d="m288.839844 72.65625c-2.007813 0-4.011719-.761719-5.542969-2.292969-3.058594-3.0625-3.058594-8.023437 0-11.082031l20.089844-20.089844c3.0625-3.058594 8.023437-3.058594 11.082031 0 3.058594 3.0625 3.0625 8.023438 0 11.082032l-20.089844 20.089843c-1.527344 1.53125-3.535156 2.292969-5.539062 2.292969zm0 0" style="fill: rgb(56, 228, 105);"/>
|
||||||
|
<path d="m314.589844 87.082031c-2.007813 0-4.011719-.765625-5.542969-2.296875-3.0625-3.058594-3.0625-8.019531 0-11.082031l20.089844-20.085937c3.0625-3.058594 8.023437-3.058594 11.082031 0 3.058594 3.0625 3.058594 8.023437 0 11.082031l-20.089844 20.085937c-1.527344 1.53125-3.535156 2.296875-5.539062 2.296875zm0 0" style="fill: rgb(59, 233, 100);"/>
|
||||||
|
<path d="m340.339844 101.507812c-2.007813 0-4.011719-.765624-5.542969-2.296874-3.058594-3.058594-3.058594-8.023438 0-11.082032l20.089844-20.085937c3.0625-3.0625 8.023437-3.0625 11.082031 0 3.058594 3.058593 3.0625 8.023437 0 11.082031l-20.089844 20.085938c-1.527344 1.53125-3.535156 2.296874-5.539062 2.296874zm0 0" style="fill: rgb(59, 233, 100);"/>
|
||||||
|
<path d="m366.089844 115.929688c-2.003906 0-4.011719-.761719-5.539063-2.292969-3.0625-3.0625-3.0625-8.023438 0-11.082031l20.085938-20.089844c3.0625-3.058594 8.023437-3.058594 11.082031 0 3.0625 3.0625 3.0625 8.023437 0 11.082031l-20.085938 20.089844c-1.53125 1.53125-3.535156 2.292969-5.542968 2.292969zm0 0" style="fill: rgb(59, 233, 100);"/>
|
||||||
|
</g>
|
||||||
|
<path d="M 401.925 247.748 C 401.761 247.748 401.611 247.629 401.573 247.469 C 401.536 247.312 401.611 247.144 401.753 247.067 C 402 246.933 402.318 247.147 402.286 247.426 C 402.265 247.606 402.107 247.748 401.925 247.748 Z M 401.925 247.748" fill="#1e2628" style=""/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.6 KiB |
@@ -1,140 +1,268 @@
|
|||||||
List of Supported Set Commands
|
List of Supported Options
|
||||||
==============================
|
=========================
|
||||||
|
|
||||||
The following `:set` commands can appear in `~/.ideavimrc` or be set manually in the command mode:
|
The following options can be set with the `:set`, `:setglobal` and `:setlocal` commands.
|
||||||
|
They can be added to the `~/.ideavimrc` file, or set manually in Command-line mode.
|
||||||
|
For more details of each option, please see the Vim documentation.
|
||||||
|
Every effort is made to make these options compatible with Vim behaviour.
|
||||||
|
However, some differences are inevitable.
|
||||||
|
|
||||||
'clipboard' 'cb' clipboard options
|
```
|
||||||
Standard clipboard options plus
|
'clipboard' 'cb' Defines clipboard behavioue
|
||||||
|
A comma-separated list of words to control clipboard behaviour:
|
||||||
|
unnamed The clipboard register '*' is used instead of the
|
||||||
|
unnamed register
|
||||||
|
unnamedplus The clipboard register '+' is used instead of the
|
||||||
|
unnamed register
|
||||||
|
ideaput Uses the IDEs own paste implementation for put
|
||||||
|
operations rather than simply inserting the text
|
||||||
|
|
||||||
|
'digraph' 'dg' Enable using <BS> to enter digraphs in Insert mode
|
||||||
|
'gdefault' 'gd' The ":substitute" flag 'g' is by default
|
||||||
|
'guicursor' 'gcr' Controls the shape of the cursor for different modes
|
||||||
|
'history' 'hi' Number of command-lines that are remembered
|
||||||
|
'hlsearch' 'hls' Highlight matches with the last search pattern
|
||||||
|
'ignorecase' 'ic' Ignore case in search patterns
|
||||||
|
'incsearch' 'is' Show where search pattern typed so far matches
|
||||||
|
'iskeyword' 'isk' Defines keywords for commands like 'w', '*', etc.
|
||||||
|
'keymodel' 'km' Controls selection behaviour with special keys
|
||||||
|
List of comma separated words, which enable special things that keys
|
||||||
|
can do. These values can be used:
|
||||||
|
startsel Using a shifted special key starts selection (either
|
||||||
|
Select mode or Visual mode, depending on "key" being
|
||||||
|
present in 'selectmode')
|
||||||
|
stopsel Using a NOT-shifted special key stops selection.
|
||||||
|
Automatically enables `stopselect` and `stopvisual`
|
||||||
|
stopselect Using a NOT-shifted special key stops select mode
|
||||||
|
and removes selection - IdeaVim ONLY
|
||||||
|
stopvisual Using a NOT-shifted special key stops visual mode
|
||||||
|
and removes selection - IdeaVim ONLY
|
||||||
|
continueselect Using a shifted arrow key doesn't start selection,
|
||||||
|
but in select mode acts like startsel is enabled
|
||||||
|
- IdeaVim ONLY
|
||||||
|
continuevisual Using a shifted arrow key doesn't start selection,
|
||||||
|
but in visual mode acts like startsel is enabled
|
||||||
|
- IdeaVim ONLY
|
||||||
|
|
||||||
`ideaput` (default on) - IdeaVim ONLY
|
Special keys in this context are the cursor keys, <End>, <Home>,
|
||||||
enable native idea paste action for put operations
|
<PageUp> and <PageDown>.
|
||||||
|
|
||||||
'digraph' 'dg' enable the entering of digraphs in Insert mode
|
|
||||||
'gdefault' 'gd' the ":substitute" flag 'g' is by default
|
|
||||||
'history' 'hi' number of command-lines that are remembered
|
|
||||||
'hlsearch' 'hls' highlight matches with the last search pattern
|
|
||||||
'ignorecase' 'ic' ignore case in search patterns
|
|
||||||
'iskeyword' 'isk' defines keywords for commands like 'w', '*', etc.
|
|
||||||
'incsearch' 'is' show where search pattern typed so far matches
|
|
||||||
|
|
||||||
`keymodel` `km` String (default "continueselect,stopselect")
|
|
||||||
|
|
||||||
List of comma separated words, which enable special things that keys
|
'matchpairs' 'mps' Pairs of characters that "%" can match
|
||||||
can do. These values can be used:
|
'maxmapdepth' 'mmd' Maximum depth of mappings
|
||||||
startsel Using a shifted special[1] key starts selection (either
|
'more' 'more' When on, listings pause when the whole screen is filled
|
||||||
Select mode or Visual mode, depending on "key" being
|
'nrformats' 'nf' Number formats recognized for CTRL-A command
|
||||||
present in 'selectmode').
|
'operatorfunc' 'opfunc' Name of a function to call with the g@ operator
|
||||||
stopsel Using a NOT-shifted special[1] key stops selection.
|
'scroll' 'scr' Number of lines to scroll with CTRL-U and CTRL-D
|
||||||
Automatically enables `stopselect` and `stopvisual`
|
'selection' 'sel' What type of selection to use
|
||||||
stopselect Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
'selectmode' 'slm' Controls when to start Select mode instead of Visual
|
||||||
select mode and removes selection.
|
This is a comma-separated list of words:
|
||||||
stopvisual Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
|
||||||
visual mode and removes selection.
|
mouse When using the mouse
|
||||||
continueselect Using a shifted arrow key doesn't - IdeaVim ONLY
|
key When using shifted special[1] keys
|
||||||
start selection, but in select mode
|
cmd When using "v", "V", or <C-V>
|
||||||
acts like startsel is enabled
|
ideaselection When IDE sets a selection - IdeaVim ONLY
|
||||||
continuevisual Using a shifted arrow key doesn't - IdeaVim ONLY
|
(e.g.: extend selection, wrap with while, etc.)
|
||||||
start selection, but in visual mode
|
|
||||||
acts like startsel is enabled
|
|
||||||
|
|
||||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
|
||||||
'maxmapdepth' 'mmd' Maximum depth of mappings
|
|
||||||
'more' 'more' When on, listings pause when the whole screen is filled.
|
|
||||||
'nrformats' 'nf' number formats recognized for CTRL-A command
|
|
||||||
'number' 'nu' print the line number in front of each line
|
|
||||||
'relativenumber' 'rnu' show the line number relative to the line with
|
|
||||||
the cursor
|
|
||||||
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
|
||||||
'scrolljump' 'sj' minimum number of lines to scroll
|
|
||||||
'scrolloff' 'so' minimum number of lines above and below the cursor
|
|
||||||
'selection' 'sel' what type of selection to use
|
|
||||||
|
|
||||||
`selectmode` `slm` String (default "")
|
'shell' 'sh' The shell to use to execute commands with ! and :!
|
||||||
|
'shellcmdflag' 'shcf' The command flag passed to the shell
|
||||||
|
'shellxescape' 'sxe' The characters to be escaped when calling a shell
|
||||||
|
'shellxquote' 'sxq' The quote character to use in a shell command
|
||||||
|
'showcmd' 'sc' Show (partial) command in the status bar
|
||||||
|
'showmode' 'smd' Show the current mode in the status bar
|
||||||
|
'smartcase' 'scs' Use case sensitive search if any character in the
|
||||||
|
pattern is uppercase
|
||||||
|
'startofline' 'sol' When on, some commands move the cursor to the first
|
||||||
|
non-blank of the line
|
||||||
|
When off, the cursor is kept in the same column
|
||||||
|
(if possible)
|
||||||
|
'timeout' 'to' Use timeout for mapped key sequences
|
||||||
|
'timeoutlen' 'tm' Timeout duration for a mapped key sequence
|
||||||
|
'viminfo' 'vi' Information to remember after restart
|
||||||
|
'virtualedit' 've' Placement of the cursor where there is no actual text
|
||||||
|
A comma-separated list of these words:
|
||||||
|
block Allow virtual editing in Visual mode (not supported)
|
||||||
|
insert Allow virtual editing in Insert mode (not supported)
|
||||||
|
all Allow virtual editing in all modes (not supported)
|
||||||
|
onemore Allow the cursor to move just past the end of the line
|
||||||
|
|
||||||
This is a comma-separated list of words, which specify when to start
|
'visualbell' 'vb' When on, prevents beeping on error
|
||||||
Select mode instead of Visual mode, when a selection is started.
|
'whichwrap' 'ww' Which keys that move the cursor left/right can wrap to
|
||||||
Possible values:
|
other lines
|
||||||
mouse when using the mouse
|
A comma-separated list of these flags:
|
||||||
key when using shifted special[1] keys
|
char key modes
|
||||||
cmd when using "v", "V", or <C-V>
|
b <BS> Normal and Visual
|
||||||
ideaselection when IDE sets a selection - IdeaVim ONLY
|
s <Space> Normal and Visual
|
||||||
(examples: extend selection, wrap with while, etc.)
|
h "h" Normal and Visual
|
||||||
|
l "l" Normal and Visual
|
||||||
|
< <Left> Normal and Visual
|
||||||
|
> <Right> Normal and Visual
|
||||||
|
~ "~" Normal
|
||||||
|
[ <Left> Insert and Replace
|
||||||
|
] <Right> Insert and Replace
|
||||||
|
|
||||||
`startofline` `sol` When "on" some commands move the cursor to the first non-blank of the line.
|
'wrapscan' 'ws' Search will wrap around the end of file
|
||||||
When off the cursor is kept in the same column (if possible).
|
```
|
||||||
|
|
||||||
'showmode' 'smd' message on the status line to show current mode
|
## IdeaVim options mapped to IntelliJ-based IDE settings
|
||||||
'showcmd' 'sc' show (partial) command in the status bar
|
|
||||||
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
|
||||||
'sidescrolloff' 'siso' min. number of columns to left and right of cursor
|
|
||||||
'smartcase' 'scs' no ignore case when pattern is uppercase
|
|
||||||
'timeout' 'to' use timeout for mapped key sequences
|
|
||||||
'timeoutlen' 'tm' timeout duration for a mapped key sequence
|
|
||||||
'undolevels' 'ul' maximum number of changes that can be undone
|
|
||||||
'viminfo' 'vi' information to remember after restart
|
|
||||||
'visualbell' 'vb' use visual bell instead of beeping
|
|
||||||
'wrapscan' 'ws' searches wrap around the end of file
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IdeaVim only commands:
|
|
||||||
|
|
||||||
`ideamarks` `ideamarks` Boolean (default true)
|
IdeaVim provides its own implementation for handling scroll jump and offset, even though IntelliJ-based IDEs have similar functionality (there are differences in behaviour).
|
||||||
|
When IdeaVim is hosted in an IntelliJ-based IDE (but not JetBrains Fleet), the following options map to the equivalent IDE settings:
|
||||||
If true, creation of global mark will trigger creation of IDE's bookmark
|
|
||||||
and vice versa.
|
|
||||||
|
|
||||||
`idearefactormode` `idearefactormode` String(default "select")
|
|
||||||
|
|
||||||
Define the mode that would be enabled during
|
|
||||||
the refactoring (renaming, live template, introduce variable, etc)
|
|
||||||
|
|
||||||
Use one of the following values:
|
|
||||||
- keep - keep the mode that was enabled before starting a refactoring
|
|
||||||
- select - start refactoring in select mode
|
|
||||||
- visual - start refactoring in visual mode
|
|
||||||
|
|
||||||
This option has effect if you are in normal, insert or replace mode before refactoring start.
|
|
||||||
Visual or select mode are not changed.
|
|
||||||
|
|
||||||
|
|
||||||
`ideajoin` `ideajoin` Boolean (default false)
|
|
||||||
|
|
||||||
If true, join command will be performed via IDE
|
|
||||||
See wiki/`ideajoin` examples
|
|
||||||
|
|
||||||
`ideastatusicon` `ideastatusicon` String(default "enabled")
|
|
||||||
|
|
||||||
Define the behavior of IdeaVim icon in the status bar.
|
|
||||||
|
|
||||||
Use one of the following values:
|
|
||||||
- enabled - icon is shown in the status bar
|
|
||||||
- gray - use the gray version of the icon
|
|
||||||
- disabled - hide the icon
|
|
||||||
|
|
||||||
`ideawrite` `ideawrite` String (default "all")
|
```
|
||||||
"file" or "all". Defines the behaviour of ":w" command.
|
'scrolljump' 'sj' Minimal number of lines to scroll
|
||||||
Value "all" enables execution of ":wa" (save all) command on ":w" (save).
|
'scrolloff' 'so' Minimal number of lines above and below the cursor
|
||||||
This feature exists because some IJ options like "Prettier on save" or "ESlint on save"
|
'sidescroll' 'ss' Minimal number of columns to scroll horizontally
|
||||||
work only with "save all" action. If this option is set to "all", these actions work
|
'sidescrolloff' 'siso' Minimal number of columns to left and right of cursor
|
||||||
also with ":w" command.
|
```
|
||||||
|
|
||||||
`lookupkeys` `lookupkeys` List of strings
|
|
||||||
|
|
||||||
List of keys that should be processed by the IDE during the active lookup (autocompletion).
|
|
||||||
For example, <Tab> and <Enter> are used by the IDE to finish the lookup,
|
|
||||||
but <C-W> should be passed to IdeaVim.
|
|
||||||
Default value:
|
|
||||||
"<Tab>", "<Down>", "<Up>", "<Enter>", "<Left>", "<Right>",
|
|
||||||
"<C-Down>", "<C-Up>", "<PageUp>", "<PageDown>",
|
|
||||||
"<C-J>", "<C-Q>"
|
|
||||||
|
|
||||||
`ideavimsupport` `ideavimsupport` List of strings (default "dialog")
|
|
||||||
|
|
||||||
Define the list of additional buffers where IdeaVim is enabled.
|
|
||||||
|
|
||||||
- dialog - enable IdeaVim in dialogs
|
|
||||||
- singleline - enable IdeaVim in single line editors (not suggested)
|
|
||||||
|
|
||||||
----------
|
## IdeaVim options for IntelliJ-based IDE features
|
||||||
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
|
||||||
|
Some Vim features cannot be implemented by IdeaVim, and must be implemented by the host IDE, such as showing whitespace and line numbers, and enabling soft-wrap.
|
||||||
|
The following options modify equivalent settings and features implemented by IntelliJ-based IDEs.
|
||||||
|
|
||||||
|
There is some mismatch when trying to map Vim options, most of which are local options, to IDE settings, which are mostly global-local.
|
||||||
|
The Vim option will always reflect the effective value of the IDE setting for the current editor, and modifying the Vim option will update the local value of the IDE setting.
|
||||||
|
The default value of the Vim option set during startup is not passed to the IDE setting.
|
||||||
|
|
||||||
|
If the IDE setting has a way to modify the local value, such as entries in the _View | Active Editor_ menu, then changing this will update the current editor and be reflected in the Vim option value.
|
||||||
|
If the IDE setting can only modify its global setting in the main _Settings_ dialog, this change does not always update the current editor (because the local IDE setting has been modified and takes precedence).
|
||||||
|
|
||||||
|
IdeaVim tries to make this work more naturally by updating the editor and local Vim option when a global value changes unless the Vim option has been explicitly set in Command-line mode.
|
||||||
|
|
||||||
|
In other words, if the local Vim value is explicitly set for a window or buffer, interactively, then it should not be reset.
|
||||||
|
If the Vim option was explicitly set in `~/.ideavimrc` however, then the value will be reset, because this can be viewed as a "global" value - set once and applied to subsequently opened windows.
|
||||||
|
(This should not be confused with Vim's concept of global options, which are mainly used to initialise new windows.)
|
||||||
|
|
||||||
|
The local Vim option can always be reset to the global IDE setting value by resetting the Vim option to default with the `:set {option}&` syntax.
|
||||||
|
|
||||||
|
```
|
||||||
|
'bomb' 'bomb' Add or remove a byte order mark (BOM) to the
|
||||||
|
current file. Unlike Vim, the file is modified
|
||||||
|
immediately, and not when saved
|
||||||
|
'breakindent' 'bri' Indent soft wrapped lines to match the first
|
||||||
|
line's indent
|
||||||
|
'colorcolumn' 'cc' Maps to IntelliJ's visual guide columns
|
||||||
|
'cursorline' 'cul' Highlight the line containing the cursor
|
||||||
|
'fileencoding' 'fenc' Change the encoding of the current file. The file
|
||||||
|
is modified and written immediately, rather than
|
||||||
|
waiting to be saved
|
||||||
|
Note that the names of the encoding might not
|
||||||
|
match Vim's known names
|
||||||
|
'fileformat' 'ff' Change the file format - dos, unix or mac
|
||||||
|
The file is modified immediately, rather than
|
||||||
|
when saved
|
||||||
|
'list' 'list' Show whitespace. Maps to the editor's local
|
||||||
|
setting in the View | Active Editor menu
|
||||||
|
'number' 'nu' Show line numbers. Maps to the editor's local
|
||||||
|
setting in the View | Active Editor menu
|
||||||
|
'relativenumber' 'rnu' Show line numbers relative to the current line
|
||||||
|
'textwidth' 'tw' Set the column at which text is automatically
|
||||||
|
wrapped
|
||||||
|
'wrap' 'wrap' Enable soft-wraps. Maps to the editor's local
|
||||||
|
setting in the View | Active Editor menu
|
||||||
|
```
|
||||||
|
|
||||||
|
## IdeaVim only options
|
||||||
|
|
||||||
|
These options are IdeaVim only, and not supported by Vim.
|
||||||
|
They control integration with the host IDE.
|
||||||
|
Unless otherwise stated, these options do not have abbreviations.
|
||||||
|
|
||||||
|
```
|
||||||
|
'ideacopypreprocess' boolean (default off)
|
||||||
|
global or local to buffer
|
||||||
|
When enabled, the IDE will run custom copy pre-processors over text
|
||||||
|
copied to registers. These pre-processors can perform transformations
|
||||||
|
on the text, such as converting escape characters in a string literal
|
||||||
|
into the actual control characters in a Java file.
|
||||||
|
|
||||||
|
This is not usually the expected behaviour, so this option's default
|
||||||
|
value is off. The equivalent processing for paste is controlled by the
|
||||||
|
"ideaput" value to the 'clipboard' option.
|
||||||
|
|
||||||
|
'ideaglobalmode' boolean (default off)
|
||||||
|
global
|
||||||
|
This option will cause IdeaVim to share a single mode across all open
|
||||||
|
windows. In other words, entering Insert mode in one window will
|
||||||
|
enable Insert mode in all windows.
|
||||||
|
|
||||||
|
'ideajoin' boolean (default off)
|
||||||
|
global or local to buffer
|
||||||
|
When enabled, join commands will be handled by the IDE's "smart join"
|
||||||
|
feature. The IDE can change syntax when joining lines, such as merging
|
||||||
|
string literals or if statements. See the wiki for more examples. Not
|
||||||
|
all languages support smart join functionality.
|
||||||
|
|
||||||
|
'ideamarks' boolean (default on)
|
||||||
|
global
|
||||||
|
Maps Vim's global marks to IDE bookmarks.
|
||||||
|
|
||||||
|
'idearefactormode' string (default "select")
|
||||||
|
global or local to buffer
|
||||||
|
Specifies the mode to be used when a refactoring selects text to be
|
||||||
|
edited (e.g. renaming, live template fields, introduce variable, etc):
|
||||||
|
keep Keep the current mode
|
||||||
|
select Switch to Select mode
|
||||||
|
visual Switch to Visual mode
|
||||||
|
|
||||||
|
This option is only used when the refactoring is started in Normal,
|
||||||
|
Insert or Replace mode. Visual or Select modes are not changed.
|
||||||
|
|
||||||
|
'ideastatusicon' string (default "enabled")
|
||||||
|
global
|
||||||
|
This option controls the behaviour and appearance of the IdeaVim icon
|
||||||
|
in the status bar:
|
||||||
|
enabled Show the icon in the status bar
|
||||||
|
gray Show the gray version of the icon
|
||||||
|
disabled Hide the icon
|
||||||
|
|
||||||
|
'ideavimsupport' string (default "dialog")
|
||||||
|
global
|
||||||
|
A comma-separated list of additional buffers or locations where
|
||||||
|
IdeaVim should be enabled:
|
||||||
|
dialog Enable IdeaVim in editors hosted in dialogs
|
||||||
|
singleline Enable IdeaVim in single line editors (not recommended)
|
||||||
|
|
||||||
|
The IDE's editor component can be used in many places, such as VCS
|
||||||
|
commit tool window, or inside dialogs, and even as single line fields.
|
||||||
|
|
||||||
|
'ideawrite' string (default "all")
|
||||||
|
global
|
||||||
|
This option defines the behaviour of the :w command:
|
||||||
|
file Save the current file only
|
||||||
|
all The :w command works like :wa and invokes the Save All
|
||||||
|
IDE action. This allows options such as "Prettier on
|
||||||
|
save" or "ESlint on save" to work with the :w command,
|
||||||
|
but means all files are saved.
|
||||||
|
|
||||||
|
'lookupkeys' string (default "<Tab>,<Down>,<Up>,<Enter>,
|
||||||
|
<Left>,<Right>,<C-Down>,<C-Up>,
|
||||||
|
<PageUp>,<PageDown>, <C-J>,<C-Q>")
|
||||||
|
global
|
||||||
|
Comma-separated list of keys that should be processed by the IDE while
|
||||||
|
a code completion lookup popup is active. For example, <Tab> and
|
||||||
|
<Enter> are used by the IDE to complete the lookup and insert text,
|
||||||
|
but <C-W> should be passed IdeaVim to continue editing the text.
|
||||||
|
|
||||||
|
'trackactionids' boolean (default off)
|
||||||
|
global
|
||||||
|
When on, IdeaVim will try to track the current IDE action and display
|
||||||
|
the action name in a notification. This action ID can then be used in
|
||||||
|
a mapping to the action in the form <Action>(...).
|
||||||
|
|
||||||
|
'visualdelay' number (default 100)
|
||||||
|
global
|
||||||
|
This option specifies the delay, in milliseconds before converting an
|
||||||
|
IDE selection into Visual mode.
|
||||||
|
|
||||||
|
Some IDE features make a selection to help modify text (e.g. backspace
|
||||||
|
in Python or Yaml selects an indent and invokes the "remove selection"
|
||||||
|
action). IdeaVim listens for changes in selection to switch to Visual
|
||||||
|
mode, and will return to Normal mode when the selection is removed,
|
||||||
|
even if originally in Insert mode.
|
||||||
|
|
||||||
|
By waiting before converting to Visual mode, temporary selections can
|
||||||
|
be ignored and the current Vim mode maintained.
|
||||||
|
|
||||||
|
It is not expected that this value will need to be changed.
|
||||||
|
```
|
||||||
|
@@ -8,26 +8,47 @@
|
|||||||
|
|
||||||
# suppress inspection "UnusedProperty" for whole file
|
# suppress inspection "UnusedProperty" for whole file
|
||||||
|
|
||||||
ideaVersion=2023.2
|
# ideaVersion is the version of the IDE that will be added as a compile-time dependency. The format can be either
|
||||||
|
# product version (e.g. 2024.1, 2024.1.1) or build (e.g. 241.15989.150, 241-EAP-SNAPSHOT). The dependency will be
|
||||||
|
# resolved against the configured repositories, which by default includes Maven releases and snapshots, the CDN used to
|
||||||
|
# download consumer releases, the plugin marketplace and so on.
|
||||||
|
# You can find an example list of all CDN based versions for IDEA Community here:
|
||||||
|
# https://data.services.jetbrains.com/products?code=IC
|
||||||
|
# Maven releases are here: https://www.jetbrains.com/intellij-repository/releases
|
||||||
|
# And snapshots: https://www.jetbrains.com/intellij-repository/snapshots
|
||||||
|
ideaVersion=2024.1.1
|
||||||
|
# Values for type: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type
|
||||||
|
ideaType=IC
|
||||||
downloadIdeaSources=true
|
downloadIdeaSources=true
|
||||||
instrumentPluginCode=true
|
instrumentPluginCode=true
|
||||||
version=chylex-21
|
version=chylex-37
|
||||||
javaVersion=17
|
javaVersion=17
|
||||||
remoteRobotVersion=0.11.17
|
remoteRobotVersion=0.11.22
|
||||||
antlrVersion=4.10.1
|
antlrVersion=4.10.1
|
||||||
|
|
||||||
kotlin.incremental.useClasspathSnapshot=false
|
# [VERSION UPDATE] 2024.2 - remove when IdeaVim targets 2024.2
|
||||||
|
# Running IdeaVim in split mode requires 242. Update this version once 242 has been released, and remove it completely
|
||||||
|
# when IdeaVim targets 242, at which point runIdeSplitMode will run correctly with the target version.
|
||||||
|
# See also runIdeSplitMode
|
||||||
|
splitModeVersion=242-EAP-SNAPSHOT
|
||||||
|
|
||||||
|
|
||||||
# Please don't forget to update kotlin version in buildscript section
|
# Please don't forget to update kotlin version in buildscript section
|
||||||
kotlinVersion=1.8.21
|
# Also update kotlinxSerializationVersion version
|
||||||
|
kotlinVersion=1.9.22
|
||||||
publishToken=token
|
publishToken=token
|
||||||
publishChannels=eap
|
publishChannels=eap
|
||||||
|
|
||||||
|
# Kotlinx serialization also uses some version of kotlin stdlib under the hood. However,
|
||||||
|
# we exclude this version from the dependency and use our own version of kotlin that is specified above
|
||||||
|
kotlinxSerializationVersion=1.6.2
|
||||||
|
|
||||||
slackUrl=
|
slackUrl=
|
||||||
youtrackToken=
|
youtrackToken=
|
||||||
|
|
||||||
# Gradle settings
|
# Gradle settings
|
||||||
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||||
|
org.gradle.caching=true
|
||||||
|
|
||||||
# Disable warning from gradle-intellij-plugin. Kotlin stdlib is included as compileOnly, so the warning is unnecessary
|
# Disable warning from gradle-intellij-plugin. Kotlin stdlib is included as compileOnly, so the warning is unnecessary
|
||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
5
gradlew
vendored
5
gradlew
vendored
@@ -130,10 +130,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
99092
qodana.sarif.json
99092
qodana.sarif.json
File diff suppressed because one or more lines are too long
@@ -21,6 +21,9 @@ exclude:
|
|||||||
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/SimpleText.kt
|
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/SimpleText.kt
|
||||||
- src/main/java/com/maddyhome/idea/vim/vimscript/parser/generated
|
- src/main/java/com/maddyhome/idea/vim/vimscript/parser/generated
|
||||||
- src/main/java/com/maddyhome/idea/vim/package-info.java
|
- src/main/java/com/maddyhome/idea/vim/package-info.java
|
||||||
|
- vim-engine/src/main/java/com/maddyhome/idea/vim/regexp/parser/generated
|
||||||
|
- src/main/java/com/maddyhome/idea/vim/group/SearchGroup.java
|
||||||
|
- tests/ui-fixtures
|
||||||
dependencyIgnores:
|
dependencyIgnores:
|
||||||
- name: "acejump"
|
- name: "acejump"
|
||||||
- name: "icu4j"
|
- name: "icu4j"
|
||||||
|
@@ -20,17 +20,17 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
|
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.24")
|
||||||
|
|
||||||
implementation("io.ktor:ktor-client-core:2.3.6")
|
implementation("io.ktor:ktor-client-core:2.3.12")
|
||||||
implementation("io.ktor:ktor-client-cio:2.3.5")
|
implementation("io.ktor:ktor-client-cio:2.3.10")
|
||||||
implementation("io.ktor:ktor-client-content-negotiation:2.3.6")
|
implementation("io.ktor:ktor-client-content-negotiation:2.3.10")
|
||||||
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.6")
|
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.12")
|
||||||
implementation("io.ktor:ktor-client-auth:2.3.6")
|
implementation("io.ktor:ktor-client-auth:2.3.12")
|
||||||
implementation("org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r")
|
implementation("org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r")
|
||||||
|
|
||||||
// This is needed for jgit to connect to ssh
|
// This is needed for jgit to connect to ssh
|
||||||
implementation("org.eclipse.jgit:org.eclipse.jgit.ssh.apache:6.7.0.202309050840-r")
|
implementation("org.eclipse.jgit:org.eclipse.jgit.ssh.apache:6.10.0.202406032230-r")
|
||||||
implementation("com.vdurmont:semver4j:3.1.0")
|
implementation("com.vdurmont:semver4j:3.1.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,13 +58,6 @@ tasks.register("checkNewPluginDependencies", JavaExec::class) {
|
|||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("updateAffectedRates", JavaExec::class) {
|
|
||||||
group = "verification"
|
|
||||||
description = "This job updates Affected Rate field on YouTrack"
|
|
||||||
mainClass.set("scripts.YouTrackUsersAffectedKt")
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("calculateNewVersion", JavaExec::class) {
|
tasks.register("calculateNewVersion", JavaExec::class) {
|
||||||
group = "release"
|
group = "release"
|
||||||
mainClass.set("scripts.release.CalculateNewVersionKt")
|
mainClass.set("scripts.release.CalculateNewVersionKt")
|
||||||
@@ -93,25 +86,6 @@ tasks.register("addReleaseTag", JavaExec::class) {
|
|||||||
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("resetReleaseBranch", JavaExec::class) {
|
|
||||||
group = "release"
|
|
||||||
mainClass.set("scripts.release.ResetReleaseBranchKt")
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
|
||||||
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("pushChanges", JavaExec::class) {
|
|
||||||
mainClass.set("scripts.PushChangesKt")
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
|
||||||
args = listOf(rootProject.rootDir.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("pushChangesWithReleaseBranch", JavaExec::class) {
|
|
||||||
mainClass.set("scripts.PushChangesWithReleaseBranchKt")
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
|
||||||
args = listOf(rootProject.rootDir.toString(), releaseType ?: "")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("selectBranch", JavaExec::class) {
|
tasks.register("selectBranch", JavaExec::class) {
|
||||||
group = "release"
|
group = "release"
|
||||||
mainClass.set("scripts.release.SelectBranchKt")
|
mainClass.set("scripts.release.SelectBranchKt")
|
||||||
@@ -119,6 +93,13 @@ tasks.register("selectBranch", JavaExec::class) {
|
|||||||
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("eapReleaseActions", JavaExec::class) {
|
||||||
|
group = "release"
|
||||||
|
mainClass.set("scripts.releaseEap.EapReleaseActionsKt")
|
||||||
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
|
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("calculateNewEapVersion", JavaExec::class) {
|
tasks.register("calculateNewEapVersion", JavaExec::class) {
|
||||||
group = "release"
|
group = "release"
|
||||||
mainClass.set("scripts.release.CalculateNewEapVersionKt")
|
mainClass.set("scripts.release.CalculateNewEapVersionKt")
|
||||||
@@ -126,6 +107,13 @@ tasks.register("calculateNewEapVersion", JavaExec::class) {
|
|||||||
args = listOf("${rootProject.rootDir}")
|
args = listOf("${rootProject.rootDir}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("calculateNewEapVersionFromBranch", JavaExec::class) {
|
||||||
|
group = "release"
|
||||||
|
mainClass.set("scripts.release.CalculateNewEapVersionFromBranchKt")
|
||||||
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
|
args = listOf("${rootProject.rootDir}")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("calculateNewDevVersion", JavaExec::class) {
|
tasks.register("calculateNewDevVersion", JavaExec::class) {
|
||||||
group = "release"
|
group = "release"
|
||||||
mainClass.set("scripts.release.CalculateNewDevVersionKt")
|
mainClass.set("scripts.release.CalculateNewDevVersionKt")
|
||||||
|
@@ -22,7 +22,7 @@ import kotlinx.serialization.json.jsonPrimitive
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Suppress("SpellCheckingInspection")
|
@Suppress("SpellCheckingInspection")
|
||||||
val knownPlugins = listOf(
|
val knownPlugins = setOf(
|
||||||
"IdeaVimExtension",
|
"IdeaVimExtension",
|
||||||
"github.zgqq.intellij-enhance",
|
"github.zgqq.intellij-enhance",
|
||||||
"org.jetbrains.IdeaVim-EasyMotion",
|
"org.jetbrains.IdeaVim-EasyMotion",
|
||||||
@@ -31,7 +31,13 @@ val knownPlugins = listOf(
|
|||||||
"com.github.copilot",
|
"com.github.copilot",
|
||||||
"com.github.dankinsoid.multicursor",
|
"com.github.dankinsoid.multicursor",
|
||||||
"com.joshestein.ideavim-quickscope",
|
"com.joshestein.ideavim-quickscope",
|
||||||
|
|
||||||
"ca.alexgirard.HarpoonIJ",
|
"ca.alexgirard.HarpoonIJ",
|
||||||
|
"me.kyren223.harpoonforjb", // https://plugins.jetbrains.com/plugin/23771-harpoonforjb
|
||||||
|
"com.github.erotourtes.harpoon", // https://plugins.jetbrains.com/plugin/21796-harpooner
|
||||||
|
"me.kyren223.trident", // https://plugins.jetbrains.com/plugin/23818-trident
|
||||||
|
|
||||||
|
"com.protoseo.input-source-auto-converter",
|
||||||
|
|
||||||
// "cc.implicated.intellij.plugins.bunny", // I don't want to include this plugin in the list of IdeaVim plugins as I don't understand what this is for
|
// "cc.implicated.intellij.plugins.bunny", // I don't want to include this plugin in the list of IdeaVim plugins as I don't understand what this is for
|
||||||
)
|
)
|
||||||
@@ -41,19 +47,15 @@ suspend fun main() {
|
|||||||
parameter("dependency", "IdeaVIM")
|
parameter("dependency", "IdeaVIM")
|
||||||
parameter("includeOptional", true)
|
parameter("includeOptional", true)
|
||||||
}
|
}
|
||||||
val output = response.body<List<String>>()
|
val output = response.body<List<String>>().toSet()
|
||||||
println(output)
|
println(output)
|
||||||
if (knownPlugins != output) {
|
val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
|
||||||
val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
|
if (newPlugins.isNotEmpty()) {
|
||||||
val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
|
// val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
|
||||||
error(
|
error(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Unregistered plugins:
|
Unregistered plugins:
|
||||||
${if (newPlugins.isNotEmpty()) newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No unregistered plugins"}
|
${newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" }}
|
||||||
|
|
||||||
Removed plugins:
|
|
||||||
${if (removedPlugins.isNotEmpty()) removedPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No removed plugins"}
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ fun httpClient(): HttpClient {
|
|||||||
install(Auth) {
|
install(Auth) {
|
||||||
bearer {
|
bearer {
|
||||||
loadTokens {
|
loadTokens {
|
||||||
val accessToken = System.getenv("YOUTRACK_TOKEN")!!
|
val accessToken = System.getenv("YOUTRACK_TOKEN") ?: error("Missing YOUTRACK_TOKEN")
|
||||||
BearerTokens(accessToken, "")
|
BearerTokens(accessToken, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package scripts
|
|
||||||
|
|
||||||
import scripts.release.checkoutBranch
|
|
||||||
import scripts.release.withGit
|
|
||||||
import scripts.release.withRepo
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
val rootDir = args[0]
|
|
||||||
println("root dir: $rootDir")
|
|
||||||
|
|
||||||
val currentBranch = withRepo(rootDir) { it.branch }
|
|
||||||
println("Current branch is $currentBranch")
|
|
||||||
|
|
||||||
|
|
||||||
withGit(rootDir) { git ->
|
|
||||||
if (currentBranch != "master") {
|
|
||||||
git.checkoutBranch("master")
|
|
||||||
println("Check out master branch")
|
|
||||||
}
|
|
||||||
|
|
||||||
git.push()
|
|
||||||
.setPushTags()
|
|
||||||
.call()
|
|
||||||
println("Master pushed with tags")
|
|
||||||
|
|
||||||
git.checkoutBranch(currentBranch)
|
|
||||||
println("Checked out $currentBranch branch")
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package scripts
|
|
||||||
|
|
||||||
import scripts.release.checkoutBranch
|
|
||||||
import scripts.release.withGit
|
|
||||||
import scripts.release.withRepo
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
val rootDir = args[0]
|
|
||||||
val releaseType = args[1]
|
|
||||||
println("root dir: $rootDir")
|
|
||||||
println("releaseType: $releaseType")
|
|
||||||
|
|
||||||
val currentBranch = withRepo(rootDir) { it.branch }
|
|
||||||
println("Current branch is $currentBranch")
|
|
||||||
|
|
||||||
|
|
||||||
withGit(rootDir) { git ->
|
|
||||||
if (currentBranch != "master") {
|
|
||||||
git.checkoutBranch("master")
|
|
||||||
println("Check out master branch")
|
|
||||||
}
|
|
||||||
|
|
||||||
git.push()
|
|
||||||
.setPushTags()
|
|
||||||
.call()
|
|
||||||
println("Master pushed with tags")
|
|
||||||
|
|
||||||
if (releaseType != "patch") {
|
|
||||||
git.checkoutBranch("release")
|
|
||||||
println("Checked out release")
|
|
||||||
|
|
||||||
git
|
|
||||||
.push()
|
|
||||||
.setForce(true)
|
|
||||||
.setPushTags()
|
|
||||||
.call()
|
|
||||||
println("Pushed release branch with tags")
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
println("Do not push release branch because type of release is $releaseType")
|
|
||||||
}
|
|
||||||
|
|
||||||
git.checkoutBranch(currentBranch)
|
|
||||||
println("Checked out $currentBranch branch")
|
|
||||||
}
|
|
||||||
}
|
|
@@ -8,21 +8,29 @@
|
|||||||
|
|
||||||
package scripts.release
|
package scripts.release
|
||||||
|
|
||||||
|
import org.eclipse.jgit.lib.ObjectId
|
||||||
|
import org.eclipse.jgit.revwalk.RevCommit
|
||||||
|
import org.eclipse.jgit.revwalk.RevWalk
|
||||||
|
import org.eclipse.jgit.revwalk.filter.RevFilter
|
||||||
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
println("HI!")
|
println("HI!")
|
||||||
val projectDir = args[0]
|
val projectDir = args[0]
|
||||||
println("Working directory: $projectDir")
|
println("Working directory: $projectDir")
|
||||||
val (lastVersion, objectId) = getVersion(projectDir, onlyStable = true)
|
val (lastVersion, objectId) = getVersion(projectDir, ReleaseType.STABLE_NO_PATCH)
|
||||||
println("Last version: $lastVersion, hash: ${objectId.name}")
|
println("Last version: $lastVersion, hash: ${objectId.name}")
|
||||||
|
|
||||||
val branch = withRepo(projectDir) { it.branch }
|
val branch = withRepo(projectDir) { it.branch }
|
||||||
check(branch == "master") {
|
check(branch == "master") {
|
||||||
"We should be on master branch"
|
"We should be on master branch"
|
||||||
}
|
}
|
||||||
|
val mergeBaseCommit = getMergeBaseWithMaster(projectDir, objectId)
|
||||||
|
println("Base commit $mergeBaseCommit")
|
||||||
withGit(projectDir) { git ->
|
withGit(projectDir) { git ->
|
||||||
val log = git.log().setMaxCount(500).call().toList()
|
val log = git.log().setMaxCount(500).call().toList()
|
||||||
println("First commit hash in log: " + log.first().name + " log size: ${log.size}")
|
println("First commit hash in log: " + log.first().name + " log size: ${log.size}")
|
||||||
val logDiff = log.takeWhile { it.id.name != objectId.name }
|
val logDiff = log.takeWhile { it.id.name != mergeBaseCommit }
|
||||||
val numCommits = logDiff.size
|
val numCommits = logDiff.size
|
||||||
println("Log diff size is $numCommits")
|
println("Log diff size is $numCommits")
|
||||||
check(numCommits < 450) {
|
check(numCommits < 450) {
|
||||||
@@ -35,3 +43,18 @@ fun main(args: Array<String>) {
|
|||||||
println("##teamcity[setParameter name='env.ORG_GRADLE_PROJECT_version' value='$nextVersion']")
|
println("##teamcity[setParameter name='env.ORG_GRADLE_PROJECT_version' value='$nextVersion']")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getMergeBaseWithMaster(projectDir: String, tag: ObjectId): String {
|
||||||
|
withRepo(projectDir) { repo ->
|
||||||
|
val master = repo.resolve("master")
|
||||||
|
RevWalk(repo).use { walk ->
|
||||||
|
val tagRevCommit = walk.parseCommit(tag)
|
||||||
|
val masterRevCommit = walk.parseCommit(master)
|
||||||
|
walk.setRevFilter(RevFilter.MERGE_BASE)
|
||||||
|
walk.markStart(tagRevCommit)
|
||||||
|
walk.markStart(masterRevCommit)
|
||||||
|
val mergeBase: RevCommit = walk.next()
|
||||||
|
return mergeBase.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -12,7 +12,7 @@ fun main(args: Array<String>) {
|
|||||||
println("HI!")
|
println("HI!")
|
||||||
val projectDir = args[0]
|
val projectDir = args[0]
|
||||||
println("Working directory: $projectDir")
|
println("Working directory: $projectDir")
|
||||||
val (lastVersion, _) = getVersion(projectDir, onlyStable = false)
|
val (lastVersion, _) = getVersion(projectDir, ReleaseType.ANY)
|
||||||
|
|
||||||
val nextVersion = if (lastVersion.suffixTokens.isEmpty()) {
|
val nextVersion = if (lastVersion.suffixTokens.isEmpty()) {
|
||||||
lastVersion.nextMinor().withSuffix("eap.1").value
|
lastVersion.nextMinor().withSuffix("eap.1").value
|
||||||
|
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2003-2023 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE.txt file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package scripts.release
|
||||||
|
|
||||||
|
fun main(args: Array<String> ) {
|
||||||
|
val projectDir = args[0]
|
||||||
|
println("Working directory: $projectDir")
|
||||||
|
val branch = withRepo(projectDir) { it.branch }
|
||||||
|
val (majorBranchVersion, minorBranchVersion) = versions(branch)
|
||||||
|
val versions = getVersionsExistingVersionsFor(majorBranchVersion, minorBranchVersion, projectDir)
|
||||||
|
val maxExistingVersion = versions.keys.maxOrNull()
|
||||||
|
|
||||||
|
val nextVersion = if (maxExistingVersion != null) {
|
||||||
|
if (maxExistingVersion.suffixTokens.isEmpty()) {
|
||||||
|
maxExistingVersion.nextPatch().withSuffix("eap.1").value
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
check(maxExistingVersion.suffixTokens.size == 2) {
|
||||||
|
"We should have exactly two suffix tokens. Current tokens: ${maxExistingVersion.suffixTokens.toList()}"
|
||||||
|
}
|
||||||
|
check(maxExistingVersion.suffixTokens[0] == "eap") {
|
||||||
|
"First suffix token must be eap. Current tokens: ${maxExistingVersion.suffixTokens.toList()}"
|
||||||
|
}
|
||||||
|
|
||||||
|
val newEapNumber = maxExistingVersion.suffixTokens[1].toInt().inc()
|
||||||
|
maxExistingVersion.withSuffix("eap.$newEapNumber").value
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
"$majorBranchVersion.$minorBranchVersion.0-eap.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
println("Next eap version: $nextVersion")
|
||||||
|
println("##teamcity[setParameter name='env.ORG_GRADLE_PROJECT_version' value='$nextVersion']")
|
||||||
|
}
|
||||||
|
|
||||||
|
private val regex = "releases/(\\d+)\\.(\\d+)\\.x".toRegex()
|
||||||
|
private fun versions(branchName: String): Pair<Int, Int> {
|
||||||
|
val match = regex.matchEntire(branchName) ?: error("Cannot match branch: $branchName")
|
||||||
|
val major = match.groups[1]
|
||||||
|
val minor = match.groups[2]
|
||||||
|
return major!!.value.toInt() to minor!!.value.toInt()
|
||||||
|
}
|
@@ -14,7 +14,7 @@ fun main(args: Array<String>) {
|
|||||||
val releaseType = args[1]
|
val releaseType = args[1]
|
||||||
println("Working directory: $projectDir")
|
println("Working directory: $projectDir")
|
||||||
println("Release type: $releaseType")
|
println("Release type: $releaseType")
|
||||||
val (lastVersion, _) = getVersion(projectDir, onlyStable = true)
|
val (lastVersion, _) = getVersion(projectDir, ReleaseType.ONLY_STABLE)
|
||||||
|
|
||||||
val nextVersion = when (releaseType) {
|
val nextVersion = when (releaseType) {
|
||||||
"major" -> lastVersion.nextMajor()
|
"major" -> lastVersion.nextMajor()
|
||||||
|
@@ -8,28 +8,45 @@
|
|||||||
|
|
||||||
package scripts.release
|
package scripts.release
|
||||||
|
|
||||||
|
import com.vdurmont.semver4j.Semver
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
import kotlin.io.path.readText
|
import kotlin.io.path.readText
|
||||||
import kotlin.io.path.writeText
|
import kotlin.io.path.writeText
|
||||||
|
|
||||||
|
private const val toBeReleased = "## To Be Released"
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
println("Start updating unreleased section")
|
println("Start updating unreleased section")
|
||||||
val (newVersion, rootDir, releaseType) = readArgs(args)
|
val (newVersion, rootDir, releaseType) = readArgs(args)
|
||||||
|
|
||||||
checkReleaseType(releaseType)
|
checkReleaseType(releaseType)
|
||||||
|
|
||||||
if (releaseType == "patch") {
|
|
||||||
println("Skip updating the changelog because release type is 'patch'")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val currentDate = LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE)
|
val currentDate = LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE)
|
||||||
val newItem = "## $newVersion, $currentDate"
|
val newItem = "## $newVersion, $currentDate"
|
||||||
|
|
||||||
val changelogPath = Path("$rootDir/CHANGES.md")
|
val changelogPath = Path("$rootDir/CHANGES.md")
|
||||||
val changelog = changelogPath.readText()
|
val changelog = changelogPath.readText()
|
||||||
val newChangelog = changelog.replace("## To Be Released", newItem)
|
val newChangelog = if (releaseType == "patch") {
|
||||||
|
val decreasedVersion = Semver(newVersion).withIncPatch(-1)
|
||||||
|
val firstEntry = changelog.indexOf("## $decreasedVersion")
|
||||||
|
if (firstEntry != -1) {
|
||||||
|
val newLog = StringBuilder(changelog)
|
||||||
|
newLog.insert(firstEntry, newItem + "\n")
|
||||||
|
newLog.toString()
|
||||||
|
} else {
|
||||||
|
changelog
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (toBeReleased in changelog) {
|
||||||
|
changelog.replace(toBeReleased, newItem)
|
||||||
|
} else {
|
||||||
|
val firstEntry = changelog.indexOf("##")
|
||||||
|
val newLog = StringBuilder(changelog)
|
||||||
|
newLog.insert(firstEntry, newItem + "\n")
|
||||||
|
newLog.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
changelogPath.writeText(newChangelog)
|
changelogPath.writeText(newChangelog)
|
||||||
}
|
}
|
@@ -13,21 +13,20 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
checkReleaseType(releaseType)
|
checkReleaseType(releaseType)
|
||||||
|
|
||||||
if (releaseType == "patch") {
|
|
||||||
println("Skip committing changes because release type is 'patch'")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
withGit(rootDir) { git ->
|
withGit(rootDir) { git ->
|
||||||
git
|
if (git.diff().call().isNotEmpty()) {
|
||||||
.commit()
|
git
|
||||||
.setAll(true)
|
.commit()
|
||||||
.setAuthor("IdeaVim Bot", "maintainers@ideavim.dev")
|
.setAll(true)
|
||||||
.setMessage("Preparation to $newVersion release")
|
.setAuthor("IdeaVim Bot", "maintainers@ideavim.dev")
|
||||||
.setSign(false)
|
.setMessage("Preparation to $newVersion release")
|
||||||
.call()
|
.setSign(false)
|
||||||
|
.call()
|
||||||
|
|
||||||
val lastGitMessage = git.log().call().first().shortMessage
|
val lastGitMessage = git.log().call().first().shortMessage
|
||||||
println("Changes committed. Last gitlog message: $lastGitMessage")
|
println("Changes committed. Last gitlog message: $lastGitMessage")
|
||||||
|
} else {
|
||||||
|
println("No Changes")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package scripts.release
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
val (_, rootDir, releaseType) = readArgs(args)
|
|
||||||
|
|
||||||
checkReleaseType(releaseType)
|
|
||||||
|
|
||||||
checkBranch(rootDir, releaseType)
|
|
||||||
|
|
||||||
if (releaseType == "patch") {
|
|
||||||
println("Skip release branch reset because release type is 'patch'")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
withGit(rootDir) { git ->
|
|
||||||
val currentCommit = git.log().setMaxCount(1).call().first()
|
|
||||||
println("Current commit id: ${currentCommit.id.name}")
|
|
||||||
|
|
||||||
git.checkoutBranch("release")
|
|
||||||
println("Checked out release branch")
|
|
||||||
|
|
||||||
git.reset()
|
|
||||||
.setRef(currentCommit.id.name)
|
|
||||||
.call()
|
|
||||||
println("release branch reset")
|
|
||||||
|
|
||||||
git.checkoutBranch("master")
|
|
||||||
println("Checked out master branch")
|
|
||||||
}
|
|
||||||
}
|
|
@@ -15,8 +15,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
withGit(rootDir) { git ->
|
withGit(rootDir) { git ->
|
||||||
val branchName = when (releaseType) {
|
val branchName = when (releaseType) {
|
||||||
"major", "minor" -> "master"
|
"major", "minor", "patch" -> "release"
|
||||||
"patch" -> "release"
|
|
||||||
else -> error("Unsupported release type: $releaseType")
|
else -> error("Unsupported release type: $releaseType")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -58,7 +58,38 @@ internal fun checkBranch(rootDir: String, releaseType: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun getVersion(projectDir: String, onlyStable: Boolean): Pair<Semver, ObjectId> {
|
enum class ReleaseType {
|
||||||
|
ANY,
|
||||||
|
ONLY_STABLE,
|
||||||
|
STABLE_NO_PATCH, // Version that ends on 0. Like 2.5.0
|
||||||
|
}
|
||||||
|
|
||||||
|
internal fun getVersionsExistingVersionsFor(
|
||||||
|
majorVersion: Int,
|
||||||
|
minorVersion: Int,
|
||||||
|
projectDir: String,
|
||||||
|
): Map<Semver, ObjectId> {
|
||||||
|
val repository = RepositoryBuilder().setGitDir(File("$projectDir/.git")).build()
|
||||||
|
val git = Git(repository)
|
||||||
|
println(git.log().call().first())
|
||||||
|
println(git.tagList().call().first())
|
||||||
|
|
||||||
|
return git.tagList().call().mapNotNull { ref ->
|
||||||
|
runCatching {
|
||||||
|
// Git has two types of tags: light and annotated. This code detect hash of the commit for both types of tags
|
||||||
|
val revWalk = RevWalk(repository)
|
||||||
|
val tag = revWalk.parseAny(ref.objectId)
|
||||||
|
val commitHash = revWalk.peel(tag).id
|
||||||
|
val semver = Semver(ref.name.removePrefix("refs/tags/"))
|
||||||
|
if (semver.major == majorVersion && semver.minor == minorVersion) {
|
||||||
|
semver to commitHash
|
||||||
|
} else null
|
||||||
|
}.getOrNull()
|
||||||
|
}
|
||||||
|
.toMap()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal fun getVersion(projectDir: String, releaseType: ReleaseType): Pair<Semver, ObjectId> {
|
||||||
val repository = RepositoryBuilder().setGitDir(File("$projectDir/.git")).build()
|
val repository = RepositoryBuilder().setGitDir(File("$projectDir/.git")).build()
|
||||||
val git = Git(repository)
|
val git = Git(repository)
|
||||||
println(git.log().call().first())
|
println(git.log().call().first())
|
||||||
@@ -75,10 +106,10 @@ internal fun getVersion(projectDir: String, onlyStable: Boolean): Pair<Semver, O
|
|||||||
}
|
}
|
||||||
.sortedBy { it.first }
|
.sortedBy { it.first }
|
||||||
|
|
||||||
val version = if (onlyStable) {
|
val version = when (releaseType) {
|
||||||
versions.last { it.first.isStable }
|
ReleaseType.ANY -> versions.last()
|
||||||
} else {
|
ReleaseType.ONLY_STABLE -> versions.last { it.first.isStable }
|
||||||
versions.last()
|
ReleaseType.STABLE_NO_PATCH -> versions.last { it.first.isStable && it.first.patch == 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
return version
|
return version
|
||||||
|
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2003-2024 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE.txt file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package scripts.releaseEap
|
||||||
|
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
import scripts.addComment
|
||||||
|
import scripts.getYoutrackTicketsByQuery
|
||||||
|
import scripts.release.readArgs
|
||||||
|
import scripts.releasedInEapTagId
|
||||||
|
import scripts.setTag
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
runBlocking {
|
||||||
|
val (newVersion, _, _) = readArgs(args)
|
||||||
|
|
||||||
|
// Search for Ready to release, but without "IdeaVim Released In EAP" tag
|
||||||
|
val ticketsToUpdate =
|
||||||
|
getYoutrackTicketsByQuery("%23%7BReady%20To%20Release%7D%20tag:%20-%7BIdeaVim%20Released%20In%20EAP%7D%20")
|
||||||
|
println("Have to update the following tickets: $ticketsToUpdate")
|
||||||
|
|
||||||
|
ticketsToUpdate.forEach { ticketId ->
|
||||||
|
setTag(ticketId, releasedInEapTagId)
|
||||||
|
addComment(
|
||||||
|
ticketId, """
|
||||||
|
The fix is available in the IdeaVim $newVersion. See https://jb.gg/ideavim-eap for the instructions on how to get EAP builds as updates within the IDE. You can also wait till the next stable release with this fix, you’ll get it automatically.
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package scripts
|
|
||||||
|
|
||||||
import io.ktor.client.call.*
|
|
||||||
import kotlinx.serialization.json.JsonArray
|
|
||||||
import kotlinx.serialization.json.jsonObject
|
|
||||||
import kotlinx.serialization.json.jsonPrimitive
|
|
||||||
import kotlinx.serialization.json.put
|
|
||||||
|
|
||||||
val areaWeights = setOf(
|
|
||||||
Triple("118-53212", "Plugins", 50),
|
|
||||||
Triple("118-53220", "Vim Script", 30),
|
|
||||||
Triple("118-54084", "Esc", 100),
|
|
||||||
)
|
|
||||||
|
|
||||||
suspend fun updateRates() {
|
|
||||||
println("Updating rates of the issues")
|
|
||||||
areaWeights.forEach { (id, name, weight) ->
|
|
||||||
val unmappedIssues = unmappedIssues(name)
|
|
||||||
println("Got ${unmappedIssues.size} for $name area")
|
|
||||||
|
|
||||||
unmappedIssues.forEach { issueId ->
|
|
||||||
print("Trying to update issue $issueId: ")
|
|
||||||
val response = updateCustomField(issueId) {
|
|
||||||
put("name", "Affected Rate")
|
|
||||||
put("\$type", "SimpleIssueCustomField")
|
|
||||||
put("value", weight)
|
|
||||||
}
|
|
||||||
|
|
||||||
println(response)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun unmappedIssues(area: String): List<String> {
|
|
||||||
val areaProcessed = if (" " in area) "{$area}" else area
|
|
||||||
val res = issuesQuery(
|
|
||||||
query = "project: VIM Affected Rate: {No affected rate} Area: $areaProcessed #Unresolved",
|
|
||||||
fields = "id,idReadable"
|
|
||||||
)
|
|
||||||
return res.body<JsonArray>().map { it.jsonObject }.map { it["idReadable"]!!.jsonPrimitive.content }
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun getAreasWithoutWeight(): Set<Pair<String, String>> {
|
|
||||||
val allAreas = getAreaValues()
|
|
||||||
return allAreas
|
|
||||||
.filterNot { it.key in areaWeights.map { it.first }.toSet() }
|
|
||||||
.entries
|
|
||||||
.map { it.key to it.value }
|
|
||||||
.toSet()
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun main() {
|
|
||||||
updateRates()
|
|
||||||
}
|
|
@@ -11,6 +11,8 @@ package scripts
|
|||||||
import io.ktor.client.call.*
|
import io.ktor.client.call.*
|
||||||
import io.ktor.client.request.*
|
import io.ktor.client.request.*
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
import kotlinx.serialization.json.JsonArray
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.addJsonObject
|
import kotlinx.serialization.json.addJsonObject
|
||||||
import kotlinx.serialization.json.buildJsonObject
|
import kotlinx.serialization.json.buildJsonObject
|
||||||
@@ -21,6 +23,10 @@ import kotlinx.serialization.json.put
|
|||||||
import kotlinx.serialization.json.putJsonArray
|
import kotlinx.serialization.json.putJsonArray
|
||||||
import kotlinx.serialization.json.putJsonObject
|
import kotlinx.serialization.json.putJsonObject
|
||||||
|
|
||||||
|
|
||||||
|
// YouTrack tag "IdeaVim Released In EAP"
|
||||||
|
const val releasedInEapTagId = "68-385032"
|
||||||
|
|
||||||
suspend fun setYoutrackStatus(tickets: Collection<String>, status: String) {
|
suspend fun setYoutrackStatus(tickets: Collection<String>, status: String) {
|
||||||
val client = httpClient()
|
val client = httpClient()
|
||||||
|
|
||||||
@@ -59,3 +65,59 @@ suspend fun setYoutrackStatus(tickets: Collection<String>, status: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getYoutrackTicketsByQuery(query: String): Set<String> {
|
||||||
|
val client = httpClient()
|
||||||
|
|
||||||
|
return runBlocking {
|
||||||
|
val response = client.get("https://youtrack.jetbrains.com/api/issues/?fields=idReadable&query=project:VIM+$query")
|
||||||
|
response.body<JsonArray>().mapTo(HashSet()) { it.jsonObject.getValue("idReadable").jsonPrimitive.content }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 68-385032
|
||||||
|
* [issueHumanId] is like VIM-123
|
||||||
|
* [tagId] is like "145-23"
|
||||||
|
*/
|
||||||
|
suspend fun setTag(issueHumanId: String, tagId: String) {
|
||||||
|
val client = httpClient()
|
||||||
|
|
||||||
|
println("Try to add tag $tagId to $issueHumanId")
|
||||||
|
val response =
|
||||||
|
// I've updated default url in client, so this may be broken now
|
||||||
|
client.post("https://youtrack.jetbrains.com/api/issues/$issueHumanId/tags?fields=customFields(id,name,value(id,name))") {
|
||||||
|
contentType(ContentType.Application.Json)
|
||||||
|
accept(ContentType.Application.Json)
|
||||||
|
val request = buildJsonObject {
|
||||||
|
put("id", tagId)
|
||||||
|
}
|
||||||
|
setBody(request)
|
||||||
|
}
|
||||||
|
println(response)
|
||||||
|
println(response.body<String>())
|
||||||
|
if (!response.status.isSuccess()) {
|
||||||
|
error("Request failed. $issueHumanId, ${response.body<String>()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun addComment(issueHumanId: String, text: String) {
|
||||||
|
val client = httpClient()
|
||||||
|
|
||||||
|
println("Try to add comment to $issueHumanId")
|
||||||
|
val response =
|
||||||
|
// I've updated default url in client, so this may be broken now
|
||||||
|
client.post("https://youtrack.jetbrains.com/api/issues/$issueHumanId/comments?fields=customFields(id,name,value(id,name))") {
|
||||||
|
contentType(ContentType.Application.Json)
|
||||||
|
accept(ContentType.Application.Json)
|
||||||
|
val request = buildJsonObject {
|
||||||
|
put("text", text)
|
||||||
|
}
|
||||||
|
setBody(request)
|
||||||
|
}
|
||||||
|
println(response)
|
||||||
|
println(response.body<String>())
|
||||||
|
if (!response.status.isSuccess()) {
|
||||||
|
error("Request failed. $issueHumanId, ${response.body<String>()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
// Set repository for snapshot versions of gradle plugin
|
|
||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
||||||
}
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'IdeaVIM'
|
|
||||||
include 'vim-engine'
|
|
||||||
include 'scripts'
|
|
||||||
include 'annotation-processors'
|
|
||||||
|
|
21
settings.gradle.kts
Normal file
21
settings.gradle.kts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Set repository for snapshot versions of gradle plugin
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||||
|
}
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "IdeaVIM"
|
||||||
|
|
||||||
|
include("vim-engine")
|
||||||
|
include("scripts")
|
||||||
|
include("annotation-processors")
|
||||||
|
include("tests:java-tests")
|
||||||
|
include("tests:property-tests")
|
||||||
|
include("tests:long-running-tests")
|
||||||
|
include("tests:ui-ij-tests")
|
||||||
|
include("tests:ui-py-tests")
|
||||||
|
include("tests:ui-fixtures")
|
@@ -11,7 +11,6 @@ package com.maddyhome.idea.vim;
|
|||||||
import com.intellij.openapi.Disposable;
|
import com.intellij.openapi.Disposable;
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.ShortcutSet;
|
import com.intellij.openapi.actionSystem.ShortcutSet;
|
||||||
import com.intellij.openapi.editor.Document;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.EditorFactory;
|
import com.intellij.openapi.editor.EditorFactory;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||||
@@ -80,14 +79,6 @@ public class EventFacade {
|
|||||||
action.unregisterCustomShortcutSet(component);
|
action.unregisterCustomShortcutSet(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDocumentListener(@NotNull Document document, @NotNull DocumentListener listener) {
|
|
||||||
document.addDocumentListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeDocumentListener(@NotNull Document document, @NotNull DocumentListener listener) {
|
|
||||||
document.removeDocumentListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
|
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
|
||||||
EditorFactory.getInstance().addEditorFactoryListener(listener, parentDisposable);
|
EditorFactory.getInstance().addEditorFactoryListener(listener, parentDisposable);
|
||||||
}
|
}
|
||||||
@@ -98,20 +89,12 @@ public class EventFacade {
|
|||||||
editor.getCaretModel().addCaretListener(listener, disposable);
|
editor.getCaretModel().addCaretListener(listener, disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeCaretListener(@NotNull Editor editor, @NotNull CaretListener listener) {
|
|
||||||
editor.getCaretModel().removeCaretListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addEditorMouseListener(@NotNull Editor editor,
|
public void addEditorMouseListener(@NotNull Editor editor,
|
||||||
@NotNull EditorMouseListener listener,
|
@NotNull EditorMouseListener listener,
|
||||||
@NotNull Disposable disposable) {
|
@NotNull Disposable disposable) {
|
||||||
editor.addEditorMouseListener(listener, disposable);
|
editor.addEditorMouseListener(listener, disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeEditorMouseListener(@NotNull Editor editor, @NotNull EditorMouseListener listener) {
|
|
||||||
editor.removeEditorMouseListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addComponentMouseListener(@NotNull Component component,
|
public void addComponentMouseListener(@NotNull Component component,
|
||||||
@NotNull MouseListener mouseListener,
|
@NotNull MouseListener mouseListener,
|
||||||
@NotNull Disposable disposable) {
|
@NotNull Disposable disposable) {
|
||||||
@@ -119,30 +102,18 @@ public class EventFacade {
|
|||||||
Disposer.register(disposable, () -> component.removeMouseListener(mouseListener));
|
Disposer.register(disposable, () -> component.removeMouseListener(mouseListener));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeComponentMouseListener(@NotNull Component component, @NotNull MouseListener mouseListener) {
|
|
||||||
component.removeMouseListener(mouseListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addEditorMouseMotionListener(@NotNull Editor editor,
|
public void addEditorMouseMotionListener(@NotNull Editor editor,
|
||||||
@NotNull EditorMouseMotionListener listener,
|
@NotNull EditorMouseMotionListener listener,
|
||||||
@NotNull Disposable disposable) {
|
@NotNull Disposable disposable) {
|
||||||
editor.addEditorMouseMotionListener(listener, disposable);
|
editor.addEditorMouseMotionListener(listener, disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeEditorMouseMotionListener(@NotNull Editor editor, @NotNull EditorMouseMotionListener listener) {
|
|
||||||
editor.removeEditorMouseMotionListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addEditorSelectionListener(@NotNull Editor editor,
|
public void addEditorSelectionListener(@NotNull Editor editor,
|
||||||
@NotNull SelectionListener listener,
|
@NotNull SelectionListener listener,
|
||||||
@NotNull Disposable disposable) {
|
@NotNull Disposable disposable) {
|
||||||
editor.getSelectionModel().addSelectionListener(listener, disposable);
|
editor.getSelectionModel().addSelectionListener(listener, disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeEditorSelectionListener(@NotNull Editor editor, @NotNull SelectionListener listener) {
|
|
||||||
editor.getSelectionModel().removeSelectionListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
private @NotNull TypedAction getTypedAction() {
|
private @NotNull TypedAction getTypedAction() {
|
||||||
return TypedAction.getInstance();
|
return TypedAction.getInstance();
|
||||||
}
|
}
|
||||||
|
@@ -11,25 +11,20 @@ package com.maddyhome.idea.vim
|
|||||||
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx
|
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.project.ProjectManagerListener
|
import com.intellij.openapi.project.ProjectManagerListener
|
||||||
import com.intellij.openapi.startup.StartupActivity
|
import com.intellij.openapi.startup.ProjectActivity
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
import com.maddyhome.idea.vim.helper.localEditors
|
import com.maddyhome.idea.vim.newapi.IjVimEditor
|
||||||
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Alex Plate
|
* @author Alex Plate
|
||||||
*/
|
*/
|
||||||
// This service should be migrated to ProjectActivity. But we should cariful because simple replacement
|
internal class PluginStartup : ProjectActivity/*, LightEditCompatible*/ {
|
||||||
// leads to deadlock in tests. I'm not sure about the exact reasons, but "invokeAndWait" inside "initialize" function
|
|
||||||
// causes this deadlock. Good new: it's easy reproducible in tests.
|
|
||||||
// Previous migration: fc7efd5484a13b40ba9bf86a1d5429e215d973f3
|
|
||||||
// Revert: 24dd84b31cffb99eb6114524859a46d02717d33f
|
|
||||||
internal class PluginStartup : StartupActivity.DumbAware/*, LightEditCompatible*/ {
|
|
||||||
|
|
||||||
private var firstInitializationOccurred = false
|
private var firstInitializationOccurred = false
|
||||||
|
|
||||||
override fun runActivity(project: Project) {
|
override suspend fun execute(project: Project) {
|
||||||
if (firstInitializationOccurred) return
|
if (firstInitializationOccurred) return
|
||||||
firstInitializationOccurred = true
|
firstInitializationOccurred = true
|
||||||
|
|
||||||
@@ -41,8 +36,10 @@ internal class PluginStartup : StartupActivity.DumbAware/*, LightEditCompatible*
|
|||||||
// This is a temporal workaround for VIM-2487
|
// This is a temporal workaround for VIM-2487
|
||||||
internal class PyNotebooksCloseWorkaround : ProjectManagerListener {
|
internal class PyNotebooksCloseWorkaround : ProjectManagerListener {
|
||||||
override fun projectClosingBeforeSave(project: Project) {
|
override fun projectClosingBeforeSave(project: Project) {
|
||||||
|
// TODO: Confirm context in CWM scenario
|
||||||
if (injector.globalIjOptions().closenotebooks) {
|
if (injector.globalIjOptions().closenotebooks) {
|
||||||
localEditors().forEach { editor ->
|
injector.editorGroup.getEditors().forEach { vimEditor ->
|
||||||
|
val editor = (vimEditor as IjVimEditor).editor
|
||||||
val virtualFile = EditorHelper.getVirtualFile(editor)
|
val virtualFile = EditorHelper.getVirtualFile(editor)
|
||||||
if (virtualFile?.extension == "ipynb") {
|
if (virtualFile?.extension == "ipynb") {
|
||||||
val fileEditorManager = FileEditorManagerEx.getInstanceEx(project)
|
val fileEditorManager = FileEditorManagerEx.getInstanceEx(project)
|
||||||
|
@@ -7,94 +7,50 @@
|
|||||||
*/
|
*/
|
||||||
package com.maddyhome.idea.vim
|
package com.maddyhome.idea.vim
|
||||||
|
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
|
||||||
import com.intellij.openapi.extensions.ExtensionPointName
|
|
||||||
import com.maddyhome.idea.vim.action.EngineCommandProvider
|
import com.maddyhome.idea.vim.action.EngineCommandProvider
|
||||||
import com.maddyhome.idea.vim.action.IntellijCommandProvider
|
import com.maddyhome.idea.vim.action.IntellijCommandProvider
|
||||||
import com.maddyhome.idea.vim.api.injector
|
|
||||||
import com.maddyhome.idea.vim.handler.ActionBeanClass
|
|
||||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase
|
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase
|
||||||
import com.maddyhome.idea.vim.key.MappingOwner
|
import com.maddyhome.idea.vim.key.MappingOwner
|
||||||
import com.maddyhome.idea.vim.newapi.IjVimActionsInitiator
|
|
||||||
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
|
||||||
import java.awt.event.KeyEvent
|
import java.awt.event.KeyEvent
|
||||||
import javax.swing.KeyStroke
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
public object RegisterActions {
|
object RegisterActions {
|
||||||
@Deprecated("Please use @CommandOrMotion annotation instead")
|
|
||||||
internal val VIM_ACTIONS_EP: ExtensionPointName<ActionBeanClass> = ExtensionPointName.create("IdeaVIM.vimAction")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register all the key/action mappings for the plugin.
|
* Register all the key/action mappings for the plugin.
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun registerActions() {
|
fun registerActions() {
|
||||||
registerVimCommandActions()
|
registerVimCommandActions()
|
||||||
if (!injector.globalIjOptions().commandOrMotionAnnotation) {
|
registerShortcutsWithoutActions()
|
||||||
registerEmptyShortcuts()
|
|
||||||
registerEpListener()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated("Moving to annotations approach instead of xml")
|
fun findAction(id: String): EditorActionHandlerBase? {
|
||||||
private fun registerEpListener() {
|
val commandBean = IntellijCommandProvider.getCommands().firstOrNull { it.actionId == id }
|
||||||
// IdeaVim doesn't support contribution to VIM_ACTIONS_EP extension point, so technically we can skip this update,
|
?: EngineCommandProvider.getCommands().firstOrNull { it.actionId == id } ?: return null
|
||||||
// but let's support dynamic plugins in a more classic way and reload actions on every EP change.
|
return commandBean.instance
|
||||||
VIM_ACTIONS_EP.addChangeListener({
|
|
||||||
unregisterActions()
|
|
||||||
registerActions()
|
|
||||||
}, VimPlugin.getInstance())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun findAction(id: String): EditorActionHandlerBase? {
|
fun findActionOrDie(id: String): EditorActionHandlerBase {
|
||||||
if (injector.globalIjOptions().commandOrMotionAnnotation) {
|
|
||||||
val commandBean = EngineCommandProvider.getCommands().firstOrNull { it.actionId == id }
|
|
||||||
?: IntellijCommandProvider.getCommands().firstOrNull { it.actionId == id } ?: return null
|
|
||||||
return commandBean.instance
|
|
||||||
} else {
|
|
||||||
return VIM_ACTIONS_EP.getExtensionList(ApplicationManager.getApplication()).stream()
|
|
||||||
.filter { vimActionBean: ActionBeanClass -> vimActionBean.actionId == id }
|
|
||||||
.findFirst().map { obj: ActionBeanClass -> obj.instance }
|
|
||||||
.orElse(null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public fun findActionOrDie(id: String): EditorActionHandlerBase {
|
|
||||||
return findAction(id) ?: throw RuntimeException("Action $id is not registered")
|
return findAction(id) ?: throw RuntimeException("Action $id is not registered")
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun unregisterActions() {
|
fun unregisterActions() {
|
||||||
val keyGroup = VimPlugin.getKeyIfCreated()
|
val keyGroup = VimPlugin.getKeyIfCreated()
|
||||||
keyGroup?.unregisterCommandActions()
|
keyGroup?.unregisterCommandActions()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun registerVimCommandActions() {
|
private fun registerVimCommandActions() {
|
||||||
val parser = VimPlugin.getKey()
|
val parser = VimPlugin.getKey()
|
||||||
if (injector.globalIjOptions().commandOrMotionAnnotation) {
|
IntellijCommandProvider.getCommands().forEach { parser.registerCommandAction(it) }
|
||||||
EngineCommandProvider.getCommands().forEach { parser.registerCommandAction(it) }
|
EngineCommandProvider.getCommands().forEach { parser.registerCommandAction(it) }
|
||||||
IntellijCommandProvider.getCommands().forEach { parser.registerCommandAction(it) }
|
|
||||||
} else {
|
|
||||||
VIM_ACTIONS_EP.getExtensionList(ApplicationManager.getApplication()).stream().map { bean: ActionBeanClass? ->
|
|
||||||
IjVimActionsInitiator(
|
|
||||||
bean!!
|
|
||||||
)
|
|
||||||
}
|
|
||||||
.forEach { actionHolder: IjVimActionsInitiator? ->
|
|
||||||
parser.registerCommandAction(
|
|
||||||
actionHolder!!
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo do we really need this?
|
private fun registerShortcutsWithoutActions() {
|
||||||
private fun registerEmptyShortcuts() {
|
|
||||||
val parser = VimPlugin.getKey()
|
val parser = VimPlugin.getKey()
|
||||||
|
|
||||||
// The {char1} <BS> {char2} shortcut is handled directly by KeyHandler#handleKey, so doesn't have an action. But we
|
// The {char1} <BS> {char2} shortcut is handled directly by KeyHandler#handleKey, so doesn't have an action. But we
|
||||||
// still need to register the shortcut, to make sure the editor doesn't swallow it.
|
// still need to register the shortcut, to make sure the editor doesn't swallow it.
|
||||||
parser
|
parser.registerShortcutWithoutAction(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), MappingOwner.IdeaVim.System)
|
||||||
.registerShortcutWithoutAction(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), MappingOwner.IdeaVim.System)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,17 +37,16 @@ import com.maddyhome.idea.vim.group.visual.VisualMotionGroup;
|
|||||||
import com.maddyhome.idea.vim.helper.MacKeyRepeat;
|
import com.maddyhome.idea.vim.helper.MacKeyRepeat;
|
||||||
import com.maddyhome.idea.vim.listener.VimListenerManager;
|
import com.maddyhome.idea.vim.listener.VimListenerManager;
|
||||||
import com.maddyhome.idea.vim.newapi.IjVimInjector;
|
import com.maddyhome.idea.vim.newapi.IjVimInjector;
|
||||||
|
import com.maddyhome.idea.vim.newapi.IjVimSearchGroup;
|
||||||
import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
||||||
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
|
|
||||||
import com.maddyhome.idea.vim.vimscript.services.OptionService;
|
|
||||||
import com.maddyhome.idea.vim.vimscript.services.VariableService;
|
import com.maddyhome.idea.vim.vimscript.services.VariableService;
|
||||||
import com.maddyhome.idea.vim.yank.YankGroupBase;
|
import com.maddyhome.idea.vim.yank.YankGroupBase;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
|
||||||
import org.jetbrains.annotations.Nls;
|
import org.jetbrains.annotations.Nls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import static com.maddyhome.idea.vim.api.VimInjectorKt.injector;
|
||||||
import static com.maddyhome.idea.vim.group.EditorGroup.EDITOR_STORE_ELEMENT;
|
import static com.maddyhome.idea.vim.group.EditorGroup.EDITOR_STORE_ELEMENT;
|
||||||
import static com.maddyhome.idea.vim.group.KeyGroup.SHORTCUT_CONFLICTS_ELEMENT;
|
import static com.maddyhome.idea.vim.group.KeyGroup.SHORTCUT_CONFLICTS_ELEMENT;
|
||||||
import static com.maddyhome.idea.vim.vimscript.services.VimRcService.executeIdeaVimRc;
|
import static com.maddyhome.idea.vim.vimscript.services.VimRcService.executeIdeaVimRc;
|
||||||
@@ -117,12 +116,6 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
return ApplicationManager.getApplication().getService(CommandGroup.class);
|
return ApplicationManager.getApplication().getService(CommandGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated // "Please use `injector.markService` instead"
|
|
||||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.3")
|
|
||||||
public static @NotNull MarkGroup getMark() {
|
|
||||||
return ApplicationManager.getApplication().getService(MarkGroup.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static @NotNull RegisterGroup getRegister() {
|
public static @NotNull RegisterGroup getRegister() {
|
||||||
return ((RegisterGroup)VimInjectorKt.getInjector().getRegisterGroup());
|
return ((RegisterGroup)VimInjectorKt.getInjector().getRegisterGroup());
|
||||||
}
|
}
|
||||||
@@ -131,12 +124,12 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
return (FileGroup)VimInjectorKt.getInjector().getFile();
|
return (FileGroup)VimInjectorKt.getInjector().getFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull SearchGroup getSearch() {
|
public static @NotNull IjVimSearchGroup getSearch() {
|
||||||
return ApplicationManager.getApplication().getService(SearchGroup.class);
|
return ApplicationManager.getApplication().getService(IjVimSearchGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable SearchGroup getSearchIfCreated() {
|
public static @Nullable IjVimSearchGroup getSearchIfCreated() {
|
||||||
return ApplicationManager.getApplication().getServiceIfCreated(SearchGroup.class);
|
return ApplicationManager.getApplication().getServiceIfCreated(IjVimSearchGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull ProcessGroup getProcess() {
|
public static @NotNull ProcessGroup getProcess() {
|
||||||
@@ -195,13 +188,6 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
return VimInjectorKt.getInjector().getOptionGroup();
|
return VimInjectorKt.getInjector().getOptionGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Deprecated: Use getOptionGroup */
|
|
||||||
@Deprecated
|
|
||||||
// Used by which-key 0.8.0, IdeaVimExtension 1.6.5 + 1.6.8
|
|
||||||
public static @NotNull OptionService getOptionService() {
|
|
||||||
return VimInjectorKt.getInjector().getOptionService();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static @NotNull NotificationService getNotifications() {
|
private static @NotNull NotificationService getNotifications() {
|
||||||
return getNotifications(null);
|
return getNotifications(null);
|
||||||
}
|
}
|
||||||
@@ -219,20 +205,30 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
return getInstance().enabled;
|
return getInstance().enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isNotEnabled() {
|
||||||
|
return !isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
public static void setEnabled(final boolean enabled) {
|
public static void setEnabled(final boolean enabled) {
|
||||||
if (isEnabled() == enabled) return;
|
if (isEnabled() == enabled) return;
|
||||||
|
|
||||||
|
getInstance().enabled = enabled;
|
||||||
|
|
||||||
|
if (enabled) {
|
||||||
|
VimInjectorKt.getInjector().getListenersNotifier().notifyPluginTurnedOn();
|
||||||
|
} else {
|
||||||
|
VimInjectorKt.getInjector().getListenersNotifier().notifyPluginTurnedOff();
|
||||||
|
}
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
getInstance().turnOffPlugin(true);
|
getInstance().turnOffPlugin(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
getInstance().enabled = enabled;
|
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
getInstance().turnOnPlugin();
|
getInstance().turnOnPlugin();
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBarIconFactory.Companion.updateIcon();
|
StatusBarIconFactory.Util.INSTANCE.updateIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getMessage() {
|
public static String getMessage() {
|
||||||
@@ -264,7 +260,8 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
if (enabled) {
|
if (enabled) {
|
||||||
Application application = ApplicationManager.getApplication();
|
Application application = ApplicationManager.getApplication();
|
||||||
if (application.isUnitTestMode()) {
|
if (application.isUnitTestMode()) {
|
||||||
application.invokeAndWait(this::turnOnPlugin);
|
turnOnPlugin();
|
||||||
|
//application.invokeAndWait(this::turnOnPlugin);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
application.invokeLater(this::turnOnPlugin);
|
application.invokeLater(this::turnOnPlugin);
|
||||||
@@ -286,7 +283,13 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
ideavimrcRegistered = true;
|
ideavimrcRegistered = true;
|
||||||
|
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
executeIdeaVimRc(editor);
|
try {
|
||||||
|
injector.getOptionGroup().startInitVimRc();
|
||||||
|
executeIdeaVimRc(editor);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
injector.getOptionGroup().endInitVimRc();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,20 +346,21 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void turnOffPlugin(boolean unsubscribe) {
|
private void turnOffPlugin(boolean unsubscribe) {
|
||||||
SearchGroup searchGroup = getSearchIfCreated();
|
IjVimSearchGroup searchGroup = getSearchIfCreated();
|
||||||
if (searchGroup != null) {
|
if (searchGroup != null) {
|
||||||
searchGroup.turnOff();
|
searchGroup.turnOff();
|
||||||
}
|
}
|
||||||
if (unsubscribe) {
|
if (unsubscribe) {
|
||||||
VimListenerManager.INSTANCE.turnOff();
|
VimListenerManager.INSTANCE.turnOff();
|
||||||
}
|
}
|
||||||
ExEntryPanel.fullReset();
|
injector.getCommandLine().fullReset();
|
||||||
|
|
||||||
// Unregister vim actions in command mode
|
// Unregister vim actions in command mode
|
||||||
RegisterActions.unregisterActions();
|
RegisterActions.unregisterActions();
|
||||||
|
|
||||||
if (onOffDisposable != null) {
|
if (onOffDisposable != null) {
|
||||||
Disposer.dispose(onOffDisposable);
|
Disposer.dispose(onOffDisposable);
|
||||||
|
onOffDisposable = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,13 +12,13 @@ import com.intellij.openapi.Disposable
|
|||||||
import com.intellij.openapi.components.Service
|
import com.intellij.openapi.components.Service
|
||||||
import com.intellij.openapi.components.service
|
import com.intellij.openapi.components.service
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.maddyhome.idea.vim.group.EditorHolderService
|
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel
|
||||||
|
|
||||||
@Service
|
@Service(Service.Level.PROJECT)
|
||||||
internal class VimProjectService(val project: Project) : Disposable {
|
internal class VimProjectService(val project: Project) : Disposable {
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
// Not sure if this is a best solution
|
// Not sure if this is a best solution
|
||||||
EditorHolderService.getInstance().editor = null
|
ExEntryPanel.getInstance().editor = null
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@@ -28,8 +28,11 @@ import javax.swing.KeyStroke
|
|||||||
* Accepts all regular keystrokes and passes them on to the Vim key handler.
|
* Accepts all regular keystrokes and passes them on to the Vim key handler.
|
||||||
*
|
*
|
||||||
* IDE shortcut keys used by Vim commands are handled by [com.maddyhome.idea.vim.action.VimShortcutKeyAction].
|
* IDE shortcut keys used by Vim commands are handled by [com.maddyhome.idea.vim.action.VimShortcutKeyAction].
|
||||||
|
*
|
||||||
|
* This class is used in Which-Key plugin, so don't make it internal. Generally, we should provide a proper
|
||||||
|
* way to get ideavim keys for this plugin. See VIM-3085
|
||||||
*/
|
*/
|
||||||
internal class VimTypedActionHandler(origHandler: TypedActionHandler) : TypedActionHandlerEx {
|
class VimTypedActionHandler(origHandler: TypedActionHandler) : TypedActionHandlerEx {
|
||||||
private val handler = KeyHandler.getInstance()
|
private val handler = KeyHandler.getInstance()
|
||||||
private val traceTime = injector.globalOptions().ideatracetime
|
private val traceTime = injector.globalOptions().ideatracetime
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ internal class VimTypedActionHandler(origHandler: TypedActionHandler) : TypedAct
|
|||||||
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||||
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||||
val startTime = if (traceTime) System.currentTimeMillis() else null
|
val startTime = if (traceTime) System.currentTimeMillis() else null
|
||||||
handler.handleKey(editor.vim, keyStroke, injector.executionContextManager.onEditor(editor.vim, context.vim))
|
handler.handleKey(editor.vim, keyStroke, context.vim, handler.keyHandlerState)
|
||||||
if (startTime != null) {
|
if (startTime != null) {
|
||||||
val duration = System.currentTimeMillis() - startTime
|
val duration = System.currentTimeMillis() - startTime
|
||||||
LOG.info("VimTypedAction '$charTyped': $duration ms")
|
LOG.info("VimTypedAction '$charTyped': $duration ms")
|
||||||
@@ -86,7 +89,7 @@ internal class VimTypedActionHandler(origHandler: TypedActionHandler) : TypedAct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
internal companion object {
|
||||||
private val LOG = logger<VimTypedActionHandler>()
|
private val LOG = logger<VimTypedActionHandler>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,6 @@
|
|||||||
|
|
||||||
package com.maddyhome.idea.vim.action
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
public object IntellijCommandProvider : CommandProvider {
|
object IntellijCommandProvider : CommandProvider {
|
||||||
override val commandListFileName: String = "intellij_commands.json"
|
override val commandListFileName: String = "intellij_commands.json"
|
||||||
}
|
}
|
39
src/main/java/com/maddyhome/idea/vim/action/RedrawAction.kt
Normal file
39
src/main/java/com/maddyhome/idea/vim/action/RedrawAction.kt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2003-2024 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE.txt file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
import com.intellij.vim.annotations.CommandOrMotion
|
||||||
|
import com.intellij.vim.annotations.Mode
|
||||||
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
|
import com.maddyhome.idea.vim.api.injector
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear and redraw the screen
|
||||||
|
*
|
||||||
|
* Typically, an IDE does not need to redraw the screen - it's editor handles scrolling, etc. However, it can be
|
||||||
|
* necessary to clear the status line.
|
||||||
|
*/
|
||||||
|
@CommandOrMotion(keys = ["<C-L>"], modes = [Mode.NORMAL])
|
||||||
|
internal class RedrawAction : VimActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||||
|
|
||||||
|
override fun execute(
|
||||||
|
editor: VimEditor,
|
||||||
|
context: ExecutionContext,
|
||||||
|
cmd: Command,
|
||||||
|
operatorArguments: OperatorArguments,
|
||||||
|
): Boolean {
|
||||||
|
injector.redrawService.redraw()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,74 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
package com.maddyhome.idea.vim.action
|
|
||||||
|
|
||||||
import com.intellij.codeInsight.hint.HintManagerImpl
|
|
||||||
import com.intellij.openapi.actionSystem.ActionManager
|
|
||||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
|
||||||
import com.intellij.openapi.actionSystem.CommonDataKeys
|
|
||||||
import com.intellij.openapi.actionSystem.PerformWithDocumentsCommitted
|
|
||||||
import com.intellij.openapi.actionSystem.PopupAction
|
|
||||||
import com.intellij.openapi.actionSystem.impl.ActionConfigurationCustomizer
|
|
||||||
import com.intellij.openapi.editor.Editor
|
|
||||||
import com.intellij.openapi.editor.EditorMouseHoverPopupManager
|
|
||||||
import com.intellij.openapi.editor.event.EditorMouseEvent
|
|
||||||
import com.intellij.openapi.editor.event.EditorMouseEventArea
|
|
||||||
import com.intellij.openapi.project.DumbAware
|
|
||||||
import java.awt.event.MouseEvent
|
|
||||||
|
|
||||||
// [VERSION UPDATE] 233+ Remove class
|
|
||||||
// The ShowHoverInfo action is built into the platform (using a nicer EditorMouseHoverPopupManager API)
|
|
||||||
public class VimActionConfigurationCustomizer : ActionConfigurationCustomizer {
|
|
||||||
public override fun customize(actionManager: ActionManager) {
|
|
||||||
// If the ShowHoverInfo action doesn't exist in the platform, add our own implementation
|
|
||||||
if (actionManager.getAction("ShowHoverInfo") == null) {
|
|
||||||
actionManager.registerAction("ShowHoverInfo", VimShowHoverInfoAction())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class VimShowHoverInfoAction : AnAction(), HintManagerImpl.ActionToIgnore, PopupAction, DumbAware,
|
|
||||||
PerformWithDocumentsCommitted {
|
|
||||||
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
|
|
||||||
|
|
||||||
override fun update(e: AnActionEvent) {
|
|
||||||
val dataContext = e.dataContext
|
|
||||||
val editor = CommonDataKeys.EDITOR.getData(dataContext)
|
|
||||||
if (editor == null) {
|
|
||||||
e.presentation.isEnabledAndVisible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun actionPerformed(e: AnActionEvent) {
|
|
||||||
val editor = CommonDataKeys.EDITOR.getData(e.dataContext) ?: return
|
|
||||||
|
|
||||||
val editorMouseEvent = createFakeEditorMouseEvent(editor)
|
|
||||||
EditorMouseHoverPopupManager.getInstance().showInfoTooltip(editorMouseEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createFakeEditorMouseEvent(editor: Editor): EditorMouseEvent {
|
|
||||||
val xy = editor.offsetToXY(editor.caretModel.offset)
|
|
||||||
val mouseEvent =
|
|
||||||
MouseEvent(editor.component, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, xy.x, xy.y, 0, false)
|
|
||||||
val editorMouseEvent = EditorMouseEvent(
|
|
||||||
editor,
|
|
||||||
mouseEvent,
|
|
||||||
EditorMouseEventArea.EDITING_AREA,
|
|
||||||
editor.caretModel.offset,
|
|
||||||
editor.caretModel.logicalPosition,
|
|
||||||
editor.caretModel.visualPosition,
|
|
||||||
true,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
)
|
|
||||||
return editorMouseEvent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -14,14 +14,10 @@ import com.intellij.openapi.actionSystem.ActionUpdateThread
|
|||||||
import com.intellij.openapi.actionSystem.AnAction
|
import com.intellij.openapi.actionSystem.AnAction
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
import com.intellij.openapi.actionSystem.AnActionWrapper
|
import com.intellij.openapi.actionSystem.AnActionWrapper
|
||||||
import com.intellij.openapi.actionSystem.IdeActions
|
|
||||||
import com.intellij.openapi.actionSystem.KeyboardShortcut
|
|
||||||
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
||||||
import com.intellij.openapi.application.invokeLater
|
import com.intellij.openapi.application.invokeLater
|
||||||
import com.intellij.openapi.diagnostic.logger
|
import com.intellij.openapi.diagnostic.logger
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager
|
|
||||||
import com.intellij.openapi.keymap.KeymapManager
|
|
||||||
import com.intellij.openapi.progress.ProcessCanceledException
|
import com.intellij.openapi.progress.ProcessCanceledException
|
||||||
import com.intellij.openapi.project.DumbAware
|
import com.intellij.openapi.project.DumbAware
|
||||||
import com.intellij.openapi.util.Key
|
import com.intellij.openapi.util.Key
|
||||||
@@ -32,6 +28,7 @@ import com.maddyhome.idea.vim.api.globalOptions
|
|||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.group.IjOptionConstants
|
import com.maddyhome.idea.vim.group.IjOptionConstants
|
||||||
import com.maddyhome.idea.vim.group.IjOptions
|
import com.maddyhome.idea.vim.group.IjOptions
|
||||||
|
import com.maddyhome.idea.vim.handler.enableOctopus
|
||||||
import com.maddyhome.idea.vim.handler.isOctopusEnabled
|
import com.maddyhome.idea.vim.handler.isOctopusEnabled
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
import com.maddyhome.idea.vim.helper.HandlerInjector
|
import com.maddyhome.idea.vim.helper.HandlerInjector
|
||||||
@@ -47,7 +44,8 @@ import com.maddyhome.idea.vim.listener.AceJumpService
|
|||||||
import com.maddyhome.idea.vim.listener.AppCodeTemplates.appCodeTemplateCaptured
|
import com.maddyhome.idea.vim.listener.AppCodeTemplates.appCodeTemplateCaptured
|
||||||
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
import com.maddyhome.idea.vim.newapi.vim
|
||||||
import com.maddyhome.idea.vim.state.mode.mode
|
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel
|
||||||
|
import com.maddyhome.idea.vim.ui.ex.ExTextField
|
||||||
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimString
|
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimString
|
||||||
import java.awt.event.InputEvent
|
import java.awt.event.InputEvent
|
||||||
import java.awt.event.KeyEvent
|
import java.awt.event.KeyEvent
|
||||||
@@ -58,9 +56,17 @@ import javax.swing.KeyStroke
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* These keys are not passed to [com.maddyhome.idea.vim.VimTypedActionHandler] and should be handled by actions.
|
* These keys are not passed to [com.maddyhome.idea.vim.VimTypedActionHandler] and should be handled by actions.
|
||||||
|
*
|
||||||
|
* This class is used in Which-Key plugin, so don't make it internal. Generally, we should provide a proper
|
||||||
|
* way to get ideavim keys for this plugin. See VIM-3085
|
||||||
*/
|
*/
|
||||||
internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
|
class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
|
||||||
private val traceTime = injector.globalOptions().ideatracetime
|
private val traceTime: Boolean
|
||||||
|
get() {
|
||||||
|
// Make sure the injector is initialized
|
||||||
|
VimPlugin.getInstance()
|
||||||
|
return injector.globalOptions().ideatracetime
|
||||||
|
}
|
||||||
|
|
||||||
override fun actionPerformed(e: AnActionEvent) {
|
override fun actionPerformed(e: AnActionEvent) {
|
||||||
LOG.trace("Executing shortcut key action")
|
LOG.trace("Executing shortcut key action")
|
||||||
@@ -74,11 +80,8 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||||
try {
|
try {
|
||||||
val start = if (traceTime) System.currentTimeMillis() else null
|
val start = if (traceTime) System.currentTimeMillis() else null
|
||||||
KeyHandler.getInstance().handleKey(
|
val keyHandler = KeyHandler.getInstance()
|
||||||
editor.vim,
|
keyHandler.handleKey(editor.vim, keyStroke, e.dataContext.vim, keyHandler.keyHandlerState)
|
||||||
keyStroke,
|
|
||||||
injector.executionContextManager.onEditor(editor.vim, e.dataContext.vim),
|
|
||||||
)
|
|
||||||
if (start != null) {
|
if (start != null) {
|
||||||
val duration = System.currentTimeMillis() - start
|
val duration = System.currentTimeMillis() - start
|
||||||
LOG.info("VimShortcut update '$keyStroke': $duration ms")
|
LOG.info("VimShortcut update '$keyStroke': $duration ms")
|
||||||
@@ -94,7 +97,7 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
|
|
||||||
// There is a chance that we can use BGT, but we call for isCell inside the update.
|
// There is a chance that we can use BGT, but we call for isCell inside the update.
|
||||||
// Not sure if can can use BGT with this call. Let's use EDT for now.
|
// Not sure if can can use BGT with this call. Let's use EDT for now.
|
||||||
override fun getActionUpdateThread() = ActionUpdateThread.EDT
|
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
|
||||||
|
|
||||||
override fun update(e: AnActionEvent) {
|
override fun update(e: AnActionEvent) {
|
||||||
val start = if (traceTime) System.currentTimeMillis() else null
|
val start = if (traceTime) System.currentTimeMillis() else null
|
||||||
@@ -109,14 +112,16 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun isEnabled(e: AnActionEvent, keyStroke: KeyStroke?): ActionEnableStatus {
|
private fun isEnabled(e: AnActionEvent, keyStroke: KeyStroke?): ActionEnableStatus {
|
||||||
if (!VimPlugin.isEnabled()) return ActionEnableStatus.no("IdeaVim is disabled", LogLevel.DEBUG)
|
if (VimPlugin.isNotEnabled()) return ActionEnableStatus.no("IdeaVim is disabled", LogLevel.DEBUG)
|
||||||
val editor = getEditor(e)
|
val editor = getEditor(e)
|
||||||
if (editor != null && keyStroke != null) {
|
if (editor != null && keyStroke != null) {
|
||||||
if (isOctopusEnabled(keyStroke, editor)) {
|
if (enableOctopus) {
|
||||||
return ActionEnableStatus.no(
|
if (isOctopusEnabled(keyStroke, editor)) {
|
||||||
"Processing VimShortcutKeyAction for the key that is used in the octopus handler",
|
return ActionEnableStatus.no(
|
||||||
LogLevel.ERROR
|
"Processing VimShortcutKeyAction for the key that is used in the octopus handler",
|
||||||
)
|
LogLevel.ERROR
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (editor.isIdeaVimDisabledHere) {
|
if (editor.isIdeaVimDisabledHere) {
|
||||||
return ActionEnableStatus.no("IdeaVim is disabled in this place", LogLevel.INFO)
|
return ActionEnableStatus.no("IdeaVim is disabled in this place", LogLevel.INFO)
|
||||||
@@ -163,14 +168,6 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
return ActionEnableStatus.no("App code template is active", LogLevel.INFO)
|
return ActionEnableStatus.no("App code template is active", LogLevel.INFO)
|
||||||
}
|
}
|
||||||
|
|
||||||
val nextTemplateVariableShortcuts = KeymapManager.getInstance().activeKeymap.getShortcuts(IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE)
|
|
||||||
if (nextTemplateVariableShortcuts.any { it is KeyboardShortcut && it.firstKeyStroke == keyStroke }) {
|
|
||||||
val handler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE)
|
|
||||||
if (handler.isEnabled(editor, null, e.dataContext)) {
|
|
||||||
return ActionEnableStatus.no("Next template variable or finish in-place refactoring", LogLevel.INFO)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (editor.inInsertMode) {
|
if (editor.inInsertMode) {
|
||||||
if (keyCode == KeyEvent.VK_TAB) {
|
if (keyCode == KeyEvent.VK_TAB) {
|
||||||
// TODO: This stops VimEditorTab seeing <Tab> in insert mode and correctly scrolling the view
|
// TODO: This stops VimEditorTab seeing <Tab> in insert mode and correctly scrolling the view
|
||||||
@@ -236,9 +233,9 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
/**
|
/**
|
||||||
* getDefaultKeyStroke is needed for NEO layout keyboard VIM-987
|
* getDefaultKeyStroke is needed for NEO layout keyboard VIM-987
|
||||||
* but we should cache the value because on the second call (isEnabled -> actionPerformed)
|
* but we should cache the value because on the second call (isEnabled -> actionPerformed)
|
||||||
* the event is already consumed
|
* the event is already consumed and getDefaultKeyStroke returns null
|
||||||
*/
|
*/
|
||||||
private var keyStrokeCache: Pair<KeyEvent?, KeyStroke?> = null to null
|
private var keyStrokeCache: Pair<Long?, KeyStroke?> = null to null
|
||||||
|
|
||||||
private fun getKeyStroke(e: AnActionEvent): KeyStroke? {
|
private fun getKeyStroke(e: AnActionEvent): KeyStroke? {
|
||||||
val inputEvent = e.inputEvent
|
val inputEvent = e.inputEvent
|
||||||
@@ -246,9 +243,9 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
val defaultKeyStroke = KeyStrokeAdapter.getDefaultKeyStroke(inputEvent)
|
val defaultKeyStroke = KeyStrokeAdapter.getDefaultKeyStroke(inputEvent)
|
||||||
val strokeCache = keyStrokeCache
|
val strokeCache = keyStrokeCache
|
||||||
if (defaultKeyStroke != null) {
|
if (defaultKeyStroke != null) {
|
||||||
keyStrokeCache = inputEvent to defaultKeyStroke
|
keyStrokeCache = inputEvent.`when` to defaultKeyStroke
|
||||||
return defaultKeyStroke
|
return defaultKeyStroke
|
||||||
} else if (strokeCache.first === inputEvent) {
|
} else if (strokeCache.first == inputEvent.`when`) {
|
||||||
keyStrokeCache = null to null
|
keyStrokeCache = null to null
|
||||||
return strokeCache.second
|
return strokeCache.second
|
||||||
}
|
}
|
||||||
@@ -257,7 +254,14 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getEditor(e: AnActionEvent): Editor? = e.getData(PlatformDataKeys.EDITOR)
|
private fun getEditor(e: AnActionEvent): Editor? {
|
||||||
|
return e.getData(PlatformDataKeys.EDITOR)
|
||||||
|
?: if (e.getData(PlatformDataKeys.CONTEXT_COMPONENT) is ExTextField) {
|
||||||
|
ExEntryPanel.getInstance().editor
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Every time the key pressed with an active lookup, there is a decision:
|
* Every time the key pressed with an active lookup, there is a decision:
|
||||||
@@ -281,7 +285,7 @@ internal class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatib
|
|||||||
.toSet()
|
.toSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
internal companion object {
|
||||||
@JvmField
|
@JvmField
|
||||||
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> =
|
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> =
|
||||||
ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0))
|
ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0))
|
||||||
@@ -381,6 +385,10 @@ private class ActionEnableStatus(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "ActionEnableStatus(isEnabled=$isEnabled, message='$message', logLevel=$logLevel)"
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val LOG = logger<ActionEnableStatus>()
|
private val LOG = logger<ActionEnableStatus>()
|
||||||
|
|
||||||
|
@@ -14,39 +14,84 @@ import com.maddyhome.idea.vim.VimPlugin
|
|||||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
import com.maddyhome.idea.vim.api.VimCaret
|
import com.maddyhome.idea.vim.api.VimCaret
|
||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
|
import com.maddyhome.idea.vim.api.globalOptions
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.api.setChangeMarks
|
import com.maddyhome.idea.vim.api.setChangeMarks
|
||||||
import com.maddyhome.idea.vim.command.Argument
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.state.mode.SelectionType
|
|
||||||
import com.maddyhome.idea.vim.common.TextRange
|
import com.maddyhome.idea.vim.common.TextRange
|
||||||
import com.maddyhome.idea.vim.common.argumentCaptured
|
import com.maddyhome.idea.vim.common.argumentCaptured
|
||||||
|
import com.maddyhome.idea.vim.ex.ExException
|
||||||
import com.maddyhome.idea.vim.group.MotionGroup
|
import com.maddyhome.idea.vim.group.MotionGroup
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.MessageHelper
|
import com.maddyhome.idea.vim.helper.MessageHelper
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.inRepeatMode
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
|
||||||
import com.maddyhome.idea.vim.newapi.ij
|
import com.maddyhome.idea.vim.newapi.ij
|
||||||
import java.util.*
|
import com.maddyhome.idea.vim.state.mode.SelectionType
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.CommandLineVimLContext
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimFuncref
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.expressions.FunctionCallExpression
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.expressions.SimpleExpression
|
||||||
|
|
||||||
// todo make it multicaret
|
// todo make it multicaret
|
||||||
private fun doOperatorAction(editor: VimEditor, context: ExecutionContext, textRange: TextRange, selectionType: SelectionType): Boolean {
|
private fun doOperatorAction(editor: VimEditor, context: ExecutionContext, textRange: TextRange, selectionType: SelectionType): Boolean {
|
||||||
val operatorFunction = injector.keyGroup.operatorFunction
|
val func = injector.globalOptions().operatorfunc
|
||||||
if (operatorFunction == null) {
|
if (func.isEmpty()) {
|
||||||
VimPlugin.showMessage(MessageHelper.message("E774"))
|
VimPlugin.showMessage(MessageHelper.message("E774"))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val scriptContext = CommandLineVimLContext
|
||||||
|
|
||||||
|
// The option value is either a function name, which should have a handler, or it might be a lambda expression, or a
|
||||||
|
// `function` or `funcref` call expression, all of which will return a funcref (with a handler)
|
||||||
|
var handler = injector.functionService.getFunctionHandlerOrNull(null, func, scriptContext)
|
||||||
|
if (handler == null) {
|
||||||
|
val expression = injector.vimscriptParser.parseExpression(func)
|
||||||
|
if (expression != null) {
|
||||||
|
try {
|
||||||
|
val value = expression.evaluate(editor, context, scriptContext)
|
||||||
|
if (value is VimFuncref) {
|
||||||
|
handler = value.handler
|
||||||
|
}
|
||||||
|
} catch (ex: ExException) {
|
||||||
|
// Get the argument for function('...') or funcref('...') for the error message
|
||||||
|
val functionName = if (expression is FunctionCallExpression && expression.arguments.size > 0) {
|
||||||
|
expression.arguments[0].evaluate(editor, context, scriptContext).toString()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
func
|
||||||
|
}
|
||||||
|
|
||||||
|
VimPlugin.showMessage("E117: Unknown function: $functionName")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (handler == null) {
|
||||||
|
VimPlugin.showMessage("E117: Unknown function: $func")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
val arg = when (selectionType) {
|
||||||
|
SelectionType.LINE_WISE -> "line"
|
||||||
|
SelectionType.CHARACTER_WISE -> "char"
|
||||||
|
SelectionType.BLOCK_WISE -> "block"
|
||||||
|
}
|
||||||
|
|
||||||
val saveRepeatHandler = VimRepeater.repeatHandler
|
val saveRepeatHandler = VimRepeater.repeatHandler
|
||||||
injector.markService.setChangeMarks(editor.primaryCaret(), textRange)
|
injector.markService.setChangeMarks(editor.primaryCaret(), textRange)
|
||||||
KeyHandler.getInstance().reset(editor)
|
KeyHandler.getInstance().reset(editor)
|
||||||
val result = operatorFunction.apply(editor, context, selectionType)
|
|
||||||
|
val arguments = listOf(SimpleExpression(arg))
|
||||||
|
handler.executeFunction(arguments, editor, context, scriptContext)
|
||||||
|
|
||||||
VimRepeater.repeatHandler = saveRepeatHandler
|
VimRepeater.repeatHandler = saveRepeatHandler
|
||||||
return result
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["g@"], modes = [Mode.NORMAL])
|
@CommandOrMotion(keys = ["g@"], modes = [Mode.NORMAL])
|
||||||
@@ -57,7 +102,7 @@ internal class OperatorAction : VimActionHandler.SingleExecution() {
|
|||||||
|
|
||||||
override fun execute(editor: VimEditor, context: ExecutionContext, cmd: Command, operatorArguments: OperatorArguments): Boolean {
|
override fun execute(editor: VimEditor, context: ExecutionContext, cmd: Command, operatorArguments: OperatorArguments): Boolean {
|
||||||
val argument = cmd.argument ?: return false
|
val argument = cmd.argument ?: return false
|
||||||
if (!editor.vimStateMachine.isDotRepeatInProgress) {
|
if (!editor.inRepeatMode) {
|
||||||
argumentCaptured = argument
|
argumentCaptured = argument
|
||||||
}
|
}
|
||||||
val range = getMotionRange(editor, context, argument, operatorArguments)
|
val range = getMotionRange(editor, context, argument, operatorArguments)
|
||||||
@@ -104,8 +149,6 @@ internal class OperatorAction : VimActionHandler.SingleExecution() {
|
|||||||
internal class VisualOperatorAction : VisualOperatorActionHandler.ForEachCaret() {
|
internal class VisualOperatorAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
|
||||||
|
|
||||||
override fun executeAction(
|
override fun executeAction(
|
||||||
editor: VimEditor,
|
editor: VimEditor,
|
||||||
caret: VimCaret,
|
caret: VimCaret,
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.maddyhome.idea.vim.action.change
|
package com.maddyhome.idea.vim.action.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.command.CommandProcessor
|
||||||
import com.intellij.vim.annotations.CommandOrMotion
|
import com.intellij.vim.annotations.CommandOrMotion
|
||||||
import com.intellij.vim.annotations.Mode
|
import com.intellij.vim.annotations.Mode
|
||||||
import com.intellij.openapi.command.CommandProcessor
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
@@ -17,7 +17,6 @@ import com.maddyhome.idea.vim.api.injector
|
|||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
|
||||||
import com.maddyhome.idea.vim.newapi.ij
|
import com.maddyhome.idea.vim.newapi.ij
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["."], modes = [Mode.NORMAL])
|
@CommandOrMotion(keys = ["."], modes = [Mode.NORMAL])
|
||||||
@@ -25,7 +24,7 @@ internal class RepeatChangeAction : VimActionHandler.SingleExecution() {
|
|||||||
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
||||||
|
|
||||||
override fun execute(editor: VimEditor, context: ExecutionContext, cmd: Command, operatorArguments: OperatorArguments): Boolean {
|
override fun execute(editor: VimEditor, context: ExecutionContext, cmd: Command, operatorArguments: OperatorArguments): Boolean {
|
||||||
val state = editor.vimStateMachine
|
val state = injector.vimState
|
||||||
val lastCommand = VimRepeater.lastChangeCommand
|
val lastCommand = VimRepeater.lastChangeCommand
|
||||||
|
|
||||||
if (lastCommand == null && Extension.lastExtensionHandler == null) return false
|
if (lastCommand == null && Extension.lastExtensionHandler == null) return false
|
||||||
@@ -58,11 +57,11 @@ internal class RepeatChangeAction : VimActionHandler.SingleExecution() {
|
|||||||
)
|
)
|
||||||
} else if (!repeatHandler && lastCommand != null) {
|
} else if (!repeatHandler && lastCommand != null) {
|
||||||
if (cmd.rawCount > 0) {
|
if (cmd.rawCount > 0) {
|
||||||
lastCommand.count = cmd.count
|
lastCommand.rawCount = cmd.count
|
||||||
val arg = lastCommand.argument
|
val arg = lastCommand.argument
|
||||||
if (arg != null) {
|
if (arg != null) {
|
||||||
val mot = arg.motion
|
val mot = arg.motion
|
||||||
mot.count = 0
|
mot.rawCount = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.executingCommand = lastCommand
|
state.executingCommand = lastCommand
|
||||||
|
@@ -20,7 +20,7 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
import com.maddyhome.idea.vim.newapi.ijOptions
|
import com.maddyhome.idea.vim.newapi.ijOptions
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["gJ"], modes = [Mode.NORMAL])
|
@CommandOrMotion(keys = ["gJ"], modes = [Mode.NORMAL])
|
||||||
public class DeleteJoinLinesAction : ChangeEditorActionHandler.ConditionalSingleExecution() {
|
class DeleteJoinLinesAction : ChangeEditorActionHandler.ConditionalSingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
override fun runAsMulticaret(
|
override fun runAsMulticaret(
|
||||||
editor: VimEditor,
|
editor: VimEditor,
|
||||||
|
@@ -19,7 +19,7 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
import com.maddyhome.idea.vim.newapi.ijOptions
|
import com.maddyhome.idea.vim.newapi.ijOptions
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["J"], modes = [Mode.NORMAL])
|
@CommandOrMotion(keys = ["J"], modes = [Mode.NORMAL])
|
||||||
public class DeleteJoinLinesSpacesAction : ChangeEditorActionHandler.SingleExecution() {
|
class DeleteJoinLinesSpacesAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
override fun execute(
|
override fun execute(
|
||||||
@@ -34,7 +34,7 @@ public class DeleteJoinLinesSpacesAction : ChangeEditorActionHandler.SingleExecu
|
|||||||
}
|
}
|
||||||
injector.editorGroup.notifyIdeaJoin(editor)
|
injector.editorGroup.notifyIdeaJoin(editor)
|
||||||
var res = true
|
var res = true
|
||||||
editor.nativeCarets().sortedByDescending { it.offset.point }.forEach { caret ->
|
editor.nativeCarets().sortedByDescending { it.offset }.forEach { caret ->
|
||||||
if (!injector.changeGroup.deleteJoinLines(editor, caret, operatorArguments.count1, true, operatorArguments)) {
|
if (!injector.changeGroup.deleteJoinLines(editor, caret, operatorArguments.count1, true, operatorArguments)) {
|
||||||
res = false
|
res = false
|
||||||
}
|
}
|
||||||
|
@@ -14,23 +14,18 @@ import com.maddyhome.idea.vim.api.VimCaret
|
|||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
|
||||||
import com.maddyhome.idea.vim.newapi.ijOptions
|
import com.maddyhome.idea.vim.newapi.ijOptions
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author vlan
|
* @author vlan
|
||||||
*/
|
*/
|
||||||
@CommandOrMotion(keys = ["gJ"], modes = [Mode.VISUAL])
|
@CommandOrMotion(keys = ["gJ"], modes = [Mode.VISUAL])
|
||||||
public class DeleteJoinVisualLinesAction : VisualOperatorActionHandler.SingleExecution() {
|
class DeleteJoinVisualLinesAction : VisualOperatorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
|
||||||
|
|
||||||
override fun executeForAllCarets(
|
override fun executeForAllCarets(
|
||||||
editor: VimEditor,
|
editor: VimEditor,
|
||||||
context: ExecutionContext,
|
context: ExecutionContext,
|
||||||
@@ -44,7 +39,7 @@ public class DeleteJoinVisualLinesAction : VisualOperatorActionHandler.SingleExe
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var res = true
|
var res = true
|
||||||
editor.nativeCarets().sortedByDescending { it.offset.point }.forEach { caret ->
|
editor.nativeCarets().sortedByDescending { it.offset }.forEach { caret ->
|
||||||
if (!caret.isValid) return@forEach
|
if (!caret.isValid) return@forEach
|
||||||
val range = caretsAndSelections[caret] ?: return@forEach
|
val range = caretsAndSelections[caret] ?: return@forEach
|
||||||
if (!injector.changeGroup.deleteJoinRange(
|
if (!injector.changeGroup.deleteJoinRange(
|
||||||
|
@@ -14,23 +14,18 @@ import com.maddyhome.idea.vim.api.VimCaret
|
|||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
|
||||||
import com.maddyhome.idea.vim.newapi.ijOptions
|
import com.maddyhome.idea.vim.newapi.ijOptions
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author vlan
|
* @author vlan
|
||||||
*/
|
*/
|
||||||
@CommandOrMotion(keys = ["J"], modes = [Mode.VISUAL])
|
@CommandOrMotion(keys = ["J"], modes = [Mode.VISUAL])
|
||||||
public class DeleteJoinVisualLinesSpacesAction : VisualOperatorActionHandler.SingleExecution() {
|
class DeleteJoinVisualLinesSpacesAction : VisualOperatorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
|
||||||
|
|
||||||
override fun executeForAllCarets(
|
override fun executeForAllCarets(
|
||||||
editor: VimEditor,
|
editor: VimEditor,
|
||||||
context: ExecutionContext,
|
context: ExecutionContext,
|
||||||
@@ -44,7 +39,7 @@ public class DeleteJoinVisualLinesSpacesAction : VisualOperatorActionHandler.Sin
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var res = true
|
var res = true
|
||||||
editor.carets().sortedByDescending { it.offset.point }.forEach { caret ->
|
editor.carets().sortedByDescending { it.offset }.forEach { caret ->
|
||||||
if (!caret.isValid) return@forEach
|
if (!caret.isValid) return@forEach
|
||||||
val range = caretsAndSelections[caret] ?: return@forEach
|
val range = caretsAndSelections[caret] ?: return@forEach
|
||||||
if (!injector.changeGroup.deleteJoinRange(
|
if (!injector.changeGroup.deleteJoinRange(
|
||||||
|
@@ -8,10 +8,9 @@
|
|||||||
|
|
||||||
package com.maddyhome.idea.vim.action.editor
|
package com.maddyhome.idea.vim.action.editor
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.IdeActions
|
||||||
import com.intellij.vim.annotations.CommandOrMotion
|
import com.intellij.vim.annotations.CommandOrMotion
|
||||||
import com.intellij.vim.annotations.Mode
|
import com.intellij.vim.annotations.Mode
|
||||||
import com.intellij.openapi.actionSystem.IdeActions
|
|
||||||
import com.maddyhome.idea.vim.action.ComplicatedKeysAction
|
|
||||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
import com.maddyhome.idea.vim.api.VimEditor
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
@@ -21,56 +20,58 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
|||||||
import com.maddyhome.idea.vim.handler.IdeActionHandler
|
import com.maddyhome.idea.vim.handler.IdeActionHandler
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
import java.awt.event.KeyEvent
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import javax.swing.KeyStroke
|
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["<C-H>", "<BS>"], modes = [Mode.INSERT])
|
@CommandOrMotion(keys = ["<C-H>", "<BS>"], modes = [Mode.INSERT])
|
||||||
internal class VimEditorBackSpace : IdeActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE), ComplicatedKeysAction {
|
internal class VimEditorBackSpace : IdeActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE) {
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_H, KeyEvent.CTRL_DOWN_MASK)),
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0)),
|
|
||||||
)
|
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["<Del>"], modes = [Mode.INSERT])
|
@CommandOrMotion(keys = ["<Del>"], modes = [Mode.INSERT])
|
||||||
internal class VimEditorDelete : IdeActionHandler(IdeActions.ACTION_EDITOR_DELETE), ComplicatedKeysAction {
|
internal class VimEditorDelete : IdeActionHandler(IdeActions.ACTION_EDITOR_DELETE) {
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)),
|
|
||||||
)
|
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_SAVE_STROKE)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["<Down>", "<kDown>"], modes = [Mode.INSERT])
|
@CommandOrMotion(keys = ["<Down>", "<kDown>"], modes = [Mode.INSERT])
|
||||||
internal class VimEditorDown : IdeActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN), ComplicatedKeysAction {
|
internal class VimEditorDown : IdeActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN) {
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)),
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0)),
|
|
||||||
)
|
|
||||||
override val type: Command.Type = Command.Type.MOTION
|
override val type: Command.Type = Command.Type.MOTION
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_CLEAR_STROKES)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_CLEAR_STROKES)
|
||||||
|
|
||||||
|
override fun execute(
|
||||||
|
editor: VimEditor,
|
||||||
|
context: ExecutionContext,
|
||||||
|
cmd: Command,
|
||||||
|
operatorArguments: OperatorArguments
|
||||||
|
): Boolean {
|
||||||
|
val undo = injector.undo
|
||||||
|
val nanoTime = System.nanoTime()
|
||||||
|
editor.forEachCaret { undo.endInsertSequence(it, it.offset, nanoTime) }
|
||||||
|
return super.execute(editor, context, cmd, operatorArguments)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["<Tab>", "<C-I>"], modes = [Mode.INSERT])
|
@CommandOrMotion(keys = ["<Tab>", "<C-I>"], modes = [Mode.INSERT])
|
||||||
internal class VimEditorTab : IdeActionHandler(IdeActions.ACTION_EDITOR_TAB), ComplicatedKeysAction {
|
internal class VimEditorTab : IdeActionHandler(IdeActions.ACTION_EDITOR_TAB) {
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_I, KeyEvent.CTRL_DOWN_MASK)),
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)),
|
|
||||||
)
|
|
||||||
override val type: Command.Type = Command.Type.INSERT
|
override val type: Command.Type = Command.Type.INSERT
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_SAVE_STROKE)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_SAVE_STROKE)
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["<Up>", "<kUp>"], modes = [Mode.INSERT])
|
@CommandOrMotion(keys = ["<Up>", "<kUp>"], modes = [Mode.INSERT])
|
||||||
internal class VimEditorUp : IdeActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_UP), ComplicatedKeysAction {
|
internal class VimEditorUp : IdeActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_UP) {
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0)),
|
|
||||||
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, 0)),
|
|
||||||
)
|
|
||||||
override val type: Command.Type = Command.Type.MOTION
|
override val type: Command.Type = Command.Type.MOTION
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_CLEAR_STROKES)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_CLEAR_STROKES)
|
||||||
|
|
||||||
|
override fun execute(
|
||||||
|
editor: VimEditor,
|
||||||
|
context: ExecutionContext,
|
||||||
|
cmd: Command,
|
||||||
|
operatorArguments: OperatorArguments
|
||||||
|
): Boolean {
|
||||||
|
val undo = injector.undo
|
||||||
|
val nanoTime = System.nanoTime()
|
||||||
|
editor.forEachCaret { undo.endInsertSequence(it, it.offset, nanoTime) }
|
||||||
|
return super.execute(editor, context, cmd, operatorArguments)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CommandOrMotion(keys = ["K"], modes = [Mode.NORMAL])
|
@CommandOrMotion(keys = ["K"], modes = [Mode.NORMAL])
|
||||||
|
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
package com.maddyhome.idea.vim.action.ex
|
|
||||||
|
|
||||||
import com.intellij.vim.annotations.CommandOrMotion
|
|
||||||
import com.intellij.vim.annotations.Mode
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
|
||||||
import com.maddyhome.idea.vim.action.ComplicatedKeysAction
|
|
||||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
|
||||||
import com.maddyhome.idea.vim.api.VimEditor
|
|
||||||
import com.maddyhome.idea.vim.command.Command
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
|
||||||
import java.util.*
|
|
||||||
import javax.swing.KeyStroke
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called by KeyHandler to process the contents of the ex entry panel
|
|
||||||
*
|
|
||||||
* The mapping for this action means that the ex command is executed as a write action
|
|
||||||
*/
|
|
||||||
@CommandOrMotion(keys = ["<CR>", "<C-M>", "<C-J>"], modes = [Mode.CMD_LINE])
|
|
||||||
public class ProcessExEntryAction : VimActionHandler.SingleExecution(), ComplicatedKeysAction {
|
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> =
|
|
||||||
parseKeysSet("<CR>", "<C-M>", 0x0a.toChar().toString(), 0x0d.toChar().toString())
|
|
||||||
|
|
||||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
|
||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_COMPLETE_EX)
|
|
||||||
|
|
||||||
override fun execute(editor: VimEditor, context: ExecutionContext, cmd: Command, operatorArguments: OperatorArguments): Boolean {
|
|
||||||
return VimPlugin.getProcess().processExEntry(editor, context)
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2023 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.command
|
|
||||||
|
|
||||||
import com.intellij.openapi.editor.Editor
|
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
|
||||||
import com.maddyhome.idea.vim.state.VimStateMachine
|
|
||||||
import com.maddyhome.idea.vim.state.mode.SelectionType
|
|
||||||
|
|
||||||
/**
|
|
||||||
* COMPATIBILITY-LAYER: Additional class
|
|
||||||
* Please see: https://jb.gg/zo8n0r
|
|
||||||
*/
|
|
||||||
public class CommandState(private val machine: VimStateMachine) {
|
|
||||||
|
|
||||||
public val isOperatorPending: Boolean
|
|
||||||
get() = machine.isOperatorPending
|
|
||||||
|
|
||||||
public val mode: CommandState.Mode
|
|
||||||
get() {
|
|
||||||
val myMode = machine.mode
|
|
||||||
return when (myMode) {
|
|
||||||
com.maddyhome.idea.vim.state.mode.Mode.CMD_LINE -> CommandState.Mode.CMD_LINE
|
|
||||||
com.maddyhome.idea.vim.state.mode.Mode.INSERT -> CommandState.Mode.INSERT
|
|
||||||
is com.maddyhome.idea.vim.state.mode.Mode.NORMAL -> CommandState.Mode.COMMAND
|
|
||||||
is com.maddyhome.idea.vim.state.mode.Mode.OP_PENDING -> CommandState.Mode.OP_PENDING
|
|
||||||
com.maddyhome.idea.vim.state.mode.Mode.REPLACE -> CommandState.Mode.REPLACE
|
|
||||||
is com.maddyhome.idea.vim.state.mode.Mode.SELECT -> CommandState.Mode.SELECT
|
|
||||||
is com.maddyhome.idea.vim.state.mode.Mode.VISUAL -> CommandState.Mode.VISUAL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public val commandBuilder: CommandBuilder
|
|
||||||
get() = machine.commandBuilder
|
|
||||||
|
|
||||||
public val mappingState: MappingState
|
|
||||||
get() = machine.mappingState
|
|
||||||
|
|
||||||
public enum class Mode {
|
|
||||||
// Basic modes
|
|
||||||
COMMAND, VISUAL, SELECT, INSERT, CMD_LINE, /*EX*/
|
|
||||||
|
|
||||||
// Additional modes
|
|
||||||
OP_PENDING, REPLACE /*, VISUAL_REPLACE*/, INSERT_NORMAL, INSERT_VISUAL, INSERT_SELECT
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum class SubMode {
|
|
||||||
NONE, VISUAL_CHARACTER, VISUAL_LINE, VISUAL_BLOCK
|
|
||||||
}
|
|
||||||
|
|
||||||
public companion object {
|
|
||||||
@JvmStatic
|
|
||||||
public fun getInstance(editor: Editor): CommandState {
|
|
||||||
return CommandState(editor.vim.vimStateMachine)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val CommandState.SubMode.engine: SelectionType
|
|
||||||
get() = when (this) {
|
|
||||||
CommandState.SubMode.NONE -> error("Unexpected value")
|
|
||||||
CommandState.SubMode.VISUAL_CHARACTER -> SelectionType.CHARACTER_WISE
|
|
||||||
CommandState.SubMode.VISUAL_LINE -> SelectionType.LINE_WISE
|
|
||||||
CommandState.SubMode.VISUAL_BLOCK -> SelectionType.BLOCK_WISE
|
|
||||||
}
|
|
@@ -12,18 +12,18 @@ import com.intellij.openapi.editor.Editor
|
|||||||
import com.intellij.openapi.editor.LogicalPosition
|
import com.intellij.openapi.editor.LogicalPosition
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
import com.maddyhome.idea.vim.newapi.vim
|
||||||
|
|
||||||
public class CharacterPosition(line: Int, col: Int) : LogicalPosition(line, col) {
|
class CharacterPosition(line: Int, col: Int) : LogicalPosition(line, col) {
|
||||||
public fun toOffset(editor: Editor): Int = editor.vim.getLineStartOffset(line) + column
|
fun toOffset(editor: Editor): Int = editor.vim.getLineStartOffset(line) + column
|
||||||
|
|
||||||
public companion object {
|
companion object {
|
||||||
public fun fromOffset(editor: Editor, offset: Int): CharacterPosition {
|
fun fromOffset(editor: Editor, offset: Int): CharacterPosition {
|
||||||
// logical position "expands" tabs
|
// logical position "expands" tabs
|
||||||
val logicalPosition = editor.offsetToLogicalPosition(offset)
|
val logicalPosition = editor.offsetToLogicalPosition(offset)
|
||||||
val lineStartOffset = editor.vim.getLineStartOffset(logicalPosition.line)
|
val lineStartOffset = editor.vim.getLineStartOffset(logicalPosition.line)
|
||||||
return CharacterPosition(logicalPosition.line, offset - lineStartOffset)
|
return CharacterPosition(logicalPosition.line, offset - lineStartOffset)
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun atCaret(editor: Editor): CharacterPosition {
|
fun atCaret(editor: Editor): CharacterPosition {
|
||||||
return fromOffset(editor, editor.caretModel.offset)
|
return fromOffset(editor, editor.caretModel.offset)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
package com.maddyhome.idea.vim.common
|
package com.maddyhome.idea.vim.common
|
||||||
|
|
||||||
import com.intellij.application.options.CodeStyle
|
import com.intellij.application.options.CodeStyle
|
||||||
import com.intellij.openapi.actionSystem.DataContext
|
|
||||||
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings.IndentOptions
|
import com.intellij.psi.codeStyle.CommonCodeStyleSettings.IndentOptions
|
||||||
@@ -39,13 +37,12 @@ internal class IndentConfig private constructor(indentOptions: IndentOptions) {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun create(editor: Editor, context: DataContext): IndentConfig {
|
fun create(editor: Editor): IndentConfig {
|
||||||
return create(editor, PlatformDataKeys.PROJECT.getData(context))
|
return create(editor, editor.project)
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@JvmOverloads
|
fun create(editor: Editor, project: Project?): IndentConfig {
|
||||||
fun create(editor: Editor, project: Project? = editor.project): IndentConfig {
|
|
||||||
val indentOptions = if (project != null) {
|
val indentOptions = if (project != null) {
|
||||||
CodeStyle.getIndentOptions(project, editor.document)
|
CodeStyle.getIndentOptions(project, editor.document)
|
||||||
} else {
|
} else {
|
||||||
|
@@ -9,40 +9,93 @@ package com.maddyhome.idea.vim.ex
|
|||||||
|
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.maddyhome.idea.vim.api.VimExOutputPanel
|
import com.maddyhome.idea.vim.api.VimOutputPanel
|
||||||
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.helper.vimExOutput
|
import com.maddyhome.idea.vim.helper.vimExOutput
|
||||||
import com.maddyhome.idea.vim.ui.ExOutputPanel
|
import com.maddyhome.idea.vim.ui.ExOutputPanel
|
||||||
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
/**
|
// TODO: We need a nicer way to handle output, especially wrt testing, appending + clearing
|
||||||
* @author vlan
|
class ExOutputModel(private val myEditor: WeakReference<Editor>) : VimOutputPanel {
|
||||||
*/
|
private var isActiveInTestMode = false
|
||||||
public class ExOutputModel private constructor(private val myEditor: Editor) : VimExOutputPanel {
|
|
||||||
override var text: String? = null
|
|
||||||
private set
|
|
||||||
|
|
||||||
override fun output(text: String) {
|
val editor get() = myEditor.get()
|
||||||
|
|
||||||
|
val isActive: Boolean
|
||||||
|
get() = if (!ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
|
editor?.let { ExOutputPanel.getNullablePanel(it) }?.myActive ?: false
|
||||||
|
} else {
|
||||||
|
isActiveInTestMode
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun addText(text: String, isNewLine: Boolean) {
|
||||||
|
if (this.text.isNotEmpty() && isNewLine) this.text += "\n$text" else this.text += text
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun show() {
|
||||||
|
if (editor == null) return
|
||||||
|
val currentPanel = injector.outputPanel.getCurrentOutputPanel()
|
||||||
|
if (currentPanel != null && currentPanel != this) currentPanel.close()
|
||||||
|
|
||||||
|
editor!!.vimExOutput = this
|
||||||
|
val exOutputPanel = ExOutputPanel.getInstance(editor!!)
|
||||||
|
if (!exOutputPanel.myActive) {
|
||||||
|
if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
|
isActiveInTestMode = true
|
||||||
|
} else {
|
||||||
|
exOutputPanel.activate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override var text: String = ""
|
||||||
|
get() = if (!ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
|
editor?.let { ExOutputPanel.getInstance(it).text } ?: ""
|
||||||
|
} else {
|
||||||
|
// ExOutputPanel always returns a non-null string
|
||||||
|
field
|
||||||
|
}
|
||||||
|
set(value) {
|
||||||
|
// ExOutputPanel will strip a trailing newline. We'll do it now so that tests have the same behaviour. We also
|
||||||
|
// never pass null to ExOutputPanel, but we do store it for tests, so we know if we're active or not
|
||||||
|
val newValue = value.removeSuffix("\n")
|
||||||
|
if (!ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
|
editor?.let { ExOutputPanel.getInstance(it).setText(newValue) }
|
||||||
|
} else {
|
||||||
|
field = newValue
|
||||||
|
isActiveInTestMode = newValue.isNotEmpty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun output(text: String) {
|
||||||
this.text = text
|
this.text = text
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clear() {
|
||||||
|
text = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun close() {
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode) {
|
if (!ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
ExOutputPanel.getInstance(myEditor).setText(text)
|
editor?.let { ExOutputPanel.getInstance(it).close() }
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
isActiveInTestMode = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun clear() {
|
companion object {
|
||||||
text = null
|
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode) {
|
|
||||||
ExOutputPanel.getInstance(myEditor).deactivate(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public companion object {
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun getInstance(editor: Editor): ExOutputModel {
|
fun getInstance(editor: Editor): ExOutputModel {
|
||||||
var model = editor.vimExOutput
|
var model = editor.vimExOutput
|
||||||
if (model == null) {
|
if (model == null) {
|
||||||
model = ExOutputModel(editor)
|
model = ExOutputModel(WeakReference(editor))
|
||||||
editor.vimExOutput = model
|
editor.vimExOutput = model
|
||||||
}
|
}
|
||||||
return model
|
return model
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun tryGetInstance(editor: Editor) = editor.vimExOutput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,27 +7,40 @@
|
|||||||
*/
|
*/
|
||||||
package com.maddyhome.idea.vim.extension
|
package com.maddyhome.idea.vim.extension
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
import com.intellij.openapi.components.service
|
import com.intellij.openapi.diagnostic.logger
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.maddyhome.idea.vim.KeyHandler
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
import com.maddyhome.idea.vim.action.change.Extension
|
import com.maddyhome.idea.vim.action.change.Extension
|
||||||
|
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||||
import com.maddyhome.idea.vim.api.ImmutableVimCaret
|
import com.maddyhome.idea.vim.api.ImmutableVimCaret
|
||||||
import com.maddyhome.idea.vim.api.VimCaret
|
import com.maddyhome.idea.vim.api.VimCaret
|
||||||
|
import com.maddyhome.idea.vim.api.VimEditor
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.command.MappingMode
|
import com.maddyhome.idea.vim.command.MappingMode
|
||||||
import com.maddyhome.idea.vim.state.mode.SelectionType
|
|
||||||
import com.maddyhome.idea.vim.common.CommandAlias
|
import com.maddyhome.idea.vim.common.CommandAlias
|
||||||
import com.maddyhome.idea.vim.common.CommandAliasHandler
|
import com.maddyhome.idea.vim.common.CommandAliasHandler
|
||||||
import com.maddyhome.idea.vim.helper.CommandLineHelper
|
import com.maddyhome.idea.vim.common.TextRange
|
||||||
import com.maddyhome.idea.vim.helper.TestInputModel
|
import com.maddyhome.idea.vim.helper.TestInputModel
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
import com.maddyhome.idea.vim.helper.inRepeatMode
|
||||||
|
import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||||
import com.maddyhome.idea.vim.key.MappingOwner
|
import com.maddyhome.idea.vim.key.MappingOwner
|
||||||
import com.maddyhome.idea.vim.key.OperatorFunction
|
import com.maddyhome.idea.vim.key.OperatorFunction
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
import com.maddyhome.idea.vim.newapi.vim
|
||||||
|
import com.maddyhome.idea.vim.state.mode.SelectionType
|
||||||
import com.maddyhome.idea.vim.ui.ModalEntry
|
import com.maddyhome.idea.vim.ui.ModalEntry
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.Executable
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.ExecutionResult
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.VimLContext
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimDataType
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.expressions.Expression
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.expressions.Scope
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.statements.FunctionDeclaration
|
||||||
|
import com.maddyhome.idea.vim.vimscript.model.statements.FunctionFlag
|
||||||
import java.awt.event.KeyEvent
|
import java.awt.event.KeyEvent
|
||||||
|
import java.util.*
|
||||||
import javax.swing.KeyStroke
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,10 +50,13 @@ import javax.swing.KeyStroke
|
|||||||
*
|
*
|
||||||
* @author vlan
|
* @author vlan
|
||||||
*/
|
*/
|
||||||
public object VimExtensionFacade {
|
object VimExtensionFacade {
|
||||||
|
|
||||||
|
private val LOG = logger<VimExtensionFacade>()
|
||||||
|
|
||||||
/** The 'map' command for mapping keys to handlers defined in extensions. */
|
/** The 'map' command for mapping keys to handlers defined in extensions. */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun putExtensionHandlerMapping(
|
fun putExtensionHandlerMapping(
|
||||||
modes: Set<MappingMode>,
|
modes: Set<MappingMode>,
|
||||||
fromKeys: List<KeyStroke>,
|
fromKeys: List<KeyStroke>,
|
||||||
pluginOwner: MappingOwner,
|
pluginOwner: MappingOwner,
|
||||||
@@ -51,13 +67,15 @@ public object VimExtensionFacade {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* COMPATIBILITY-LAYER: Additional method
|
|
||||||
* Please see: https://jb.gg/zo8n0r
|
|
||||||
*/
|
|
||||||
/** The 'map' command for mapping keys to handlers defined in extensions. */
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun putExtensionHandlerMapping(
|
@Deprecated(
|
||||||
|
"Use VimPlugin.getKey().putKeyMapping(modes, fromKeys, pluginOwner, extensionHandler, recursive)",
|
||||||
|
ReplaceWith(
|
||||||
|
"VimPlugin.getKey().putKeyMapping(modes, fromKeys, pluginOwner, extensionHandler, recursive)",
|
||||||
|
"com.maddyhome.idea.vim.VimPlugin"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
fun putExtensionHandlerMapping(
|
||||||
modes: Set<MappingMode>,
|
modes: Set<MappingMode>,
|
||||||
fromKeys: List<KeyStroke>,
|
fromKeys: List<KeyStroke>,
|
||||||
pluginOwner: MappingOwner,
|
pluginOwner: MappingOwner,
|
||||||
@@ -69,7 +87,7 @@ public object VimExtensionFacade {
|
|||||||
|
|
||||||
/** The 'map' command for mapping keys to other keys. */
|
/** The 'map' command for mapping keys to other keys. */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun putKeyMapping(
|
fun putKeyMapping(
|
||||||
modes: Set<MappingMode>,
|
modes: Set<MappingMode>,
|
||||||
fromKeys: List<KeyStroke>,
|
fromKeys: List<KeyStroke>,
|
||||||
pluginOwner: MappingOwner,
|
pluginOwner: MappingOwner,
|
||||||
@@ -81,7 +99,7 @@ public object VimExtensionFacade {
|
|||||||
|
|
||||||
/** The 'map' command for mapping keys to other keys if there is no other mapping to these keys */
|
/** The 'map' command for mapping keys to other keys if there is no other mapping to these keys */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun putKeyMappingIfMissing(
|
fun putKeyMappingIfMissing(
|
||||||
modes: Set<MappingMode>,
|
modes: Set<MappingMode>,
|
||||||
fromKeys: List<KeyStroke>,
|
fromKeys: List<KeyStroke>,
|
||||||
pluginOwner: MappingOwner,
|
pluginOwner: MappingOwner,
|
||||||
@@ -95,7 +113,7 @@ public object VimExtensionFacade {
|
|||||||
/**
|
/**
|
||||||
* Equivalent to calling 'command' to set up a user-defined command or alias
|
* Equivalent to calling 'command' to set up a user-defined command or alias
|
||||||
*/
|
*/
|
||||||
public fun addCommand(
|
fun addCommand(
|
||||||
name: String,
|
name: String,
|
||||||
handler: CommandAliasHandler,
|
handler: CommandAliasHandler,
|
||||||
) {
|
) {
|
||||||
@@ -106,7 +124,7 @@ public object VimExtensionFacade {
|
|||||||
* Equivalent to calling 'command' to set up a user-defined command or alias
|
* Equivalent to calling 'command' to set up a user-defined command or alias
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun addCommand(
|
fun addCommand(
|
||||||
name: String,
|
name: String,
|
||||||
minimumNumberOfArguments: Int,
|
minimumNumberOfArguments: Int,
|
||||||
maximumNumberOfArguments: Int,
|
maximumNumberOfArguments: Int,
|
||||||
@@ -116,12 +134,6 @@ public object VimExtensionFacade {
|
|||||||
.setAlias(name, CommandAlias.Call(minimumNumberOfArguments, maximumNumberOfArguments, name, handler))
|
.setAlias(name, CommandAlias.Call(minimumNumberOfArguments, maximumNumberOfArguments, name, handler))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the value of 'operatorfunc' to be used as the operator function in 'g@'. */
|
|
||||||
@JvmStatic
|
|
||||||
public fun setOperatorFunction(function: OperatorFunction) {
|
|
||||||
VimPlugin.getKey().operatorFunction = function
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs normal mode commands similar to ':normal! {commands}'.
|
* Runs normal mode commands similar to ':normal! {commands}'.
|
||||||
* Mappings doesn't work with this function
|
* Mappings doesn't work with this function
|
||||||
@@ -130,32 +142,37 @@ public object VimExtensionFacade {
|
|||||||
* leaves the editor in the insert mode if it's been activated.
|
* leaves the editor in the insert mode if it's been activated.
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun executeNormalWithoutMapping(keys: List<KeyStroke>, editor: Editor) {
|
fun executeNormalWithoutMapping(keys: List<KeyStroke>, editor: Editor) {
|
||||||
val context = injector.executionContextManager.onEditor(editor.vim)
|
val context = injector.executionContextManager.getEditorExecutionContext(editor.vim)
|
||||||
keys.forEach { KeyHandler.getInstance().handleKey(editor.vim, it, context, false, false) }
|
val keyHandler = KeyHandler.getInstance()
|
||||||
|
keys.forEach { keyHandler.handleKey(editor.vim, it, context, false, false, keyHandler.keyHandlerState) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns a single key stroke from the user input similar to 'getchar()'. */
|
/** Returns a single key stroke from the user input similar to 'getchar()'. */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun inputKeyStroke(editor: Editor): KeyStroke {
|
fun inputKeyStroke(editor: Editor): KeyStroke {
|
||||||
if (editor.vim.vimStateMachine.isDotRepeatInProgress) {
|
if (editor.vim.inRepeatMode) {
|
||||||
val input = Extension.consumeKeystroke()
|
val input = Extension.consumeKeystroke()
|
||||||
|
LOG.trace("inputKeyStroke: dot repeat in progress. Input: $input")
|
||||||
return input ?: error("Not enough keystrokes saved: ${Extension.lastExtensionHandler}")
|
return input ?: error("Not enough keystrokes saved: ${Extension.lastExtensionHandler}")
|
||||||
}
|
}
|
||||||
|
|
||||||
val key: KeyStroke? = if (ApplicationManager.getApplication().isUnitTestMode) {
|
val key: KeyStroke? = if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
|
LOG.trace("Unit test mode is active")
|
||||||
val mappingStack = KeyHandler.getInstance().keyStack
|
val mappingStack = KeyHandler.getInstance().keyStack
|
||||||
mappingStack.feedSomeStroke() ?: TestInputModel.getInstance(editor).nextKeyStroke()?.also {
|
mappingStack.feedSomeStroke() ?: TestInputModel.getInstance(editor).nextKeyStroke()?.also {
|
||||||
if (editor.vim.vimStateMachine.isRecording) {
|
if (injector.registerGroup.isRecording) {
|
||||||
KeyHandler.getInstance().modalEntryKeys += it
|
KeyHandler.getInstance().modalEntryKeys += it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
LOG.trace("Getting char from the modal entry...")
|
||||||
var ref: KeyStroke? = null
|
var ref: KeyStroke? = null
|
||||||
ModalEntry.activate(editor.vim) { stroke: KeyStroke? ->
|
ModalEntry.activate(editor.vim) { stroke: KeyStroke? ->
|
||||||
ref = stroke
|
ref = stroke
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
LOG.trace("Got char $ref")
|
||||||
ref
|
ref
|
||||||
}
|
}
|
||||||
val result = key ?: KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE.toChar())
|
val result = key ?: KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE.toChar())
|
||||||
@@ -165,38 +182,99 @@ public object VimExtensionFacade {
|
|||||||
|
|
||||||
/** Returns a string typed in the input box similar to 'input()'. */
|
/** Returns a string typed in the input box similar to 'input()'. */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun inputString(editor: Editor, prompt: String, finishOn: Char?): String {
|
fun inputString(editor: Editor, context: DataContext, prompt: String, finishOn: Char?): String {
|
||||||
return service<CommandLineHelper>().inputString(editor.vim, prompt, finishOn) ?: ""
|
return injector.commandLine.inputString(editor.vim, context.vim, prompt, finishOn) ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the current contents of the given register similar to 'getreg()'. */
|
/** Get the current contents of the given register similar to 'getreg()'. */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun getRegister(register: Char): List<KeyStroke>? {
|
fun getRegister(register: Char): List<KeyStroke>? {
|
||||||
val reg = VimPlugin.getRegister().getRegister(register) ?: return null
|
val reg = VimPlugin.getRegister().getRegister(register) ?: return null
|
||||||
return reg.keys
|
return reg.keys
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun getRegisterForCaret(register: Char, caret: VimCaret): List<KeyStroke>? {
|
fun getRegisterForCaret(register: Char, caret: VimCaret): List<KeyStroke>? {
|
||||||
val reg = caret.registerStorage.getRegister(register) ?: return null
|
val reg = injector.registerGroup.getRegister(register) ?: return null
|
||||||
return reg.keys
|
return reg.keys
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current contents of the given register */
|
/** Set the current contents of the given register */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun setRegister(register: Char, keys: List<KeyStroke?>?) {
|
fun setRegister(register: Char, keys: List<KeyStroke?>?) {
|
||||||
VimPlugin.getRegister().setKeys(register, keys?.filterNotNull() ?: emptyList())
|
VimPlugin.getRegister().setKeys(register, keys?.filterNotNull() ?: emptyList())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current contents of the given register */
|
/** Set the current contents of the given register */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun setRegisterForCaret(register: Char, caret: ImmutableVimCaret, keys: List<KeyStroke?>?) {
|
fun setRegisterForCaret(register: Char, caret: ImmutableVimCaret, keys: List<KeyStroke?>?) {
|
||||||
caret.registerStorage.setKeys(register, keys?.filterNotNull() ?: emptyList())
|
injector.registerGroup.setKeys(register, keys?.filterNotNull() ?: emptyList())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current contents of the given register */
|
/** Set the current contents of the given register */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun setRegister(register: Char, keys: List<KeyStroke?>?, type: SelectionType) {
|
fun setRegister(register: Char, keys: List<KeyStroke?>?, type: SelectionType) {
|
||||||
VimPlugin.getRegister().setKeys(register, keys?.filterNotNull() ?: emptyList(), type)
|
VimPlugin.getRegister().setKeys(register, keys?.filterNotNull() ?: emptyList(), type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun exportScriptFunction(
|
||||||
|
scope: Scope?,
|
||||||
|
name: String,
|
||||||
|
args: List<String>,
|
||||||
|
defaultArgs: List<Pair<String, Expression>>,
|
||||||
|
hasOptionalArguments: Boolean,
|
||||||
|
flags: EnumSet<FunctionFlag>,
|
||||||
|
function: ScriptFunction
|
||||||
|
) {
|
||||||
|
var functionDeclaration: FunctionDeclaration? = null
|
||||||
|
val body = listOf(object : Executable {
|
||||||
|
// This context is set to the function declaration during initialisation and then set to the function execution
|
||||||
|
// context during execution
|
||||||
|
override lateinit var vimContext: VimLContext
|
||||||
|
override var rangeInScript: TextRange = TextRange(0, 0)
|
||||||
|
|
||||||
|
override fun execute(editor: VimEditor, context: ExecutionContext): ExecutionResult {
|
||||||
|
return function.execute(editor, context, functionDeclaration!!.functionVariables)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
functionDeclaration = FunctionDeclaration(
|
||||||
|
scope,
|
||||||
|
name,
|
||||||
|
args,
|
||||||
|
defaultArgs,
|
||||||
|
body,
|
||||||
|
replaceExisting = true,
|
||||||
|
flags,
|
||||||
|
hasOptionalArguments
|
||||||
|
)
|
||||||
|
functionDeclaration.rangeInScript = TextRange(0, 0)
|
||||||
|
body.forEach { it.vimContext = functionDeclaration }
|
||||||
|
injector.functionService.storeFunction(functionDeclaration)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun VimExtensionFacade.exportOperatorFunction(name: String, function: OperatorFunction) {
|
||||||
|
exportScriptFunction(null, name, listOf("type"), emptyList(), false, noneOfEnum()) {
|
||||||
|
editor, context, args ->
|
||||||
|
|
||||||
|
val type = args["type"]?.asString()
|
||||||
|
val selectionType = when (type) {
|
||||||
|
"line" -> SelectionType.LINE_WISE
|
||||||
|
"block" -> SelectionType.BLOCK_WISE
|
||||||
|
"char" -> SelectionType.CHARACTER_WISE
|
||||||
|
else -> return@exportScriptFunction ExecutionResult.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
if (function.apply(editor, context, selectionType)) {
|
||||||
|
ExecutionResult.Success
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ExecutionResult.Error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun interface ScriptFunction {
|
||||||
|
fun execute(editor: VimEditor, context: ExecutionContext, args: Map<String, VimDataType>): ExecutionResult
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user