Compare commits
852 Commits
0.53.1-EAP
...
0.60
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e89e0466eb | ||
![]() |
c9d0d7aef6 | ||
![]() |
90c7d5a74a | ||
![]() |
b19e11b5b6 | ||
![]() |
2d002c044d | ||
![]() |
9a7b2bd158 | ||
![]() |
461c874de6 | ||
![]() |
992ff97877 | ||
![]() |
96689eab23 | ||
![]() |
0dd47c192b | ||
![]() |
5875ce58fb | ||
![]() |
1c21968259 | ||
![]() |
1d8ac4fc02 | ||
![]() |
0a863f32b2 | ||
![]() |
cd0d503402 | ||
![]() |
0bac6bf8b6 | ||
![]() |
6436a59528 | ||
![]() |
2dc54ea882 | ||
![]() |
63db148aae | ||
![]() |
78f1c8499a | ||
![]() |
26dae9b4e0 | ||
![]() |
10f1d75f2e | ||
![]() |
5b3984ce7a | ||
![]() |
43810ba730 | ||
![]() |
5bf2818b2a | ||
![]() |
76587d672f | ||
![]() |
890d48769f | ||
![]() |
fffe8e2499 | ||
![]() |
fffc2d3b11 | ||
![]() |
007f33be0b | ||
![]() |
fa17af8d33 | ||
![]() |
eabe43061c | ||
![]() |
64502fb31b | ||
![]() |
d693906905 | ||
![]() |
cf25f7e201 | ||
![]() |
df3a533515 | ||
![]() |
53a687fd53 | ||
![]() |
2091bbc025 | ||
![]() |
eb46ed8f00 | ||
![]() |
3096c2e7ad | ||
![]() |
f8d66f354a | ||
![]() |
67c5601fdc | ||
![]() |
62601686aa | ||
![]() |
e92c0d5098 | ||
![]() |
5ca0298497 | ||
![]() |
7321099a0f | ||
![]() |
63d9a33d80 | ||
![]() |
a7ba6d6004 | ||
![]() |
5008d5c8c4 | ||
![]() |
33f8a00679 | ||
![]() |
be0adb833f | ||
![]() |
8f90ff8a65 | ||
![]() |
c8a1938155 | ||
![]() |
3cf42c86f3 | ||
![]() |
632e9fad2e | ||
![]() |
a5de935192 | ||
![]() |
111c1ebe32 | ||
![]() |
8a42bff6ad | ||
![]() |
d878c3e05d | ||
![]() |
d08da77b2f | ||
![]() |
86d6876db4 | ||
![]() |
a7985e1e9b | ||
![]() |
879ca456f7 | ||
![]() |
1863cbdef0 | ||
![]() |
ac4755a6ff | ||
![]() |
61600b07a4 | ||
![]() |
6be6e7f173 | ||
![]() |
e597e06324 | ||
![]() |
4cebaa865b | ||
![]() |
589e43f825 | ||
![]() |
61a70704c5 | ||
![]() |
174f86f91e | ||
![]() |
77a462702e | ||
![]() |
d20955900d | ||
![]() |
b952d2b96a | ||
![]() |
428d1d6699 | ||
![]() |
35863581e9 | ||
![]() |
041f6af607 | ||
![]() |
0e8a1bfc87 | ||
![]() |
442e739447 | ||
![]() |
47bb155989 | ||
![]() |
bd733b72a7 | ||
![]() |
e01327ab29 | ||
![]() |
2a10247653 | ||
![]() |
e3b7ed7657 | ||
![]() |
d4357ce801 | ||
![]() |
5bdeaed416 | ||
![]() |
a44d93283f | ||
![]() |
804f69e9c8 | ||
![]() |
086c2f201b | ||
![]() |
0b22360891 | ||
![]() |
808fb24bbc | ||
![]() |
febd8eccf0 | ||
![]() |
22b1209eb5 | ||
![]() |
485c5501b3 | ||
![]() |
81ceba8926 | ||
![]() |
3edd95da4e | ||
![]() |
c1bb364cbe | ||
![]() |
db8fa31503 | ||
![]() |
1a5a65dcb1 | ||
![]() |
1c96f4491e | ||
![]() |
30ddb4071f | ||
![]() |
dccc793fc7 | ||
![]() |
f070a57148 | ||
![]() |
2dde2cfb3b | ||
![]() |
e0fef4f017 | ||
![]() |
3a40b9689c | ||
![]() |
3937a395b7 | ||
![]() |
7e3d532075 | ||
![]() |
4f658c4734 | ||
![]() |
26aa753d9e | ||
![]() |
bd9c40aabc | ||
![]() |
008edc7e33 | ||
![]() |
2901bf45b7 | ||
![]() |
24e7f655fc | ||
![]() |
ab8de509d9 | ||
![]() |
4fc4ed7675 | ||
![]() |
b35ad2bb9d | ||
![]() |
895c7f1af1 | ||
![]() |
fbca5712e3 | ||
![]() |
58850960b8 | ||
![]() |
1c874d3957 | ||
![]() |
a42a19a174 | ||
![]() |
bbe39d5942 | ||
![]() |
f5fb844442 | ||
![]() |
cb186a686e | ||
![]() |
0c22bb2f4f | ||
![]() |
49756c5c2f | ||
![]() |
7efc2e1631 | ||
![]() |
ed23f5958c | ||
![]() |
0ea53f3445 | ||
![]() |
4531b38c89 | ||
![]() |
2114725dab | ||
![]() |
6877ffcb47 | ||
![]() |
c4a3cc6718 | ||
![]() |
a53ed1705a | ||
![]() |
ae13eed152 | ||
![]() |
2c2c023200 | ||
![]() |
1dbe7735df | ||
![]() |
a321e77e2e | ||
![]() |
9b52b496b2 | ||
![]() |
deeddc22be | ||
![]() |
680693448f | ||
![]() |
b4b5c0c77e | ||
![]() |
3f3305706d | ||
![]() |
bd942e2ea1 | ||
![]() |
a4c3fd8f0b | ||
![]() |
f54fc09a37 | ||
![]() |
fd6bdde5b0 | ||
![]() |
85c8007084 | ||
![]() |
8a82d60172 | ||
![]() |
8b3f5d5e81 | ||
![]() |
e222294c6e | ||
![]() |
a04b536df8 | ||
![]() |
2a0bd8722e | ||
![]() |
742187919f | ||
![]() |
aece559400 | ||
![]() |
8b6e41afb8 | ||
![]() |
9eed5802d6 | ||
![]() |
437932d023 | ||
![]() |
e8dd4f2e59 | ||
![]() |
93cdf3828b | ||
![]() |
99a91404ce | ||
![]() |
28ae3a104a | ||
![]() |
bc08839b16 | ||
![]() |
15ebcb5b6a | ||
![]() |
93fd8b0ff7 | ||
![]() |
6d0f280f19 | ||
![]() |
3b26a4c26d | ||
![]() |
60315744d1 | ||
![]() |
40a6617816 | ||
![]() |
a6964a37ac | ||
![]() |
9249ae073c | ||
![]() |
2a216728f1 | ||
![]() |
b186cb585e | ||
![]() |
4e26f62391 | ||
![]() |
ddb502acb3 | ||
![]() |
89cb6867d4 | ||
![]() |
f7892b33c8 | ||
![]() |
e04e0e69f3 | ||
![]() |
7172faf7b5 | ||
![]() |
6e1761a1f5 | ||
![]() |
baa7d4f098 | ||
![]() |
baa5557010 | ||
![]() |
5ce25ebc23 | ||
![]() |
1f4d5b0140 | ||
![]() |
ddd1a0a5f0 | ||
![]() |
802c887b60 | ||
![]() |
e15fd8fa24 | ||
![]() |
034cc3a725 | ||
![]() |
f34dcc0386 | ||
![]() |
a7b278553f | ||
![]() |
bd52eb12bd | ||
![]() |
2d9a0a7559 | ||
![]() |
67d3698a40 | ||
![]() |
7b40281875 | ||
![]() |
dc1d01c91d | ||
![]() |
1e2618fddc | ||
![]() |
85194b772b | ||
![]() |
5a048139d6 | ||
![]() |
7809842348 | ||
![]() |
c7948374fd | ||
![]() |
f8afdf304b | ||
![]() |
29d617f7bb | ||
![]() |
0e7b05e360 | ||
![]() |
5f18e99128 | ||
![]() |
b2e0af587f | ||
![]() |
b0b0817668 | ||
![]() |
a6ef654c05 | ||
![]() |
e428b9fa0a | ||
![]() |
7008185735 | ||
![]() |
e4bbc7b962 | ||
![]() |
68704a2e3d | ||
![]() |
6f0222c55e | ||
![]() |
e0646541e8 | ||
![]() |
2d1fee0516 | ||
![]() |
149899c34e | ||
![]() |
c6573b48c2 | ||
![]() |
476ba265d2 | ||
![]() |
9904de1946 | ||
![]() |
e73aec2e9e | ||
![]() |
d6658a1771 | ||
![]() |
583988034b | ||
![]() |
e57d6f3d97 | ||
![]() |
55e553c2a0 | ||
![]() |
44a3263a86 | ||
![]() |
80723a6cad | ||
![]() |
ca15c60d52 | ||
![]() |
8be075b36a | ||
![]() |
ca203f8297 | ||
![]() |
934c3065b9 | ||
![]() |
5d95917727 | ||
![]() |
a53b67f0ef | ||
![]() |
eff13180b3 | ||
![]() |
354aec4713 | ||
![]() |
d2acb88dd4 | ||
![]() |
e96ece23b8 | ||
![]() |
a3a3db9bc8 | ||
![]() |
ede0737261 | ||
![]() |
dc7efad420 | ||
![]() |
423d51a6f9 | ||
![]() |
c350650f9c | ||
![]() |
8c3cbc49b3 | ||
![]() |
786b7193d0 | ||
![]() |
2a6acba07f | ||
![]() |
e5a5d112ca | ||
![]() |
9e2cfe548b | ||
![]() |
f4d595f5c2 | ||
![]() |
c1e5b7d111 | ||
![]() |
1eccc60cb3 | ||
![]() |
9f8095ae52 | ||
![]() |
3674cf4aad | ||
![]() |
6b0d2157c8 | ||
![]() |
5a629d6256 | ||
![]() |
b8909f97aa | ||
![]() |
8c83ed6b55 | ||
![]() |
b161346171 | ||
![]() |
330e717518 | ||
![]() |
dafc031ef6 | ||
![]() |
b00a2d3b79 | ||
![]() |
c64ec34a1f | ||
![]() |
8ed709c7bb | ||
![]() |
8e8e52c6f9 | ||
![]() |
f3e806c4a6 | ||
![]() |
3bae95ae5b | ||
![]() |
0adde753f4 | ||
![]() |
5f28a22666 | ||
![]() |
a975b53894 | ||
![]() |
98aee5d0ab | ||
![]() |
f57af8bf9e | ||
![]() |
c6c3b6643e | ||
![]() |
af94079b92 | ||
![]() |
7203cc5cb3 | ||
![]() |
028423cf58 | ||
![]() |
2ead6af96a | ||
![]() |
bf853e3c0c | ||
![]() |
660b243056 | ||
![]() |
c85f41e65b | ||
![]() |
2759bed1b2 | ||
![]() |
89c2a8ec9b | ||
![]() |
aa2c1257ac | ||
![]() |
f9fa15b7ac | ||
![]() |
93a9be41bc | ||
![]() |
ecd2f2032c | ||
![]() |
de5ce5f635 | ||
![]() |
2eb6fd6819 | ||
![]() |
22ea4e7ffa | ||
![]() |
3d98f3035f | ||
![]() |
ec1d6ac477 | ||
![]() |
0dc236cb5b | ||
![]() |
98349a49fd | ||
![]() |
ab8be2cada | ||
![]() |
b8c22d0928 | ||
![]() |
c6cf77e4b8 | ||
![]() |
6c0511a898 | ||
![]() |
366c862bcf | ||
![]() |
03493e2390 | ||
![]() |
8f9c71dd55 | ||
![]() |
11beb1e331 | ||
![]() |
01b4dc233a | ||
![]() |
9f1e80e969 | ||
![]() |
7e319e11c6 | ||
![]() |
d11bf1c4d2 | ||
![]() |
3e2f18b757 | ||
![]() |
61677aa811 | ||
![]() |
fb04e835ef | ||
![]() |
bb133922d6 | ||
![]() |
44dd5ef872 | ||
![]() |
bcc8e1c055 | ||
![]() |
71117ed335 | ||
![]() |
de07fb3b74 | ||
![]() |
e31d5a4dcf | ||
![]() |
e14aae761d | ||
![]() |
47db2a247c | ||
![]() |
e449bb9692 | ||
![]() |
b8fc72b6a7 | ||
![]() |
64c01c1bd1 | ||
![]() |
0a0e3df42b | ||
![]() |
949c69a7e9 | ||
![]() |
69caf7a604 | ||
![]() |
23860ad5f9 | ||
![]() |
ace5234d8d | ||
![]() |
4654f821a9 | ||
![]() |
927e0e7865 | ||
![]() |
d47c9735b5 | ||
![]() |
6100433636 | ||
![]() |
43f79e8183 | ||
![]() |
f58fda0c87 | ||
![]() |
64b49e37d7 | ||
![]() |
e44418d410 | ||
![]() |
ca8d05ff13 | ||
![]() |
626871e34d | ||
![]() |
4b659fe643 | ||
![]() |
d5055506b0 | ||
![]() |
55f54b2e82 | ||
![]() |
1b18065e68 | ||
![]() |
053dc02152 | ||
![]() |
b8cb4a1295 | ||
![]() |
cd2cbf68a1 | ||
![]() |
73f3be8af0 | ||
![]() |
8cce059fb4 | ||
![]() |
db641ec6f6 | ||
![]() |
9d8239b68d | ||
![]() |
4ec0bac275 | ||
![]() |
613c234cfb | ||
![]() |
83dca71f69 | ||
![]() |
f7ea9cdb6e | ||
![]() |
762cb1804f | ||
![]() |
962cfb7ae2 | ||
![]() |
9bc2ec7d8a | ||
![]() |
8415d104e9 | ||
![]() |
abd0f9b961 | ||
![]() |
0a4683d908 | ||
![]() |
4c280b0193 | ||
![]() |
e88a3deafd | ||
![]() |
7de08e08d0 | ||
![]() |
bd172b3300 | ||
![]() |
95c7a13cb5 | ||
![]() |
b1ddf03385 | ||
![]() |
a83c326736 | ||
![]() |
b1acb56247 | ||
![]() |
caa4731a13 | ||
![]() |
5b0ece7a91 | ||
![]() |
a4cd94847e | ||
![]() |
a0a7386b51 | ||
![]() |
535a72000f | ||
![]() |
60531b9cd2 | ||
![]() |
8f86ad696d | ||
![]() |
c9bda98a6a | ||
![]() |
9ea08da133 | ||
![]() |
5762ec0518 | ||
![]() |
7db74460fa | ||
![]() |
c8d64e0a06 | ||
![]() |
1a3dea0de6 | ||
![]() |
17b642280e | ||
![]() |
1c1717b78b | ||
![]() |
4bbbdf8108 | ||
![]() |
04a193309d | ||
![]() |
f106ffa176 | ||
![]() |
8d5d099542 | ||
![]() |
4849992ca9 | ||
![]() |
623105650e | ||
![]() |
5e2c01daa6 | ||
![]() |
58bf3a4d30 | ||
![]() |
2d434c38b9 | ||
![]() |
246f5cd8cf | ||
![]() |
5a174d21f1 | ||
![]() |
e632c653f6 | ||
![]() |
174d17b088 | ||
![]() |
3a35c931e4 | ||
![]() |
b768b26c85 | ||
![]() |
123ce6ebaf | ||
![]() |
276c8db512 | ||
![]() |
f898b8d181 | ||
![]() |
e9f9e531e4 | ||
![]() |
a7d813cb86 | ||
![]() |
75b6eedb12 | ||
![]() |
ec6860aa90 | ||
![]() |
5cf661c6ae | ||
![]() |
8c62caae7c | ||
![]() |
cc6fe21af6 | ||
![]() |
1902151efa | ||
![]() |
b7af1e6289 | ||
![]() |
0c77b320db | ||
![]() |
ee41adc4e9 | ||
![]() |
93462d7505 | ||
![]() |
2f5946640e | ||
![]() |
7cdb7dc308 | ||
![]() |
2f148255f7 | ||
![]() |
cb00b8b335 | ||
![]() |
559b56c8a2 | ||
![]() |
c0038d0373 | ||
![]() |
2820decb5e | ||
![]() |
c64f368e6a | ||
![]() |
b7c8e84f5e | ||
![]() |
5acf6c9158 | ||
![]() |
a8197b0c84 | ||
![]() |
2e03062c24 | ||
![]() |
7fb60a185b | ||
![]() |
0327ea972b | ||
![]() |
561cc77ecc | ||
![]() |
a1ab4acd14 | ||
![]() |
d4939803da | ||
![]() |
730ce3aca9 | ||
![]() |
1893dc6afd | ||
![]() |
6ec39314ee | ||
![]() |
158cea51db | ||
![]() |
33d34f35e9 | ||
![]() |
1f4f40fd7c | ||
![]() |
7c908b247e | ||
![]() |
c87528939b | ||
![]() |
41c822fde1 | ||
![]() |
e56646105d | ||
![]() |
b8a40d93f7 | ||
![]() |
4bfc025248 | ||
![]() |
36f6027b0e | ||
![]() |
e032377e68 | ||
![]() |
929eee4a12 | ||
![]() |
61ce50264a | ||
![]() |
48927b1207 | ||
![]() |
0820893dc6 | ||
![]() |
dd6079cfa6 | ||
![]() |
2a6569742d | ||
![]() |
3d7d75bae4 | ||
![]() |
6da4d0ce5e | ||
![]() |
4994d70b1a | ||
![]() |
c873081dc3 | ||
![]() |
070237f77f | ||
![]() |
eb01b25f35 | ||
![]() |
c0c9cfaf86 | ||
![]() |
304f860eb2 | ||
![]() |
2f18b25593 | ||
![]() |
14c8b6a248 | ||
![]() |
adaa683e58 | ||
![]() |
9b71215cde | ||
![]() |
8be572f976 | ||
![]() |
4f43bcffb9 | ||
![]() |
29e4dc5fb5 | ||
![]() |
0dc95cb13c | ||
![]() |
5ee0a93675 | ||
![]() |
767b3c4a39 | ||
![]() |
bb948a463c | ||
![]() |
e4e9a03d0a | ||
![]() |
50ba386f59 | ||
![]() |
79d0565c2d | ||
![]() |
bcc9b0a7b1 | ||
![]() |
2c8f4940b9 | ||
![]() |
41876cf8fd | ||
![]() |
f6fd0b52f0 | ||
![]() |
843faa7cc6 | ||
![]() |
a8af2c3242 | ||
![]() |
e5bfad974e | ||
![]() |
59d87e0c94 | ||
![]() |
50c2d04503 | ||
![]() |
480de62686 | ||
![]() |
955b501058 | ||
![]() |
d985527624 | ||
![]() |
afbe7f0e69 | ||
![]() |
94e65ddce6 | ||
![]() |
cb9f144255 | ||
![]() |
ac84624faa | ||
![]() |
c2196785e7 | ||
![]() |
30097fbae6 | ||
![]() |
c295dd5c62 | ||
![]() |
373fef2824 | ||
![]() |
cfc255bf2b | ||
![]() |
ea7e58535b | ||
![]() |
ea342a8e4f | ||
![]() |
0b67dd1d05 | ||
![]() |
1519faef81 | ||
![]() |
9fad4a74ed | ||
![]() |
24f023c8b3 | ||
![]() |
3eb46114f8 | ||
![]() |
6a5fd30531 | ||
![]() |
96e83150e5 | ||
![]() |
b2b65c65b9 | ||
![]() |
5b028b4fa3 | ||
![]() |
8f4e1b3409 | ||
![]() |
ff209d0120 | ||
![]() |
ea2fe618b5 | ||
![]() |
3403cdf84b | ||
![]() |
4f9a6f3a7b | ||
![]() |
c8d6d233e5 | ||
![]() |
0cfb65a19a | ||
![]() |
384d917021 | ||
![]() |
f1c8c67789 | ||
![]() |
75e8f4ec6d | ||
![]() |
d1d0323112 | ||
![]() |
ab31dae582 | ||
![]() |
64f176cedb | ||
![]() |
9e921d6621 | ||
![]() |
a4b98f2848 | ||
![]() |
0d190e4a63 | ||
![]() |
13cdb7cc35 | ||
![]() |
ca60c467f3 | ||
![]() |
01abba7d2c | ||
![]() |
80074177fc | ||
![]() |
bf67f8984a | ||
![]() |
b2267c4b6c | ||
![]() |
c80d69a31c | ||
![]() |
1b7c3f0da3 | ||
![]() |
c1ff6e1498 | ||
![]() |
50c04ce71c | ||
![]() |
bc6ff6bc8e | ||
![]() |
93bcf2a7e8 | ||
![]() |
c3b503adff | ||
![]() |
ecdcbdda10 | ||
![]() |
b97c9a5ed0 | ||
![]() |
84a6843a7b | ||
![]() |
17eed7467c | ||
![]() |
310ffc849c | ||
![]() |
3e6756160a | ||
![]() |
563e809a2d | ||
![]() |
86ec3f3bcd | ||
![]() |
7b225cb824 | ||
![]() |
562e0b06df | ||
![]() |
51ce064507 | ||
![]() |
ebaeff9b4d | ||
![]() |
8889e799ca | ||
![]() |
668705e475 | ||
![]() |
e428e909bf | ||
![]() |
d755c751c2 | ||
![]() |
312c547412 | ||
![]() |
48d30f2a3c | ||
![]() |
d8ed30df14 | ||
![]() |
50176cb267 | ||
![]() |
5898d21857 | ||
![]() |
e3839bc0b2 | ||
![]() |
f97555d4a8 | ||
![]() |
79bdca9769 | ||
![]() |
138c2956ac | ||
![]() |
ced457dd94 | ||
![]() |
784fc6c6fa | ||
![]() |
b4e0ec282f | ||
![]() |
cbf7dfabcb | ||
![]() |
b8eb55d965 | ||
![]() |
30662a8110 | ||
![]() |
69a273982f | ||
![]() |
f817e6cb7f | ||
![]() |
eef1b25e9f | ||
![]() |
622de851fe | ||
![]() |
8cecb61d28 | ||
![]() |
77d8d27dfa | ||
![]() |
340f259b17 | ||
![]() |
5cf68a7f06 | ||
![]() |
6a622565ca | ||
![]() |
0ae5abcd0c | ||
![]() |
b6cecb2125 | ||
![]() |
3aa3a9c9a8 | ||
![]() |
2c11ed43e4 | ||
![]() |
23126aeb6d | ||
![]() |
61fd67472b | ||
![]() |
be0bee672e | ||
![]() |
105c073e1f | ||
![]() |
b695e3c646 | ||
![]() |
33840dc5cd | ||
![]() |
255f2f59fc | ||
![]() |
200f3484b6 | ||
![]() |
6a40eb48fe | ||
![]() |
fb3e9ce9f3 | ||
![]() |
91865460a2 | ||
![]() |
644afe541e | ||
![]() |
232303f06a | ||
![]() |
280845610b | ||
![]() |
6108c9d6d2 | ||
![]() |
ce04e995ee | ||
![]() |
d7fca09f0a | ||
![]() |
917b77c8ad | ||
![]() |
a2cd8ec19c | ||
![]() |
6300d39065 | ||
![]() |
2457079724 | ||
![]() |
ba84e723e8 | ||
![]() |
bf75e75d6f | ||
![]() |
c3183a8bd7 | ||
![]() |
7c162fc7ed | ||
![]() |
529c5ac8d7 | ||
![]() |
60e619e45e | ||
![]() |
a89bdcdd3b | ||
![]() |
09fbdf5541 | ||
![]() |
0b517671cb | ||
![]() |
a15dc3ed60 | ||
![]() |
b7d60f4cb5 | ||
![]() |
82a331a940 | ||
![]() |
c31e688f11 | ||
![]() |
0c887027d3 | ||
![]() |
7c7df85d1a | ||
![]() |
a7c025d927 | ||
![]() |
424598b92f | ||
![]() |
dc713c477b | ||
![]() |
7e71edaee2 | ||
![]() |
3f8925cbb0 | ||
![]() |
5f9e24b314 | ||
![]() |
dcd799ad85 | ||
![]() |
ff0d7a4345 | ||
![]() |
d68bad313e | ||
![]() |
bd09917396 | ||
![]() |
eeaa2fe882 | ||
![]() |
32ac0e77fa | ||
![]() |
947a1aa9f5 | ||
![]() |
17a87f80e3 | ||
![]() |
59f4dc8c78 | ||
![]() |
6434a06c08 | ||
![]() |
6133ab509d | ||
![]() |
572a96328a | ||
![]() |
a7ac3bec7f | ||
![]() |
3e78f50a76 | ||
![]() |
a4843e57cb | ||
![]() |
d6d90dda58 | ||
![]() |
c92c5e234c | ||
![]() |
987f06d518 | ||
![]() |
eaf7476785 | ||
![]() |
3b39656280 | ||
![]() |
5c559f921d | ||
![]() |
77f6b3fcb8 | ||
![]() |
f56ed7fd50 | ||
![]() |
a470b579a9 | ||
![]() |
a2eb7d44c0 | ||
![]() |
dfc83a7aea | ||
![]() |
71686e45e3 | ||
![]() |
b0ac35a51b | ||
![]() |
d836320b31 | ||
![]() |
19e7c058c3 | ||
![]() |
f1ae3607e4 | ||
![]() |
d03bfaeb53 | ||
![]() |
33f363cb31 | ||
![]() |
cdb87b6a70 | ||
![]() |
b5497d83a9 | ||
![]() |
802b7c33b6 | ||
![]() |
bb4f81fb84 | ||
![]() |
10a02e98e9 | ||
![]() |
32075ef758 | ||
![]() |
998073ac7f | ||
![]() |
93c7a5bdd2 | ||
![]() |
3fb2ce47e9 | ||
![]() |
61a8217d83 | ||
![]() |
ad5e4341fa | ||
![]() |
5b192795e6 | ||
![]() |
5db9c5d31e | ||
![]() |
ff469a386e | ||
![]() |
3a90cf0e7b | ||
![]() |
07dbad8c70 | ||
![]() |
e8ba919661 | ||
![]() |
390d92b16f | ||
![]() |
d45d56f330 | ||
![]() |
2e7cde3ca5 | ||
![]() |
0594ea0b98 | ||
![]() |
37d09781b4 | ||
![]() |
b0f3a0ea30 | ||
![]() |
8282abf264 | ||
![]() |
4153b58502 | ||
![]() |
b62b940cd4 | ||
![]() |
ca9cf02361 | ||
![]() |
e863ffd949 | ||
![]() |
eb4bb3f238 | ||
![]() |
d3d35bbea1 | ||
![]() |
8eff6d80a2 | ||
![]() |
77c8947ccd | ||
![]() |
48556f6917 | ||
![]() |
2e8dc4234f | ||
![]() |
a6a60b6e71 | ||
![]() |
eba9eaf37a | ||
![]() |
ae31b1c23d | ||
![]() |
535a0532df | ||
![]() |
0579d242f6 | ||
![]() |
b4910ed8f4 | ||
![]() |
2bb1399ae7 | ||
![]() |
062ada96ff | ||
![]() |
bb94238e9c | ||
![]() |
43a40c1f6b | ||
![]() |
639866a9e1 | ||
![]() |
05bbe6b799 | ||
![]() |
e19b1c8bf0 | ||
![]() |
0648d621b5 | ||
![]() |
93c0de9ebb | ||
![]() |
0220b3f3cd | ||
![]() |
1af7f9388d | ||
![]() |
76f0eaebce | ||
![]() |
ae71957236 | ||
![]() |
5004f0280e | ||
![]() |
52967368ff | ||
![]() |
8a63fa42ae | ||
![]() |
05ecb92a88 | ||
![]() |
829619d901 | ||
![]() |
c74b60820b | ||
![]() |
cd741fe7fd | ||
![]() |
3b26cd845a | ||
![]() |
d05cc3cd35 | ||
![]() |
96dff832ba | ||
![]() |
e43339613c | ||
![]() |
e025bc2912 | ||
![]() |
a4be636f9d | ||
![]() |
a2bae6795f | ||
![]() |
28d9bd0c73 | ||
![]() |
8e12c9bef0 | ||
![]() |
88926c3eef | ||
![]() |
8dd774446b | ||
![]() |
46cf112378 | ||
![]() |
5d2520d057 | ||
![]() |
a6ea89162a | ||
![]() |
1039cf661d | ||
![]() |
eaf9f0bbfa | ||
![]() |
9e036176ef | ||
![]() |
31e1edcc72 | ||
![]() |
7d9d8d4a02 | ||
![]() |
71cb43e751 | ||
![]() |
f27e00500e | ||
![]() |
617c0e3813 | ||
![]() |
76634e3eed | ||
![]() |
21c16b26c9 | ||
![]() |
21536fb3ef | ||
![]() |
7c0ee2429d | ||
![]() |
9d6f43cfeb | ||
![]() |
cdcb31cf2f | ||
![]() |
e17f571dba | ||
![]() |
629c48bba0 | ||
![]() |
5078df6caf | ||
![]() |
2c5c4d9714 | ||
![]() |
316cd2c02c | ||
![]() |
e56f08505f | ||
![]() |
58a1f9e275 | ||
![]() |
bfdf54db67 | ||
![]() |
df8598a6f4 | ||
![]() |
4ca9e74249 | ||
![]() |
33caeeaf1d | ||
![]() |
53a8c3ecc8 | ||
![]() |
0ddb7f971d | ||
![]() |
fabe066f94 | ||
![]() |
5672bc0fb2 | ||
![]() |
c77f43e7c7 | ||
![]() |
d47ad34909 | ||
![]() |
96f731e9c9 | ||
![]() |
1b9376a9f5 | ||
![]() |
1425ee0048 | ||
![]() |
3a014b2a13 | ||
![]() |
38c4e6bebc | ||
![]() |
171404bf43 | ||
![]() |
73b1adce1b | ||
![]() |
90f55821e0 | ||
![]() |
fee8009f38 | ||
![]() |
8d698aeacd | ||
![]() |
fbd588444f | ||
![]() |
5735769ee7 | ||
![]() |
150f9190d5 | ||
![]() |
6a1e8a0c22 | ||
![]() |
66fca4a921 | ||
![]() |
9a2accc74b | ||
![]() |
5584b5ec3a | ||
![]() |
3b4121f59a | ||
![]() |
35eb6c2974 | ||
![]() |
e51deac151 | ||
![]() |
c9bb160291 | ||
![]() |
586979644c | ||
![]() |
0d376eaa1d | ||
![]() |
086c3d1a24 | ||
![]() |
91e75561a3 | ||
![]() |
979bf26441 | ||
![]() |
49844ddd9b | ||
![]() |
d095ebb2f3 | ||
![]() |
36f473508a | ||
![]() |
5eb2810352 | ||
![]() |
ee9e3a6673 | ||
![]() |
81a6bd528d | ||
![]() |
0cd32c97c4 | ||
![]() |
9bef55c63e | ||
![]() |
9b8686c25f | ||
![]() |
7130760114 | ||
![]() |
c6390874a2 | ||
![]() |
bf758dcd32 | ||
![]() |
2258ffa5eb | ||
![]() |
20b8e8db8b | ||
![]() |
0738d965fd | ||
![]() |
a3a421410f | ||
![]() |
1921bef0ea | ||
![]() |
70270830dc | ||
![]() |
d57f465e60 | ||
![]() |
03c38e3454 | ||
![]() |
be7d632cba | ||
![]() |
8c0a85abf4 | ||
![]() |
497e8c06f1 | ||
![]() |
c1bf84605c | ||
![]() |
e362f12394 | ||
![]() |
02d201a2f1 | ||
![]() |
48915cc6ad | ||
![]() |
02b065cc2c | ||
![]() |
a255597bc0 | ||
![]() |
29858e8b10 | ||
![]() |
972cfb265b | ||
![]() |
5e8a3afe61 | ||
![]() |
700decb2e0 | ||
![]() |
8368055397 | ||
![]() |
0d0f1f1c0c | ||
![]() |
db68ae5cea | ||
![]() |
0fd7c4aa4f | ||
![]() |
8592e6ef60 | ||
![]() |
e9fb02220a | ||
![]() |
aa54a0cd98 | ||
![]() |
eb724c8753 | ||
![]() |
1bb0caa704 | ||
![]() |
5bf2bc4a7b | ||
![]() |
70fd7ef89d | ||
![]() |
50d8e79571 | ||
![]() |
c236ddd967 | ||
![]() |
b551518911 | ||
![]() |
1be49b06f3 | ||
![]() |
200a9c6318 | ||
![]() |
9f10106d75 | ||
![]() |
6d4ff752a0 | ||
![]() |
29ecae66a9 | ||
![]() |
9c5f50d0a6 | ||
![]() |
8fcc9ac1e2 | ||
![]() |
8d83b3b1e7 | ||
![]() |
155570b6bf | ||
![]() |
831dc35935 | ||
![]() |
b641f1b67c | ||
![]() |
3c4906b8ac | ||
![]() |
a575bc92cc | ||
![]() |
7794e9ccd2 | ||
![]() |
4f5301a7e0 | ||
![]() |
6842936a75 | ||
![]() |
a0bf6599fa | ||
![]() |
c0384949a3 | ||
![]() |
371f4b128e | ||
![]() |
29fc776293 | ||
![]() |
bbdf87190c | ||
![]() |
02a448f284 | ||
![]() |
8665878b04 | ||
![]() |
c23812941b | ||
![]() |
fdac774745 | ||
![]() |
0a38b65ded | ||
![]() |
a7f44c8dd1 | ||
![]() |
2444bd3c2d | ||
![]() |
27f74844cc |
7
.gitignore
vendored
@@ -1,6 +1,13 @@
|
|||||||
*.swp
|
*.swp
|
||||||
/.gradle/
|
/.gradle/
|
||||||
|
|
||||||
/.idea/
|
/.idea/
|
||||||
|
!/.idea/scopes
|
||||||
|
!/.idea/copyright
|
||||||
|
!/.idea/icon.png
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
/out/
|
/out/
|
||||||
/tmp/
|
/tmp/
|
||||||
|
|
||||||
|
*.DS_Store
|
6
.idea/copyright/IdeaVim.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="CopyrightManager">
|
||||||
|
<copyright>
|
||||||
|
<option name="notice" value="IdeaVim - Vim emulator for IDEs based on the IntelliJ platform Copyright (C) 2003-&#36;today.year The IdeaVim authors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>." />
|
||||||
|
<option name="myName" value="IdeaVim" />
|
||||||
|
</copyright>
|
||||||
|
</component>
|
7
.idea/copyright/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="CopyrightManager">
|
||||||
|
<settings>
|
||||||
|
<module2copyright>
|
||||||
|
<element module="Copyright" copyright="IdeaVim" />
|
||||||
|
</module2copyright>
|
||||||
|
</settings>
|
||||||
|
</component>
|
BIN
.idea/icon.png
generated
Normal file
After Width: | Height: | Size: 113 KiB |
3
.idea/scopes/Copyright.xml
generated
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<component name="DependencyValidationManager">
|
||||||
|
<scope name="Copyright" pattern="file[IdeaVIM.main]:com//*||file[IdeaVIM.test]:*/" />
|
||||||
|
</component>
|
60
AUTHORS.md
@@ -263,6 +263,66 @@ Contributors:
|
|||||||
[![icon][github]](https://github.com/jorgengranseth)
|
[![icon][github]](https://github.com/jorgengranseth)
|
||||||
|
|
||||||
Jørgen Granseth
|
Jørgen Granseth
|
||||||
|
* [![icon][mail]](mailto:rafal@hajdacki.com)
|
||||||
|
[![icon][github]](https://github.com/hajdamak)
|
||||||
|
|
||||||
|
Rafał Hajdacki
|
||||||
|
* [![icon][mail]](mailto:igrek+github@fastem.com)
|
||||||
|
[![icon][github]](https://github.com/igrekster)
|
||||||
|
|
||||||
|
igrekster
|
||||||
|
* [![icon][mail]](mailto:lokomot476@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/fan-tom)
|
||||||
|
|
||||||
|
Alexey Gerasimov
|
||||||
|
* [![icon][mail]](mailto:a.grison+github@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/agrison)
|
||||||
|
|
||||||
|
Alexandre Grison
|
||||||
|
* [![icon][mail]](mailto:angel@knight-industries.com)
|
||||||
|
[![icon][github]](https://github.com/angelbot)
|
||||||
|
|
||||||
|
John Weigel
|
||||||
|
* [![icon][mail]](mailto:kevinz@weghst.com)
|
||||||
|
[![icon][github]](https://github.com/kevin70)
|
||||||
|
|
||||||
|
kk
|
||||||
|
* [![icon][mail]](mailto:runforprogram@163.com)
|
||||||
|
[![icon][github]](https://github.com/runforprogram)
|
||||||
|
|
||||||
|
runforprogram
|
||||||
|
* [![icon][mail]](mailto:valery.isaev@jetbrains.com)
|
||||||
|
[![icon][github]](https://github.com/valis)
|
||||||
|
|
||||||
|
valis
|
||||||
|
* [![icon][mail]](mailto:pmikulski@voleon.com)
|
||||||
|
[![icon][github]](https://github.com/pmnoxx)
|
||||||
|
|
||||||
|
Piotr Mikulski
|
||||||
|
* [![icon][mail]](mailto:14farresa@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/adriafarres)
|
||||||
|
|
||||||
|
Adrià Farrés
|
||||||
|
* [![icon][mail]](mailto:patrick.j.elmquist@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/patrick-elmquist)
|
||||||
|
|
||||||
|
Patrick Elmquist
|
||||||
|
* [![icon][mail]](mailto:rieon@rieon.cn)
|
||||||
|
[![icon][github]](https://github.com/rieonke)
|
||||||
|
|
||||||
|
Rieon Ke
|
||||||
|
* [![icon][mail]](mailto:jiirra@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/KostkaBrukowa)
|
||||||
|
|
||||||
|
KostkaBrukowa
|
||||||
|
* [![icon][mail]](mailto:wangyaohuicn@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/yaohui-wyh)
|
||||||
|
|
||||||
|
Yaohui Wang
|
||||||
|
* [![icon][mail]](mailto:iain.ballard@bjss.com)
|
||||||
|
[![icon][github]](https://github.com/i-e-b)
|
||||||
|
|
||||||
|
Iain Ballard
|
||||||
|
|
||||||
If you are a contributor and your name is not listed here, feel free to
|
If you are a contributor and your name is not listed here, feel free to
|
||||||
contact the maintainers.
|
contact the maintainers.
|
||||||
|
194
CHANGES.md
@@ -3,24 +3,196 @@ The Changelog
|
|||||||
|
|
||||||
History of changes in IdeaVim for the IntelliJ platform.
|
History of changes in IdeaVim for the IntelliJ platform.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project DOES NOT adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
Stable versions use X.Y format.
|
||||||
|
EAP versions use X.Y.Z format.
|
||||||
|
|
||||||
|
|
||||||
Get an Early Access
|
Get an Early Access
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Would you like to try new features and fixes? Join the Early Access Program and
|
Would you like to try new features and fixes? Join the Early Access Program and
|
||||||
receive EAP builds as updates! Add this URL to "Settings | Plugins |
|
receive EAP builds as updates! Use the `EAP` option in the status bar or
|
||||||
Browse Repositories | Manage Repositories":
|
add this URL to "Settings | Plugins | Manage Plugin Repositories":
|
||||||
[https://plugins.jetbrains.com/plugins/eap/ideavim](https://plugins.jetbrains.com/plugins/eap/ideavim)
|
`https://plugins.jetbrains.com/plugins/eap/ideavim`
|
||||||
|
|
||||||
It is important to distinguish EAP from traditional pre-release software.
|
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
|
0.60, 2020-10-09
|
||||||
--------------
|
-----------
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
* Support of `virtualedit=onemore` ([VIM-844](https://youtrack.jetbrains.com/issue/VIM-844))
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-2097](https://youtrack.jetbrains.com/issue/VIM-2097) Do not apply mappings for register selecting
|
||||||
|
* [VIM-2080](https://youtrack.jetbrains.com/issue/VIM-2080) Fix S command with count
|
||||||
|
* [VIM-2099](https://youtrack.jetbrains.com/issue/VIM-2099) Fix operations with backward inclusive motions
|
||||||
|
* [VIM-2104](https://youtrack.jetbrains.com/issue/VIM-2104) Use `sidescrolloff` for horizontal offset
|
||||||
|
* [VIM-1080](https://youtrack.jetbrains.com/issue/VIM-1080) Fix `zt` for virtual space enabled
|
||||||
|
* [VIM-1556](https://youtrack.jetbrains.com/issue/VIM-1556) Fix horizontal scrolling
|
||||||
|
* [VIM-1770](https://youtrack.jetbrains.com/issue/VIM-1770) Fix goto end with large inline hints
|
||||||
|
* [VIM-2110](https://youtrack.jetbrains.com/issue/VIM-2110) Fix scrolling for non-monospaced fonts
|
||||||
|
|
||||||
|
**Changes:**
|
||||||
|
* `:w` works as `:wa` by default. This can be disabled with `ideawrite` option.
|
||||||
|
|
||||||
|
Now features like `Prettier on save` or `Run on save for files` would work with `:w` command as well.
|
||||||
|
|
||||||
|
See [VIM-1968](https://youtrack.jetbrains.com/issue/VIM-1968).
|
||||||
|
|
||||||
|
**Merged PRs:**
|
||||||
|
* [248](https://github.com/JetBrains/ideavim/pull/248) by [Yaohui Wang](https://github.com/yaohui-wyh): Check if project is disposed when editorDeinit
|
||||||
|
* [242](https://github.com/JetBrains/ideavim/pull/242) by [Iain Ballard](https://github.com/i-e-b): Partial implementation of virtualedit config
|
||||||
|
* [252](https://github.com/JetBrains/ideavim/pull/252) by [Matt Ellis](https://github.com/citizenmatt): Fixes for scrolling
|
||||||
|
|
||||||
|
0.59, 2020-08-25
|
||||||
|
------------
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* `vim-highlightedyank` plugin emulation ([VIM-1970](https://youtrack.jetbrains.com/issue/VIM-1970) | [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)).
|
||||||
|
|
||||||
|
* <details>
|
||||||
|
<summary><strong>Click to see details</strong></summary>
|
||||||
|
<img src="resources/changes/0.59/highlight_yank.gif" alt="highlight yank"/>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
* [VIM-2068](https://youtrack.jetbrains.com/issue/VIM-2068) `:tabclose` command
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-1421](https://youtrack.jetbrains.com/issue/VIM-1421) Escape key finishes `t` and `f` motions
|
||||||
|
* [VIM-2075](https://youtrack.jetbrains.com/issue/VIM-2075) Fix zR command
|
||||||
|
* [VIM-2059](https://youtrack.jetbrains.com/issue/VIM-2059) Fixed macro editing
|
||||||
|
|
||||||
|
**Merged PRs:**
|
||||||
|
* [237](https://github.com/JetBrains/ideavim/pull/237) by [Adrià Farrés](https://github.com/adriafarres): Reset operator-pending commands on escape
|
||||||
|
* [241](https://github.com/JetBrains/ideavim/pull/241) by [Patrick Elmquist](https://github.com/patrick-elmquist): Properly reset when pressing Esc in the middle of command
|
||||||
|
* [244](https://github.com/JetBrains/ideavim/pull/244) by [Rieon Ke](https://github.com/rieonke): Implement tabc[lose] ex command
|
||||||
|
* [240](https://github.com/JetBrains/ideavim/pull/240) by [Rieon Ke](https://github.com/rieonke): add support for putting & editing macros
|
||||||
|
* [245](https://github.com/JetBrains/ideavim/pull/245) by [KostkaBrukowa](https://github.com/KostkaBrukowa): VIM-1970 | Working solution of plugin vim-highlightedyank
|
||||||
|
|
||||||
|
0.58, 2020-07-07
|
||||||
|
-------------
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* `exchange` plugin emulation ([VIM-921](https://youtrack.jetbrains.com/issue/VIM-921) | [vim-exchange](https://github.com/tommcdo/vim-exchange)).
|
||||||
|
* `~/.ideavimrc` file can be reloaded using the new floating action.
|
||||||
|
|
||||||
|
* <details>
|
||||||
|
<summary><strong>Click to see details</strong></summary>
|
||||||
|
<img src="resources/changes/0.58/reload_ideavimrc.png" alt="IdeaVimRc reload"/>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
* Add `:buffer` command.
|
||||||
|
|
||||||
|
**Changes:**
|
||||||
|
* Support IntelliJ's smooth scrolling. Use "Enable smooth scrolling" checkbox in _Preferences | Editor | General_ to disable.
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-1994](https://youtrack.jetbrains.com/issue/VIM-1994) Correct paste after `y}P` command.
|
||||||
|
* [VIM-1924](https://youtrack.jetbrains.com/issue/VIM-1924) Select next occurrence doesn't become block selection.
|
||||||
|
* [VIM-2038](https://youtrack.jetbrains.com/issue/VIM-2038) Last line is now accessible in normal mode
|
||||||
|
* [VIM-1934](https://youtrack.jetbrains.com/issue/VIM-1934) Line number is not clipped for relative line numbers
|
||||||
|
* [VIM-1852](https://youtrack.jetbrains.com/issue/VIM-1852) Line number doesn't flickers for relative line numbers
|
||||||
|
* [VIM-2021](https://youtrack.jetbrains.com/issue/VIM-2021) Line numbers don't reactivating
|
||||||
|
* Fix mappings to `"\<SPACE>"` including `let mapleader="\<SPACE>"`
|
||||||
|
|
||||||
|
|
||||||
|
**Merged PRs:**
|
||||||
|
* [233](https://github.com/JetBrains/ideavim/pull/233) by [valis](https://github.com/valis): [VIM-1994] Correct paste after `y}P` command.
|
||||||
|
* [224](https://github.com/JetBrains/ideavim/pull/224) by [pmnoxx](https://github.com/pmnoxx): Populate intelij navigation history together with ideavim jumplist.
|
||||||
|
* [227](https://github.com/JetBrains/ideavim/pull/227) by [angelbot](https://github.com/angelbot): Add support for buffer command.
|
||||||
|
* [230](https://github.com/JetBrains/ideavim/pull/230) by [fan-tom](https://github.com/fan-tom): VIM-1924.
|
||||||
|
* [231](https://github.com/JetBrains/ideavim/pull/231) by [citizenmatt](https://github.com/citizenmatt): Support smooth scrolling.
|
||||||
|
* [239](https://github.com/JetBrains/ideavim/pull/239) by [citizenmatt](https://github.com/citizenmatt): Use new API for relative line numbers
|
||||||
|
|
||||||
|
0.57, 2020-04-28
|
||||||
|
-------------
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-1992](https://youtrack.jetbrains.com/issue/VIM-1992) Fix mappings to `<S-Letter>`
|
||||||
|
* [VIM-1991](https://youtrack.jetbrains.com/issue/VIM-1991) Fix working with number registers
|
||||||
|
|
||||||
|
**Merged PRs:**
|
||||||
|
* [234](https://github.com/JetBrains/ideavim/pull/234) by [runforprogram](https://github.com/runforprogram): [VIM-1991] fix >0 number register not work
|
||||||
|
|
||||||
|
0.56, 2020-04-09
|
||||||
|
--------------
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* `ReplaceWithRegister` plugin emulation ([ReplaceWithRegister](https://www.vim.org/scripts/script.php?script_id=2703)).
|
||||||
|
* `argtextobj.vim` plugin emulation ([argtextobj.vim](https://vim.sourceforge.io/scripts/script.php?script_id=2699)).
|
||||||
|
* `vim-textobj-entire` plugin emulation ([vim-textobj-entire](https://github.com/kana/vim-textobj-entire)).
|
||||||
|
* [VIM-434](https://youtrack.jetbrains.com/issue/VIM-434) Add `'showcmd'` support, on by default.
|
||||||
|
* Support `ls/buffers/files` commands.
|
||||||
|
|
||||||
|
**Changes:**
|
||||||
|
* Replace `ideastatusbar` option with `ideastatusicon`. Now you can make the icon gray.
|
||||||
|
|
||||||
|
**Deprecations:**
|
||||||
|
* `ideastatusbar` option is deprecated now. See `ideastatusicon`.
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-1284](https://youtrack.jetbrains.com/issue/VIM-1284) Fix mapping of digits.
|
||||||
|
* Fix handling of counts on both operator and motion, e.g. `3d2w` deletes 6 words, instead of 32.
|
||||||
|
* Allow mapping of `<C-K>` and `<C-V>`/`<C-Q>`.
|
||||||
|
* [VIM-1899](https://youtrack.jetbrains.com/issue/VIM-1899) Add argument to `:registers` command.
|
||||||
|
* [VIM-1835](https://youtrack.jetbrains.com/issue/VIM-1835) Macros record input keystrokes instead of mapped keystrokes.
|
||||||
|
* [VIM-1900](https://youtrack.jetbrains.com/issue/VIM-1900) Ensure non-printable output for `:registers`, `:marks` and `:jumps` is encoded correctly.
|
||||||
|
* [VIM-570](https://youtrack.jetbrains.com/issue/VIM-570) Print non-ascii characters in ex panel.
|
||||||
|
* [VIM-926](https://youtrack.jetbrains.com/issue/VIM-926) Fix `<S-Space>` mapping.
|
||||||
|
* [VIM-1958](https://youtrack.jetbrains.com/issue/VIM-1958) Fix `X` command for linewise selection.
|
||||||
|
* [VIM-1911](https://youtrack.jetbrains.com/issue/VIM-1911) Lookup keys respect `IDE` handler.
|
||||||
|
* [VIM-1008](https://youtrack.jetbrains.com/issue/VIM-1008) Correct `ci{` behavior.
|
||||||
|
|
||||||
|
0.55, 2020-01-20
|
||||||
|
--------------
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* Surround and Commentary extensions support repeating with a dot command ([VIM-1118](https://youtrack.jetbrains.com/issue/VIM-1118))
|
||||||
|
* Support XDG settings standard ([VIM-664](https://youtrack.jetbrains.com/issue/VIM-664))
|
||||||
|
* Add option to remove the status bar icon ([VIM-1847](https://youtrack.jetbrains.com/issue/VIM-1847))
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
* [VIM-1823](https://youtrack.jetbrains.com/issue/VIM-1823) Fix multiple carets with ignorecase
|
||||||
|
* [VIM-1053](https://youtrack.jetbrains.com/issue/VIM-1053)
|
||||||
|
[VIM-1038](https://youtrack.jetbrains.com/issue/VIM-1038)
|
||||||
|
Implement gq+motion. Support some double `g` commands (`guu`, `gUU`, `g~~`).
|
||||||
|
* [VIM-1325](https://youtrack.jetbrains.com/issue/VIM-1325)
|
||||||
|
[VIM-1050](https://youtrack.jetbrains.com/issue/VIM-1050)
|
||||||
|
[VIM-1627](https://youtrack.jetbrains.com/issue/VIM-1627)
|
||||||
|
[VIM-1867](https://youtrack.jetbrains.com/issue/VIM-1867)
|
||||||
|
Fix bindings for active lookup
|
||||||
|
* [VIM-1845](https://youtrack.jetbrains.com/issue/VIM-1845) Show ActionGroup popups
|
||||||
|
* [VIM-1424](https://youtrack.jetbrains.com/issue/VIM-1424) CTRL-A doesn't have any restrictions now
|
||||||
|
* [VIM-1454](https://youtrack.jetbrains.com/issue/VIM-1454) Fix CTRL-W with the autocompletion lookup
|
||||||
|
* [VIM-1855](https://youtrack.jetbrains.com/issue/VIM-1855) Fix initialization error
|
||||||
|
* [VIM-1853](https://youtrack.jetbrains.com/issue/VIM-1853) Fix marks for disposed projects
|
||||||
|
* [VIM-1858](https://youtrack.jetbrains.com/issue/VIM-1858) Fix imap for autocomplete
|
||||||
|
* [VIM-1362](https://youtrack.jetbrains.com/issue/VIM-1362) Search with confirm doesn't scroll down far enough
|
||||||
|
* [VIM-1875](https://youtrack.jetbrains.com/issue/VIM-1875) Fix `isk` in `~/.ideaivmrc`
|
||||||
|
* [VIM-1874](https://youtrack.jetbrains.com/issue/VIM-1874) Fix `set clipboard=unnamed` execution from `~/.ideavimrc`
|
||||||
|
* [VIM-1878](https://youtrack.jetbrains.com/issue/VIM-1878) Fix `c` command after extract method action
|
||||||
|
* [VIM-1884](https://youtrack.jetbrains.com/issue/VIM-1884) Show quickDoc during popup with `CTRL-J`
|
||||||
|
* [VIM-987](https://youtrack.jetbrains.com/issue/VIM-987) Fix arrow keys for the NEO keyboard
|
||||||
|
|
||||||
|
0.54, 2019-11-20
|
||||||
|
--------------
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* EasyMotion plugin emulation ([VIM-820](https://youtrack.jetbrains.com/issue/VIM-820) | [Instructions](https://github.com/JetBrains/ideavim#emulated-vim-plugins))
|
||||||
* Support surrounding with a function name ([link](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L138))
|
* Support surrounding with a function name ([link](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L138))
|
||||||
* [VIM-1720](https://youtrack.jetbrains.com/issue/VIM-1720) Add `:delmarks` command
|
* Add `:delmarks` command ([VIM-1720](https://youtrack.jetbrains.com/issue/VIM-1720))
|
||||||
|
* Add IdeaVim icon to the status bar ([VIM-943](https://youtrack.jetbrains.com/issue/VIM-943))
|
||||||
|
|
||||||
|
**Changes:**
|
||||||
|
* Remove the default IdeaVim toggle shortcut (<kbd>CTRL</kbd><kbd>ALT</kbd><kbd>V</kbd>)
|
||||||
|
* Rename `refactoring` value of `selectmode` option to `ideaselection`
|
||||||
|
* Remove `template` value of `selectmode` option and replace it with `idearefactormode` option.
|
||||||
|
|
||||||
**Fixes:**
|
**Fixes:**
|
||||||
* [VIM-1766](https://youtrack.jetbrains.com/issue/VIM-1766) Fix disappearing caret in ex entry on Linux
|
* [VIM-1766](https://youtrack.jetbrains.com/issue/VIM-1766) Fix disappearing caret in ex entry on Linux
|
||||||
@@ -38,6 +210,16 @@ To be released
|
|||||||
* [VIM-1772](https://youtrack.jetbrains.com/issue/VIM-1772) Fix yanking with `:y` command
|
* [VIM-1772](https://youtrack.jetbrains.com/issue/VIM-1772) Fix yanking with `:y` command
|
||||||
* [VIM-1685](https://youtrack.jetbrains.com/issue/VIM-1685) Fix `ESC` for insert mode
|
* [VIM-1685](https://youtrack.jetbrains.com/issue/VIM-1685) Fix `ESC` for insert mode
|
||||||
* [VIM-1752](https://youtrack.jetbrains.com/issue/VIM-1752) Fix `ESC` for insert mode
|
* [VIM-1752](https://youtrack.jetbrains.com/issue/VIM-1752) Fix `ESC` for insert mode
|
||||||
|
* [VIM-1189](https://youtrack.jetbrains.com/issue/VIM-1189)
|
||||||
|
[VIM-927](https://youtrack.jetbrains.com/issue/VIM-927)
|
||||||
|
Fix mappings to black hole register
|
||||||
|
* [VIM-1804](https://youtrack.jetbrains.com/issue/VIM-1804) Exit insert move after toggling IdeaVim
|
||||||
|
* [VIM-1749](https://youtrack.jetbrains.com/issue/VIM-1749) Tag surround is finished on `>`
|
||||||
|
* [VIM-1801](https://youtrack.jetbrains.com/issue/VIM-1801) Fix j/k motions with inline hints
|
||||||
|
* [VIM-1800](https://youtrack.jetbrains.com/issue/VIM-1800) Improve ideamarks option
|
||||||
|
* [VIM-1819](https://youtrack.jetbrains.com/issue/VIM-1819) Fix execution of some rider actions
|
||||||
|
* [VIM-1604](https://youtrack.jetbrains.com/issue/VIM-1604) Add IdeaVim logo
|
||||||
|
|
||||||
|
|
||||||
0.53, 2019-08-07
|
0.53, 2019-08-07
|
||||||
--------------
|
--------------
|
||||||
|
182
CONTRIBUTING.md
@@ -1,106 +1,140 @@
|
|||||||
<div>
|
[![TeamCity Build][teamcity-build-status-svg]][teamcity-build-status]
|
||||||
<a href="https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJ20183&guest=1">
|
|
||||||
<img src="https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJ20183)/statusIcon.svg?guest=1"/>
|
|
||||||
</a>
|
|
||||||
<span>2018.3 Tests</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a href="https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJ20191&guest=1">
|
|
||||||
<img src="https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJ20191)/statusIcon.svg?guest=1"/>
|
|
||||||
</a>
|
|
||||||
<span>2019.1 Tests</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
IdeaVim is an open source project created by 60+ contributors. Would you like to make it even better? That’s wonderful!
|
||||||
|
|
||||||
### Where to Start
|
This page is created to help you start contributing. And who knows, maybe in a few days this project will be brighter than ever!
|
||||||
|
|
||||||
In order to contribute to IdeaVim, you should have some understanding of Java or [Kotlin](https://kotlinlang.org/).
|
## Before you begin
|
||||||
|
|
||||||
See also these docs on the IntelliJ API:
|
- The project is written in Kotlin and Java. Choose whichever language you feel more comfortable with,
|
||||||
|
or maybe one that you’d like to get to know better (why not start [learning Kotlin](https://kotlinlang.org/docs/tutorials/) right now?).
|
||||||
|
|
||||||
* [IntelliJ architectural overview](https://www.jetbrains.org/intellij/sdk/docs/platform/fundamentals.html)
|
- If you come across some IntelliJ Platform code, these links may prove helpful:
|
||||||
* [IntelliJ plugin development resources](https://www.jetbrains.org/intellij/sdk/docs/welcome.html)
|
|
||||||
|
|
||||||
You can start by:
|
* [IntelliJ architectural overview](https://www.jetbrains.org/intellij/sdk/docs/platform/fundamentals.html)
|
||||||
|
* [IntelliJ plugin development resources](https://www.jetbrains.org/intellij/sdk/docs/welcome.html)
|
||||||
|
|
||||||
- Picking relatively simple tasks that are tagged with
|
- Having any difficulties?
|
||||||
|
Join the brand new
|
||||||
|
[](https://gitter.im/JetBrains/ideavim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
for IdeaVim developers and contributors!
|
||||||
|
|
||||||
|
OK, ready to do some coding?
|
||||||
|
|
||||||
|
## Yes, I'm ready for some coding
|
||||||
|
|
||||||
|
* Fork the repository and clone it to the local machine.
|
||||||
|
* Open the project with IntelliJ IDEA.
|
||||||
|
|
||||||
|
Yoo hoo! You’re all set to begin contributing. Here are some useful gradle commands:
|
||||||
|
|
||||||
|
* `./gradlew runIde` — start the dev version of IntelliJ IDEA with IdeaVim installed.
|
||||||
|
* `./gradlew test` — run tests.
|
||||||
|
* `./gradlew buildPlugin` — build the plugin. The result will be located in `build/distributions`. This file can be
|
||||||
|
installed by using `Settings | Plugin | >Gear Icon< | Install Plugin from Disk...`. You can stay with your personal build
|
||||||
|
for a few days or send it to a friend for testing.
|
||||||
|
|
||||||
|
## Warmup
|
||||||
|
|
||||||
|
- Pick a few relatively simple tasks that are tagged with
|
||||||
[#patch_welcome](https://youtrack.jetbrains.com/issues/VIM?q=%23patch_welcome%20%23Unresolved%20sort%20by:%20votes%20)
|
[#patch_welcome](https://youtrack.jetbrains.com/issues/VIM?q=%23patch_welcome%20%23Unresolved%20sort%20by:%20votes%20)
|
||||||
in the issue tracker.
|
in the issue tracker.
|
||||||
- Read about the `@VimBehaviorDiffers` annotation and fix the corresponding functionality.
|
- Read the javadoc for the `@VimBehaviorDiffers` annotation in the source code and fix the corresponding functionality.
|
||||||
|
- Implement one of the requested [#vim plugin](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved%20tag:%20%7Bvim%20plugin%7D%20sort%20by:%20votes%20)s.
|
||||||
|
|
||||||
|
> :small_orange_diamond: Selected an issue to work on? Leave a comment in a YouTrack ticket or create a draft PR
|
||||||
|
> to indicate that you've started working on it so that you might get additional guidance and feedback from the maintainers.
|
||||||
|
|
||||||
|
## Where to start in the codebase
|
||||||
|
|
||||||
|
If you are looking for:
|
||||||
|
|
||||||
|
- Vim commands (`w`, `<C-O>`, `p`, etc.):
|
||||||
|
- Any particular command: `package-info.java`.
|
||||||
|
- How commands are executed in common: `EditorActionHandlerBase`.
|
||||||
|
- Key mapping: `KeyHandler.handleKey()`.
|
||||||
|
|
||||||
|
- Ex commands (`:set`, `:s`, `:nohlsearch`):
|
||||||
|
- Any particular ex command: package `com.maddyhome.idea.vim.ex.handler`.
|
||||||
|
- Ex command executor: `CommandHandler`.
|
||||||
|
|
||||||
|
- Extensions:
|
||||||
|
- Extensions handler: `VimExtensionHandler`.
|
||||||
|
- Available extensions: package `com/maddyhome/idea/vim/extension`.
|
||||||
|
|
||||||
|
- Common features:
|
||||||
|
- State machine. How every particular keystroke is parsed in IdeaVim: `KeyHandler.handleKey()`.
|
||||||
|
- Options (`incsearch`, `iskeyword`, `relativenumber`): `OptionsManager`.
|
||||||
|
- Plugin startup: `PluginStartup`.
|
||||||
|
- Notifications: `NotificationService`.
|
||||||
|
- Status bar icon: `StatusBar.kt`.
|
||||||
|
- On/off switch: `VimPlugin.setEnabled()`.
|
||||||
|
|
||||||
|
|
||||||
### Development Environment
|
## Testing
|
||||||
|
|
||||||
1. Fork IdeaVim on GitHub and clone the repository on your local machine.
|
Here are some guides for testing:
|
||||||
|
|
||||||
2. Import the project from the existing sources in IntelliJ IDEA 2018.1 or newer (Community or
|
1. Read the javadoc for the `@VimBehaviorDiffers` annotation in the source code.
|
||||||
Ultimate), by selecting "File | New | Project from Existing Sources..." or selecting "Import
|
|
||||||
Project" from the Welcome screen.
|
|
||||||
|
|
||||||
* In the project wizard, select "Import project from external model | Gradle".
|
2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd", "123 123 123 123", etc. Try to choose an example
|
||||||
|
text that is easy to read and understand what is wrong if the test fails. For example, take a few lines from your
|
||||||
|
favorite poem, or use Vladimir Nabokov’s “A Discovery" if you don't have one.
|
||||||
|
|
||||||
* Select your Java 8+ JDK as the Gradle JVM; leave other parameters unchanged.
|
3. Don't forget to test your functionality with line start, line end, file start, file end, empty line, multiple
|
||||||
|
carets, dollar motion, etc.
|
||||||
|
|
||||||
3. Run your IdeaVim plugin within IntelliJ via a Gradle task:
|
##### Neovim
|
||||||
|
IdeaVim has an experimental integration with neovim in tests. Tests that are performed with `doTest` also executed in
|
||||||
|
neovim instance, and the state of IdeaVim is asserted to be the same as the state of neovim.
|
||||||
|
- Only tests that use `doTest` are checked with neovim.
|
||||||
|
- Tests with `@VimBehaviorDiffers` or `@TestWithoutNeovim` annotations don't use neovim.
|
||||||
|
|
||||||
* Select the "View | Tool Windows | Gradle" tool window.
|
#### Property-based tests
|
||||||
|
Property-based tests are located under `propertybased` package. These tests a flaky by nature
|
||||||
|
although in most cases they are stable. If the test fails on your TeamCity run, try to check the test output and understand
|
||||||
|
if the fail is caused by your changes. If it's not, just ignore the test.
|
||||||
|
|
||||||
* Launch "ideavim | intellij | runIde" from the tool window.
|
|
||||||
|
|
||||||
4. Run IdeaVim tests via a Gradle task:
|
## A common direction
|
||||||
|
|
||||||
* Select the "View | Tool Windows | Gradle" tool window.
|
We’re trying to make IdeaVim close to the original Vim both in terms of functionality and architecture.
|
||||||
|
|
||||||
* Launch "ideavim | verification | test" from the tool window.
|
- Vim motions can be [either inclusive, exclusive, or linewise](http://vimdoc.sourceforge.net/htmldoc/motion.html#inclusive).
|
||||||
|
In IdeaVim, you can use `MotionType` for that.
|
||||||
|
- Have you read the [interesting things](https://github.com/JetBrains/ideavim#some-facts-about-vim) about IdeaVim?
|
||||||
|
Do you remember how `dd`, `yy`, and other similar commands work? `DuplicableOperatorAction` will help you with that.
|
||||||
|
And we also translate it to `d_` and `y_`: `KeyHandler.mapOpCommand()`.
|
||||||
|
- All IdeaVim extensions use the same command names as the originals (e.g. `<Plug>(CommentMotion)`, `<Plug>ReplaceWithRegisterLine`),
|
||||||
|
so you can reuse your `.vimrc` settings.
|
||||||
|
We also support proper command mappings (functions are mapped to `<Plug>...`), the operator function (`OperatorFunction`), and so on.
|
||||||
|
- Magic is supported as well. See `Magic`.
|
||||||
|
|
||||||
5. Build the plugin distribution by running `./gradlew clean buildPlugin` in the
|
-----
|
||||||
terminal in your project root.
|
|
||||||
|
|
||||||
* The resulting distribution file will be located at build/distributions/IdeaVim-VERSION.zip
|
### I read the whole page but something is still unclear.
|
||||||
|
|
||||||
* You can install this file by selecting "Settings | Plugins | Install plugin
|
Oh no! No cookies for the maintainers today! Please [tell us](https://github.com/JetBrains/ideavim#contact-maintainers) about it so we can help.
|
||||||
from disk...".
|
|
||||||
|
|
||||||
### Copyright
|
|
||||||
|
|
||||||
1. Go to `Preferences | Appearance & Behavior | Scopes`, press "+" button, `Shared`.
|
### I’ve found a bug in this documentation.
|
||||||
Name: Copyright scope
|
|
||||||
Pattern: `file[IdeaVIM.main]:com//*||file[IdeaVIM.test]:*/`
|
|
||||||
|
|
||||||
2. Go to `Preferences | Editor | Copyright | Copyright Profiles` and click the "+" button.
|
No beer in the bar for us unless it's fixed. [Let us know](https://github.com/JetBrains/ideavim#contact-maintainers) situation so we might be able to fix it.
|
||||||
Name: IdeaVim
|
|
||||||
Text:
|
|
||||||
|
|
||||||
IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
Copyright (C) 2003-$today.year The IdeaVim authors
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
### The lack of documentation or a javadoc/ktdoc makes it difficult to start contributing.
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This is just terrible. [You know what to do](https://github.com/JetBrains/ideavim#contact-maintainers).
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
### Resources:
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
3. Go to `Preferences | Editor | Copyright`, click the "+" button.
|
* [Continuous integration builds](https://teamcity.jetbrains.com/project.html?projectId=IdeaVim&guest=1)
|
||||||
Scope: Copyright scope
|
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
||||||
Copyright: IdeaVim
|
* [Chat on gitter](https://gitter.im/JetBrains/ideavim)
|
||||||
|
* [Unofficial discord server](https://jb.gg/bi6zp7)
|
||||||
|
* [Plugin homepage](https://plugins.jetbrains.com/plugin/164-ideavim)
|
||||||
|
* [Changelog](CHANGES.md)
|
||||||
|
* [Contributors listing](AUTHORS.md)
|
||||||
|
|
||||||
### Testing
|
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJ20201&guest=1
|
||||||
|
[teamcity-build-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJ20201)/statusIcon.svg?guest=1
|
||||||
1. Read about the `@VimBehaviorDiffers` annotation.
|
|
||||||
|
|
||||||
2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd",
|
|
||||||
"123 123 123 123", etc. Try to choose an example text that is easy to
|
|
||||||
read and understand what is wrong if the test fails.
|
|
||||||
For example, take a few lines from your favorite poem, or use
|
|
||||||
"Vladimir Nabokov – A Discovery" if you don't have one.
|
|
||||||
|
|
||||||
3. Test your functionality properly.
|
|
||||||
Especially check whether your command works with:
|
|
||||||
line start, line end, file start, file end, empty line, multiple carets, dollar motion, etc.
|
|
||||||
|
313
README.md
@@ -1,57 +1,49 @@
|
|||||||
|
<img src="resources/META-INF/pluginIcon.svg" width="80" height="80" alt="icon" align="left"/>
|
||||||
|
|
||||||
IdeaVim
|
IdeaVim
|
||||||
=======
|
===
|
||||||
|
|
||||||
<div>
|
|
||||||
<a href="https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub">
|
|
||||||
<img src="https://jb.gg/badges/official.svg" alt="official JetBrains project"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<a href="https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_Deploy&guest=1">
|
|
||||||
<img src="https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_Deploy)/statusIcon.svg?guest=1"/>
|
|
||||||
</a>
|
|
||||||
<span>Stable</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<a href="https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_Build&guest=1">
|
|
||||||
<img src="https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_Build)/statusIcon.svg?guest=1"/>
|
|
||||||
</a>
|
|
||||||
<span>EAP</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
[![Official JetBrains Project][jb-official-svg]][jb-official]
|
||||||
|
[![Contributions welcome][contributions-welcome-svg]][contributions-welcome]
|
||||||
|
[![Downloads][plugin-downloads-svg]][plugin-repo]
|
||||||
|
[![Rating][plugin-rating-svg]][plugin-repo]
|
||||||
|
[![Version][plugin-version-svg]][plugin-repo]
|
||||||
|
[![Gitter][gitter-svg]][gitter]
|
||||||
|
[![Twitter][twitter-svg]][twitter]
|
||||||
|
|
||||||
IdeaVim is a Vim emulation plugin for IDEs based on the IntelliJ Platform.
|
IdeaVim is a Vim emulation plugin for IDEs based on the IntelliJ Platform.
|
||||||
IdeaVim can be used with IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm,
|
|
||||||
RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive, and Android Studio.
|
|
||||||
|
|
||||||
Resources:
|
##### Contact maintainers:
|
||||||
|
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
||||||
|
* [@IdeaVim](https://twitter.com/ideavim) on Twitter
|
||||||
|
* [Chat on gitter](https://gitter.im/JetBrains/ideavim)
|
||||||
|
* [Unofficial discord server](https://jb.gg/bi6zp7)
|
||||||
|
|
||||||
|
##### Resources:
|
||||||
|
|
||||||
* [Plugin homepage](https://plugins.jetbrains.com/plugin/164-ideavim)
|
* [Plugin homepage](https://plugins.jetbrains.com/plugin/164-ideavim)
|
||||||
* [Changelog](CHANGES.md)
|
* [Changelog](CHANGES.md)
|
||||||
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
|
||||||
* [Continuous integration builds](https://teamcity.jetbrains.com/project.html?projectId=IdeaVim&guest=1)
|
* [Continuous integration builds](https://teamcity.jetbrains.com/project.html?projectId=IdeaVim&guest=1)
|
||||||
* [@IdeaVim](https://twitter.com/ideavim) in Twitter
|
|
||||||
|
|
||||||
|
#### Compatibility
|
||||||
|
|
||||||
Installation
|
IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm, RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive,
|
||||||
|
Android Studio and other IntelliJ platform based IDEs.
|
||||||
|
|
||||||
|
Setup
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Use the IDE's plugin manager to install the latest version of the plugin.
|
- IdeaVim can be installed via `Settings | Plugins`.
|
||||||
Start the IDE normally and enable the Vim emulation using "Tools | Vim
|
See the [detailed instructions](https://www.jetbrains.com/help/idea/managing-plugins.html#).
|
||||||
Emulator" menu item. At this point you must use Vim keystrokes in all editors.
|
|
||||||
|
|
||||||
If you wish to disable the plugin, select the "Tools | Vim Emulator" menu so
|
- Use `Tools | Vim Emulator` to enable or disable emulation.
|
||||||
it is unchecked. At this point your IDE will work with its regular keyboard
|
|
||||||
shortcuts.
|
|
||||||
|
|
||||||
Keyboard shortcut conflicts between the Vim emulation and the IDE can be
|
- Use the `~/.ideavimrc` file as an analog of `~/.vimrc` ([learn more](#Files)). The XDG standard is supported, as well.
|
||||||
resolved via "File | Settings | Editor | Vim Emulation", "File | Settings |
|
|
||||||
Keymap" on Linux & Windows, and via "Preferences | Editor | Vim Emulation",
|
|
||||||
"Preferences | Keymap" on macOS. They can also be resolved by key-mapping
|
|
||||||
commands in your ~/.ideavimrc file.
|
|
||||||
|
|
||||||
|
- Shortcut conflicts can be resolved by using:
|
||||||
|
- On Linux & Windows: `File | Settings | Editor | Vim Emulation` & `File | Settings | Keymap`,
|
||||||
|
- On macOS: `Preferences | Editor | Vim Emulation` & `Preferences | Keymap`,
|
||||||
|
- Regular Vim mappings in the `~/.ideavimrc` file.
|
||||||
|
|
||||||
Get Early Access
|
Get Early Access
|
||||||
-------------------
|
-------------------
|
||||||
@@ -59,11 +51,17 @@ Get Early Access
|
|||||||
Would you like to try new features and fixes? Join the Early Access Program and
|
Would you like to try new features and fixes? Join the Early Access Program and
|
||||||
receive EAP builds as updates!
|
receive EAP builds as updates!
|
||||||
|
|
||||||
|
1. Click the IdeaVim icon <img src="resources/META-INF/pluginIcon_noBorders.svg" width="16" height="16" alt="icon"/>
|
||||||
|
in the status bar | `EAP` | `Get Early Access...`
|
||||||
|
|
||||||
|
|
||||||
|
Or subscribe to EAP updates manually:
|
||||||
|
|
||||||
1. Open `Settings | Plugins`
|
1. Open `Settings | Plugins`
|
||||||
2. Click the gear icon :gear:, select `Manage Plugin Repositories`, and add the following url:
|
2. Click the gear icon :gear:, select `Manage Plugin Repositories`, and add the following url:
|
||||||
`https://plugins.jetbrains.com/plugins/eap/ideavim`
|
`https://plugins.jetbrains.com/plugins/eap/ideavim`
|
||||||
|
|
||||||
See [the changelog](CHANGES.md) for the list of hot unreleased features.
|
See [the changelog](CHANGES.md) for the list of unreleased features.
|
||||||
|
|
||||||
It is important to distinguish EAP builds from traditional pre-release software.
|
It is important to distinguish EAP builds 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
|
||||||
@@ -77,92 +75,140 @@ You can always leave your feedback with:
|
|||||||
Summary of Supported Vim Features
|
Summary of Supported Vim Features
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
Supported:
|
Here are some examples of supported vim features and commands:
|
||||||
|
|
||||||
* Motion keys
|
* Normal / insert / visual / select / etc. modes
|
||||||
* Deletion/changing
|
* Motion / deletion / change / window / etc. commands
|
||||||
* Insert mode commands
|
|
||||||
* Marks
|
|
||||||
* Registers
|
|
||||||
* Undo/redo
|
|
||||||
* Visual mode commands
|
|
||||||
* Some Ex commands
|
|
||||||
* Some [:set options](doc/set-commands.md)
|
|
||||||
* Full Vim regexps for search and search/replace
|
|
||||||
* Key mappings
|
* Key mappings
|
||||||
* Macros
|
* Marks / Macros / Digraphs / Registers
|
||||||
* Digraphs
|
* Some [set commands](doc/set-commands.md)
|
||||||
* Command line and search history
|
* Full Vim regexps for search and search/replace
|
||||||
* Window commands
|
|
||||||
* Vim web help
|
* Vim web help
|
||||||
* Select mode
|
* `~/.ideavimrc` configuration file
|
||||||
|
|
||||||
Emulated Vim plugins:
|
[Emulated Vim plugins](doc/emulated-plugins.md):
|
||||||
|
|
||||||
|
* vim-easymotion
|
||||||
* vim-surround
|
* vim-surround
|
||||||
* vim-multiple-cursors
|
* vim-multiple-cursors
|
||||||
* vim-commentary
|
* vim-commentary
|
||||||
|
* argtextobj.vim
|
||||||
Not supported (yet):
|
* vim-textobj-entire
|
||||||
|
* ReplaceWithRegister
|
||||||
* Jump lists
|
* vim-exchange
|
||||||
* Various less-used commands
|
* vim-highlightedyank
|
||||||
|
|
||||||
See also:
|
See also:
|
||||||
|
|
||||||
* [The list of all supported commands](src/com/maddyhome/idea/vim/package-info.java)
|
* [The list of all supported commands](src/com/maddyhome/idea/vim/package-info.java)
|
||||||
* [Top features and bugs](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+sort+by%3A+votes)
|
* [Top feature requests and bugs](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+sort+by%3A+votes)
|
||||||
|
|
||||||
|
|
||||||
Files
|
Files
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* ~/.ideavimrc
|
* `~/.ideavimrc`
|
||||||
* Your IdeaVim-specific Vim initialization commands
|
* Your IdeaVim-specific Vim initialization commands
|
||||||
|
|
||||||
You can read your ~/.vimrc file from ~/.ideavimrc with this command:
|
<details>
|
||||||
|
<summary><strong>Example</strong> (click to see)</summary>
|
||||||
|
|
||||||
|
```vim
|
||||||
|
""" Map leader to space ---------------------
|
||||||
|
let mapleader=" "
|
||||||
|
|
||||||
|
""" Plugins --------------------------------
|
||||||
|
set surround
|
||||||
|
set multiple-cursors
|
||||||
|
set commentary
|
||||||
|
set argtextobj
|
||||||
|
set easymotion
|
||||||
|
set textobj-entire
|
||||||
|
set ReplaceWithRegister
|
||||||
|
|
||||||
|
""" Plugin settings -------------------------
|
||||||
|
let g:argtextobj_pairs="[:],(:),<:>"
|
||||||
|
|
||||||
|
""" Common settings -------------------------
|
||||||
|
set showmode
|
||||||
|
set so=5
|
||||||
|
set incsearch
|
||||||
|
set nu
|
||||||
|
|
||||||
|
""" Idea specific settings ------------------
|
||||||
|
set ideajoin
|
||||||
|
set ideastatusicon=gray
|
||||||
|
set idearefactormode=keep
|
||||||
|
|
||||||
|
""" Mappings --------------------------------
|
||||||
|
map <leader>f <Plug>(easymotion-s)
|
||||||
|
map <leader>e <Plug>(easymotion-f)
|
||||||
|
|
||||||
|
map <leader>d :action Debug<CR>
|
||||||
|
map <leader>r :action RenameElement<CR>
|
||||||
|
map <leader>c :action Stop<CR>
|
||||||
|
map <leader>z :action ToggleDistractionFreeMode<CR>
|
||||||
|
|
||||||
|
map <leader>s :action SelectInProjectView<CR>
|
||||||
|
map <leader>a :action Annotate<CR>
|
||||||
|
map <leader>h :action Vcs.ShowTabbedFileHistory<CR>
|
||||||
|
map <S-Space> :action GotoNextError<CR>
|
||||||
|
|
||||||
|
map <leader>b :action ToggleLineBreakpoint<CR>
|
||||||
|
map <leader>o :action FileStructurePopup<CR>
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
You can read your `~/.vimrc` file from `~/.ideavimrc` with this command:
|
||||||
|
|
||||||
source ~/.vimrc
|
source ~/.vimrc
|
||||||
|
|
||||||
Note, that IdeaVim currently parses ~/.ideavimrc file via simple pattern matching.
|
Please note that IdeaVim currently parses `~/.ideavimrc` & `~/.vimrc` files via simple pattern-matching.
|
||||||
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
||||||
of VimL files.
|
of VimL files.
|
||||||
|
|
||||||
Also note that if you have overridden the `user.home` JVM option, this
|
Also note that if you have overridden the `user.home` JVM option, this
|
||||||
will affect where IdeaVim looks for your .ideavimrc file. For example, if you
|
will affect where IdeaVim looks for your `.ideavimrc` file. For example, if you
|
||||||
have `-Duser.home=/my/alternate/home` then IdeaVim will source
|
have `-Duser.home=/my/alternate/home` then IdeaVim will source
|
||||||
`/my/alternate/home/.ideavimrc` instead of `~/.ideavimrc`.
|
`/my/alternate/home/.ideavimrc` instead of `~/.ideavimrc`.
|
||||||
|
|
||||||
|
Alternatively, you can set up initialization commands using [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) standard.
|
||||||
|
Put your settings to `$XDG_CONFIG_HOME/ideavim/ideavimrc` file.
|
||||||
|
|
||||||
|
|
||||||
Emulated Vim Plugins
|
Emulated Vim Plugins
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
IdeaVim extensions emulate some plugins of the original Vim. In order to use
|
See [doc/emulated-plugins.md](doc/emulated-plugins.md)
|
||||||
IdeaVim extensions, you have to enable them via this command in your ~/.ideavimrc:
|
|
||||||
|
|
||||||
set <extension-name>
|
|
||||||
|
|
||||||
Available extensions:
|
|
||||||
|
|
||||||
* surround
|
|
||||||
* `set surround`
|
|
||||||
* Emulates [vim-surround](https://github.com/tpope/vim-surround)
|
|
||||||
* Commands: `ys`, `cs`, `ds`, `S`
|
|
||||||
|
|
||||||
* multiple-cursors
|
|
||||||
* `set multiple-cursors`
|
|
||||||
* Emulates [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)
|
|
||||||
* Commands: `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>`
|
|
||||||
|
|
||||||
* commentary
|
|
||||||
* `set commentary`
|
|
||||||
* Emulates [commentary.vim](https://github.com/tpope/vim-commentary)
|
|
||||||
* Commands: `gcc`, `gc + motion`, `v_gc`
|
|
||||||
|
|
||||||
|
|
||||||
Changes to the IDE
|
Changes to the IDE
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
### Executing IDE Actions
|
||||||
|
|
||||||
|
IdeaVim adds two commands for listing and executing arbitrary IDE actions as
|
||||||
|
Ex commands or via `:map` command mappings:
|
||||||
|
|
||||||
|
* `:actionlist [pattern]`
|
||||||
|
* Find IDE actions by name or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
||||||
|
* `:action {name}`
|
||||||
|
* Execute an action named `NAME`
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Map \r to the Reformat Code action
|
||||||
|
:map \r :action ReformatCode<CR>
|
||||||
|
|
||||||
|
" Map <leader>d to start debug
|
||||||
|
:map <leader>d :action Debug<CR>
|
||||||
|
|
||||||
|
" Map \b to toggle the breakpoint on the current line
|
||||||
|
:map \b :action ToggleLineBreakpoint<CR>
|
||||||
|
```
|
||||||
|
|
||||||
### Undo/Redo
|
### Undo/Redo
|
||||||
|
|
||||||
The IdeaVim plugin uses the undo/redo functionality of the IntelliJ Platform,
|
The IdeaVim plugin uses the undo/redo functionality of the IntelliJ Platform,
|
||||||
@@ -181,25 +227,12 @@ improvement.
|
|||||||
|
|
||||||
See also [unresolved escape issues](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+Help+topic%3A+i_Esc).
|
See also [unresolved escape issues](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+Help+topic%3A+i_Esc).
|
||||||
|
|
||||||
### Executing IDE Actions
|
:gem: Contributing
|
||||||
|
|
||||||
IdeaVim adds two commands for listing and executing arbitrary IDE actions as
|
|
||||||
Ex commands or via `:map` command mappings:
|
|
||||||
|
|
||||||
* `:actionlist [pattern]`
|
|
||||||
* Find IDE actions by name or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
|
||||||
* `:action {name}`
|
|
||||||
* Execute an action named `NAME`
|
|
||||||
|
|
||||||
For example, here `\r` is mapped to the Reformat Code action:
|
|
||||||
|
|
||||||
:map \r :action ReformatCode<CR>
|
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
------------
|
------------
|
||||||
|
|
||||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
The power of contributing drives IdeaVim :muscle:. Even small contributions matter!
|
||||||
|
|
||||||
|
See [CONTRIBUTING.md](CONTRIBUTING.md) to start bringing your value to the project.
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
@@ -207,8 +240,76 @@ Authors
|
|||||||
See [AUTHORS.md](AUTHORS.md)
|
See [AUTHORS.md](AUTHORS.md)
|
||||||
for a list of authors and contributors.
|
for a list of authors and contributors.
|
||||||
|
|
||||||
|
IdeaVim tips and tricks
|
||||||
|
-------
|
||||||
|
|
||||||
|
- Use the power of IJ and Vim:
|
||||||
|
- `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.
|
||||||
|
- Sync IJ bookmarks and Vim marks: `set ideamarks`
|
||||||
|
- Check out more [ex commands](doc/set-commands.md).
|
||||||
|
|
||||||
|
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
||||||
|
> :warning: Please note that IdeaVim currently parses `~/.ideavimrc` & `~/.vimrc` files via simple pattern-matching.
|
||||||
|
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
||||||
|
of VimL files.
|
||||||
|
|
||||||
|
- Control the status bar icon via the [`ideastatusicon` option](doc/set-commands.md).
|
||||||
|
- Not familiar with the default behaviour during a refactoring? See the [`idearefactormode` option](doc/set-commands.md).
|
||||||
|
|
||||||
|
Some facts about Vim
|
||||||
|
-------
|
||||||
|
|
||||||
|
Let’s relax and have some fun now! Here are a few things we've found interesting during development
|
||||||
|
and would like to share with you.
|
||||||
|
|
||||||
|
- There are no such commands as `dd`, `yy`, or `cc`. For example, `dd` is not a separate command for deleting the line,
|
||||||
|
but a `d` command with a `d` motion.
|
||||||
|
Wait, but there isn't a `d` motion in Vim! That’s right, and that’s why Vim has a dedicated set of commands
|
||||||
|
for which it checks whether the
|
||||||
|
[command equals to motion](https://github.com/vim/vim/blob/759d81549c1340185f0d92524c563bb37697ea88/src/normal.c#L6468)
|
||||||
|
and if so, it executes `_` motion instead.
|
||||||
|
`_` is an interesting motion that isn't even documented in vi, and it refers to the current line.
|
||||||
|
So, commands like `dd`, `yy`, and similar ones are simply translated to `d_`, `y_`, etc.
|
||||||
|
[Here](https://github.com/vim/vim/blob/759d81549c1340185f0d92524c563bb37697ea88/src/normal.c#L6502)
|
||||||
|
is the source of this knowledge.
|
||||||
|
|
||||||
|
- `x`, `D`, and `&` are not separate commands either. They are synonyms of `dl`, `d$`, and `:s\r`, respectively.
|
||||||
|
[Here](https://github.com/vim/vim/blob/759d81549c1340185f0d92524c563bb37697ea88/src/normal.c#L5365)
|
||||||
|
is the full list of synonyms.
|
||||||
|
|
||||||
|
- Have you ever used `U` after `dd`? [Don't even try](https://github.com/vim/vim/blob/759d81549c1340185f0d92524c563bb37697ea88/src/ops.c#L874).
|
||||||
|
|
||||||
|
- A lot of variables that refers to visual mode start with two uppercase letters, e.g. `VIsual_active`. [Some examples](https://github.com/vim/vim/blob/master/src/normal.c#L17).
|
||||||
|
|
||||||
|
- Other [strange things](https://github.com/vim/vim/blob/759d81549c1340185f0d92524c563bb37697ea88/src/ex_docmd.c#L1845) from vi:
|
||||||
|
* ":3" jumps to line 3
|
||||||
|
* ":3|..." prints line 3
|
||||||
|
* ":|" prints current line
|
||||||
|
|
||||||
|
- Vim script doesn't skip white space before comma. `F(a ,b)` => E475.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
IdeaVim is licensed under the terms of the GNU Public License version 2.
|
IdeaVim is licensed under the terms of the GNU Public License version 2
|
||||||
|
or any later version.
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Badges -->
|
||||||
|
[jb-official]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub
|
||||||
|
[jb-official-svg]: https://jb.gg/badges/official.svg
|
||||||
|
|
||||||
|
[plugin-repo]: https://plugins.jetbrains.com/plugin/164-ideavim
|
||||||
|
[plugin-downloads-svg]: http://img.shields.io/jetbrains/plugin/d/IdeaVIM
|
||||||
|
[plugin-rating-svg]: http://img.shields.io/jetbrains/plugin/r/rating/IdeaVIM
|
||||||
|
[plugin-version-svg]: https://img.shields.io/jetbrains/plugin/v/ideavim?label=version
|
||||||
|
|
||||||
|
[gitter-svg]: https://badges.gitter.im/JetBrains/ideavim.svg
|
||||||
|
[gitter]: https://gitter.im/JetBrains/ideavim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||||
|
|
||||||
|
[twitter]: https://twitter.com/ideavim
|
||||||
|
[twitter-svg]: https://img.shields.io/twitter/follow/ideavim?label=twitter%20%40ideavim
|
||||||
|
|
||||||
|
[contributions-welcome-svg]: http://img.shields.io/badge/contributions-welcome-brightgreen
|
||||||
|
[contributions-welcome]: https://github.com/JetBrains/ideavim/blob/master/CONTRIBUTING.md
|
||||||
|
65
build.gradle
@@ -9,7 +9,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.intellij' version '0.4.9'
|
id 'org.jetbrains.intellij' version '0.4.18'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
@@ -37,11 +37,7 @@ intellij {
|
|||||||
downloadSources Boolean.valueOf(downloadIdeaSources)
|
downloadSources Boolean.valueOf(downloadIdeaSources)
|
||||||
instrumentCode Boolean.valueOf(instrumentPluginCode)
|
instrumentCode Boolean.valueOf(instrumentPluginCode)
|
||||||
intellijRepo = "https://www.jetbrains.com/intellij-repository"
|
intellijRepo = "https://www.jetbrains.com/intellij-repository"
|
||||||
if (!Boolean.valueOf(legacyNoJavaPlugin)) {
|
plugins = ['java']
|
||||||
// Since 192 version of IJ java plugin should be defined separately
|
|
||||||
// Set `legacyNoJavaPlugin` to true if you are going to run tests under idea version < 192
|
|
||||||
plugins = ['java']
|
|
||||||
}
|
|
||||||
|
|
||||||
publishPlugin {
|
publishPlugin {
|
||||||
channels publishChannels.split(',')
|
channels publishChannels.split(',')
|
||||||
@@ -55,8 +51,11 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||||
compile "org.jetbrains:annotations:17.0.0"
|
compileOnly "org.jetbrains:annotations:19.0.0"
|
||||||
|
|
||||||
|
// https://mvnrepository.com/artifact/com.ensarsarajcic.neovim.java/neovim-api
|
||||||
|
compile group: 'com.ensarsarajcic.neovim.java', name: 'neovim-api', version: '0.1.16'
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
@@ -70,19 +69,65 @@ compileTestKotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task testWithNeovim(type : Test) {
|
||||||
|
group = "verification"
|
||||||
|
systemProperty "ideavim.neovim.test", 'true'
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("slackEapNotification") {
|
tasks.register("slackEapNotification") {
|
||||||
doLast {
|
doLast {
|
||||||
if (!slackUrl) return
|
if (!slackUrl) return
|
||||||
def post = new URL(slackUrl).openConnection()
|
def post = new URL(slackUrl).openConnection()
|
||||||
def message = "{\"text\":\"New EAP released: $version\"}"
|
def changeLog = extractChangelog()
|
||||||
|
changeLog = changeLog.replace("* ", "• ") // Replace stars with bullets
|
||||||
|
changeLog = changeLog.replace("**", "*") // Enable bold text
|
||||||
|
changeLog = changeLog.replaceAll("\\[([^]]+)]\\(([^)]+)\\)", '<$2|$1>') // Enable links
|
||||||
|
def message ="""
|
||||||
|
{
|
||||||
|
"text": "New version of IdeaVim",
|
||||||
|
"blocks": [
|
||||||
|
{
|
||||||
|
"type": "section",
|
||||||
|
"text": {
|
||||||
|
"type": "mrkdwn",
|
||||||
|
"text": "IdeaVim EAP $version has been released\\n$changeLog"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
post.setRequestMethod("POST")
|
post.setRequestMethod("POST")
|
||||||
post.setDoOutput(true)
|
post.setDoOutput(true)
|
||||||
post.setRequestProperty("Content-Type", "application/json")
|
post.setRequestProperty("Content-Type", "application/json")
|
||||||
post.getOutputStream().write(message.getBytes("UTF-8"))
|
post.getOutputStream().write(message.getBytes("UTF-8"))
|
||||||
def postRC = post.getResponseCode()
|
def postRC = post.getResponseCode()
|
||||||
println(postRC)
|
println(postRC)
|
||||||
if(postRC.equals(200)) {
|
if(postRC == 200) {
|
||||||
println(post.getInputStream().getText())
|
println(post.getInputStream().getText())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Very primitive changelog extraction code
|
||||||
|
def extractChangelog() {
|
||||||
|
def startLine = "_Available since $version EAP:_"
|
||||||
|
def endLine = "_To Be Released..._"
|
||||||
|
def startSaving = false
|
||||||
|
def res = new StringBuilder()
|
||||||
|
new File("./CHANGES.md").eachLine { line ->
|
||||||
|
if (startSaving) {
|
||||||
|
if (line == endLine) {
|
||||||
|
startSaving = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
res.append(line).append('\n')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (line == startLine) {
|
||||||
|
startSaving = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.toString()
|
||||||
|
}
|
||||||
|
84
doc/emulated-plugins.md
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
Emulated Vim Plugins
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
IdeaVim extensions emulate plugins of the original Vim. In order to use
|
||||||
|
IdeaVim extensions, you have to enable them via this command in your `~/.ideavimrc`:
|
||||||
|
|
||||||
|
set <extension-name>
|
||||||
|
|
||||||
|
Available extensions:
|
||||||
|
|
||||||
|
## easymotion
|
||||||
|
|
||||||
|
* Setup:
|
||||||
|
* Install [IdeaVim-EasyMotion](https://plugins.jetbrains.com/plugin/13360-ideavim-easymotion/)
|
||||||
|
and [AceJump](https://plugins.jetbrains.com/plugin/7086-acejump/) plugins.
|
||||||
|
* `set easymotion`
|
||||||
|
* Emulates [vim-easymotion](https://github.com/easymotion/vim-easymotion)
|
||||||
|
* Commands: All commands with the mappings are supported. See the [full list of supported commands](https://github.com/AlexPl292/IdeaVim-EasyMotion#supported-commands).
|
||||||
|
|
||||||
|
## surround
|
||||||
|
|
||||||
|
* Setup: `set surround`
|
||||||
|
* Emulates [vim-surround](https://github.com/tpope/vim-surround)
|
||||||
|
* Commands: `ys`, `cs`, `ds`, `S`
|
||||||
|
|
||||||
|
## multiple-cursors
|
||||||
|
|
||||||
|
* Setup: `set multiple-cursors`
|
||||||
|
* Emulates [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)
|
||||||
|
* Commands: `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>`
|
||||||
|
|
||||||
|
## commentary
|
||||||
|
|
||||||
|
* Setup: `set commentary`
|
||||||
|
* Emulates [commentary.vim](https://github.com/tpope/vim-commentary)
|
||||||
|
* Commands: `gcc`, `gc + motion`, `v_gc`
|
||||||
|
* By [Daniel Leong](https://github.com/dhleong)
|
||||||
|
|
||||||
|
## ReplaceWithRegister
|
||||||
|
|
||||||
|
* Setup: `set ReplaceWithRegister`
|
||||||
|
* Emulates [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister)
|
||||||
|
* Commands: `gr`, `grr`
|
||||||
|
* By [igrekster](https://github.com/igrekster)
|
||||||
|
|
||||||
|
## argtextobj
|
||||||
|
|
||||||
|
* Setup:
|
||||||
|
* `set argtextobj`
|
||||||
|
* By default, only the arguments inside parenthesis are considered. To extend the functionality
|
||||||
|
to other types of brackets, set `g:argtextobj_pairs` variable to a comma-separated
|
||||||
|
list of colon-separated pairs (same as VIM's `matchpairs` option), like
|
||||||
|
`let g:argtextobj_pairs="(:),{:},<:>"`. The order of pairs matters when
|
||||||
|
handling symbols that can also be operators: `func(x << 5, 20) >> 17`. To handle
|
||||||
|
this syntax parenthesis, must come before angle brackets in the list.
|
||||||
|
* Emulates [argtextobj.vim](https://www.vim.org/scripts/script.php?script_id=2699)
|
||||||
|
* Additional text objects: `aa`, `ia`
|
||||||
|
|
||||||
|
## exchange
|
||||||
|
|
||||||
|
* Setup: `set exchange`
|
||||||
|
* Emulates [vim-exchange](https://github.com/tommcdo/vim-exchange)
|
||||||
|
* Commands: `cx`, `cxx`, `X`, `cxc`
|
||||||
|
* By [fan-tom](https://github.com/fan-tom)
|
||||||
|
|
||||||
|
## textobj-entire
|
||||||
|
|
||||||
|
* Setup: `set textobj-entire`
|
||||||
|
* Emulates [vim-textobj-entire](https://github.com/kana/vim-textobj-entire)
|
||||||
|
* Additional text objects: `ae`, `ie`
|
||||||
|
* By [Alexandre Grison](https://github.com/agrison)
|
||||||
|
|
||||||
|
## highlightedyank
|
||||||
|
|
||||||
|
* Setup:
|
||||||
|
* `set highlightedyank`
|
||||||
|
* if you want to optimize highlight duration, assign a time in milliseconds:
|
||||||
|
`let g:highlightedyank_highlight_duration = "1000"`
|
||||||
|
A negative number makes the highlight persistent.
|
||||||
|
`let g:highlightedyank_highlight_duration = "-1"`
|
||||||
|
* if you want to change background color of highlight you can provide the rgba of the color you want e.g.
|
||||||
|
`let g:highlightedyank_highlight_color = "rgba(160, 160, 160, 155)"`
|
||||||
|
* Emulates [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)
|
||||||
|
* By [KostkaBrukowa](https://github.com/KostkaBrukowa)
|
@@ -13,12 +13,6 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
'gdefault' 'gd' the ":substitute" flag 'g' is by default
|
'gdefault' 'gd' the ":substitute" flag 'g' is by default
|
||||||
'history' 'hi' number of command-lines that are remembered
|
'history' 'hi' number of command-lines that are remembered
|
||||||
'hlsearch' 'hls' highlight matches with the last search pattern
|
'hlsearch' 'hls' highlight matches with the last search pattern
|
||||||
|
|
||||||
`ideamarks` `ideamarks` Boolean (default true) - IdeaVim ONLY
|
|
||||||
|
|
||||||
If true, creation of global mark will trigger creation of IDE's bookmark
|
|
||||||
and vice versa.
|
|
||||||
|
|
||||||
'ignorecase' 'ic' ignore case in search patterns
|
'ignorecase' 'ic' ignore case in search patterns
|
||||||
'iskeyword' 'isk' defines keywords for commands like 'w', '*', etc.
|
'iskeyword' 'isk' defines keywords for commands like 'w', '*', etc.
|
||||||
'incsearch' 'is' show where search pattern typed so far matches
|
'incsearch' 'is' show where search pattern typed so far matches
|
||||||
@@ -44,14 +38,9 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
acts like startsel is enabled
|
acts like startsel is enabled
|
||||||
|
|
||||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
'matchpairs' 'mps' pairs of characters that "%" can match
|
||||||
|
'more' 'more' When on, listings pause when the whole screen is filled.
|
||||||
'nrformats' 'nf' number formats recognized for CTRL-A command
|
'nrformats' 'nf' number formats recognized for CTRL-A command
|
||||||
'number' 'nu' print the line number in front of each line
|
'number' 'nu' print the line number in front of each line
|
||||||
|
|
||||||
`lookupactions` `lookupactions` String (default "VimLookupUp,VimLookupDown") - IdeaVim Only
|
|
||||||
|
|
||||||
By default all actions are handled by the IDE if lookup is active.
|
|
||||||
This list of comma-separated words enables defined vim actions for active lookup.
|
|
||||||
|
|
||||||
'relativenumber' 'rnu' show the line number relative to the line with
|
'relativenumber' 'rnu' show the line number relative to the line with
|
||||||
the cursor
|
the cursor
|
||||||
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
||||||
@@ -59,7 +48,7 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
'scrolloff' 'so' minimum number of lines above and below the cursor
|
'scrolloff' 'so' minimum number of lines above and below the cursor
|
||||||
'selection' 'sel' what type of selection to use
|
'selection' 'sel' what type of selection to use
|
||||||
|
|
||||||
`selectmode` `slm` String (default "template")
|
`selectmode` `slm` String (default "")
|
||||||
|
|
||||||
This is a comma-separated list of words, which specify when to start
|
This is a comma-separated list of words, which specify when to start
|
||||||
Select mode instead of Visual mode, when a selection is started.
|
Select mode instead of Visual mode, when a selection is started.
|
||||||
@@ -67,17 +56,17 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
mouse when using the mouse
|
mouse when using the mouse
|
||||||
key when using shifted special[1] keys
|
key when using shifted special[1] keys
|
||||||
cmd when using "v", "V", or <C-V>
|
cmd when using "v", "V", or <C-V>
|
||||||
template when starting a template - IdeaVim ONLY
|
ideaselection when IDE sets a selection - IdeaVim ONLY
|
||||||
refactoring when refactoring without - IdeaVim ONLY
|
(examples: extend selection, wrap with while, etc.)
|
||||||
a template is performed
|
|
||||||
|
Deprecated values:
|
||||||
|
template ~~please use `idearefactormode` option~~
|
||||||
|
when starting a template - IdeaVim ONLY
|
||||||
|
refactoring ~~please use ideaselection~~
|
||||||
|
same as ideaselection - IdeaVim ONLY
|
||||||
|
|
||||||
'showmode' 'smd' message on the status line to show current mode
|
'showmode' 'smd' message on the status line to show current mode
|
||||||
|
'showcmd' 'sc' show (partial) command in the status bar
|
||||||
`ideajoin` `ideajoin` Boolean (default false) - IdeaVim ONLY
|
|
||||||
|
|
||||||
If true, join command will be performed via IDE
|
|
||||||
See wiki/`ideajoin` examples
|
|
||||||
|
|
||||||
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
||||||
'sidescrolloff' 'siso' min. number of columns to left and right of cursor
|
'sidescrolloff' 'siso' min. number of columns to left and right of cursor
|
||||||
'smartcase' 'scs' no ignore case when pattern is uppercase
|
'smartcase' 'scs' no ignore case when pattern is uppercase
|
||||||
@@ -88,5 +77,65 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
'visualbell' 'vb' use visual bell instead of beeping
|
'visualbell' 'vb' use visual bell instead of beeping
|
||||||
'wrapscan' 'ws' searches wrap around the end of file
|
'wrapscan' 'ws' searches wrap around the end of file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IdeaVim only commands:
|
||||||
|
|
||||||
|
`ideamarks` `ideamarks` Boolean (default true)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
`ideastatusbar` `ideastatusbar` Boolean (default true)
|
||||||
|
DEPRECATED. Please use `ideastatusicon`
|
||||||
|
|
||||||
|
If false, IdeaVim icon won't be shown in the status bar.
|
||||||
|
Works only from `~/.ideavimrc` after the IDE restart.
|
||||||
|
|
||||||
|
`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.
|
||||||
|
Value "all" enables execution of ":wa" (save all) command on ":w" (save).
|
||||||
|
This feature exists because some IJ options like "Prettier on save" or "ESlint on save"
|
||||||
|
work only with "save all" action. If this option is set to "all", these actions work
|
||||||
|
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>"
|
||||||
|
|
||||||
----------
|
----------
|
||||||
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
||||||
|
@@ -1,16 +1,13 @@
|
|||||||
# suppress inspection "UnusedProperty" for whole file
|
# suppress inspection "UnusedProperty" for whole file
|
||||||
|
|
||||||
ideaVersion=193-EAP-SNAPSHOT
|
ideaVersion=LATEST-EAP-SNAPSHOT
|
||||||
downloadIdeaSources=true
|
downloadIdeaSources=true
|
||||||
instrumentPluginCode=true
|
instrumentPluginCode=true
|
||||||
version=SNAPSHOT
|
version=SNAPSHOT
|
||||||
javaVersion=1.8
|
javaVersion=1.8
|
||||||
kotlinVersion=1.3.50
|
kotlinVersion=1.3.71
|
||||||
publishUsername=username
|
publishUsername=username
|
||||||
publishToken=token
|
publishToken=token
|
||||||
publishChannels=eap
|
publishChannels=eap
|
||||||
# Since 192 version of IJ java plugin should be defined separately
|
|
||||||
# Set this value to true if you are going to run tests under idea version < 192
|
|
||||||
legacyNoJavaPlugin=false
|
|
||||||
|
|
||||||
slackUrl=
|
slackUrl=
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
21
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,24 +1,5 @@
|
|||||||
#
|
|
||||||
# IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
# Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
#Thu Feb 21 15:20:13 MSK 2019
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
|
|
||||||
|
53
gradlew
vendored
@@ -1,5 +1,21 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
## Gradle start up script for UN*X
|
## Gradle start up script for UN*X
|
||||||
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
|||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
@@ -66,6 +82,7 @@ esac
|
|||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
@@ -109,10 +126,11 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
@@ -138,19 +156,19 @@ if $cygwin ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -159,14 +177,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
22
gradlew.bat
vendored
@@ -1,3 +1,19 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
@@ -65,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
|||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
23
resources/META-INF/includes/ApplicationServices.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MotionGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.ChangeGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.CommandGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MarkGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.RegisterGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.FileGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.SearchGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.ProcessGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MacroGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.DigraphGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.HistoryGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.KeyGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.WindowGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.EditorGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.visual.VisualMotionGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.copy.YankGroup"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.copy.PutGroup"/>
|
||||||
|
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.NotificationService"/>
|
||||||
|
</extensions>
|
||||||
|
</idea-plugin>
|
351
resources/META-INF/includes/VimActions.xml
Normal file
@@ -0,0 +1,351 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<extensions defaultExtensionNs="IdeaVIM">
|
||||||
|
<!-- Motions -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.tabs.MotionPreviousTabAction" mappingModes="NXO" keys="gT"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.tabs.MotionNextTabAction" mappingModes="NXO" keys="gt"/>
|
||||||
|
<!-- Left/Right -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionColumnAction" mappingModes="NXO" keys="|"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnAction" mappingModes="NXO" keys="0"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnInsertModeAction" mappingModes="I" keys="«Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenColumnAction" mappingModes="NXO" keys="g0,g«Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstNonSpaceAction" mappingModes="NXO" keys="^"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenNonSpaceAction" mappingModes="NXO" keys="g^"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnAction" mappingModes="NXO" keys="$"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnInsertAction" mappingModes="I" keys="«End»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastScreenColumnAction" mappingModes="NXO" keys="g$,g«End»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharAction" mappingModes="NXO" keys=";"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharReverseAction" mappingModes="NXO" keys="«COMMA»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastNonSpaceAction" mappingModes="NXO" keys="g_"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftAction" mappingModes="NXO" keys="h"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftInsertModeAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftWrapAction" mappingModes="NXO" keys="«BS»,«C-H»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftMatchCharAction" mappingModes="NXO" keys="F"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftTillMatchCharAction" mappingModes="NXO" keys="T"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionMiddleColumnAction" mappingModes="NXO" keys="gm"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightAction" mappingModes="NXO" keys="l"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightInsertAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightWrapAction" mappingModes="NXO" keys=" "/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction" mappingModes="NXO" keys="f"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction" mappingModes="NXO" keys="t"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionHomeAction" mappingModes="NV" keys="«Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftHomeAction" mappingModes="NV" keys="«S-Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionEndAction" mappingModes="NVO" keys="«End»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftEndAction" mappingModes="NV" keys="«S-End»"/>
|
||||||
|
<!-- Up/Down -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" mappingModes="NXO" keys="j"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownCtrlNAction" mappingModes="NXO" keys="«C-N»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownNotLineWiseAction" mappingModes="NXO" keys="gj,g«Down»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownFirstNonSpaceAction" mappingModes="NXO" keys="+,«C-M»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.EnterNormalAction" mappingModes="NXO" keys="«CR»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceAction" mappingModes="NXO" keys="_"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstAction" mappingModes="NXO" keys="gg,«C-Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstInsertAction" mappingModes="I" keys="«C-Home»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastAction" mappingModes="NXO" keys="G"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndAction" mappingModes="NXO" keys="«C-End»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndInsertAction" mappingModes="I" keys="«C-End»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionPercentOrMatchAction" mappingModes="NXO" keys="%"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpAction" mappingModes="NXO" keys="k"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpCtrlPAction" mappingModes="NXO" keys="«C-P»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpNotLineWiseAction" mappingModes="NXO" keys="gk,g«Up»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpFirstNonSpaceAction" mappingModes="NXO" keys="-"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionArrowDownAction" mappingModes="NVO"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionArrowUpAction" mappingModes="NVO"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionArrowLeftAction" mappingModes="NXO"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionArrowRightAction" mappingModes="NXO"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.LookupDownAction" mappingModes="I" keys="«C-N»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.LookupUpAction" mappingModes="I" keys="«C-P»"/>
|
||||||
|
<!-- Text -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndLeftAction" mappingModes="NXO" keys="]b"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndRightAction" mappingModes="NXO" keys="]w"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelLeftAction" mappingModes="NXO" keys="[b"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelRightAction" mappingModes="NXO" keys="[w"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionNthCharacterAction" mappingModes="NXO" keys="go"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordEndLeftAction" mappingModes="NXO" keys="ge"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndLeftAction" mappingModes="NXO" keys="gE"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordEndRightAction" mappingModes="NXO" keys="e"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndRightAction" mappingModes="NXO" keys="E"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftAction" mappingModes="NXO" keys="b"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftInsertAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordLeftAction" mappingModes="NXO" keys="B,«C-Left»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordRightAction" mappingModes="NXO" keys="w"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordRightInsertAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordRightAction" mappingModes="NXO" keys="W,«C-Right»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextStartAction" mappingModes="NXO" keys=")"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousStartAction" mappingModes="NXO" keys="("/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextEndAction" mappingModes="NXO" keys="g)"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousEndAction" mappingModes="NXO" keys="g("/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionParagraphNextAction" mappingModes="NXO" keys="}"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionParagraphPreviousAction" mappingModes="NXO" keys="{"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceCloseAction" mappingModes="NXO" keys="]}"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceOpenAction" mappingModes="NXO" keys="[{"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenCloseAction" mappingModes="NXO" keys="])"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenOpenAction" mappingModes="NXO" keys="[("/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardEndAction" mappingModes="NXO" keys="[]"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardStartAction" mappingModes="NXO" keys="[["/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardEndAction" mappingModes="NXO" keys="]]"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardStartAction" mappingModes="NXO" keys="]["/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousEndAction" mappingModes="NXO" keys="[M"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousStartAction" mappingModes="NXO" keys="[m"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextEndAction" mappingModes="NXO" keys="]M"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextStartAction" mappingModes="NXO" keys="]m"/>
|
||||||
|
<!-- Text Objects -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterWordAction" mappingModes="XO" keys="aw"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBigWordAction" mappingModes="XO" keys="aW"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerWordAction" mappingModes="XO" keys="iw"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBigWordAction" mappingModes="XO" keys="iW"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockAngleAction" mappingModes="XO" keys="i>,i<"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBraceAction" mappingModes="XO" keys="iB,i{,i}"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBracketAction" mappingModes="XO" keys="i[,i]"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockParenAction" mappingModes="XO" keys="ib,i(,i)"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockDoubleQuoteAction" mappingModes="XO" keys='i"'/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockSingleQuoteAction" mappingModes="XO" keys="i'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBackQuoteAction" mappingModes="XO" keys="i`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockTagAction" mappingModes="XO" keys="it"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockAngleAction" mappingModes="XO" keys="a<,a>"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBraceAction" mappingModes="XO" keys="aB,a{,a}"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBracketAction" mappingModes="XO" keys="a[,a]"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockParenAction" mappingModes="XO" keys="ab,a(,a)"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockDoubleQuoteAction" mappingModes="XO" keys='a"'/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockSingleQuoteAction" mappingModes="XO" keys="a'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBackQuoteAction" mappingModes="XO" keys="a`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockTagAction" mappingModes="XO" keys="at"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerParagraphAction" mappingModes="XO" keys="ip"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterParagraphAction" mappingModes="XO" keys="ap"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerSentenceAction" mappingModes="XO" keys="is"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterSentenceAction" mappingModes="XO" keys="as"/>
|
||||||
|
<!-- Marks -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionMarkAction" mappingModes="NX" keys="m"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkAction" mappingModes="XO" keys="`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkNoSaveJumpAction" mappingModes="XO" keys="g`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineAction" mappingModes="XO" keys="'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineNoSaveJumpAction" mappingModes="XO" keys="g'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkAction" mappingModes="N" keys="`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkNoSaveJumpAction" mappingModes="N" keys="g`"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineAction" mappingModes="N" keys="'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineNoSaveJumpAction" mappingModes="N" keys="g'"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction" mappingModes="N" keys="«C-I»,«Tab»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction" mappingModes="N" keys="«C-O»,«C-T»"/>
|
||||||
|
<!-- Screen -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionFirstScreenLineAction" mappingModes="NXO" keys="H"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineAction" mappingModes="NXO" keys="L"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionMiddleScreenLineAction" mappingModes="NXO" keys="M"/>
|
||||||
|
<!-- Scroll -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLinePageStartAction" mappingModes="NXO" keys="z+"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineStartAction" mappingModes="NXO" keys="z«CR»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineAction" mappingModes="NXO" keys="zt"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageDownAction" mappingModes="NXO" keys="«C-D»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageUpAction" mappingModes="NXO" keys="«C-U»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineAction" mappingModes="NXO" keys="zb"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLinePageStartAction" mappingModes="NXO" keys="z^"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineStartAction" mappingModes="NXO" keys="z-"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineDownAction" mappingModes="NXO" keys="«C-E»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineUpAction" mappingModes="NXO" keys="«C-Y»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineAction" mappingModes="NXO" keys="zz"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineStartAction" mappingModes="NXO" keys="z."/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownAction" mappingModes="NXO" keys="«C-F»,«PageDown»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownInsertModeAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpAction" mappingModes="NXO" keys="«C-B»,«PageUp»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpInsertModeAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenColumnAction" mappingModes="NXO" keys="zs"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenColumnAction" mappingModes="NXO" keys="ze"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnLeftAction" mappingModes="NXO" keys="zl,z«Right»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnRightAction" mappingModes="NXO" keys="zh,z«Left»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfWidthLeftAction" mappingModes="NXO" keys="zL"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfWidthRightAction" mappingModes="NXO" keys="zH"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftDownAction" mappingModes="NV" keys="«S-Down»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftUpAction" mappingModes="NV" keys="«S-Up»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftRightAction" mappingModes="NV" keys="«S-Right»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftLeftAction" mappingModes="NV" keys="«S-Left»"/>
|
||||||
|
<!-- Visual -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" mappingModes="X" keys="«Esc»,«C-[»,«C-C»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" mappingModes="NX" keys="v"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleLineModeAction" mappingModes="NX" keys="V"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleBlockModeAction" mappingModes="NX" keys="«C-q»,«C-v»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsAction" mappingModes="X" keys="o"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsBlockAction" mappingModes="X" keys="O"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSelectPreviousAction" mappingModes="N" keys="gv"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapSelectionsAction" mappingModes="X" keys="gv"/>
|
||||||
|
|
||||||
|
<!-- Select-->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableCharacterModeAction" mappingModes="N" keys="gh"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableLineModeAction" mappingModes="N" keys="gH"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableBlockModeAction" mappingModes="N" keys="g«C-h»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.motion.SelectMotionRightAction" mappingModes="S" keys="«Right»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.motion.SelectMotionLeftAction" mappingModes="S" keys="«Left»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectToggleVisualMode" mappingModes="V" keys="«C-G»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnterAction" mappingModes="S" keys="«enter»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEscapeAction" mappingModes="S" keys="«esc»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectDeleteAction" mappingModes="S" keys="«BS»,«DEL»"/>
|
||||||
|
|
||||||
|
<!-- Insert -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAfterCursorAction" mappingModes="N" keys="a"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAfterLineEndAction" mappingModes="N" keys="A"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAtPreviousInsertAction" mappingModes="N" keys="gi"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertBeforeCursorAction" mappingModes="N" keys="i,«Insert»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertBeforeFirstNonBlankAction" mappingModes="N" keys="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCharacterAboveCursorAction" mappingModes="I" keys="«C-Y»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCharacterBelowCursorAction" mappingModes="I" keys="«C-E»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertDeleteInsertedTextAction" mappingModes="I" keys="«C-U»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertDeletePreviousWordAction" mappingModes="I" keys="«C-W»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertEnterAction" mappingModes="I" keys="«C-M»,«CR»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertExitModeAction" mappingModes="I" keys="«C-[»,«C-C»,«Esc»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertLineStartAction" mappingModes="N" keys="gI"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertNewLineAboveAction" mappingModes="N" keys="O"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertNewLineBelowAction" mappingModes="N" keys="o"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertAction" mappingModes="I" keys="«C-A»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertExitAction" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertRegisterAction" mappingModes="I" keys="«C-R»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertInsertAction" mappingModes="I" keys="«Ins»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertSingleCommandAction" mappingModes="I" keys="«C-O»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.VisualBlockInsertAction" mappingModes="X" keys="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.VisualBlockAppendAction" mappingModes="X" keys="A"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCompletedDigraphAction" mappingModes="IC" keys="«C-K»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCompletedLiteralAction" mappingModes="IC" keys="«C-V»,«C-Q»"/>
|
||||||
|
|
||||||
|
<!-- Delete -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterAction" mappingModes="N" keys="«DEL»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterLeftAction" mappingModes="N" keys="X"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterRightAction" mappingModes="N" keys="x"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteEndOfLineAction" mappingModes="N" keys="D"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesAction" mappingModes="N" keys="gJ"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesSpacesAction" mappingModes="N" keys="J"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesAction" mappingModes="X" keys="gJ"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesSpacesAction" mappingModes="X" keys="J"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteMotionAction" mappingModes="N" keys="d"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction" mappingModes="X" keys="d,x,«Del»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesAction" mappingModes="X" keys="X"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesEndAction" mappingModes="X" keys="D"/>
|
||||||
|
|
||||||
|
<!-- Change -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerMotionAction" mappingModes="N" keys="gu"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerVisualAction" mappingModes="X" keys="u"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleCharacterAction" mappingModes="N" keys="~"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleMotionAction" mappingModes="N" keys="g~"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleVisualAction" mappingModes="X" keys="~"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperMotionAction" mappingModes="N" keys="gU"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperVisualAction" mappingModes="X" keys="U"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCharacterAction" mappingModes="N" keys="r"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCharactersAction" mappingModes="N" keys="s"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeEndOfLineAction" mappingModes="N" keys="C"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLineAction" mappingModes="N" keys="S"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeMotionAction" mappingModes="N" keys="c"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeNumberIncAction" mappingModes="N" keys="«C-A»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeNumberDecAction" mappingModes="N" keys="«C-X»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberIncAction" mappingModes="X" keys="«C-A»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberDecAction" mappingModes="X" keys="«C-X»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberAvalancheIncAction" mappingModes="X" keys="g«C-A»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberAvalancheDecAction" mappingModes="X" keys="g«C-X»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeReplaceAction" mappingModes="N" keys="R"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualAction" mappingModes="X" keys="c,s"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualCharacterAction" mappingModes="X" keys="r"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesAction" mappingModes="X" keys="R,S"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesEndAction" mappingModes="X" keys="C"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.FilterMotionAction" mappingModes="N" keys="!"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.FilterVisualLinesAction" mappingModes="X" keys="!"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.AutoIndentLinesVisualAction" mappingModes="X" keys="="/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ReformatCodeVisualAction" mappingModes="X" keys="gq"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ReformatCodeMotionAction" mappingModes="N" keys="gq"/>
|
||||||
|
|
||||||
|
<!-- Shift -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.AutoIndentMotionAction" mappingModes="N" keys="="/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftLinesAction" mappingModes="I" keys="«C-D»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftMotionAction" mappingModes="N" keys="<"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftVisualAction" mappingModes="X" keys="<"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightLinesAction" mappingModes="I" keys="«C-T»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightMotionAction" mappingModes="N" keys=">"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightVisualAction" mappingModes="X" keys=">"/>
|
||||||
|
|
||||||
|
<!-- Copy -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorAction" mappingModes="N" keys="p"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorAction" mappingModes="N" keys="P"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorNoIndentAction" mappingModes="N" keys="]p"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorNoIndentAction" mappingModes="N" keys="[P,]P,[p"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorActionMoveCursor" mappingModes="N" keys="gp"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorActionMoveCursor" mappingModes="N" keys="gP"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankLineAction" mappingModes="N" keys="Y"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankMotionAction" mappingModes="N" keys="y"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankVisualAction" mappingModes="X" keys="y"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankVisualLinesAction" mappingModes="X" keys="Y"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextBeforeCursorAction" mappingModes="X" keys="P"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextAfterCursorAction" mappingModes="X" keys="p"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextBeforeCursorNoIndentAction" mappingModes="X" keys="]P,[P"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextAfterCursorNoIndentAction" mappingModes="X" keys="[p,]p"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextBeforeCursorMoveCursorAction" mappingModes="X" keys="gP"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextAfterCursorMoveCursorAction" mappingModes="X" keys="gp"/>
|
||||||
|
|
||||||
|
<!-- File -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileSaveCloseAction" mappingModes="N" keys="ZQ,ZZ"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FilePreviousAction" mappingModes="N"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetAsciiAction" mappingModes="N" keys="ga"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetHexAction" mappingModes="N" keys="g8"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetFileInfoAction" mappingModes="N" keys="«C-G»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetLocationInfoAction" mappingModes="NX" keys="g«C-G»"/>
|
||||||
|
|
||||||
|
<!-- Window -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.VerticalSplitAction" mappingModes="N" keys="«C-W»v,«C-W»«C-V»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.HorizontalSplitAction" mappingModes="N" keys="«C-W»s,«C-W»S,«C-W»«C-S»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.CloseWindowAction" mappingModes="N" keys="«C-W»c"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowOnlyAction" mappingModes="N" keys="«C-W»o,«C-W»«C-O»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowNextAction" mappingModes="N" keys="«C-W»w,«C-W»«C-W»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowPrevAction" mappingModes="N" keys="«C-W»W"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowLeftAction" mappingModes="N" keys="«C-W»h,«C-W»«C-H»,«C-W»«Left»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowRightAction" mappingModes="N" keys="«C-W»l,«C-W»«C-L»,«C-W»«Right»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowUpAction" mappingModes="N" keys="«C-W»k,«C-W»«C-K»,«C-W»«Up»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowDownAction" mappingModes="N" keys="«C-W»j,«C-W»«C-J»,«C-W»«Down»"/>
|
||||||
|
|
||||||
|
<!-- Search -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchEntryFwdAction" mappingModes="NXO" keys="/"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchEntryRevAction" mappingModes="NXO" keys="?"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchAgainNextAction" mappingModes="NXO" keys="n"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchAgainPreviousAction" mappingModes="NXO" keys="N"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordForwardAction" mappingModes="NXO" keys="*"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordBackwardAction" mappingModes="NXO" keys="#"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWordForwardAction" mappingModes="NXO" keys="g*"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWordBackwardAction" mappingModes="NXO" keys="g#"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.GotoDeclarationAction" mappingModes="NX" keys="gD,gd,«C-]»"/>
|
||||||
|
|
||||||
|
<!-- Macro -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.macro.ToggleRecordingAction" mappingModes="NX" keys="q"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.macro.PlaybackRegisterAction" mappingModes="N" keys="@"/>
|
||||||
|
|
||||||
|
<!-- Command Line -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.ex.ProcessExEntryAction" mappingModes="C"/>
|
||||||
|
|
||||||
|
<!-- Other -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLastSearchReplaceAction" mappingModes="N" keys="&"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLastGlobalSearchReplaceAction" mappingModes="N" keys="g&"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.RepeatChangeAction" mappingModes="N" keys="."/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.ExEntryAction" mappingModes="NXO" keys=":"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.ResetModeAction" mappingModes="ALL" keys="«C-\»«C-N»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.RedoAction" mappingModes="N" keys="«C-R»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.UndoAction" mappingModes="N"/>
|
||||||
|
|
||||||
|
<!-- Keys -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.change.OperatorAction" mappingModes="N" keys="g@"/>
|
||||||
|
|
||||||
|
<!-- Visual Selection of last Search Pattern (gn) -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.VisualSelectNextSearch" mappingModes="NX" keys="gn"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.VisualSelectPreviousSearch" mappingModes="NX" keys="gN"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.GnNextTextObject" mappingModes="O" keys="gn"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.GnPreviousTextObject" mappingModes="O" keys="gN"/>
|
||||||
|
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.CtrlDownAction" mappingModes="N" keys="«C-Down»"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.CtrlUpAction" mappingModes="N" keys="«C-Up»"/>
|
||||||
|
|
||||||
|
<!-- Folds -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseAllRegions" mappingModes="NX" keys="zM"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseRegion" mappingModes="NX" keys="zc"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseRegionRecursively" mappingModes="NX" keys="zC"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandAllRegions" mappingModes="NX" keys="zR"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandRegion" mappingModes="NX" keys="zo"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandRegionRecursively" mappingModes="NX" keys="zO"/>
|
||||||
|
|
||||||
|
<!-- Editor Actions -->
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorBackSpace" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorDelete" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorDown" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorTab" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorUp" mappingModes="I"/>
|
||||||
|
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimQuickJavaDoc" mappingModes="N" keys="K"/>
|
||||||
|
</extensions>
|
||||||
|
</idea-plugin>
|
68
resources/META-INF/includes/VimExCommands.xml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<extensions defaultExtensionNs="IdeaVIM">
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ActionListHandler" names="actionlist"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.AsciiHandler" names="as[cii]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdFilterHandler" names="!"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdHandler" names="com[mand]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdClearHandler" names="comc[lear]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CopyTextHandler" names="co[py],t"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DelCmdHandler" names="delc[ommand]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DeleteLinesHandler" names="d[elete]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DeleteMarksHandler" names="delm[arks]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DigraphHandler" names="dig[raphs]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DumpLineHandler" names="dump[line]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.EditFileHandler" names="bro[wse],e[dit]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ActionHandler" names="action"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.EchoHandler" names="ec[ho]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ExitHandler" names="qa[ll],quita[ll],wqa[ll],xa[ll]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FileHandler" names="f[ile]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindClassHandler" names="cla[ss]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindFileHandler" names="fin[d]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindSymbolHandler" names="sym[bol]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.GotoCharacterHandler" names="go[to]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.HelpHandler" names="h[elp]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.HistoryHandler" names="his[tory]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JoinLinesHandler" names="j[oin]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JumpsHandler" names="ju[mps]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.LetHandler" names="let"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MapHandler"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarkHandler" names="ma[rk],k"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarksHandler" names="marks"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MoveTextHandler" names="m[ove]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NextFileHandler" names="n[ext]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NoHLSearchHandler" names="noh[lsearch]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.OnlyHandler" names="on[ly]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PreviousFileHandler" names="N[ext],prev[ious]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PromptFindHandler" names="pro[mptfind]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PromptReplaceHandler" names="promptr[epl]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PutLinesHandler" names="pu[t]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.QuitHandler" names="q[uit],clo[se],hid[e]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RedoHandler" names="red[o]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RegistersHandler" names="di[splay],reg[isters]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RepeatHandler" names="@"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectFileHandler" names="argu[ment]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectFirstFileHandler" names="fir[st],rew[ind]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectLastFileHandler" names="la[st]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SetHandler" names="se[t]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShiftLeftHandler"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShiftRightHandler"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SourceHandler" names="so[urce]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SortHandler" names="sor[t]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SplitHandler" names="vs[plit],sp[lit]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SubstituteHandler" names="s[ubstitute],&,~"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.UndoHandler" names="u[ndo]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteAllHandler" names="wa[ll]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteHandler" names="w[rite]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteNextFileHandler" names="wn[ext]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WritePreviousFileHandler" names="wN[ext],wp[revious]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteQuitHandler" names="wq,exi[t],x[it]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.YankLinesHandler" names="y[ank]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShellHandler" names="sh[ell]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NextTabHandler" names="tabn[ext]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PreviousTabHandler" names="tabp[revious],tabN[ext]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.TabOnlyHandler" names="tabo[nly]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.TabCloseHandler" names="tabc[lose]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.BufferListHandler" names="buffers,ls,files"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.BufferHandler" names="b[uffer]"/>
|
||||||
|
</extensions>
|
||||||
|
</idea-plugin>
|
12
resources/META-INF/includes/VimExtensions.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<extensions defaultExtensionNs="IdeaVIM">
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.textobjentire.VimTextObjEntireExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.argtextobj.VimArgTextObjExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.replacewithregister.ReplaceWithRegister"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension"/>
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.highlightedyank.VimHighlightedYank"/>
|
||||||
|
</extensions>
|
||||||
|
</idea-plugin>
|
25
resources/META-INF/includes/VimListeners.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<applicationListeners>
|
||||||
|
<listener class="com.maddyhome.idea.vim.ui.ExEntryPanel$LafListener"
|
||||||
|
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||||
|
</applicationListeners>
|
||||||
|
<projectListeners>
|
||||||
|
<listener class="com.maddyhome.idea.vim.ui.ExOutputPanel$LafListener"
|
||||||
|
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||||
|
|
||||||
|
<listener class="com.maddyhome.idea.vim.listener.VimListenerManager$VimFileEditorManagerListener"
|
||||||
|
topic="com.intellij.openapi.fileEditor.FileEditorManagerListener"/>
|
||||||
|
|
||||||
|
<listener class="com.maddyhome.idea.vim.listener.IdeaSpecifics$VimActionListener"
|
||||||
|
topic="com.intellij.openapi.actionSystem.ex.AnActionListener"/>
|
||||||
|
|
||||||
|
<listener class="com.maddyhome.idea.vim.listener.IdeaSpecifics$VimTemplateManagerListener"
|
||||||
|
topic="com.intellij.codeInsight.template.TemplateManagerListener"/>
|
||||||
|
|
||||||
|
<listener class="com.maddyhome.idea.vim.group.MarkGroup$MarkListener"
|
||||||
|
topic="com.intellij.ide.bookmarks.BookmarksListener"/>
|
||||||
|
|
||||||
|
<listener class="com.maddyhome.idea.vim.listener.IdeaSpecifics$VimFindModelListener"
|
||||||
|
topic="com.intellij.find.FindModelListener"/>
|
||||||
|
</projectListeners>
|
||||||
|
</idea-plugin>
|
@@ -1,10 +1,10 @@
|
|||||||
<idea-plugin url="https://plugins.jetbrains.com/plugin/164">
|
<idea-plugin url="https://plugins.jetbrains.com/plugin/164" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<name>IdeaVim</name>
|
<name>IdeaVim</name>
|
||||||
<id>IdeaVIM</id>
|
<id>IdeaVIM</id>
|
||||||
<change-notes><![CDATA[
|
<change-notes><![CDATA[
|
||||||
<ul>
|
<ul>
|
||||||
<li>Support surrounding with a function name</li>
|
<li>Support of `virtualedit=onemore`</li>
|
||||||
<li>Various bug fixes</li>
|
<li>A lot of fixes for scrolling</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||||
]]></change-notes>
|
]]></change-notes>
|
||||||
@@ -21,7 +21,8 @@
|
|||||||
<vendor>JetBrains</vendor>
|
<vendor>JetBrains</vendor>
|
||||||
|
|
||||||
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
||||||
<idea-version since-build="183.4284.148"/>
|
<!-- Check for [Version Update] tag in YouTrack as well -->
|
||||||
|
<idea-version since-build="201.5985.32"/>
|
||||||
|
|
||||||
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
||||||
<depends>com.intellij.modules.lang</depends>
|
<depends>com.intellij.modules.lang</depends>
|
||||||
@@ -29,475 +30,74 @@
|
|||||||
|
|
||||||
<application-components>
|
<application-components>
|
||||||
<component>
|
<component>
|
||||||
<implementation-class>com.maddyhome.idea.vim.VimPlugin</implementation-class>
|
<implementation-class>com.maddyhome.idea.vim.DynamicLoaderStopper</implementation-class>
|
||||||
</component>
|
|
||||||
<component>
|
|
||||||
<implementation-class>com.maddyhome.idea.vim.VimLocalConfig</implementation-class>
|
|
||||||
</component>
|
</component>
|
||||||
</application-components>
|
</application-components>
|
||||||
<project-components>
|
|
||||||
<component>
|
|
||||||
<implementation-class>com.maddyhome.idea.vim.VimProjectComponent</implementation-class>
|
|
||||||
</component>
|
|
||||||
</project-components>
|
|
||||||
|
|
||||||
<extensionPoints>
|
<extensionPoints>
|
||||||
<extensionPoint name="vimExtension" interface="com.maddyhome.idea.vim.extension.VimExtension"/>
|
<extensionPoint name="vimExtension" interface="com.maddyhome.idea.vim.extension.VimExtension" dynamic="true"/>
|
||||||
<extensionPoint name="vimAction" interface="com.maddyhome.idea.vim.handler.EditorActionHandlerBase"/>
|
|
||||||
<extensionPoint name="vimExCommand" interface="com.maddyhome.idea.vim.ex.CommandHandler"/>
|
<!-- For internal use only -->
|
||||||
|
<extensionPoint name="vimExCommand" beanClass="com.maddyhome.idea.vim.ex.ExBeanClass" dynamic="true">
|
||||||
|
<with attribute="implementation" implements="com.maddyhome.idea.vim.ex.CommandHandler"/>
|
||||||
|
</extensionPoint>
|
||||||
|
<!-- For internal use only -->
|
||||||
|
<extensionPoint name="vimAction" beanClass="com.maddyhome.idea.vim.handler.ActionBeanClass" dynamic="true">
|
||||||
|
<with attribute="implementation" implements="com.maddyhome.idea.vim.handler.EditorActionHandlerBase"/>
|
||||||
|
</extensionPoint>
|
||||||
</extensionPoints>
|
</extensionPoints>
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<applicationConfigurable groupId="editor" instance="com.maddyhome.idea.vim.ui.VimEmulationConfigurable"/>
|
<applicationConfigurable groupId="editor" instance="com.maddyhome.idea.vim.ui.VimEmulationConfigurable"/>
|
||||||
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MotionGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.ChangeGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.CommandGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MarkGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.RegisterGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.FileGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.SearchGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.ProcessGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.MacroGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.DigraphGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.HistoryGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.KeyGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.WindowGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.EditorGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.visual.VisualMotionGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.copy.YankGroup"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.copy.PutGroup"/>
|
|
||||||
|
|
||||||
<projectService serviceImplementation="com.maddyhome.idea.vim.group.NotificationService"/>
|
<projectService serviceImplementation="com.maddyhome.idea.vim.group.NotificationService"/>
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.group.NotificationService"/>
|
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.StatusBarIconFactory"/>
|
||||||
|
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.ShowCmdStatusBarWidgetFactory" order="first"/>
|
||||||
|
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.config.VimLocalConfig"/>
|
||||||
|
<applicationService serviceImplementation="com.maddyhome.idea.vim.VimPlugin"/>
|
||||||
|
|
||||||
|
<!-- Initialise as early as possible so that we're ready to edit quickly. This is especially important for Rider,
|
||||||
|
which (at least for 2020.1) has some long running activities that block other startup extensions. None of the
|
||||||
|
core platform activities have IDs, so we can't use "before ID". We have to use "first" -->
|
||||||
|
<postStartupActivity implementation="com.maddyhome.idea.vim.PluginStartup" order="first"/>
|
||||||
|
|
||||||
|
<editorFloatingToolbarProvider implementation="com.maddyhome.idea.vim.ui.ReloadFloatingToolbar"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<extensions defaultExtensionNs="IdeaVIM">
|
<xi:include href="/META-INF/includes/ApplicationServices.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension"/>
|
<xi:include href="/META-INF/includes/VimActions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"/>
|
<xi:include href="/META-INF/includes/VimExCommands.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension"/>
|
<xi:include href="/META-INF/includes/VimExtensions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
|
<xi:include href="/META-INF/includes/VimListeners.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
|
|
||||||
<!-- Motions -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.tabs.MotionPreviousTabAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.tabs.MotionNextTabAction"/>
|
|
||||||
<!-- Left/Right -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnInsertModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastScreenColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharReverseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLastNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftInsertModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftWrapAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftMatchCharAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftTillMatchCharAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionMiddleColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightWrapAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionHomeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftHomeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftEndAction"/>
|
|
||||||
<!-- Up/Down -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownNotLineWiseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownFirstNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.EnterNormalAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionPercentOrMatchAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpNotLineWiseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionUpFirstNonSpaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionArrowDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionArrowUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionArrowLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionArrowRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.LookupDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.LookupUpAction"/>
|
|
||||||
<!-- Text -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionCamelRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionNthCharacterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordEndLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordEndRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionWordRightInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionBigWordRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionParagraphNextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionParagraphPreviousAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceCloseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceOpenAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenCloseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenOpenAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextStartAction"/>
|
|
||||||
<!-- Text Objects -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterWordAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBigWordAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerWordAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBigWordAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockAngleAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBraceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBracketAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockParenAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockDoubleQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockSingleQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBackQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockTagAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockAngleAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBraceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBracketAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockParenAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockDoubleQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockSingleQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBackQuoteAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockTagAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerParagraphAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterParagraphAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionInnerSentenceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.object.MotionOuterSentenceAction"/>
|
|
||||||
<!-- Marks -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionMarkAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkNoSaveJumpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineNoSaveJumpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkNoSaveJumpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineNoSaveJumpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction"/>
|
|
||||||
<!-- Screen -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionFirstScreenLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.screen.MotionMiddleScreenLineAction"/>
|
|
||||||
<!-- Scroll -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLinePageStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLinePageStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownInsertModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpInsertModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenColumnAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftLeftAction"/>
|
|
||||||
<!-- Visual -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleLineModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleBlockModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsBlockAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSelectPreviousAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualSwapSelectionsAction"/>
|
|
||||||
|
|
||||||
<!-- Select-->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableCharacterModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableLineModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnableBlockModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.motion.SelectMotionRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.motion.SelectMotionLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectToggleVisualMode"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEnterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectEscapeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.select.SelectDeleteAction"/>
|
|
||||||
|
|
||||||
<!-- Insert -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAfterCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAfterLineEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertAtPreviousInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertBeforeCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertBeforeFirstNonBlankAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCharacterAboveCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertCharacterBelowCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertDeleteInsertedTextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertDeletePreviousWordAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertEnterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertExitModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertLineStartAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertNewLineAboveAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertNewLineBelowAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertExitAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertRegisterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.InsertSingleCommandAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.VisualBlockInsertAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.insert.VisualBlockAppendAction"/>
|
|
||||||
|
|
||||||
<!-- Delete -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteEndOfLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesSpacesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesSpacesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesEndAction"/>
|
|
||||||
|
|
||||||
<!-- Change -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleCharacterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCharacterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeCharactersAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeEndOfLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeNumberIncAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeNumberDecAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberIncAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberDecAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberAvalancheIncAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.number.ChangeVisualNumberAvalancheDecAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeReplaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualCharacterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesEndAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.FilterMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.FilterCountLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.FilterVisualLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.AutoIndentLinesVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ReformatCodeVisualAction"/>
|
|
||||||
|
|
||||||
<!-- Shift -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.AutoIndentLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.AutoIndentMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftLinesNormalModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftLeftVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightLinesNormalModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.shift.ShiftRightVisualAction"/>
|
|
||||||
|
|
||||||
<!-- Copy -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorNoIndentAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorNoIndentAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorActionMoveCursor"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorActionMoveCursor"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.SelectRegisterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankLineAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankLineMidCountAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankMotionAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankVisualAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.YankVisualLinesAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextNoIndentAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.copy.PutVisualTextMoveCursorAction"/>
|
|
||||||
|
|
||||||
<!-- File -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileSaveCloseAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FilePreviousAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetAsciiAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetHexAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetFileInfoAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.file.FileGetLocationInfoAction"/>
|
|
||||||
|
|
||||||
<!-- Window -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.VerticalSplitAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.HorizontalSplitAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.CloseWindowAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowOnlyAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowNextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowPrevAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowLeftAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowRightAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowUpAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.window.WindowDownAction"/>
|
|
||||||
|
|
||||||
<!-- Search -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchEntryFwdAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchEntryRevAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchAgainNextAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchAgainPreviousAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordForwardAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordBackwardAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWordForwardAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.SearchWordBackwardAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.search.GotoDeclarationAction"/>
|
|
||||||
|
|
||||||
<!-- Macro -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.macro.ToggleRecordingAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.macro.PlaybackRegisterAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.macro.PlaybackLastRegisterAction"/>
|
|
||||||
|
|
||||||
<!-- Command Line -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.ex.ProcessExEntryAction"/>
|
|
||||||
|
|
||||||
<!-- Other -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLastSearchReplaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.change.ChangeLastGlobalSearchReplaceAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.RepeatChangeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.RepeatExCommandAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.ExEntryAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.ResetModeAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.RedoAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.UndoAction"/>
|
|
||||||
|
|
||||||
<!-- Keys -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.change.OperatorAction"/>
|
|
||||||
|
|
||||||
<!-- Visual Selection of last Search Pattern (gn) -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.VisualSelectNextSearch"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.VisualSelectPreviousSearch"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.GnNextTextObject"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.gn.GnPreviousTextObject"/>
|
|
||||||
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.CtrlDownAction"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.CtrlUpAction"/>
|
|
||||||
|
|
||||||
<!-- Folds -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseAllRegions"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseRegion"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimCollapseRegionRecursively"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandAllRegions"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandRegion"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.fold.VimExpandRegionRecursively"/>
|
|
||||||
|
|
||||||
<!-- Editor Actions -->
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorBackSpace"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorDelete"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorDown"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorTab"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimEditorUp"/>
|
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.editor.VimQuickJavaDoc"/>
|
|
||||||
|
|
||||||
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ActionListHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.AsciiHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdFilterHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CmdClearHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.CopyTextHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DelCmdHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DeleteLinesHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DeleteMarksHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DigraphHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.DumpLineHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.EditFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ActionHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.EchoHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ExitHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindClassHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.FindSymbolHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.GotoCharacterHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.HelpHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.HistoryHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JoinLinesHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JumpsHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.LetHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MapHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarkHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarksHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MoveTextHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NextFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NoHLSearchHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.OnlyHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PreviousFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PromptFindHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PromptReplaceHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PutLinesHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.QuitHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RedoHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RegistersHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.RepeatHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectFirstFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SelectLastFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SetHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShiftLeftHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShiftRightHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SourceHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SortHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SplitHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.SubstituteHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.UndoHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteAllHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteNextFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WritePreviousFileHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.WriteQuitHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.YankLinesHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.ShellHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.NextTabHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PreviousTabHandler"/>
|
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.TabOnlyHandler"/>
|
|
||||||
|
|
||||||
</extensions>
|
|
||||||
|
|
||||||
<actions>
|
<actions>
|
||||||
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.action.VimPluginToggleAction" text="Vim Emulator" description="Toggle the vim plugin On/off">
|
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.action.VimPluginToggleAction">
|
||||||
<keyboard-shortcut first-keystroke="control alt V" keymap="$default"/>
|
|
||||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<!-- Internal -->
|
<!-- Internal -->
|
||||||
<action id="VimInternalAddInlays" class="com.maddyhome.idea.vim.action.internal.AddInlaysAction" text="Add Test Inlays | IdeaVim Internal" internal="true"/>
|
<action id="VimInternalAddBlockInlays" class="com.maddyhome.idea.vim.action.internal.AddBlockInlaysAction" text="Add Test Block Inlays | IdeaVim Internal" internal="true"/>
|
||||||
|
<action id="VimInternalAddInlineInlays" class="com.maddyhome.idea.vim.action.internal.AddInlineInlaysAction" text="Add Test Inline Inlays | IdeaVim Internal" internal="true"/>
|
||||||
|
|
||||||
<action id="VimShortcutKeyAction" class="com.maddyhome.idea.vim.action.VimShortcutKeyAction" text="Shortcuts"/>
|
<action id="VimShortcutKeyAction" class="com.maddyhome.idea.vim.action.VimShortcutKeyAction"/>
|
||||||
|
<action id="VimActions" class="com.maddyhome.idea.vim.ui.VimActions"/>
|
||||||
|
|
||||||
|
<!-- [Version Update] 202+ use-shortcut-of="ExternalSystem.ProjectRefreshAction" -->
|
||||||
|
<group id="IdeaVim.ReloadVimRc.group" class="com.maddyhome.idea.vim.ui.ReloadFloatingToolbarActionGroup">
|
||||||
|
<action id="IdeaVim.ReloadVimRc.reload" class="com.maddyhome.idea.vim.ui.ReloadVimRc">
|
||||||
|
<keyboard-shortcut first-keystroke="control shift O" keymap="$default"/>
|
||||||
|
<keyboard-shortcut first-keystroke="control shift O" keymap="Eclipse" remove="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="control shift O" keymap="NetBeans 6.5" remove="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="control shift O" keymap="Visual Studio" remove="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="meta shift O" keymap="Mac OS X" replace-all="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="meta shift O" keymap="Eclipse (Mac OS X)" replace-all="true" remove="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="meta shift O" keymap="Xcode" replace-all="true" remove="true"/>
|
||||||
|
<keyboard-shortcut first-keystroke="meta shift I" keymap="Mac OS X 10.5+" replace-all="true"/>
|
||||||
|
</action>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<action id="VimFindActionIdAction"
|
||||||
|
class="com.maddyhome.idea.vim.listener.FindActionIdAction" text="IdeaVim: Track Action Ids"
|
||||||
|
description="Starts tracking ids of executed actions"/>
|
||||||
</actions>
|
</actions>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
9
resources/META-INF/pluginIcon.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
|
||||||
|
<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="100%" stop-color="#087CFA"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<polygon fill="url(#ideavim_plugin-a)" fill-rule="evenodd" points="28.019 4 15.988 24.119 15.988 4 4 4 4 36 17.953 36 36 4"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 450 B |
9
resources/META-INF/pluginIcon_noBorders.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
|
||||||
|
<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="100%" stop-color="#087CFA"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<polygon fill="url(#ideavim_plugin-a)" fill-rule="evenodd" points="29.019 0 13.988 26.119 13.988 0 0 0 0 40 16.953 40 40 0"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 450 B |
BIN
resources/changes/0.58/reload_ideavimrc.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
resources/changes/0.59/highlight_yank.gif
Normal file
After Width: | Height: | Size: 128 KiB |
4
resources/icons/github.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<path
|
||||||
|
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 824 B |
9
resources/icons/ideavim.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40">
|
||||||
|
<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="100%" stop-color="#087CFA"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<polygon fill="url(#ideavim_plugin-a)" fill-rule="evenodd" points="28.019 4 15.988 24.119 15.988 4 4 4 4 36 17.953 36 36 4"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 450 B |
3
resources/icons/ideavim_disabled.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40">
|
||||||
|
<polygon fill="#6E6E6E" fill-rule="evenodd" points="28.019 4 15.988 24.119 15.988 4 4 4 4 36 17.953 36 36 4"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 204 B |
3
resources/icons/ideavim_disabled_dark.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40">
|
||||||
|
<polygon fill="#AFB1B3" fill-rule="evenodd" points="28.019 4 15.988 24.119 15.988 4 4 4 4 36 17.953 36 36 4"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 204 B |
4
resources/icons/twitter.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" width="16" height="16" fill="#000000">
|
||||||
|
<path fill="#1DA1F2" d="M 25.855469 5.574219 C 24.914063 5.992188 23.902344 6.273438 22.839844 6.402344 C 23.921875 5.75 24.757813 4.722656 25.148438 3.496094 C 24.132813 4.097656 23.007813 4.535156 21.8125 4.769531 C 20.855469 3.75 19.492188 3.113281 17.980469 3.113281 C 15.082031 3.113281 12.730469 5.464844 12.730469 8.363281 C 12.730469 8.773438 12.777344 9.175781 12.867188 9.558594 C 8.503906 9.339844 4.636719 7.246094 2.046875 4.070313 C 1.59375 4.847656 1.335938 5.75 1.335938 6.714844 C 1.335938 8.535156 2.261719 10.140625 3.671875 11.082031 C 2.808594 11.054688 2 10.820313 1.292969 10.425781 C 1.292969 10.449219 1.292969 10.46875 1.292969 10.492188 C 1.292969 13.035156 3.101563 15.15625 5.503906 15.640625 C 5.0625 15.761719 4.601563 15.824219 4.121094 15.824219 C 3.78125 15.824219 3.453125 15.792969 3.132813 15.730469 C 3.800781 17.8125 5.738281 19.335938 8.035156 19.375 C 6.242188 20.785156 3.976563 21.621094 1.515625 21.621094 C 1.089844 21.621094 0.675781 21.597656 0.265625 21.550781 C 2.585938 23.039063 5.347656 23.90625 8.3125 23.90625 C 17.96875 23.90625 23.25 15.90625 23.25 8.972656 C 23.25 8.742188 23.246094 8.515625 23.234375 8.289063 C 24.261719 7.554688 25.152344 6.628906 25.855469 5.574219"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
49
resources/icons/youtrack.svg
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="16" height="16" viewBox="0 0 70 70" style="enable-background:new 0 0 70 70;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
|
||||||
|
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="7.083" y1="16.2945" x2="64.1058" y2="42.2878" gradientTransform="matrix(1 0 0 -1 0 71.0471)">
|
||||||
|
<stop offset="0" style="stop-color:#7863AB"/>
|
||||||
|
<stop offset="0.1649" style="stop-color:#6572B6"/>
|
||||||
|
<stop offset="0.3776" style="stop-color:#538FCC"/>
|
||||||
|
<stop offset="0.5401" style="stop-color:#3DA5DD"/>
|
||||||
|
<stop offset="0.6317" style="stop-color:#35ADE3"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path style="fill:url(#SVGID_1_);" d="M66.9,47.5c-0.2-0.2-13.1-12.6-13.1-12.6s9.8-10.4,12.4-13c0.8-0.8,1.5-1.6,2-2.6
|
||||||
|
c3.6-6.1,1.5-13.9-4.6-17.5c-4.5-2.6-10.1-2.2-14.1,0.8c-0.7,0.5-1.3,1-1.9,1.6C47.3,4.6,33.7,17,21.9,27.8l22.1,14L20.8,67.9
|
||||||
|
c-1.4,1-2.8,1.6-4.3,1.9c0.3,0,0.5,0,0.8-0.1c4.6-0.7,43.9-7.3,45.8-7.7c2.3-0.4,4.4-1.8,5.7-3.9C71,54.5,70,50,66.9,47.5z"/>
|
||||||
|
|
||||||
|
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="30.31" y1="42.9162" x2="1.0679" y2="68.7442" gradientTransform="matrix(1 0 0 -1 0 71.0471)">
|
||||||
|
<stop offset="0" style="stop-color:#7863AB"/>
|
||||||
|
<stop offset="7.176042e-002" style="stop-color:#895EA7"/>
|
||||||
|
<stop offset="0.2523" style="stop-color:#C34F9D"/>
|
||||||
|
<stop offset="0.3901" style="stop-color:#ED3995"/>
|
||||||
|
<stop offset="0.4677" style="stop-color:#EE3B8B"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path style="fill:url(#SVGID_2_);" d="M45.9,30.5c-0.4-2.7-1.8-4.9-3.8-6.5C40,22.4,23.8,5.6,22,3.7C19.2,1,15.2-0.5,11.1,0.2
|
||||||
|
C4.1,1.2-0.8,7.8,0.3,14.8c0.5,3.5,2.5,6.5,5.1,8.4c2.6,2,23,16,24.3,17c2.1,1.6,4.9,2.5,7.7,2C42.9,41.2,46.8,36,45.9,30.5z"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="4.9829" y1="12.3617" x2="74.0226" y2="55.8638" gradientTransform="matrix(1 0 0 -1 0 71.0471)">
|
||||||
|
<stop offset="0" style="stop-color:#7863AB"/>
|
||||||
|
<stop offset="0.1649" style="stop-color:#6572B6"/>
|
||||||
|
<stop offset="0.3776" style="stop-color:#538FCC"/>
|
||||||
|
<stop offset="0.5401" style="stop-color:#3DA5DD"/>
|
||||||
|
<stop offset="0.6317" style="stop-color:#35ADE3"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path style="fill:url(#SVGID_3_);" d="M23,67.8c0.1,0,23.3-26.1,23.3-26.1L22.9,26.9c-8.3,7.6-16,14.5-17.8,16.2
|
||||||
|
c-1.1,1-2.2,2.3-3,3.7c-4.3,7.4-1.8,16.8,5.6,21.1C10.7,69.6,17.5,71.7,23,67.8z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<rect x="13.4" y="13.4" style="fill:#231F20;" width="43.2" height="43.2"/>
|
||||||
|
<rect x="17.4" y="48.5" style="fill:#FFFFFF;" width="16.2" height="2.7"/>
|
||||||
|
<polygon style="fill:#FFFFFF;" points="23.8,29.9 17,19.1 21.6,19.1 25.8,26.2 30.2,19.1 34.7,19.1 27.8,29.8 27.8,37 23.8,37
|
||||||
|
"/>
|
||||||
|
<polygon style="fill:#FFFFFF;" points="41.6,22.7 36.1,22.7 36.1,19.1 51,19.1 51,22.7 45.5,22.7 45.5,37 41.6,37 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
# IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
# Copyright (C) 2003-2019 The IdeaVim authors
|
# Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,6 +23,7 @@ e_badrange=Unexpected character ''{0}'' in range
|
|||||||
e_norange=No range allowed
|
e_norange=No range allowed
|
||||||
e_rangereq=Range required
|
e_rangereq=Range required
|
||||||
e_argreq=Argument required
|
e_argreq=Argument required
|
||||||
|
e_argforb=Argument forbidden
|
||||||
e_noprev=E34: No previous command
|
e_noprev=E34: No previous command
|
||||||
e_nopresub=E33: No previous substitute regular expression
|
e_nopresub=E33: No previous substitute regular expression
|
||||||
E191=E191: Argument must be a letter or forward/backward quote
|
E191=E191: Argument must be a letter or forward/backward quote
|
||||||
@@ -69,3 +70,10 @@ unkopt=Unknown option: {0}
|
|||||||
e_invarg=Invalid argument: {0}
|
e_invarg=Invalid argument: {0}
|
||||||
E475=E475: Invalid argument: {0}
|
E475=E475: Invalid argument: {0}
|
||||||
E774=E774: 'operatorfunc' is empty
|
E774=E774: 'operatorfunc' is empty
|
||||||
|
|
||||||
|
action.VimPluginToggle.text=Vim Emulator
|
||||||
|
description.VimPluginToggle.description=Toggle the vim plugin On/off
|
||||||
|
|
||||||
|
action.VimShortcutKeyAction.text=Shortcuts
|
||||||
|
|
||||||
|
action.VimActions.text=Vim Actions
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,10 +16,9 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.key;
|
package com.maddyhome.idea.vim
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marker interface for all key/action tree nodes
|
* This class prevents dynamic loading of IdeaVim plugin
|
||||||
*/
|
*/
|
||||||
public interface Node {
|
class DynamicLoaderStopper
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,15 +19,9 @@
|
|||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.codeInsight.lookup.LookupManager;
|
import com.intellij.codeInsight.lookup.LookupManager;
|
||||||
import com.intellij.codeInsight.template.TemplateManager;
|
|
||||||
import com.intellij.codeInsight.template.TemplateManagerListener;
|
|
||||||
import com.intellij.find.FindManager;
|
|
||||||
import com.intellij.find.FindModelListener;
|
|
||||||
import com.intellij.ide.bookmarks.BookmarksListener;
|
|
||||||
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.actionSystem.ex.AnActionListener;
|
|
||||||
import com.intellij.openapi.editor.Document;
|
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;
|
||||||
@@ -35,10 +29,7 @@ import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
|||||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||||
import com.intellij.openapi.editor.event.*;
|
import com.intellij.openapi.editor.event.*;
|
||||||
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
|
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import com.intellij.openapi.util.Disposer;
|
|
||||||
import com.intellij.util.messages.MessageBusConnection;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -46,23 +37,19 @@ import javax.swing.*;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author vlan
|
* @author vlan
|
||||||
*/
|
*/
|
||||||
public class EventFacade {
|
public class EventFacade {
|
||||||
@NotNull private static final EventFacade ourInstance = new EventFacade();
|
private static final @NotNull EventFacade ourInstance = new EventFacade();
|
||||||
|
|
||||||
@Nullable private TypedActionHandler myOriginalTypedActionHandler;
|
private @Nullable TypedActionHandler myOriginalTypedActionHandler;
|
||||||
private Map<Project, MessageBusConnection> connections = new HashMap<>();
|
|
||||||
|
|
||||||
private EventFacade() {
|
private EventFacade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull EventFacade getInstance() {
|
||||||
public static EventFacade getInstance() {
|
|
||||||
return ourInstance;
|
return ourInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,35 +76,10 @@ public class EventFacade {
|
|||||||
action.registerCustomShortcutSet(shortcutSet, component, disposable);
|
action.registerCustomShortcutSet(shortcutSet, component, disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unregisterCustomShortcutSet(@NotNull AnAction action, @Nullable JComponent component) {
|
public void unregisterCustomShortcutSet(@NotNull AnAction action, @NotNull JComponent component) {
|
||||||
action.unregisterCustomShortcutSet(component);
|
action.unregisterCustomShortcutSet(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void connectFileEditorManagerListener(@NotNull Project project, @NotNull FileEditorManagerListener listener) {
|
|
||||||
final MessageBusConnection connection = getConnection(project);
|
|
||||||
connection.subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connectAnActionListener(@NotNull Project project, @NotNull AnActionListener listener) {
|
|
||||||
final MessageBusConnection connection = getConnection(project);
|
|
||||||
connection.subscribe(AnActionListener.TOPIC, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connectTemplateStartedListener(@NotNull Project project, @NotNull TemplateManagerListener listener) {
|
|
||||||
final MessageBusConnection connection = getConnection(project);
|
|
||||||
connection.subscribe(TemplateManager.TEMPLATE_STARTED_TOPIC, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connectBookmarkListener(@NotNull Project project, @NotNull BookmarksListener bookmarksListener) {
|
|
||||||
final MessageBusConnection connection = getConnection(project);
|
|
||||||
connection.subscribe(BookmarksListener.TOPIC, bookmarksListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connectFindModelListener(@NotNull Project project, @NotNull FindModelListener findModelListener) {
|
|
||||||
final MessageBusConnection connection = getConnection(project);
|
|
||||||
connection.subscribe(FindManager.FIND_MODEL_TOPIC, findModelListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addDocumentListener(@NotNull Document document, @NotNull DocumentListener listener) {
|
public void addDocumentListener(@NotNull Document document, @NotNull DocumentListener listener) {
|
||||||
document.addDocumentListener(listener);
|
document.addDocumentListener(listener);
|
||||||
}
|
}
|
||||||
@@ -169,32 +131,15 @@ public class EventFacade {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void registerLookupListener(@NotNull Project project, @NotNull PropertyChangeListener propertyChangeListener) {
|
public void registerLookupListener(@NotNull Project project, @NotNull PropertyChangeListener propertyChangeListener) {
|
||||||
LookupManager.getInstance(project).addPropertyChangeListener(propertyChangeListener, project);
|
VimProjectService parentDisposable = VimProjectService.getInstance(project);
|
||||||
|
LookupManager.getInstance(project).addPropertyChangeListener(propertyChangeListener, parentDisposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeLookupListener(@NotNull Project project, @NotNull PropertyChangeListener propertyChangeListener) {
|
public void removeLookupListener(@NotNull Project project, @NotNull PropertyChangeListener propertyChangeListener) {
|
||||||
LookupManager.getInstance(project).removePropertyChangeListener(propertyChangeListener);
|
LookupManager.getInstance(project).removePropertyChangeListener(propertyChangeListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableBusConnection() {
|
private @NotNull TypedAction getTypedAction() {
|
||||||
connections.values().forEach(MessageBusConnection::disconnect);
|
|
||||||
connections.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private MessageBusConnection getConnection(Project project) {
|
|
||||||
if (!connections.containsKey(project)) {
|
|
||||||
final MessageBusConnection connection = project.getMessageBus().connect();
|
|
||||||
connections.put(project, connection);
|
|
||||||
Disposer.register(project, () -> {
|
|
||||||
connection.disconnect();
|
|
||||||
connections.remove(project);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return connections.get(project);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private TypedAction getTypedAction() {
|
|
||||||
return EditorActionManager.getInstance().getTypedAction();
|
return EditorActionManager.getInstance().getTypedAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
45
src/com/maddyhome/idea/vim/PluginStartup.kt
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim
|
||||||
|
|
||||||
|
import com.intellij.openapi.project.Project
|
||||||
|
import com.intellij.openapi.startup.StartupActivity
|
||||||
|
import com.maddyhome.idea.vim.listener.VimListenerManager
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Alex Plate
|
||||||
|
*/
|
||||||
|
class PluginStartup : StartupActivity.DumbAware {
|
||||||
|
|
||||||
|
private var firstInitializationOccurred = false
|
||||||
|
|
||||||
|
override fun runActivity(project: Project) {
|
||||||
|
if (firstInitializationOccurred && VimPlugin.isEnabled()) {
|
||||||
|
// This code should be executed on every project open
|
||||||
|
// Project listeners are self-disposable, so there is no need to unregister them on project close
|
||||||
|
VimListenerManager.ProjectListeners.add(project)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (firstInitializationOccurred) return
|
||||||
|
firstInitializationOccurred = true
|
||||||
|
|
||||||
|
// This code should be executed once
|
||||||
|
VimPlugin.getInstance().initialize()
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,8 +19,9 @@ package com.maddyhome.idea.vim;
|
|||||||
|
|
||||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||||
import com.maddyhome.idea.vim.group.KeyGroup;
|
import com.maddyhome.idea.vim.group.KeyGroup;
|
||||||
|
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.Shortcut;
|
import com.maddyhome.idea.vim.key.MappingOwner;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -29,30 +30,45 @@ import java.awt.event.KeyEvent;
|
|||||||
|
|
||||||
public class RegisterActions {
|
public class RegisterActions {
|
||||||
|
|
||||||
public static final ExtensionPointName<EditorActionHandlerBase> VIM_ACTIONS_EP =
|
public static final ExtensionPointName<ActionBeanClass> VIM_ACTIONS_EP =
|
||||||
ExtensionPointName.create("IdeaVIM.vimAction");
|
ExtensionPointName.create("IdeaVIM.vimAction");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register all the key/action mappings for the plugin.
|
* Register all the key/action mappings for the plugin.
|
||||||
*/
|
*/
|
||||||
static void registerActions() {
|
public static void registerActions() {
|
||||||
registerVimCommandActions();
|
registerVimCommandActions();
|
||||||
registerEmptyShortcuts();
|
registerEmptyShortcuts();
|
||||||
|
registerEpListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
private static void registerEpListener() {
|
||||||
public static EditorActionHandlerBase findAction(@NotNull String id) {
|
// IdeaVim doesn't support contribution to VIM_ACTIONS_EP extension point, so technically we can skip this update,
|
||||||
return VIM_ACTIONS_EP.extensions().filter(vimActionBean -> vimActionBean.getId().equals(id)).findFirst()
|
// but let's support dynamic plugins in a more classic way and reload actions on every EP change.
|
||||||
.orElse(null);
|
VIM_ACTIONS_EP.getPoint(null).addExtensionPointListener(() -> {
|
||||||
|
unregisterActions();
|
||||||
|
registerActions();
|
||||||
|
}, false, VimPlugin.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @Nullable EditorActionHandlerBase findAction(@NotNull String id) {
|
||||||
public static EditorActionHandlerBase findActionOrDie(@NotNull String id) {
|
return VIM_ACTIONS_EP.extensions().filter(vimActionBean -> vimActionBean.getActionId().equals(id)).findFirst()
|
||||||
|
.map(ActionBeanClass::getAction).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull EditorActionHandlerBase findActionOrDie(@NotNull String id) {
|
||||||
EditorActionHandlerBase action = findAction(id);
|
EditorActionHandlerBase action = findAction(id);
|
||||||
if (action == null) throw new RuntimeException("Action " + id + " is not registered");
|
if (action == null) throw new RuntimeException("Action " + id + " is not registered");
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void unregisterActions() {
|
||||||
|
KeyGroup keyGroup = VimPlugin.getKeyIfCreated();
|
||||||
|
if (keyGroup != null) {
|
||||||
|
keyGroup.unregisterCommandActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void registerVimCommandActions() {
|
private static void registerVimCommandActions() {
|
||||||
KeyGroup parser = VimPlugin.getKey();
|
KeyGroup parser = VimPlugin.getKey();
|
||||||
VIM_ACTIONS_EP.extensions().forEach(parser::registerCommandAction);
|
VIM_ACTIONS_EP.extensions().forEach(parser::registerCommandAction);
|
||||||
@@ -61,12 +77,8 @@ public class RegisterActions {
|
|||||||
private static void registerEmptyShortcuts() {
|
private static void registerEmptyShortcuts() {
|
||||||
final KeyGroup parser = VimPlugin.getKey();
|
final KeyGroup parser = VimPlugin.getKey();
|
||||||
|
|
||||||
// Digraph shortcuts are handled directly by KeyHandler#handleKey, so they don't have an action. But we still need to
|
// The {char1} <BS> {char2} shortcut is handled directly by KeyHandler#handleKey, so doesn't have an action. But we
|
||||||
// register the shortcuts or the editor will swallow them. Technically, the shortcuts will be registered as part of
|
// still need to register the shortcut, to make sure the editor doesn't swallow it.
|
||||||
// other commands, but it's best to be explicit
|
parser.registerShortcutWithoutAction(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), MappingOwner.IdeaVim.INSTANCE);
|
||||||
parser.registerShortcutWithoutAction(new Shortcut(KeyStroke.getKeyStroke(KeyEvent.VK_K, KeyEvent.CTRL_MASK)));
|
|
||||||
parser.registerShortcutWithoutAction(new Shortcut(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK)));
|
|
||||||
parser.registerShortcutWithoutAction(new Shortcut(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_MASK)));
|
|
||||||
parser.registerShortcutWithoutAction(new Shortcut(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,14 +19,15 @@ package com.maddyhome.idea.vim;
|
|||||||
|
|
||||||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||||||
import com.intellij.ide.plugins.PluginManager;
|
import com.intellij.ide.plugins.PluginManager;
|
||||||
import com.intellij.ide.util.PropertiesComponent;
|
|
||||||
import com.intellij.notification.Notification;
|
import com.intellij.notification.Notification;
|
||||||
import com.intellij.notification.NotificationListener;
|
import com.intellij.notification.NotificationListener;
|
||||||
import com.intellij.openapi.Disposable;
|
import com.intellij.openapi.Disposable;
|
||||||
import com.intellij.openapi.application.ApplicationInfo;
|
import com.intellij.openapi.application.Application;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
import com.intellij.openapi.application.PermanentInstallationID;
|
import com.intellij.openapi.components.PersistentStateComponent;
|
||||||
import com.intellij.openapi.components.*;
|
import com.intellij.openapi.components.ServiceManager;
|
||||||
|
import com.intellij.openapi.components.State;
|
||||||
|
import com.intellij.openapi.components.Storage;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.extensions.PluginId;
|
import com.intellij.openapi.extensions.PluginId;
|
||||||
import com.intellij.openapi.keymap.Keymap;
|
import com.intellij.openapi.keymap.Keymap;
|
||||||
@@ -36,36 +37,38 @@ import com.intellij.openapi.options.ShowSettingsUtil;
|
|||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import com.intellij.openapi.project.ProjectManager;
|
import com.intellij.openapi.project.ProjectManager;
|
||||||
import com.intellij.openapi.ui.Messages;
|
import com.intellij.openapi.ui.Messages;
|
||||||
import com.intellij.openapi.util.JDOMUtil;
|
|
||||||
import com.intellij.openapi.util.SystemInfo;
|
import com.intellij.openapi.util.SystemInfo;
|
||||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
|
||||||
import com.intellij.openapi.wm.StatusBar;
|
import com.intellij.openapi.wm.StatusBar;
|
||||||
import com.intellij.openapi.wm.WindowManager;
|
import com.intellij.openapi.wm.WindowManager;
|
||||||
import com.intellij.util.io.HttpRequests;
|
import com.maddyhome.idea.vim.config.VimLocalConfig;
|
||||||
|
import com.maddyhome.idea.vim.config.VimState;
|
||||||
|
import com.maddyhome.idea.vim.config.migration.ApplicationConfigurationMigrator;
|
||||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
import com.maddyhome.idea.vim.ex.CommandParser;
|
||||||
import com.maddyhome.idea.vim.ex.vimscript.VimScriptParser;
|
import com.maddyhome.idea.vim.ex.vimscript.VimScriptParser;
|
||||||
|
import com.maddyhome.idea.vim.extension.VimExtensionRegistrar;
|
||||||
import com.maddyhome.idea.vim.group.*;
|
import com.maddyhome.idea.vim.group.*;
|
||||||
import com.maddyhome.idea.vim.group.copy.PutGroup;
|
import com.maddyhome.idea.vim.group.copy.PutGroup;
|
||||||
import com.maddyhome.idea.vim.group.copy.YankGroup;
|
import com.maddyhome.idea.vim.group.copy.YankGroup;
|
||||||
import com.maddyhome.idea.vim.group.visual.VisualMotionGroup;
|
import com.maddyhome.idea.vim.group.visual.VisualMotionGroup;
|
||||||
import com.maddyhome.idea.vim.helper.DocumentManager;
|
|
||||||
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.option.OptionsManager;
|
import com.maddyhome.idea.vim.option.OptionsManager;
|
||||||
import com.maddyhome.idea.vim.ui.ExEntryPanel;
|
import com.maddyhome.idea.vim.ui.ExEntryPanel;
|
||||||
|
import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
||||||
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable;
|
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable;
|
||||||
|
import com.maddyhome.idea.vim.ui.VimRcFileState;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
import org.jdom.JDOMException;
|
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 javax.swing.event.HyperlinkEvent;
|
import javax.swing.event.HyperlinkEvent;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.util.List;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import static com.maddyhome.idea.vim.group.EditorGroup.EDITOR_STORE_ELEMENT;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import static com.maddyhome.idea.vim.group.KeyGroup.SHORTCUT_CONFLICTS_ELEMENT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This plugin attempts to emulate the key binding and general functionality of Vim and gVim. See the supplied
|
* This plugin attempts to emulate the key binding and general functionality of Vim and gVim. See the supplied
|
||||||
@@ -76,39 +79,46 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
* Registers and marks are shared across open projects so you can copy and paste between files of different projects.
|
* Registers and marks are shared across open projects so you can copy and paste between files of different projects.
|
||||||
*/
|
*/
|
||||||
@State(name = "VimSettings", storages = {@Storage("$APP_CONFIG$/vim_settings.xml")})
|
@State(name = "VimSettings", storages = {@Storage("$APP_CONFIG$/vim_settings.xml")})
|
||||||
public class VimPlugin implements BaseComponent, PersistentStateComponent<Element>, Disposable {
|
public class VimPlugin implements PersistentStateComponent<Element>, Disposable {
|
||||||
private static final String IDEAVIM_COMPONENT_NAME = "VimPlugin";
|
|
||||||
private static final String IDEAVIM_PLUGIN_ID = "IdeaVIM";
|
private static final String IDEAVIM_PLUGIN_ID = "IdeaVIM";
|
||||||
private static final String IDEAVIM_STATISTICS_TIMESTAMP_KEY = "ideavim.statistics.timestamp";
|
public static final int STATE_VERSION = 7;
|
||||||
public static final int STATE_VERSION = 5;
|
|
||||||
|
|
||||||
private static long lastBeepTimeMillis;
|
private static long lastBeepTimeMillis;
|
||||||
|
|
||||||
private boolean error = false;
|
private boolean error = false;
|
||||||
|
private String message = null;
|
||||||
|
|
||||||
private int previousStateVersion = 0;
|
private int previousStateVersion = 0;
|
||||||
private String previousKeyMap = "";
|
private String previousKeyMap = "";
|
||||||
|
|
||||||
// It is enabled by default to avoid any special configuration after plugin installation
|
// It is enabled by default to avoid any special configuration after plugin installation
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
private boolean initialized = false;
|
|
||||||
|
|
||||||
private static final Logger LOG = Logger.getInstance(VimPlugin.class);
|
private static final Logger LOG = Logger.getInstance(VimPlugin.class);
|
||||||
|
|
||||||
@NotNull
|
private final @NotNull VimState state = new VimState();
|
||||||
@Override
|
|
||||||
public String getComponentName() {
|
VimPlugin() {
|
||||||
return IDEAVIM_COMPONENT_NAME;
|
ApplicationConfigurationMigrator.getInstance().migrate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
@NotNull private final VimState state = new VimState();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initComponent() {
|
|
||||||
LOG.debug("initComponent");
|
LOG.debug("initComponent");
|
||||||
|
|
||||||
if (isEnabled()) initializePlugin();
|
// Initialize a legacy local config.
|
||||||
|
if (previousStateVersion == 5) {
|
||||||
|
//noinspection deprecation
|
||||||
|
VimLocalConfig.Companion.initialize();
|
||||||
|
}
|
||||||
|
if (enabled) {
|
||||||
|
Application application = ApplicationManager.getApplication();
|
||||||
|
if (application.isUnitTestMode()) {
|
||||||
|
application.invokeAndWait(this::turnOnPlugin);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
application.invokeLater(this::turnOnPlugin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG.debug("done");
|
LOG.debug("done");
|
||||||
}
|
}
|
||||||
@@ -123,230 +133,142 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
/**
|
/**
|
||||||
* @return NotificationService as applicationService if project is null and projectService otherwise
|
* @return NotificationService as applicationService if project is null and projectService otherwise
|
||||||
*/
|
*/
|
||||||
@NotNull
|
public static @NotNull NotificationService getNotifications(@Nullable Project project) {
|
||||||
public static NotificationService getNotifications(@Nullable Project project) {
|
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
return ServiceManager.getService(NotificationService.class);
|
return ServiceManager.getService(NotificationService.class);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return ServiceManager.getService(project, NotificationService.class);
|
return ServiceManager.getService(project, NotificationService.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull VimState getVimState() {
|
||||||
public static VimState getVimState() {
|
|
||||||
return getInstance().state;
|
return getInstance().state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull MotionGroup getMotion() {
|
||||||
public static MotionGroup getMotion() {
|
|
||||||
return ServiceManager.getService(MotionGroup.class);
|
return ServiceManager.getService(MotionGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static @NotNull ChangeGroup getChange() {
|
||||||
* Reports statistics about installed IdeaVim and enabled Vim emulation.
|
|
||||||
* <p>
|
|
||||||
* See https://github.com/go-lang-plugin-org/go-lang-idea-plugin/commit/5182ab4a1d01ad37f6786268a2fe5e908575a217
|
|
||||||
*/
|
|
||||||
public static void statisticReport() {
|
|
||||||
final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();
|
|
||||||
final long lastUpdate = propertiesComponent.getOrInitLong(IDEAVIM_STATISTICS_TIMESTAMP_KEY, 0);
|
|
||||||
final boolean outOfDate =
|
|
||||||
lastUpdate == 0 || System.currentTimeMillis() - lastUpdate > TimeUnit.DAYS.toMillis(1);
|
|
||||||
if (outOfDate && isEnabled()) {
|
|
||||||
ApplicationManager.getApplication().executeOnPooledThread(() -> {
|
|
||||||
try {
|
|
||||||
final String buildNumber = ApplicationInfo.getInstance().getBuild().asString();
|
|
||||||
final String version = URLEncoder.encode(getVersion(), CharsetToolkit.UTF8);
|
|
||||||
final String os =
|
|
||||||
URLEncoder.encode(SystemInfo.OS_NAME + " " + SystemInfo.OS_VERSION, CharsetToolkit.UTF8);
|
|
||||||
final String uid = PermanentInstallationID.get();
|
|
||||||
final String url = "https://plugins.jetbrains.com/plugins/list" +
|
|
||||||
"?pluginId=" + IDEAVIM_PLUGIN_ID +
|
|
||||||
"&build=" +
|
|
||||||
buildNumber +
|
|
||||||
"&pluginVersion=" +
|
|
||||||
version +
|
|
||||||
"&os=" +
|
|
||||||
os +
|
|
||||||
"&uuid=" +
|
|
||||||
uid;
|
|
||||||
PropertiesComponent.getInstance()
|
|
||||||
.setValue(IDEAVIM_STATISTICS_TIMESTAMP_KEY, String.valueOf(System.currentTimeMillis()));
|
|
||||||
HttpRequests.request(url).connect(request -> {
|
|
||||||
LOG.info("Sending statistics: " + url);
|
|
||||||
try {
|
|
||||||
JDOMUtil.load(request.getInputStream());
|
|
||||||
}
|
|
||||||
catch (JDOMException e) {
|
|
||||||
LOG.warn(e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
LOG.warn(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static ChangeGroup getChange() {
|
|
||||||
return ServiceManager.getService(ChangeGroup.class);
|
return ServiceManager.getService(ChangeGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull CommandGroup getCommand() {
|
||||||
public static CommandGroup getCommand() {
|
|
||||||
return ServiceManager.getService(CommandGroup.class);
|
return ServiceManager.getService(CommandGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull MarkGroup getMark() {
|
||||||
public static MarkGroup getMark() {
|
|
||||||
return ServiceManager.getService(MarkGroup.class);
|
return ServiceManager.getService(MarkGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull RegisterGroup getRegister() {
|
||||||
public static RegisterGroup getRegister() {
|
|
||||||
return ServiceManager.getService(RegisterGroup.class);
|
return ServiceManager.getService(RegisterGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @Nullable RegisterGroup getRegisterIfCreated() {
|
||||||
public static FileGroup getFile() {
|
return ServiceManager.getServiceIfCreated(RegisterGroup.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull FileGroup getFile() {
|
||||||
return ServiceManager.getService(FileGroup.class);
|
return ServiceManager.getService(FileGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull SearchGroup getSearch() {
|
||||||
public static SearchGroup getSearch() {
|
|
||||||
return ServiceManager.getService(SearchGroup.class);
|
return ServiceManager.getService(SearchGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @Nullable SearchGroup getSearchIfCreated() {
|
||||||
public static ProcessGroup getProcess() {
|
return ServiceManager.getServiceIfCreated(SearchGroup.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull ProcessGroup getProcess() {
|
||||||
return ServiceManager.getService(ProcessGroup.class);
|
return ServiceManager.getService(ProcessGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull MacroGroup getMacro() {
|
||||||
public static MacroGroup getMacro() {
|
|
||||||
return ServiceManager.getService(MacroGroup.class);
|
return ServiceManager.getService(MacroGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull DigraphGroup getDigraph() {
|
||||||
public static DigraphGroup getDigraph() {
|
|
||||||
return ServiceManager.getService(DigraphGroup.class);
|
return ServiceManager.getService(DigraphGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull HistoryGroup getHistory() {
|
||||||
public static HistoryGroup getHistory() {
|
|
||||||
return ServiceManager.getService(HistoryGroup.class);
|
return ServiceManager.getService(HistoryGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull KeyGroup getKey() {
|
||||||
public static KeyGroup getKey() {
|
|
||||||
return ServiceManager.getService(KeyGroup.class);
|
return ServiceManager.getService(KeyGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @Nullable KeyGroup getKeyIfCreated() {
|
||||||
public static WindowGroup getWindow() {
|
return ServiceManager.getServiceIfCreated(KeyGroup.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull WindowGroup getWindow() {
|
||||||
return ServiceManager.getService(WindowGroup.class);
|
return ServiceManager.getService(WindowGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull EditorGroup getEditor() {
|
||||||
public static EditorGroup getEditor() {
|
|
||||||
return ServiceManager.getService(EditorGroup.class);
|
return ServiceManager.getService(EditorGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @Nullable EditorGroup getEditorIfCreated() {
|
||||||
public static VisualMotionGroup getVisualMotion() {
|
return ServiceManager.getServiceIfCreated(EditorGroup.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull VisualMotionGroup getVisualMotion() {
|
||||||
return ServiceManager.getService(VisualMotionGroup.class);
|
return ServiceManager.getService(VisualMotionGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull YankGroup getYank() {
|
||||||
public static YankGroup getYank() {
|
|
||||||
return ServiceManager.getService(YankGroup.class);
|
return ServiceManager.getService(YankGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull PutGroup getPut() {
|
||||||
public static PutGroup getPut() {
|
|
||||||
return ServiceManager.getService(PutGroup.class);
|
return ServiceManager.getService(PutGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private static @NotNull NotificationService getNotifications() {
|
||||||
public Element getState() {
|
|
||||||
LOG.debug("Saving state");
|
|
||||||
|
|
||||||
final Element element = new Element("ideavim");
|
|
||||||
// Save whether the plugin is enabled or not
|
|
||||||
final Element state = new Element("state");
|
|
||||||
state.setAttribute("version", Integer.toString(STATE_VERSION));
|
|
||||||
state.setAttribute("enabled", Boolean.toString(enabled));
|
|
||||||
element.addContent(state);
|
|
||||||
|
|
||||||
getKey().saveData(element);
|
|
||||||
getEditor().saveData(element);
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private static NotificationService getNotifications() {
|
|
||||||
return getNotifications(null);
|
return getNotifications(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializePlugin() {
|
private boolean ideavimrcRegistered = false;
|
||||||
if (initialized) return;
|
|
||||||
initialized = true;
|
|
||||||
|
|
||||||
ApplicationManager.getApplication().invokeLater(this::updateState);
|
private void registerIdeavimrc() {
|
||||||
|
if (ideavimrcRegistered) return;
|
||||||
|
ideavimrcRegistered = true;
|
||||||
|
|
||||||
getEditor().turnOn();
|
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
getSearch().turnOn();
|
executeIdeaVimRc();
|
||||||
VimListenerManager.INSTANCE.turnOn();
|
|
||||||
|
|
||||||
// Add some listeners so we can handle special events
|
|
||||||
DocumentManager.getInstance().addDocumentListener(MarkGroup.MarkUpdater.INSTANCE);
|
|
||||||
DocumentManager.getInstance().addDocumentListener(SearchGroup.DocumentSearchListener.INSTANCE);
|
|
||||||
|
|
||||||
Runnable asyncSetup = () -> {
|
|
||||||
// Register vim actions in command mode
|
|
||||||
RegisterActions.registerActions();
|
|
||||||
|
|
||||||
// Register ex handlers
|
|
||||||
CommandParser.getInstance().registerHandlers();
|
|
||||||
|
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
|
||||||
final File ideaVimRc = VimScriptParser.findIdeaVimRc();
|
|
||||||
if (ideaVimRc != null) {
|
|
||||||
VimScriptParser.executeFile(ideaVimRc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Initialization.initialized();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Disable multithreading for EAP release
|
|
||||||
asyncSetup.run();
|
|
||||||
/*
|
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
|
||||||
} else {
|
|
||||||
ApplicationManager.getApplication().executeOnPooledThread(asyncSetup);
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public void executeIdeaVimRc() {
|
||||||
public static PluginId getPluginId() {
|
final File ideaVimRc = VimScriptParser.findIdeaVimRc();
|
||||||
|
if (ideaVimRc != null) {
|
||||||
|
LOG.info("Execute ideavimrc file: " + ideaVimRc.getAbsolutePath());
|
||||||
|
List<String> parsedLines = VimScriptParser.executeFile(ideaVimRc);
|
||||||
|
VimRcFileState.INSTANCE.saveFileState(ideaVimRc.getAbsolutePath(), parsedLines);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LOG.info("ideavimrc file isn't found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @NotNull PluginId getPluginId() {
|
||||||
return PluginId.getId(IDEAVIM_PLUGIN_ID);
|
return PluginId.getId(IDEAVIM_PLUGIN_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
public static @NotNull String getVersion() {
|
||||||
public static String getVersion() {
|
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(getPluginId());
|
||||||
if (!ApplicationManager.getApplication().isInternal()) {
|
if (!ApplicationManager.getApplication().isInternal()) {
|
||||||
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(getPluginId());
|
|
||||||
return plugin != null ? plugin.getVersion() : "SNAPSHOT";
|
return plugin != null ? plugin.getVersion() : "SNAPSHOT";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "INTERNAL";
|
return "INTERNAL" + (plugin != null ? " - " + plugin.getVersion() : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,6 +277,8 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setEnabled(final boolean enabled) {
|
public static void setEnabled(final boolean enabled) {
|
||||||
|
if (isEnabled() == enabled) return;
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
getInstance().turnOffPlugin();
|
getInstance().turnOffPlugin();
|
||||||
}
|
}
|
||||||
@@ -364,12 +288,18 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
if (enabled) {
|
if (enabled) {
|
||||||
getInstance().turnOnPlugin();
|
getInstance().turnOnPlugin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusBarIconFactory.Companion.updateIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isError() {
|
public static boolean isError() {
|
||||||
return getInstance().error;
|
return getInstance().error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getMessage() {
|
||||||
|
return getInstance().message;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicate to the user that an error has occurred. Just beep.
|
* Indicate to the user that an error has occurred. Just beep.
|
||||||
*/
|
*/
|
||||||
@@ -397,7 +327,10 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
showMessage(msg);
|
showMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showMessage(@Nullable String msg) {
|
public static void showMessage(@Nls @Nullable String msg) {
|
||||||
|
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
|
getInstance().message = msg;
|
||||||
|
}
|
||||||
ProjectManager pm = ProjectManager.getInstance();
|
ProjectManager pm = ProjectManager.getInstance();
|
||||||
Project[] projects = pm.getOpenProjects();
|
Project[] projects = pm.getOpenProjects();
|
||||||
for (Project project : projects) {
|
for (Project project : projects) {
|
||||||
@@ -413,46 +346,53 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Initialization {
|
public static @NotNull VimPlugin getInstance() {
|
||||||
private static final AtomicBoolean initialized = new AtomicBoolean(false);
|
return ServiceManager.getService(VimPlugin.class);
|
||||||
|
|
||||||
public static boolean notInitialized() {
|
|
||||||
return !(initialized.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initialized() {
|
|
||||||
initialized.set(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private static VimPlugin getInstance() {
|
|
||||||
return (VimPlugin)ApplicationManager.getApplication().getComponent(IDEAVIM_COMPONENT_NAME);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void turnOnPlugin() {
|
private void turnOnPlugin() {
|
||||||
if (initialized) {
|
ApplicationManager.getApplication().invokeLater(this::updateState);
|
||||||
KeyHandler.getInstance().fullReset(null);
|
|
||||||
|
|
||||||
getEditor().turnOn();
|
// Register vim actions in command mode
|
||||||
getSearch().turnOn();
|
RegisterActions.registerActions();
|
||||||
VimListenerManager.INSTANCE.turnOn();
|
|
||||||
} else {
|
// Register ex handlers
|
||||||
initializePlugin();
|
CommandParser.getInstance().registerHandlers();
|
||||||
}
|
|
||||||
|
// Register extensions
|
||||||
|
VimExtensionRegistrar.registerExtensions();
|
||||||
|
|
||||||
|
// Execute ~/.ideavimrc
|
||||||
|
registerIdeavimrc();
|
||||||
|
|
||||||
|
// Turing on should be performed after all commands registration
|
||||||
|
getSearch().turnOn();
|
||||||
|
VimListenerManager.INSTANCE.turnOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void turnOffPlugin() {
|
private void turnOffPlugin() {
|
||||||
KeyHandler.getInstance().fullReset(null);
|
KeyHandler.getInstance().fullReset(null);
|
||||||
|
|
||||||
getEditor().turnOff();
|
SearchGroup searchGroup = getSearchIfCreated();
|
||||||
getSearch().turnOff();
|
if (searchGroup != null) {
|
||||||
|
searchGroup.turnOff();
|
||||||
|
}
|
||||||
VimListenerManager.INSTANCE.turnOff();
|
VimListenerManager.INSTANCE.turnOff();
|
||||||
ExEntryPanel.fullReset();
|
ExEntryPanel.fullReset();
|
||||||
|
|
||||||
|
// Unregister vim actions in command mode
|
||||||
|
RegisterActions.unregisterActions();
|
||||||
|
|
||||||
|
// Unregister ex handlers
|
||||||
|
CommandParser.getInstance().unregisterHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean stateUpdated = false;
|
||||||
|
|
||||||
private void updateState() {
|
private void updateState() {
|
||||||
|
if (stateUpdated) return;
|
||||||
if (isEnabled() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
if (isEnabled() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
|
stateUpdated = true;
|
||||||
if (SystemInfo.isMac) {
|
if (SystemInfo.isMac) {
|
||||||
final MacKeyRepeat keyRepeat = MacKeyRepeat.getInstance();
|
final MacKeyRepeat keyRepeat = MacKeyRepeat.getInstance();
|
||||||
final Boolean enabled = keyRepeat.isEnabled();
|
final Boolean enabled = keyRepeat.isEnabled();
|
||||||
@@ -492,42 +432,54 @@ public class VimPlugin implements BaseComponent, PersistentStateComponent<Elemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadState(@NotNull final Element element) {
|
public void loadState(final @NotNull Element element) {
|
||||||
LOG.debug("Loading state");
|
LOG.debug("Loading state");
|
||||||
|
|
||||||
Runnable setup = () -> {
|
// Restore whether the plugin is enabled or not
|
||||||
// Restore whether the plugin is enabled or not
|
Element state = element.getChild("state");
|
||||||
Element state = element.getChild("state");
|
if (state != null) {
|
||||||
if (state != null) {
|
try {
|
||||||
try {
|
previousStateVersion = Integer.parseInt(state.getAttributeValue("version"));
|
||||||
previousStateVersion = Integer.parseInt(state.getAttributeValue("version"));
|
|
||||||
}
|
|
||||||
catch (NumberFormatException ignored) {
|
|
||||||
}
|
|
||||||
enabled = Boolean.parseBoolean(state.getAttributeValue("enabled"));
|
|
||||||
previousKeyMap = state.getAttributeValue("keymap");
|
|
||||||
}
|
}
|
||||||
|
catch (NumberFormatException ignored) {
|
||||||
if (previousStateVersion > 0 && previousStateVersion < 5) {
|
|
||||||
// Migrate settings from 4 to 5 version
|
|
||||||
getMark().readData(element);
|
|
||||||
getRegister().readData(element);
|
|
||||||
getSearch().readData(element);
|
|
||||||
getHistory().readData(element);
|
|
||||||
}
|
}
|
||||||
getKey().readData(element);
|
enabled = Boolean.parseBoolean(state.getAttributeValue("enabled"));
|
||||||
getEditor().readData(element);
|
previousKeyMap = state.getAttributeValue("keymap");
|
||||||
this.state.readData(element);
|
}
|
||||||
};
|
|
||||||
|
legacyStateLoading(element);
|
||||||
// Disable multithreading for EAP release
|
this.state.readData(element);
|
||||||
setup.run();
|
}
|
||||||
/*
|
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
@Override
|
||||||
setup.run();
|
public Element getState() {
|
||||||
} else {
|
LOG.debug("Saving state");
|
||||||
ApplicationManager.getApplication().executeOnPooledThread(setup);
|
|
||||||
|
final Element element = new Element("ideavim");
|
||||||
|
// Save whether the plugin is enabled or not
|
||||||
|
final Element state = new Element("state");
|
||||||
|
state.setAttribute("version", Integer.toString(STATE_VERSION));
|
||||||
|
state.setAttribute("enabled", Boolean.toString(enabled));
|
||||||
|
element.addContent(state);
|
||||||
|
|
||||||
|
this.state.saveData(element);
|
||||||
|
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void legacyStateLoading(@NotNull Element element) {
|
||||||
|
if (previousStateVersion > 0 && previousStateVersion < 5) {
|
||||||
|
// Migrate settings from 4 to 5 version
|
||||||
|
getMark().readData(element);
|
||||||
|
getRegister().readData(element);
|
||||||
|
getSearch().readData(element);
|
||||||
|
getHistory().readData(element);
|
||||||
|
}
|
||||||
|
if (element.getChild(SHORTCUT_CONFLICTS_ELEMENT) != null) {
|
||||||
|
getKey().readData(element);
|
||||||
|
}
|
||||||
|
if (element.getChild(EDITOR_STORE_ELEMENT) != null) {
|
||||||
|
getEditor().readData(element);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,17 +18,22 @@
|
|||||||
|
|
||||||
package com.maddyhome.idea.vim
|
package com.maddyhome.idea.vim
|
||||||
|
|
||||||
import com.intellij.openapi.components.ProjectComponent
|
import com.intellij.openapi.Disposable
|
||||||
|
import com.intellij.openapi.components.Service
|
||||||
|
import com.intellij.openapi.components.ServiceManager
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.maddyhome.idea.vim.listener.VimListenerManager
|
|
||||||
|
|
||||||
/**
|
@Service
|
||||||
* @author Alex Plate
|
class VimProjectService(val project: Project) : Disposable {
|
||||||
*/
|
override fun dispose() {}
|
||||||
class VimProjectComponent(private val project: Project) : ProjectComponent {
|
|
||||||
override fun projectOpened() {
|
companion object {
|
||||||
if (!VimPlugin.isEnabled()) return
|
@JvmStatic
|
||||||
// Project listeners are self-disposable, so there is no need to unregister them on project close
|
fun getInstance(project: Project): VimProjectService {
|
||||||
VimListenerManager.ProjectListeners.add(project)
|
return ServiceManager.getService(project, VimProjectService::class.java)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val Project.vimDisposable
|
||||||
|
get() = VimProjectService.getInstance(this)
|
@@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim;
|
|
||||||
|
|
||||||
import com.intellij.codeInsight.lookup.Lookup;
|
|
||||||
import com.intellij.codeInsight.lookup.LookupManager;
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandlerEx;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
|
||||||
import com.maddyhome.idea.vim.listener.SelectionVimListenerSuppressor;
|
|
||||||
import com.maddyhome.idea.vim.listener.VimListenerSuppressor;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.event.KeyEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Accepts all regular keystrokes and passes them on to the Vim key handler.
|
|
||||||
*
|
|
||||||
* IDE shortcut keys used by Vim commands are handled by {@link com.maddyhome.idea.vim.action.VimShortcutKeyAction}.
|
|
||||||
*/
|
|
||||||
public class VimTypedActionHandler implements TypedActionHandlerEx {
|
|
||||||
private static final Logger logger = Logger.getInstance(VimTypedActionHandler.class.getName());
|
|
||||||
|
|
||||||
@NotNull private final KeyHandler handler;
|
|
||||||
|
|
||||||
public VimTypedActionHandler(TypedActionHandler origHandler) {
|
|
||||||
handler = KeyHandler.getInstance();
|
|
||||||
handler.setOriginalHandler(origHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeExecute(@NotNull Editor editor, char charTyped, @NotNull DataContext context, @NotNull ActionPlan plan) {
|
|
||||||
if (isEnabled(editor)) {
|
|
||||||
handler.beforeHandleKey(editor, KeyStroke.getKeyStroke(charTyped), context, plan);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
TypedActionHandler originalHandler = handler.getOriginalHandler();
|
|
||||||
if (originalHandler instanceof TypedActionHandlerEx) {
|
|
||||||
((TypedActionHandlerEx)originalHandler).beforeExecute(editor, charTyped, context, plan);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(@NotNull final Editor editor, final char charTyped, @NotNull final DataContext context) {
|
|
||||||
if (isEnabled(editor) && charTyped != KeyEvent.CHAR_UNDEFINED) {
|
|
||||||
try {
|
|
||||||
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), new EditorDataContext(editor));
|
|
||||||
}
|
|
||||||
catch (Throwable e) {
|
|
||||||
logger.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
try (final VimListenerSuppressor ignored = SelectionVimListenerSuppressor.INSTANCE.lock()) {
|
|
||||||
TypedActionHandler origHandler = handler.getOriginalHandler();
|
|
||||||
origHandler.execute(editor, charTyped, context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isEnabled(@NotNull Editor editor) {
|
|
||||||
if (VimPlugin.isEnabled()) {
|
|
||||||
final Lookup lookup = LookupManager.getActiveLookup(editor);
|
|
||||||
return lookup == null || !lookup.isFocused();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
85
src/com/maddyhome/idea/vim/VimTypedActionHandler.kt
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.diagnostic.logger
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.intellij.openapi.editor.actionSystem.ActionPlan
|
||||||
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandler
|
||||||
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandlerEx
|
||||||
|
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||||
|
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||||
|
import java.awt.event.KeyAdapter
|
||||||
|
import java.awt.event.KeyEvent
|
||||||
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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].
|
||||||
|
*/
|
||||||
|
class VimTypedActionHandler(origHandler: TypedActionHandler?) : TypedActionHandlerEx {
|
||||||
|
private val handler = KeyHandler.getInstance()
|
||||||
|
|
||||||
|
init {
|
||||||
|
handler.originalHandler = origHandler
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun beforeExecute(editor: Editor, charTyped: Char, context: DataContext, plan: ActionPlan) {
|
||||||
|
if (editor.isIdeaVimDisabledHere) {
|
||||||
|
(handler.originalHandler as? TypedActionHandlerEx)?.beforeExecute(editor, charTyped, context, plan)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||||
|
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||||
|
handler.beforeHandleKey(editor, keyStroke, context, plan)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, charTyped: Char, context: DataContext) {
|
||||||
|
if (editor.isIdeaVimDisabledHere) {
|
||||||
|
handler.originalHandler.execute(editor, charTyped, context)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||||
|
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||||
|
handler.handleKey(editor, keyStroke, EditorDataContext(editor))
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
logger.error(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val logger = logger<VimTypedActionHandler>()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A nasty workaround to handle `<S-Space>` events. Probably all the key events should go trough this listener.
|
||||||
|
*/
|
||||||
|
object VimKeyListener : KeyAdapter() {
|
||||||
|
|
||||||
|
var isSpaceShift = false
|
||||||
|
|
||||||
|
override fun keyPressed(e: KeyEvent) {
|
||||||
|
isSpaceShift = e.modifiersEx and KeyEvent.SHIFT_DOWN_MASK != 0 && e.keyChar == ' '
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.common;
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
public class Jump extends FileLocation {
|
import javax.swing.KeyStroke
|
||||||
public Jump(int lline, int col, String filename) {
|
|
||||||
super(lline, col, filename);
|
interface ComplicatedKeysAction {
|
||||||
}
|
val keyStrokesSet: Set<List<KeyStroke>>
|
||||||
}
|
}
|
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are some double-character commands like `cc`, `dd`, `yy`.
|
||||||
|
* During the execution these commands are replaced with `c_`, `d_`, `y_`, etc.
|
||||||
|
*
|
||||||
|
* This is not any kind of workaround, this is exactly how the original vim works.
|
||||||
|
* The `dd` command (and others) should not be processed as a monolith command, or it will lead to problems
|
||||||
|
* like this: https://youtrack.jetbrains.com/issue/VIM-1189
|
||||||
|
*
|
||||||
|
* If some command implements this interface, and the user enters motion operator that is the same as the command itself, the
|
||||||
|
* motion operator will be replaced with `_`.
|
||||||
|
*/
|
||||||
|
interface DuplicableOperatorAction {
|
||||||
|
val duplicateWith: Char
|
||||||
|
}
|
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ExEntryAction extends VimActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.NVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet(":");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_READONLY;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
|
||||||
VimPlugin.getProcess().startExCommand(editor, context, cmd);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
33
src/com/maddyhome/idea/vim/action/ExEntryAction.kt
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
|
||||||
|
class ExEntryAction : VimActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
|
VimPlugin.getProcess().startExCommand(editor, context, cmd)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.KeyHandler;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.HelperKt;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ResetModeAction extends VimActionHandler.SingleExecution {
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("<C-\\><C-N>");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.RESET;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
|
||||||
KeyHandler.getInstance().fullReset(HelperKt.getTopLevelEditor(editor));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
34
src/com/maddyhome/idea/vim/action/ResetModeAction.kt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
||||||
|
|
||||||
|
class ResetModeAction : VimActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
|
KeyHandler.getInstance().fullReset(editor.getTopLevelEditor())
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
|
||||||
import com.intellij.openapi.actionSystem.ToggleAction;
|
|
||||||
import com.intellij.openapi.project.DumbAware;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class is used to handle the Vim Plugin enabled/disabled toggle. This is most likely used as a menu option
|
|
||||||
* but could also be used as a toolbar item.
|
|
||||||
*/
|
|
||||||
public class VimPluginToggleAction extends ToggleAction implements DumbAware {
|
|
||||||
/**
|
|
||||||
* Indicates if the toggle is on or off
|
|
||||||
*
|
|
||||||
* @param event The event that triggered the action
|
|
||||||
* @return true if the toggle is on, false if off
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean isSelected(@NotNull AnActionEvent event) {
|
|
||||||
return VimPlugin.isEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Specifies whether the toggle should be on or off
|
|
||||||
*
|
|
||||||
* @param event The event that triggered the action
|
|
||||||
* @param b The new state - true is on, false is off
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setSelected(@NotNull AnActionEvent event, boolean b) {
|
|
||||||
VimPlugin.setEnabled(b);
|
|
||||||
}
|
|
||||||
}
|
|
44
src/com/maddyhome/idea/vim/action/VimPluginToggleAction.kt
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
|
import com.intellij.openapi.project.DumbAwareToggleAction
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.ui.VimActions
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is used to handle the Vim Plugin enabled/disabled toggle. This is most likely used as a menu option
|
||||||
|
* but could also be used as a toolbar item.
|
||||||
|
*/
|
||||||
|
class VimPluginToggleAction : DumbAwareToggleAction() {
|
||||||
|
override fun isSelected(event: AnActionEvent): Boolean = VimPlugin.isEnabled()
|
||||||
|
|
||||||
|
override fun setSelected(event: AnActionEvent, b: Boolean) {
|
||||||
|
VimPlugin.setEnabled(b)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun update(e: AnActionEvent) {
|
||||||
|
super.update(e)
|
||||||
|
|
||||||
|
e.presentation.text = if (VimActions.actionPlace == e.place) {
|
||||||
|
if (VimPlugin.isEnabled()) "Enabled" else "Enable"
|
||||||
|
} else "Vim Emulator"
|
||||||
|
}
|
||||||
|
}
|
@@ -1,247 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.intellij.codeInsight.lookup.LookupManager;
|
|
||||||
import com.intellij.openapi.actionSystem.*;
|
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.intellij.openapi.editor.ex.util.EditorUtil;
|
|
||||||
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx;
|
|
||||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
|
||||||
import com.intellij.openapi.project.DumbAware;
|
|
||||||
import com.intellij.openapi.project.Project;
|
|
||||||
import com.intellij.openapi.util.Key;
|
|
||||||
import com.maddyhome.idea.vim.KeyHandler;
|
|
||||||
import com.maddyhome.idea.vim.RegisterActions;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.action.change.insert.InsertExitModeAction;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandState;
|
|
||||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase;
|
|
||||||
import com.maddyhome.idea.vim.helper.CommandStateHelper;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
|
||||||
import com.maddyhome.idea.vim.key.ShortcutOwner;
|
|
||||||
import com.maddyhome.idea.vim.option.ListOption;
|
|
||||||
import com.maddyhome.idea.vim.option.OptionsManager;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.event.InputEvent;
|
|
||||||
import java.awt.event.KeyEvent;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import static java.awt.event.KeyEvent.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles Vim keys that are treated as action shortcuts by the IDE.
|
|
||||||
* <p>
|
|
||||||
* These keys are not passed to {@link com.maddyhome.idea.vim.VimTypedActionHandler} and should be handled by actions.
|
|
||||||
*/
|
|
||||||
public class VimShortcutKeyAction extends AnAction implements DumbAware {
|
|
||||||
private static final String ACTION_ID = "VimShortcutKeyAction";
|
|
||||||
|
|
||||||
@NotNull public static final Set<KeyStroke> VIM_ONLY_EDITOR_KEYS = ImmutableSet.<KeyStroke>builder()
|
|
||||||
.addAll(getKeyStrokes(VK_ENTER, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_ESCAPE, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_TAB, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_BACK_SPACE, 0, CTRL_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_INSERT, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_DELETE, 0, CTRL_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_UP, 0, CTRL_MASK, SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_DOWN, 0, CTRL_MASK, SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_LEFT, 0, CTRL_MASK, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_RIGHT, 0, CTRL_MASK, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_HOME, 0, CTRL_MASK, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_END, 0, CTRL_MASK, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_PAGE_UP, 0, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.addAll(getKeyStrokes(VK_PAGE_DOWN, 0, SHIFT_MASK, CTRL_MASK | SHIFT_MASK))
|
|
||||||
.build();
|
|
||||||
|
|
||||||
@NotNull private static final Set<KeyStroke> NON_FILE_EDITOR_KEYS = ImmutableSet.<KeyStroke>builder()
|
|
||||||
.addAll(getKeyStrokes(VK_ENTER, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_ESCAPE, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_TAB, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_UP, 0))
|
|
||||||
.addAll(getKeyStrokes(VK_DOWN, 0))
|
|
||||||
.build();
|
|
||||||
|
|
||||||
private static final Logger ourLogger = Logger.getInstance(VimShortcutKeyAction.class.getName());
|
|
||||||
private static AnAction ourInstance = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
|
||||||
final Editor editor = getEditor(e);
|
|
||||||
final KeyStroke keyStroke = getKeyStroke(e);
|
|
||||||
if (editor != null && keyStroke != null) {
|
|
||||||
final ShortcutOwner owner = VimPlugin.getKey().getSavedShortcutConflicts().get(keyStroke);
|
|
||||||
if (owner == ShortcutOwner.UNDEFINED) {
|
|
||||||
VimPlugin.getNotifications(editor.getProject()).notifyAboutShortcutConflict(keyStroke);
|
|
||||||
}
|
|
||||||
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
|
||||||
try {
|
|
||||||
KeyHandler.getInstance().handleKey(editor, keyStroke, new EditorDataContext(editor));
|
|
||||||
}
|
|
||||||
catch (ProcessCanceledException ignored) {
|
|
||||||
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
|
||||||
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
|
||||||
}
|
|
||||||
catch (Throwable throwable) {
|
|
||||||
ourLogger.error(throwable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void update(@NotNull AnActionEvent e) {
|
|
||||||
e.getPresentation().setEnabled(isEnabled(e));
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static AnAction getInstance() {
|
|
||||||
if (ourInstance == null) {
|
|
||||||
final AnAction originalAction = ActionManager.getInstance().getAction(ACTION_ID);
|
|
||||||
ourInstance = EmptyAction.wrap(originalAction);
|
|
||||||
}
|
|
||||||
return ourInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isEnabled(@NotNull AnActionEvent e) {
|
|
||||||
if (!VimPlugin.isEnabled()) return false;
|
|
||||||
|
|
||||||
final Editor editor = getEditor(e);
|
|
||||||
final KeyStroke keyStroke = getKeyStroke(e);
|
|
||||||
if (editor != null && keyStroke != null) {
|
|
||||||
// Workaround for smart step into
|
|
||||||
final Key<?> SMART_STEP_INPLACE_DATA = Key.findKeyByName("SMART_STEP_INPLACE_DATA");
|
|
||||||
if (SMART_STEP_INPLACE_DATA != null && editor.getUserData(SMART_STEP_INPLACE_DATA) != null) return false;
|
|
||||||
|
|
||||||
final int keyCode = keyStroke.getKeyCode();
|
|
||||||
if (LookupManager.getActiveLookup(editor) != null && !passCommandToVimWithLookup(keyStroke)) {
|
|
||||||
return isEnabledForLookup(keyStroke);
|
|
||||||
}
|
|
||||||
if (keyCode == VK_ESCAPE) {
|
|
||||||
return isEnabledForEscape(editor);
|
|
||||||
}
|
|
||||||
if (CommandStateHelper.inInsertMode(editor)) {
|
|
||||||
// XXX: <Tab> won't be recorded in macros
|
|
||||||
if (keyCode == VK_TAB) {
|
|
||||||
VimPlugin.getChange().tabAction = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Debug watch, Python console, etc.
|
|
||||||
if (NON_FILE_EDITOR_KEYS.contains(keyStroke) && !EditorHelper.isFileEditor(editor)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (VIM_ONLY_EDITOR_KEYS.contains(keyStroke)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
final Map<KeyStroke, ShortcutOwner> savedShortcutConflicts = VimPlugin.getKey().getSavedShortcutConflicts();
|
|
||||||
final ShortcutOwner owner = savedShortcutConflicts.get(keyStroke);
|
|
||||||
if (owner == ShortcutOwner.VIM) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (owner == ShortcutOwner.IDE) {
|
|
||||||
return !isShortcutConflict(keyStroke);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (isShortcutConflict(keyStroke)) {
|
|
||||||
savedShortcutConflicts.put(keyStroke, ShortcutOwner.UNDEFINED);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean passCommandToVimWithLookup(@NotNull KeyStroke keyStroke) {
|
|
||||||
final ListOption popupActions = OptionsManager.INSTANCE.getLookupActions();
|
|
||||||
final List<String> values = popupActions.values();
|
|
||||||
if (values == null) return false;
|
|
||||||
|
|
||||||
return values.stream().anyMatch(actionId -> {
|
|
||||||
final EditorActionHandlerBase action = RegisterActions.findAction(actionId);
|
|
||||||
if (action == null) return false;
|
|
||||||
return action.getKeyStrokesSet().stream()
|
|
||||||
.anyMatch(ks -> !ks.isEmpty() && ks.get(0).equals(keyStroke));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isEnabledForEscape(@NotNull Editor editor) {
|
|
||||||
final CommandState.Mode mode = CommandState.getInstance(editor).getMode();
|
|
||||||
return isPrimaryEditor(editor) || (EditorHelper.isFileEditor(editor) && mode != CommandState.Mode.COMMAND);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if the editor is a primary editor in the main editing area.
|
|
||||||
*/
|
|
||||||
private boolean isPrimaryEditor(@NotNull Editor editor) {
|
|
||||||
final Project project = editor.getProject();
|
|
||||||
if (project == null) return false;
|
|
||||||
final FileEditorManagerEx fileEditorManager = FileEditorManagerEx.getInstanceEx(project);
|
|
||||||
if (fileEditorManager == null) return false;
|
|
||||||
return Arrays.stream(fileEditorManager.getAllEditors())
|
|
||||||
.anyMatch(fileEditor -> editor.equals(EditorUtil.getEditorEx(fileEditor)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isEnabledForLookup(@NotNull KeyStroke keyStroke) {
|
|
||||||
for (List<KeyStroke> keys : InsertExitModeAction.getInstance().getKeyStrokesSet()) {
|
|
||||||
// XXX: Currently we cannot handle <C-\><C-N> because of the importance of <C-N> for the IDE on Linux
|
|
||||||
if (keys.size() == 1 && keyStroke.equals(keys.get(0))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//noinspection RedundantIfStatement
|
|
||||||
if (keyStroke.equals(KeyStroke.getKeyStroke(VK_BACK_SPACE, 0))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isShortcutConflict(@NotNull KeyStroke keyStroke) {
|
|
||||||
return !VimPlugin.getKey().getKeymapConflicts(keyStroke).isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private static List<KeyStroke> getKeyStrokes(int keyCode, @NotNull int... modifiers) {
|
|
||||||
final List<KeyStroke> keyStrokes = new ArrayList<>();
|
|
||||||
for (int modifier : modifiers) {
|
|
||||||
keyStrokes.add(KeyStroke.getKeyStroke(keyCode, modifier));
|
|
||||||
}
|
|
||||||
return keyStrokes;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
private KeyStroke getKeyStroke(@NotNull AnActionEvent e) {
|
|
||||||
final InputEvent inputEvent = e.getInputEvent();
|
|
||||||
if (inputEvent instanceof KeyEvent) {
|
|
||||||
final KeyEvent keyEvent = (KeyEvent)inputEvent;
|
|
||||||
return KeyStroke.getKeyStrokeForEvent(keyEvent);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
private Editor getEditor(@NotNull AnActionEvent e) {
|
|
||||||
return e.getData(PlatformDataKeys.EDITOR);
|
|
||||||
}
|
|
||||||
}
|
|
216
src/com/maddyhome/idea/vim/action/VimShortcutKeyAction.kt
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet
|
||||||
|
import com.intellij.codeInsight.lookup.LookupManager
|
||||||
|
import com.intellij.openapi.actionSystem.ActionManager
|
||||||
|
import com.intellij.openapi.actionSystem.AnAction
|
||||||
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
|
import com.intellij.openapi.actionSystem.EmptyAction
|
||||||
|
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
||||||
|
import com.intellij.openapi.diagnostic.Logger
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.intellij.openapi.progress.ProcessCanceledException
|
||||||
|
import com.intellij.openapi.project.DumbAware
|
||||||
|
import com.intellij.openapi.util.Key
|
||||||
|
import com.intellij.ui.KeyStrokeAdapter
|
||||||
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||||
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.StringHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.inInsertMode
|
||||||
|
import com.maddyhome.idea.vim.helper.inNormalMode
|
||||||
|
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||||
|
import com.maddyhome.idea.vim.helper.isPrimaryEditor
|
||||||
|
import com.maddyhome.idea.vim.key.ShortcutOwner
|
||||||
|
import com.maddyhome.idea.vim.listener.IdeaSpecifics.aceJumpActive
|
||||||
|
import com.maddyhome.idea.vim.option.OptionsManager
|
||||||
|
import java.awt.event.InputEvent
|
||||||
|
import java.awt.event.KeyEvent
|
||||||
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles Vim keys that are treated as action shortcuts by the IDE.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* These keys are not passed to [com.maddyhome.idea.vim.VimTypedActionHandler] and should be handled by actions.
|
||||||
|
*/
|
||||||
|
class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||||
|
override fun actionPerformed(e: AnActionEvent) {
|
||||||
|
val editor = getEditor(e)
|
||||||
|
val keyStroke = getKeyStroke(e)
|
||||||
|
if (editor != null && keyStroke != null) {
|
||||||
|
val owner = VimPlugin.getKey().savedShortcutConflicts[keyStroke]
|
||||||
|
if (owner == ShortcutOwner.UNDEFINED) {
|
||||||
|
VimPlugin.getNotifications(editor.project).notifyAboutShortcutConflict(keyStroke)
|
||||||
|
}
|
||||||
|
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||||
|
try {
|
||||||
|
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor))
|
||||||
|
} catch (ignored: ProcessCanceledException) {
|
||||||
|
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
||||||
|
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
||||||
|
} catch (throwable: Throwable) {
|
||||||
|
ourLogger.error(throwable)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun update(e: AnActionEvent) {
|
||||||
|
e.presentation.isEnabled = isEnabled(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isEnabled(e: AnActionEvent): Boolean {
|
||||||
|
if (!VimPlugin.isEnabled()) return false
|
||||||
|
val editor = getEditor(e)
|
||||||
|
val keyStroke = getKeyStroke(e)
|
||||||
|
if (editor != null && keyStroke != null) {
|
||||||
|
if (editor.isIdeaVimDisabledHere) return false
|
||||||
|
// Workaround for smart step into
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
val SMART_STEP_INPLACE_DATA = Key.findKeyByName("SMART_STEP_INPLACE_DATA")
|
||||||
|
if (SMART_STEP_INPLACE_DATA != null && editor.getUserData(SMART_STEP_INPLACE_DATA) != null) return false
|
||||||
|
|
||||||
|
if (aceJumpActive()) return false
|
||||||
|
|
||||||
|
val keyCode = keyStroke.keyCode
|
||||||
|
|
||||||
|
if (LookupManager.getActiveLookup(editor) != null && !LookupKeys.isEnabledForLookup(keyStroke)) return false
|
||||||
|
|
||||||
|
if (keyCode == KeyEvent.VK_ESCAPE) return isEnabledForEscape(editor)
|
||||||
|
|
||||||
|
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
||||||
|
if (keyCode == KeyEvent.VK_TAB) {
|
||||||
|
VimPlugin.getChange().tabAction = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// Debug watch, Python console, etc.
|
||||||
|
if (keyStroke in NON_FILE_EDITOR_KEYS && !EditorHelper.isFileEditor(editor)) return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyStroke in VIM_ONLY_EDITOR_KEYS) return true
|
||||||
|
|
||||||
|
val savedShortcutConflicts = VimPlugin.getKey().savedShortcutConflicts
|
||||||
|
return when (savedShortcutConflicts[keyStroke]) {
|
||||||
|
ShortcutOwner.VIM -> true
|
||||||
|
ShortcutOwner.IDE -> !isShortcutConflict(keyStroke)
|
||||||
|
else -> {
|
||||||
|
if (isShortcutConflict(keyStroke)) {
|
||||||
|
savedShortcutConflicts[keyStroke] = ShortcutOwner.UNDEFINED
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isEnabledForEscape(editor: Editor): Boolean {
|
||||||
|
return editor.isPrimaryEditor()
|
||||||
|
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||||
|
|| OptionsManager.dialogescape.value == "on" && !editor.inNormalMode
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
||||||
|
return VimPlugin.getKey().getKeymapConflicts(keyStroke).isNotEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getDefaultKeyStroke is needed for NEO layout keyboard VIM-987
|
||||||
|
* but we should cache the value because on the second call (isEnabled -> actionPerformed)
|
||||||
|
* the event is already consumed
|
||||||
|
*/
|
||||||
|
private var keyStrokeCache: Pair<KeyEvent?, KeyStroke?> = null to null
|
||||||
|
|
||||||
|
private fun getKeyStroke(e: AnActionEvent): KeyStroke? {
|
||||||
|
val inputEvent = e.inputEvent
|
||||||
|
if (inputEvent is KeyEvent) {
|
||||||
|
val defaultKeyStroke = KeyStrokeAdapter.getDefaultKeyStroke(inputEvent)
|
||||||
|
val strokeCache = keyStrokeCache
|
||||||
|
if (defaultKeyStroke != null) {
|
||||||
|
keyStrokeCache = inputEvent to defaultKeyStroke
|
||||||
|
return defaultKeyStroke
|
||||||
|
} else if (strokeCache.first === inputEvent) {
|
||||||
|
keyStrokeCache = null to null
|
||||||
|
return strokeCache.second
|
||||||
|
}
|
||||||
|
return KeyStroke.getKeyStrokeForEvent(inputEvent)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getEditor(e: AnActionEvent): Editor? = e.getData(PlatformDataKeys.EDITOR)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Every time the key pressed with an active lookup, there is a decision:
|
||||||
|
* should this key be processed by IdeaVim, or by IDE. For example, dot and enter should be processed by IDE, but
|
||||||
|
* <C-W> by IdeaVim.
|
||||||
|
*
|
||||||
|
* The list of keys that should be processed by IDE is stored in [OptionsManager.lookupKeys]. So, we should search
|
||||||
|
* if the pressed key is presented in this list. The caches are used to speedup the process.
|
||||||
|
*/
|
||||||
|
private object LookupKeys {
|
||||||
|
private var parsedLookupKeys: Set<KeyStroke> = parseLookupKeys()
|
||||||
|
|
||||||
|
init {
|
||||||
|
OptionsManager.lookupKeys.addOptionChangeListener { _, _ ->
|
||||||
|
parsedLookupKeys = parseLookupKeys()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isEnabledForLookup(keyStroke: KeyStroke): Boolean = keyStroke !in parsedLookupKeys
|
||||||
|
|
||||||
|
private fun parseLookupKeys() = OptionsManager.lookupKeys.values()
|
||||||
|
.map { StringHelper.parseKeys(it) }.filter { it.isNotEmpty() }.map { it.first() }.toSet()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmField
|
||||||
|
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_END, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_PAGE_UP, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_PAGE_DOWN, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)).build()
|
||||||
|
|
||||||
|
private const val ACTION_ID = "VimShortcutKeyAction"
|
||||||
|
|
||||||
|
private val NON_FILE_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>()
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_TAB, 0))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_UP, 0))
|
||||||
|
.addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0))
|
||||||
|
.build()
|
||||||
|
|
||||||
|
private val ourLogger = Logger.getInstance(VimShortcutKeyAction::class.java.name)
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
val instance: AnAction by lazy {
|
||||||
|
EmptyAction.wrap(ActionManager.getInstance().getAction(ACTION_ID))
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getKeyStrokes(keyCode: Int, vararg modifiers: Int) = modifiers.map { KeyStroke.getKeyStroke(keyCode, it) }
|
||||||
|
}
|
||||||
|
}
|
@@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.KeyHandler;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.*;
|
|
||||||
import com.maddyhome.idea.vim.common.TextRange;
|
|
||||||
import com.maddyhome.idea.vim.group.MotionGroup;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.MessageHelper;
|
|
||||||
import com.maddyhome.idea.vim.key.OperatorFunction;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class OperatorAction extends VimActionHandler.SingleExecution {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("g@");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.MOTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_OP_PEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
|
||||||
final OperatorFunction operatorFunction = VimPlugin.getKey().getOperatorFunction();
|
|
||||||
if (operatorFunction != null) {
|
|
||||||
final Argument argument = cmd.getArgument();
|
|
||||||
if (argument != null) {
|
|
||||||
final Command motion = argument.getMotion();
|
|
||||||
if (motion != null) {
|
|
||||||
final TextRange range = MotionGroup
|
|
||||||
.getMotionRange(editor, editor.getCaretModel().getPrimaryCaret(), context, cmd.getCount(),
|
|
||||||
cmd.getRawCount(), argument, true);
|
|
||||||
if (range != null) {
|
|
||||||
VimPlugin.getMark().setChangeMarks(editor, range);
|
|
||||||
final SelectionType selectionType = SelectionType.fromCommandFlags(motion.getFlags());
|
|
||||||
KeyHandler.getInstance().reset(editor);
|
|
||||||
return operatorFunction.apply(editor, context, selectionType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
VimPlugin.showMessage(MessageHelper.message("E774"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
66
src/com/maddyhome/idea/vim/action/change/OperatorAction.kt
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.SelectionType
|
||||||
|
import com.maddyhome.idea.vim.group.MotionGroup
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.MessageHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.commandState
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class OperatorAction : VimActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.MOTION
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
|
val operatorFunction = VimPlugin.getKey().operatorFunction
|
||||||
|
if (operatorFunction != null) {
|
||||||
|
val argument = cmd.argument
|
||||||
|
if (argument != null) {
|
||||||
|
if (!editor.commandState.isDotRepeatInProgress) {
|
||||||
|
VimRepeater.Extension.argumentCaptured = argument
|
||||||
|
}
|
||||||
|
val saveRepeatHandler = VimRepeater.repeatHandler
|
||||||
|
val motion = argument.motion
|
||||||
|
val range = MotionGroup
|
||||||
|
.getMotionRange(editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount, argument)
|
||||||
|
if (range != null) {
|
||||||
|
VimPlugin.getMark().setChangeMarks(editor, range)
|
||||||
|
val selectionType = if (motion.isLinewiseMotion()) SelectionType.LINE_WISE else SelectionType.CHARACTER_WISE
|
||||||
|
KeyHandler.getInstance().reset(editor)
|
||||||
|
val result = operatorFunction.apply(editor, context, selectionType)
|
||||||
|
VimRepeater.repeatHandler = saveRepeatHandler
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
VimPlugin.showMessage(MessageHelper.message("E774"))
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class RedoAction extends VimActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("<C-R>");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
|
||||||
return UndoRedoHelper.INSTANCE.redo(context);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,25 +15,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.ex;
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.UndoRedoHelper.redo
|
||||||
|
|
||||||
/**
|
class RedoAction : VimActionHandler.SingleExecution() {
|
||||||
* Exception class
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
*/
|
|
||||||
public class InvalidRangeException extends ExException {
|
|
||||||
/**
|
|
||||||
* Constructs an <code>InvalidRangeException</code> with no specified detail message.
|
|
||||||
*/
|
|
||||||
public InvalidRangeException() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean = redo(context)
|
||||||
* Constructs an <code>InvalidRangeException</code> with the specified detail message.
|
|
||||||
*
|
|
||||||
* @param s the detail message.
|
|
||||||
*/
|
|
||||||
public InvalidRangeException(String s) {
|
|
||||||
super(s);
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.KeyHandler;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandState;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class RepeatChangeAction extends VimActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet(".");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_WRITABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command command) {
|
|
||||||
CommandState state = CommandState.getInstance(editor);
|
|
||||||
Command cmd = state.getLastChangeCommand();
|
|
||||||
|
|
||||||
if (cmd != null) {
|
|
||||||
if (command.getRawCount() > 0) {
|
|
||||||
cmd.setCount(command.getCount());
|
|
||||||
Argument arg = cmd.getArgument();
|
|
||||||
if (arg != null) {
|
|
||||||
Command mot = arg.getMotion();
|
|
||||||
if (mot != null) {
|
|
||||||
mot.setCount(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Command save = state.getCommand();
|
|
||||||
int lastFTCmd = VimPlugin.getMotion().getLastFTCmd();
|
|
||||||
char lastFTChar = VimPlugin.getMotion().getLastFTChar();
|
|
||||||
|
|
||||||
state.setCommand(cmd);
|
|
||||||
state.pushState(CommandState.Mode.REPEAT, CommandState.SubMode.NONE, MappingMode.NORMAL);
|
|
||||||
char reg = VimPlugin.getRegister().getCurrentRegister();
|
|
||||||
VimPlugin.getRegister().selectRegister(state.getLastChangeRegister());
|
|
||||||
try {
|
|
||||||
KeyHandler.executeVimAction(editor, cmd.getAction(), context);
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
// oops
|
|
||||||
}
|
|
||||||
state.popState();
|
|
||||||
if (save != null) {
|
|
||||||
state.setCommand(save);
|
|
||||||
}
|
|
||||||
VimPlugin.getMotion().setLastFTCmd(lastFTCmd, lastFTChar);
|
|
||||||
state.saveLastChangeCommand(cmd);
|
|
||||||
VimPlugin.getRegister().selectRegister(reg);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
141
src/com/maddyhome/idea/vim/action/change/RepeatChangeAction.kt
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.command.CommandProcessor
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.extension.VimExtensionHandler
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.commandState
|
||||||
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
|
class RepeatChangeAction : VimActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
|
val state = editor.commandState
|
||||||
|
val lastCommand = VimRepeater.lastChangeCommand
|
||||||
|
|
||||||
|
if (lastCommand == null && VimRepeater.Extension.lastExtensionHandler == null) return false
|
||||||
|
|
||||||
|
// Save state
|
||||||
|
val save = state.executingCommand
|
||||||
|
val lastFTCmd = VimPlugin.getMotion().lastFTCmd
|
||||||
|
val lastFTChar = VimPlugin.getMotion().lastFTChar
|
||||||
|
val reg = VimPlugin.getRegister().currentRegister
|
||||||
|
val lastHandler = VimRepeater.Extension.lastExtensionHandler
|
||||||
|
val repeatHandler = VimRepeater.repeatHandler
|
||||||
|
|
||||||
|
state.isDotRepeatInProgress = true
|
||||||
|
VimPlugin.getRegister().selectRegister(VimRepeater.lastChangeRegister)
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (repeatHandler && lastHandler != null) {
|
||||||
|
val processor = CommandProcessor.getInstance()
|
||||||
|
processor.executeCommand(editor.project, { lastHandler.execute(editor, context) }, "Vim " + lastHandler.javaClass.simpleName, null)
|
||||||
|
} else if (!repeatHandler && lastCommand != null) {
|
||||||
|
if (cmd.rawCount > 0) {
|
||||||
|
lastCommand.count = cmd.count
|
||||||
|
val arg = lastCommand.argument
|
||||||
|
if (arg != null) {
|
||||||
|
val mot = arg.motion
|
||||||
|
mot.count = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.setExecutingCommand(lastCommand)
|
||||||
|
|
||||||
|
KeyHandler.executeVimAction(editor, lastCommand.action, context)
|
||||||
|
|
||||||
|
VimRepeater.saveLastChange(lastCommand)
|
||||||
|
}
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
|
|
||||||
|
state.isDotRepeatInProgress = false
|
||||||
|
|
||||||
|
// Restore state
|
||||||
|
if (save != null) state.setExecutingCommand(save)
|
||||||
|
VimPlugin.getMotion().setLastFTCmd(lastFTCmd, lastFTChar)
|
||||||
|
if (lastHandler != null) VimRepeater.Extension.lastExtensionHandler = lastHandler
|
||||||
|
VimRepeater.repeatHandler = repeatHandler
|
||||||
|
VimRepeater.Extension.reset()
|
||||||
|
VimPlugin.getRegister().selectRegister(reg)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object VimRepeater {
|
||||||
|
var repeatHandler = false
|
||||||
|
|
||||||
|
var lastChangeCommand: Command? = null
|
||||||
|
private set
|
||||||
|
var lastChangeRegister = VimPlugin.getRegister().defaultRegister
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun saveLastChange(command: Command) {
|
||||||
|
lastChangeCommand = command
|
||||||
|
lastChangeRegister = VimPlugin.getRegister().currentRegister
|
||||||
|
}
|
||||||
|
|
||||||
|
object Extension {
|
||||||
|
var lastExtensionHandler: VimExtensionHandler? = null
|
||||||
|
var argumentCaptured: Argument? = null
|
||||||
|
|
||||||
|
private val keyStrokes = mutableListOf<KeyStroke>()
|
||||||
|
private val strings = mutableListOf<String>()
|
||||||
|
|
||||||
|
private var keystrokePointer = 0
|
||||||
|
private var stringPointer = 0
|
||||||
|
|
||||||
|
fun addKeystroke(key: KeyStroke) = keyStrokes.add(key)
|
||||||
|
fun addString(key: String) = strings.add(key)
|
||||||
|
|
||||||
|
fun consumeKeystroke(): KeyStroke? {
|
||||||
|
if (keystrokePointer in keyStrokes.indices) {
|
||||||
|
keystrokePointer += 1
|
||||||
|
return keyStrokes[keystrokePointer - 1]
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
fun consumeString(): String? {
|
||||||
|
if (stringPointer in strings.indices) {
|
||||||
|
stringPointer += 1
|
||||||
|
return strings[stringPointer - 1]
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
fun reset() {
|
||||||
|
keystrokePointer = 0
|
||||||
|
stringPointer = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clean() {
|
||||||
|
keyStrokes.clear()
|
||||||
|
strings.clear()
|
||||||
|
keystrokePointer = 0
|
||||||
|
stringPointer = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
|
||||||
import com.maddyhome.idea.vim.ex.ExException;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class RepeatExCommandAction extends VimActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("@:");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command command) {
|
|
||||||
int count = command.getCount();
|
|
||||||
try {
|
|
||||||
return CommandParser.getInstance().processLastCommand(editor, context, count);
|
|
||||||
}
|
|
||||||
catch (ExException e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.VimActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class UndoAction extends VimActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("u", "<Undo>");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
|
||||||
return UndoRedoHelper.INSTANCE.undo(context);
|
|
||||||
}
|
|
||||||
}
|
|
39
src/com/maddyhome/idea/vim/action/change/UndoAction.kt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.action.ComplicatedKeysAction
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.StringHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.UndoRedoHelper.undo
|
||||||
|
import java.awt.event.KeyEvent
|
||||||
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
|
class UndoAction : VimActionHandler.SingleExecution(), ComplicatedKeysAction {
|
||||||
|
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(
|
||||||
|
StringHelper.parseKeys("u"),
|
||||||
|
listOf(KeyStroke.getKeyStroke(KeyEvent.VK_UNDO, 0))
|
||||||
|
)
|
||||||
|
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean = undo(context)
|
||||||
|
}
|
@@ -1,77 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class AutoIndentLinesVisualAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("=");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
VimPlugin.getChange().autoIndentRange(editor, caret, context, range.toVimTextRange(true));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class AutoIndentLinesVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
VimPlugin.getChange().autoIndentRange(editor, caret, context, range.toVimTextRange(true))
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCaseLowerMotionAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("gu");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_OP_PEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.MOTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return argument != null &&
|
|
||||||
VimPlugin.getChange()
|
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_LOWER, argument);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.action.DuplicableOperatorAction
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
|
||||||
|
class ChangeCaseLowerMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableOperatorAction {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.MOTION
|
||||||
|
|
||||||
|
override val duplicateWith: Char = 'u'
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return argument != null &&
|
||||||
|
VimPlugin.getChange()
|
||||||
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_LOWER, argument)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import com.maddyhome.idea.vim.helper.HelperKt;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeCaseLowerVisualAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("u");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
final Editor topLevelEditor = HelperKt.getTopLevelEditor(editor);
|
|
||||||
return VimPlugin.getChange()
|
|
||||||
.changeCaseRange(topLevelEditor, caret, range.toVimTextRange(false), CharacterHelper.CASE_LOWER);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class ChangeCaseLowerVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
val topLevelEditor = editor.getTopLevelEditor()
|
||||||
|
return VimPlugin.getChange()
|
||||||
|
.changeCaseRange(topLevelEditor, caret, range.toVimTextRange(false), CharacterHelper.CASE_LOWER)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCaseToggleCharacterAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("~");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return VimPlugin.getChange().changeCaseToggleCharacter(editor, caret, count);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
|
||||||
|
class ChangeCaseToggleCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return VimPlugin.getChange().changeCaseToggleCharacter(editor, caret, count)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCaseToggleMotionAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("g~");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.MOTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_OP_PEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return argument != null &&
|
|
||||||
VimPlugin.getChange()
|
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_TOGGLE, argument);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.action.DuplicableOperatorAction
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
|
||||||
|
class ChangeCaseToggleMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableOperatorAction {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.MOTION
|
||||||
|
|
||||||
|
override val duplicateWith: Char = '~'
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return argument != null &&
|
||||||
|
VimPlugin.getChange()
|
||||||
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_TOGGLE, argument)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeCaseToggleVisualAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("~");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
return VimPlugin.getChange()
|
|
||||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_TOGGLE);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class ChangeCaseToggleVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
return VimPlugin.getChange()
|
||||||
|
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_TOGGLE)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCaseUpperMotionAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("gU");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.MOTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_OP_PEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return argument != null &&
|
|
||||||
VimPlugin.getChange()
|
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_UPPER, argument);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.action.DuplicableOperatorAction
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
|
||||||
|
class ChangeCaseUpperMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableOperatorAction {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.MOTION
|
||||||
|
|
||||||
|
override val duplicateWith: Char = 'U'
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return argument != null &&
|
||||||
|
VimPlugin.getChange()
|
||||||
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_UPPER, argument)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeCaseUpperVisualAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("U");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
return VimPlugin.getChange()
|
|
||||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_UPPER);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.CharacterHelper
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class ChangeCaseUpperVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
return VimPlugin.getChange()
|
||||||
|
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_UPPER)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCharacterAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("r");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.DIGRAPH;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_ALLOW_DIGRAPH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return argument != null && VimPlugin.getChange().changeCharacter(editor, caret, count, argument.getCharacter());
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,8 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
package com.maddyhome.idea.vim.action.change.shift
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
import com.intellij.openapi.editor.Caret
|
import com.intellij.openapi.editor.Caret
|
||||||
@@ -25,20 +24,16 @@ import com.maddyhome.idea.vim.VimPlugin
|
|||||||
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.CommandFlags
|
||||||
import com.maddyhome.idea.vim.command.MappingMode
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import javax.swing.KeyStroke
|
|
||||||
|
|
||||||
|
class ChangeCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
class ShiftRightLinesAction : ChangeEditorActionHandler.ForEachCaret() {
|
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||||
override val mappingModes: Set<MappingMode> = MappingMode.I
|
|
||||||
|
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = parseKeysSet("<C-T>")
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH)
|
||||||
|
|
||||||
override val type: Command.Type = Command.Type.INSERT
|
|
||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_SAVE_STROKE)
|
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(editor: Editor,
|
||||||
caret: Caret,
|
caret: Caret,
|
||||||
@@ -46,22 +41,6 @@ class ShiftRightLinesAction : ChangeEditorActionHandler.ForEachCaret() {
|
|||||||
count: Int,
|
count: Int,
|
||||||
rawCount: Int,
|
rawCount: Int,
|
||||||
argument: Argument?): Boolean {
|
argument: Argument?): Boolean {
|
||||||
VimPlugin.getChange().indentLines(editor, caret, context, count, -1)
|
return argument != null && VimPlugin.getChange().changeCharacter(editor, caret, count, argument.character)
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ShiftRightLinesNormalModeAction : ChangeEditorActionHandler.ForEachCaret() {
|
|
||||||
override val mappingModes: Set<MappingMode> = MappingMode.N
|
|
||||||
|
|
||||||
override val keyStrokesSet: Set<List<KeyStroke>> = parseKeysSet(">>")
|
|
||||||
|
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
|
||||||
|
|
||||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int,
|
|
||||||
rawCount: Int, argument: Argument?): Boolean {
|
|
||||||
VimPlugin.getChange().indentLines(editor, caret, context, count, 1)
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeCharactersAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("s");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_NO_REPEAT, CommandFlags.FLAG_MULTIKEY_UNDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return VimPlugin.getChange().changeCharacters(editor, caret, count);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class ChangeCharactersAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return VimPlugin.getChange().changeCharacters(editor, caret, count)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeEndOfLineAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("C");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_NO_REPEAT, CommandFlags.FLAG_MULTIKEY_UNDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return VimPlugin.getChange().changeEndOfLine(editor, caret, count);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class ChangeEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return VimPlugin.getChange().changeEndOfLine(editor, caret, count)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.ex.LineRange;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeLastGlobalSearchReplaceAction extends ChangeEditorActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("g&");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
final LineRange range = new LineRange(0, EditorHelper.getLineCount(editor) - 1);
|
|
||||||
return VimPlugin.getSearch()
|
|
||||||
.searchAndReplace(editor, editor.getCaretModel().getPrimaryCaret(), range, "s", "//~/&");
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.ex.ranges.LineRange
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
|
|
||||||
|
class ChangeLastGlobalSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
val range = LineRange(0, EditorHelper.getLineCount(editor) - 1)
|
||||||
|
return VimPlugin.getSearch()
|
||||||
|
.searchAndReplace(editor, editor.caretModel.primaryCaret, range, "s", "//~/&")
|
||||||
|
}
|
||||||
|
}
|
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.ex.LineRange;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeLastSearchReplaceAction extends ChangeEditorActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("&");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.OTHER_SELF_SYNCHRONIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
boolean result = true;
|
|
||||||
for (Caret caret : editor.getCaretModel().getAllCarets()) {
|
|
||||||
final int line = caret.getLogicalPosition().line;
|
|
||||||
if (!VimPlugin.getSearch().searchAndReplace(editor, caret, new LineRange(line, line), "s", "//~/")) {
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.ex.ranges.LineRange
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
|
||||||
|
class ChangeLastSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
var result = true
|
||||||
|
for (caret in editor.caretModel.allCarets) {
|
||||||
|
val line = caret.logicalPosition.line
|
||||||
|
if (!VimPlugin.getSearch().searchAndReplace(editor, caret, LineRange(line, line), "s", "//~/")) {
|
||||||
|
result = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeLineAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("cc", "S");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_NO_REPEAT, CommandFlags.FLAG_ALLOW_MID_COUNT, CommandFlags.FLAG_MULTIKEY_UNDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return VimPlugin.getChange().changeLine(editor, caret, count, context);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceAction
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class ChangeLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
// `S` command is a synonym of `cc`
|
||||||
|
val motion = MotionDownLess1FirstNonSpaceAction()
|
||||||
|
val command = Command(1, motion, motion.type, motion.flags)
|
||||||
|
return VimPlugin.getChange().changeMotion(editor, caret, context, count, rawCount, Argument(command))
|
||||||
|
}
|
||||||
|
}
|
@@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeMotionAction extends ChangeEditorActionHandler.ForEachCaret {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("c");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_OP_PEND, CommandFlags.FLAG_MULTIKEY_UNDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.MOTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
return argument != null && VimPlugin.getChange().changeMotion(editor, caret, context, count, rawCount, argument);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.action.DuplicableOperatorAction
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
|
||||||
|
class ChangeMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableOperatorAction {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.MOTION
|
||||||
|
|
||||||
|
override val duplicateWith: Char = 'c'
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
return argument != null && VimPlugin.getChange().changeMotion(editor, caret, context, count, rawCount, argument)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChangeReplaceAction extends ChangeEditorActionHandler.SingleExecution {
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.N;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("R");
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_MULTIKEY_UNDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(@NotNull Editor editor,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
int count,
|
|
||||||
int rawCount,
|
|
||||||
@Nullable Argument argument) {
|
|
||||||
VimPlugin.getChange().changeReplace(editor, context);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class ChangeReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||||
|
|
||||||
|
override fun execute(editor: Editor,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?): Boolean {
|
||||||
|
VimPlugin.getChange().changeReplace(editor, context)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,77 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeVisualAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("c", "s");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
|
|
||||||
return VimPlugin.getChange().changeRange(editor, caret, range.toVimTextRange(false), range.getType(), context);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class ChangeVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
return VimPlugin.getChange().changeRange(editor, caret, range.toVimTextRange(false), range.type, context)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,86 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeVisualCharacterAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("r");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Argument.Type getArgumentType() {
|
|
||||||
return Argument.Type.DIGRAPH;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_ALLOW_DIGRAPH, CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
final Argument argument = cmd.getArgument();
|
|
||||||
return argument != null &&
|
|
||||||
VimPlugin.getChange().changeCharacterRange(editor, range.toVimTextRange(false), argument.getCharacter());
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2020 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.maddyhome.idea.vim.action.change.change
|
||||||
|
|
||||||
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
|
import com.intellij.openapi.editor.Caret
|
||||||
|
import com.intellij.openapi.editor.Editor
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
|
import com.maddyhome.idea.vim.command.Command
|
||||||
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vlan
|
||||||
|
*/
|
||||||
|
class ChangeVisualCharacterAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
|
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||||
|
|
||||||
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
|
override fun executeAction(editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection): Boolean {
|
||||||
|
val argument = cmd.argument
|
||||||
|
return argument != null &&
|
||||||
|
VimPlugin.getChange().changeCharacterRange(editor, range.toVimTextRange(false), argument.character)
|
||||||
|
}
|
||||||
|
}
|
@@ -1,83 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2019 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags;
|
|
||||||
import com.maddyhome.idea.vim.command.MappingMode;
|
|
||||||
import com.maddyhome.idea.vim.command.SelectionType;
|
|
||||||
import com.maddyhome.idea.vim.common.TextRange;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
|
||||||
import org.jetbrains.annotations.Contract;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author vlan
|
|
||||||
*/
|
|
||||||
final public class ChangeVisualLinesAction extends VisualOperatorActionHandler.ForEachCaret {
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<MappingMode> getMappingModes() {
|
|
||||||
return MappingMode.V;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Set<List<KeyStroke>> getKeyStrokesSet() {
|
|
||||||
return parseKeysSet("R", "S");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Contract(pure = true)
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public Command.Type getType() {
|
|
||||||
return Command.Type.CHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
final public EnumSet<CommandFlags> getFlags() {
|
|
||||||
return EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean executeAction(@NotNull Editor editor,
|
|
||||||
@NotNull Caret caret,
|
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull Command cmd,
|
|
||||||
@NotNull VimSelection range) {
|
|
||||||
final TextRange textRange = range.toVimTextRange(true);
|
|
||||||
|
|
||||||
final TextRange lineRange = new TextRange(EditorHelper.getLineStartForOffset(editor, textRange.getStartOffset()),
|
|
||||||
EditorHelper.getLineEndForOffset(editor, textRange.getEndOffset()) + 1);
|
|
||||||
return VimPlugin.getChange().changeRange(editor, caret, lineRange, SelectionType.LINE_WISE, context);
|
|
||||||
}
|
|
||||||
}
|
|