mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
383 Commits
0.57.1-EAP
...
0.61
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3881b905be | ||
![]() |
073c62f868 | ||
![]() |
d8e0f26bea | ||
![]() |
04c24ab5d0 | ||
![]() |
bfb0ba1ab9 | ||
![]() |
fb7d48af1f | ||
![]() |
559989ce4b | ||
![]() |
81f59e3c18 | ||
![]() |
b6adf9f7a9 | ||
![]() |
b972a01cf0 | ||
![]() |
0296cae712 | ||
![]() |
c38b18e16b | ||
![]() |
8d65c3ed26 | ||
![]() |
995bb966ad | ||
![]() |
dbda1a76ca | ||
![]() |
ed6f990d9a | ||
![]() |
4f86d9cc77 | ||
![]() |
d55774abab | ||
![]() |
d5591ba08d | ||
![]() |
f67d483c4e | ||
![]() |
f26ddd4a27 | ||
![]() |
dbbea642bc | ||
![]() |
0539e39977 | ||
![]() |
65235d32a1 | ||
![]() |
ecfcdf5a8c | ||
![]() |
cf127ba7f9 | ||
![]() |
1fba77d925 | ||
![]() |
5752b116f6 | ||
![]() |
cdf7fd8ce6 | ||
![]() |
8fe07e7b20 | ||
![]() |
b800237606 | ||
![]() |
fed02e5b8a | ||
![]() |
2d4d3e9410 | ||
![]() |
880d4c6888 | ||
![]() |
6a3d606032 | ||
![]() |
612a86c4d9 | ||
![]() |
14abc25c01 | ||
![]() |
52673d1a02 | ||
![]() |
b7caee119e | ||
![]() |
a148446912 | ||
![]() |
1ee9075976 | ||
![]() |
b03627a110 | ||
![]() |
04ac0ab743 | ||
![]() |
e7aa985ad5 | ||
![]() |
4177f4e4f3 | ||
![]() |
c1e415b76a | ||
![]() |
8ae656dee3 | ||
![]() |
d48576f48a | ||
![]() |
c0c5075072 | ||
![]() |
59d106b8c4 | ||
![]() |
d96c313ecb | ||
![]() |
212c708150 | ||
![]() |
3739eb173e | ||
![]() |
0d3ecce8a2 | ||
![]() |
164d7a4200 | ||
![]() |
1258e602e6 | ||
![]() |
8a5ad713ea | ||
![]() |
12be65fa09 | ||
![]() |
0720431c91 | ||
![]() |
6f1ac1de97 | ||
![]() |
99d2d4b594 | ||
![]() |
2bf9b97e49 | ||
![]() |
c6600f3348 | ||
![]() |
e29ab54b0e | ||
![]() |
197565d4cb | ||
![]() |
3d570d2020 | ||
![]() |
fe364dc6dc | ||
![]() |
5d0e82781f | ||
![]() |
24f005a340 | ||
![]() |
1743c08091 | ||
![]() |
81b095c899 | ||
![]() |
965e8f71a0 | ||
![]() |
efc789fbf4 | ||
![]() |
f9cf49a9dd | ||
![]() |
0b41bd30cd | ||
![]() |
7c79615c6a | ||
![]() |
10be7354cd | ||
![]() |
1e9925f092 | ||
![]() |
838079b249 | ||
![]() |
a9bf5c93df | ||
![]() |
d4ec7e1f69 | ||
![]() |
12e9774d4c | ||
![]() |
7bccaa8717 | ||
![]() |
319874b973 | ||
![]() |
daf8799c39 | ||
![]() |
f45d4e1451 | ||
![]() |
7458d126bc | ||
![]() |
a90ffb7a48 | ||
![]() |
d1e39903dd | ||
![]() |
f23793f3f3 | ||
![]() |
800390921c | ||
![]() |
9650450426 | ||
![]() |
7225ab1f1b | ||
![]() |
72dbc45457 | ||
![]() |
3d14f916ef | ||
![]() |
5598de70f1 | ||
![]() |
bfccdd6b35 | ||
![]() |
35f36070a4 | ||
![]() |
8f0c50a010 | ||
![]() |
25d6d3694b | ||
![]() |
6c784ec01e | ||
![]() |
ebc81c55c2 | ||
![]() |
d08d9fce99 | ||
![]() |
d1bfce1974 | ||
![]() |
0d0f326c26 | ||
![]() |
2072fa1e13 | ||
![]() |
fd98274e78 | ||
![]() |
e72c7d6cb7 | ||
![]() |
5860c0031b | ||
![]() |
a43232ba6c | ||
![]() |
b20bec610a | ||
![]() |
3a9f5ea33a | ||
![]() |
5d1caa21d8 | ||
![]() |
70b3156375 | ||
![]() |
d388a75f98 | ||
![]() |
b2a6d0e687 | ||
![]() |
462f5bab54 | ||
![]() |
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 | ||
![]() |
660b243056 |
146
.detekt/baseline.xml
Normal file
146
.detekt/baseline.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues>
|
||||
<ID>ComplexMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
||||
</ManuallySuppressedIssues>
|
||||
<CurrentIssues>
|
||||
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ComplexMethod:SearchHelperKt.kt$// bounds are considered inside corresponding quotes fun checkInString(chars: CharSequence, currentPos: Int, str: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ComplexMethod:VimExchangeExtension.kt$VimExchangeExtension.Operator$private fun compareExchanges(x: Exchange, y: Exchange): ExchangeCompareResult</ID>
|
||||
<ID>ComplexMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ComplexMethod:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>LongMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>MagicNumber:ActionListHandler.kt$ActionListHandler$50</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$3</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$6</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$7</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$20</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$7</ID>
|
||||
<ID>MagicNumber:BufferListHandler.kt$3</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$11</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$999999999</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$6</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
||||
<ID>MagicNumber:EditorHelper.kt$10</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
||||
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$200</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$3</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$5</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$200</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$3</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$5</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$100</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$1000</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
||||
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
||||
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
||||
<ID>MagicNumber:SearchHelperKt.kt$3</ID>
|
||||
<ID>MagicNumber:SelectLastFileHandler.kt$SelectLastFileHandler$999</ID>
|
||||
<ID>MagicNumber:SelectionType.kt$SelectionType.BLOCK_WISE$3</ID>
|
||||
<ID>MagicNumber:ShiftLeftHandler.kt$ShiftLeftHandler$31</ID>
|
||||
<ID>MagicNumber:ShiftRightHandler.kt$ShiftRightHandler$31</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
||||
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
||||
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger<ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: $pluginId")</ID>
|
||||
<ID>MaxLineLength:ExRanges.kt$SearchRange$override</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set clipboard+=ideaput", "ideaput") { OptionsManager.clipboard.append(ClipboardOptionsData.ideaput) })</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$private inner</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$val successNotification = Notification(IDEAVIM_NOTIFICATION_ID, IDEAVIM_NOTIFICATION_TITLE, "<code>$optionName</code> is enabled", NotificationType.INFORMATION)</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$private</ID>
|
||||
<ID>MaxLineLength:PutLinesHandler.kt$PutLinesHandler$val textData = registerGroup.lastRegister?.let { PutData.TextData(it.text ?: StringHelper.toKeyNotation(it.keys), SelectionType.LINE_WISE, it.transferableData) }</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBaseAction$val textData = if (lastRegister != null) TextData(lastRegister.text ?: StringHelper.toKeyNotation(lastRegister.keys), lastRegister.type, lastRegister.transferableData) else null</ID>
|
||||
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Operator$val visualSelection = PutData.VisualSelection(mapOf(editor.caretModel.primaryCaret to VimSelection.create(range.startOffset, range.endOffset - 1, selectionType, editor)), selectionType)</ID>
|
||||
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&build=$buildNumber&pluginVersion=$version&os=$os&uuid=$uid"</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$@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()</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$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))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$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))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$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))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$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))</ID>
|
||||
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList<Range> = mutableListOf()</ID>
|
||||
<ID>NestedBlockDepth:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:ActionBeanClass.kt$ActionBeanClass$fun getParsedModes(): Set<MappingMode>?</ID>
|
||||
<ID>ReturnCount:Alias.kt$Alias$fun getCommand(input: String, count: Int): String</ID>
|
||||
<ID>ReturnCount:CmdFilterHandler.kt$CmdFilterHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:CommandGroup.kt$CommandGroup$fun isAlias(command: String): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesAction.kt$DeleteJoinLinesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesSpacesAction.kt$DeleteJoinLinesSpacesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesAction.kt$DeleteJoinVisualLinesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesSpacesAction.kt$DeleteJoinVisualLinesSpacesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteMotionAction.kt$DeleteMotionAction$override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:EditFileHandler.kt$EditFileHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:EditorHelper.kt$ fun Editor.isPrimaryEditor(): Boolean</ID>
|
||||
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</ID>
|
||||
<ID>ReturnCount:FilterMotionAction.kt$FilterMotionAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:GotoCharacterHandler.kt$GotoCharacterHandler$override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:Helper.kt$@Suppress("IncorrectParentDisposable") fun Editor.isTemplateActive(): Boolean</ID>
|
||||
<ID>ReturnCount:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:IdeaSelectionControl.kt$IdeaSelectionControl$ fun predictMode(editor: Editor, selectionSource: VimListenerManager.SelectionSource): CommandState.Mode</ID>
|
||||
<ID>ReturnCount:MapHandler.kt$MapHandler$@Throws(ExException::class) private fun executeCommand(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:Marks.kt$IntellijMark$private fun getProject(): Project?</ID>
|
||||
<ID>ReturnCount:Marks.kt$VimMark.Companion$@JvmStatic fun create(key: Char?, logicalLine: Int?, col: Int?, filename: String?, protocol: String?): VimMark?</ID>
|
||||
<ID>ReturnCount:ModalEntry.kt$ModalEntry.<no name provided>$override fun dispatchKeyEvent(e: KeyEvent): Boolean</ID>
|
||||
<ID>ReturnCount:MotionScrollLastScreenLinePageStartAction.kt$MotionScrollLastScreenLinePageStartAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OperatorAction.kt$OperatorAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun getProviderForPasteViaIde(context: DataContext, typeInRegister: SelectionType, data: PutData): PasteProvider?</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ReturnCount:PutLinesHandler.kt$PutLinesHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:ReloadVimRc.kt$VimRcFileState$fun equalTo(document: Document): Boolean</ID>
|
||||
<ID>ReturnCount:RepeatHandler.kt$RepeatHandler$@Throws(ExException::class) override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:SelectMotionRightAction.kt$SelectMotionRightAction$override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int</ID>
|
||||
<ID>ReturnCount:ShowCmd.kt$ShowCmd$fun getFullText(editor: Editor?): String</ID>
|
||||
<ID>ReturnCount:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ReturnCount:TextObjectActionHandler.kt$TextObjectActionHandler$ final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun redo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun undo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:VimExchangeExtension.kt$VimExchangeExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic fun inputString(editor: Editor, prompt: String, finishOn: Char?): String</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.SkipOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$@Throws(ExException::class) fun evaluate(expression: String, globals: Map<String?, Any?>): Any</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$fun findOrCreateIdeaVimRc(): File?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun getKeyStroke(e: AnActionEvent): KeyStroke?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler$override fun execute(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockAppendAction.kt$VisualBlockAppendAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockInsertAction.kt$VisualBlockInsertAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$ fun toggleVisual(editor: Editor, count: Int, rawCount: Int, subMode: CommandState.SubMode): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun autodetectVisualSubmode(editor: Editor): CommandState.SubMode</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun selectPreviousVisualMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun swapVisualSelections(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualOperatorActionHandler.kt$VisualOperatorActionHandler$final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:YankGroup.kt$YankGroup$ fun yankMotion(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument): Boolean</ID>
|
||||
<ID>ThrowsCount:CommandHandler.kt$CommandHandler$private fun checkArgs(cmd: ExCommand)</ID>
|
||||
<ID>TooManyFunctions:CommandBuilder.kt$CommandBuilder</ID>
|
||||
<ID>TooManyFunctions:CommandState.kt$CommandState</ID>
|
||||
<ID>TooManyFunctions:PutGroup.kt$PutGroup</ID>
|
||||
<ID>TooManyFunctions:Ranges.kt$Ranges</ID>
|
||||
<ID>TooManyFunctions:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
|
||||
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
31
.detekt/config.yaml
Normal file
31
.detekt/config.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
formatting:
|
||||
Indentation:
|
||||
indentSize: 2
|
||||
continuationIndentSize: 8
|
||||
ParameterListWrapping:
|
||||
indentSize: 8
|
||||
complexity:
|
||||
LongParameterList:
|
||||
functionThreshold: 12
|
||||
NestedBlockDepth:
|
||||
threshold: 6
|
||||
ComplexCondition:
|
||||
threshold: 6
|
||||
ComplexMethod:
|
||||
threshold: 20
|
||||
exceptions:
|
||||
TooGenericExceptionCaught:
|
||||
active: false
|
||||
naming:
|
||||
ClassNaming:
|
||||
excludes: "**/ConfigurationMigrators.kt, **/VersionDetectors.kt"
|
||||
performance:
|
||||
SpreadOperator:
|
||||
active: false
|
||||
style:
|
||||
ForbiddenComment:
|
||||
active: false
|
||||
MaxLineLength:
|
||||
maxLineLength: 160
|
||||
ReturnCount:
|
||||
max: 5
|
7
.gitignore
vendored
7
.gitignore
vendored
@@ -5,9 +5,14 @@
|
||||
!/.idea/scopes
|
||||
!/.idea/copyright
|
||||
!/.idea/icon.png
|
||||
!/.idea/inspectionProfiles
|
||||
|
||||
/build/
|
||||
/out/
|
||||
/tmp/
|
||||
|
||||
*.DS_Store
|
||||
*.DS_Store
|
||||
|
||||
.teamcity/.idea
|
||||
.teamcity/target
|
||||
.teamcity/*.iml
|
||||
|
9
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
9
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_requireAnnotationsFirst" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
23
.idea/inspectionProfiles/Qodana.xml
generated
Normal file
23
.idea/inspectionProfiles/Qodana.xml
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<description>Inspections profile for Qodana</description>
|
||||
<option name="myName" value="Qodana" />
|
||||
<inspection_tool class="CanBeFinal" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="REPORT_CLASSES" value="false" />
|
||||
<option name="REPORT_METHODS" value="false" />
|
||||
<option name="REPORT_FIELDS" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GrUnresolvedAccess" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_requireAnnotationsFirst" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SameReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
24
.run/IdeaVim full verification.run.xml
Normal file
24
.run/IdeaVim full verification.run.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim full verification" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="check" />
|
||||
<option value="runPluginVerifier" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
23
.run/IdeaVim tests.run.xml
Normal file
23
.run/IdeaVim tests.run.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim tests" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="test" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
23
.run/Run IJ with IdeaVim.run.xml
Normal file
23
.run/Run IJ with IdeaVim.run.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Start IJ with IdeaVim" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="runIde" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
86
.teamcity/_Self/Project.kt
vendored
Normal file
86
.teamcity/_Self/Project.kt
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
package _Self
|
||||
|
||||
import _Self.buildTypes.GitHubPullRequests
|
||||
import _Self.buildTypes.Nvim
|
||||
import _Self.buildTypes.PluginVerifier
|
||||
import _Self.buildTypes.Release
|
||||
import _Self.buildTypes.ReleaseEap
|
||||
import _Self.buildTypes.TestsForIntelliJ20181
|
||||
import _Self.buildTypes.TestsForIntelliJ20182
|
||||
import _Self.buildTypes.TestsForIntelliJ20183
|
||||
import _Self.buildTypes.TestsForIntelliJ20191
|
||||
import _Self.buildTypes.TestsForIntelliJ20192
|
||||
import _Self.buildTypes.TestsForIntelliJ20193
|
||||
import _Self.buildTypes.TestsForIntelliJ20201
|
||||
import _Self.buildTypes.TestsForIntelliJ20202
|
||||
import _Self.buildTypes.TestsForIntelliJEAP
|
||||
import _Self.vcsRoots.Branch_181
|
||||
import _Self.vcsRoots.Branch_183
|
||||
import _Self.vcsRoots.Branch_191_193
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||
|
||||
object Project : Project({
|
||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||
|
||||
vcsRoot(Branch_183)
|
||||
vcsRoot(Branch_181)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
vcsRoot(Branch_191_193)
|
||||
|
||||
buildType(GitHubPullRequests)
|
||||
buildType(Release)
|
||||
buildType(TestsForIntelliJ20201)
|
||||
buildType(TestsForIntelliJ20191)
|
||||
buildType(TestsForIntelliJ20181)
|
||||
buildType(TestsForIntelliJ20192)
|
||||
buildType(TestsForIntelliJ20182)
|
||||
buildType(TestsForIntelliJ20193)
|
||||
buildType(TestsForIntelliJ20183)
|
||||
buildType(Nvim)
|
||||
buildType(ReleaseEap)
|
||||
buildType(TestsForIntelliJ20202)
|
||||
buildType(TestsForIntelliJEAP)
|
||||
buildType(PluginVerifier)
|
||||
|
||||
features {
|
||||
feature {
|
||||
id = "PROJECT_EXT_768"
|
||||
type = "CloudImage"
|
||||
param("use-spot-instances", "true")
|
||||
param("user-tags", "project=idea-vim")
|
||||
param("agent_pool_id", "41")
|
||||
param("image-instances-limit", "")
|
||||
param("subnet-id", "subnet-58839511")
|
||||
param("ebs-optimized", "false")
|
||||
param("instance-type", "c5d.large")
|
||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||
param("spot-instance-price", "0.1")
|
||||
param("source-id", "BuildAgentsIdeaVim")
|
||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||
param("key-pair-name", "teamcity-prod-pub")
|
||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||
param("profileId", "amazon-48")
|
||||
}
|
||||
feature {
|
||||
id = "amazon-48"
|
||||
type = "CloudProfile"
|
||||
param("profileServerUrl", "")
|
||||
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||
param("system.cloud.profile_id", "amazon-48")
|
||||
param("total-work-time", "")
|
||||
param("description", "")
|
||||
param("cloud-code", "amazon")
|
||||
param("enabled", "true")
|
||||
param("max-running-instances", "10")
|
||||
param("agentPushPreset", "")
|
||||
param("profileId", "amazon-48")
|
||||
param("name", "Cloud Agents")
|
||||
param("next-hour", "")
|
||||
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||
param("region", "eu-west-1")
|
||||
param("terminate-idle-time", "15")
|
||||
param("not-checked", "")
|
||||
}
|
||||
}
|
||||
})
|
45
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
Normal file
45
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class ActiveTests(buildName: String, ijVersion: String) : BuildType({
|
||||
name = buildName
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", ijVersion)
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean check"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJEAP : ActiveTests("Tests for IntelliJ Latest EAP", "LATEST-EAP-SNAPSHOT")
|
||||
object TestsForIntelliJ20202 : ActiveTests("Tests for IntelliJ 2020.2", "2020.2")
|
||||
object TestsForIntelliJ20201 : ActiveTests("Tests for IntelliJ 2020.1", "2020.1")
|
74
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
Normal file
74
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object GitHubPullRequests : BuildType({
|
||||
name = "GitHub Pull Requests"
|
||||
description = "Test GitHub pull requests"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.GitHubPullRequest)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = """
|
||||
+:*
|
||||
-:<default>
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
features {
|
||||
pullRequests {
|
||||
provider = github {
|
||||
authType = token {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
filterTargetBranch = "refs/heads/master"
|
||||
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
|
||||
}
|
||||
}
|
||||
commitStatusPublisher {
|
||||
vcsRootExtId = "${GitHubPullRequest.id}"
|
||||
publisher = github {
|
||||
githubUrl = "https://api.github.com"
|
||||
authType = personalToken {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
}
|
||||
param("github_oauth_user", "AlexPl292")
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
54
.teamcity/_Self/buildTypes/Nvim.kt
vendored
Normal file
54
.teamcity/_Self/buildTypes/Nvim.kt
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object Nvim : BuildType({
|
||||
name = "Tests with nvim"
|
||||
description = "Running tests with nvim integration"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ideavim.nvim.path", "./nvim-linux64/bin/nvim")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
script {
|
||||
name = "Set up NeoVim"
|
||||
scriptContent = """
|
||||
wget https://github.com/neovim/neovim/releases/download/v0.4.4/nvim-linux64.tar.gz
|
||||
tar xzf nvim-linux64.tar.gz
|
||||
cd nvim-linux64/bin
|
||||
chmod +x nvim
|
||||
""".trimIndent()
|
||||
}
|
||||
gradle {
|
||||
tasks = "clean testWithNeovim"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
40
.teamcity/_Self/buildTypes/PluginVerifier.kt
vendored
Normal file
40
.teamcity/_Self/buildTypes/PluginVerifier.kt
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object PluginVerifier : BuildType({
|
||||
name = "Plugin verification"
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean runPluginVerifier"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
42
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
42
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
|
||||
object Release : BuildType({
|
||||
name = "Publish Release"
|
||||
description = "Build and publish IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.61"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
label = "Password"
|
||||
)
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
})
|
75
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
75
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.vcsLabeling
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.ScheduleTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
|
||||
|
||||
object ReleaseEap : BuildType({
|
||||
name = "Publish EAP Build"
|
||||
description = "Build and publish EAP of IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.61.%build.counter%"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
label = "Token"
|
||||
)
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_slackUrl",
|
||||
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||
label = "Slack Token"
|
||||
)
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin slackEapNotification"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
schedule {
|
||||
enabled = false
|
||||
schedulingPolicy = daily {
|
||||
hour = 22
|
||||
}
|
||||
branchFilter = ""
|
||||
triggerBuild = onWatchedBuildChange {
|
||||
buildType = "IdeaVim_TestsForIntelliJBranch146"
|
||||
watchedBuildRule = ScheduleTrigger.WatchedBuildRule.LAST_SUCCESSFUL
|
||||
watchedBuildBranchFilter = "<default>"
|
||||
promoteWatchedBuild = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
features {
|
||||
vcsLabeling {
|
||||
vcsRootId = "${DslContext.settingsRoot.id}"
|
||||
labelingPattern = "%system.build.number%-EAP"
|
||||
successfulOnly = true
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
})
|
44
.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
vendored
Normal file
44
.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20183 : BuildType({
|
||||
name = "Tests for IntelliJ 2018.3"
|
||||
description = "branch 183"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.3")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_183)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
47
.teamcity/_Self/buildTypes/TestsForIntelliJ_181-182.kt
vendored
Normal file
47
.teamcity/_Self/buildTypes/TestsForIntelliJ_181-182.kt
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class TestsForIntelliJ_181_branch(private val version: String) : BuildType({
|
||||
name = "Tests for IntelliJ $version"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-$version")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_181)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJ20181 : TestsForIntelliJ_181_branch("2018.1")
|
||||
object TestsForIntelliJ20182 : TestsForIntelliJ_181_branch("2018.2")
|
49
.teamcity/_Self/buildTypes/TestsForIntelliJ_191-193.kt
vendored
Normal file
49
.teamcity/_Self/buildTypes/TestsForIntelliJ_191-193.kt
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class TestsForIntelliJ_191_193_branch(private val version: String) : BuildType({
|
||||
name = "Tests for IntelliJ $version"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-$version")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_191_193)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJ20191 : TestsForIntelliJ_191_193_branch("2019.1")
|
||||
object TestsForIntelliJ20192 : TestsForIntelliJ_191_193_branch("2019.2")
|
||||
object TestsForIntelliJ20193 : TestsForIntelliJ_191_193_branch("2019.3")
|
12
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_181 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 181)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "181"
|
||||
useMirrors = false
|
||||
})
|
12
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_183 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 183)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "183"
|
||||
useMirrors = false
|
||||
})
|
12
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_191_193 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 191-193)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "191-193"
|
||||
useMirrors = false
|
||||
})
|
12
.teamcity/_Self/vcsRoots/GitHubPullRequest.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/GitHubPullRequest.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object GitHubPullRequest : GitVcsRoot({
|
||||
name = "IdeaVim Pull Requests"
|
||||
url = "git@github.com:JetBrains/ideavim.git"
|
||||
branchSpec = "+:refs/(pull/*)/head"
|
||||
authMethod = uploadedKey {
|
||||
uploadedKey = "Alex Plate TeamCity key"
|
||||
}
|
||||
})
|
104
.teamcity/pom.xml
vendored
Normal file
104
.teamcity/pom.xml
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>IdeaVim Config DSL Script</name>
|
||||
<groupId>IdeaVim</groupId>
|
||||
<artifactId>IdeaVim_dsl</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jetbrains-all</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>teamcity-server</id>
|
||||
<url>https://teamcity.jetbrains.com/app/dsl-plugins-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>JetBrains</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${basedir}</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
|
||||
<configuration/>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>process-test-sources</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>teamcity-configs-maven-plugin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<configuration>
|
||||
<format>kotlin</format>
|
||||
<dstDir>target/generated-configs</dstDir>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-plugins</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
33
.teamcity/settings.kts
vendored
Normal file
33
.teamcity/settings.kts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
|
||||
/*
|
||||
The settings script is an entry point for defining a single
|
||||
TeamCity project. TeamCity looks for the 'settings.kts' file in a
|
||||
project directory and runs it if it's found, so the script name
|
||||
shouldn't be changed and its package should be the same as the
|
||||
project's id.
|
||||
|
||||
The script should contain a single call to the project() function
|
||||
with a Project instance or an init function as an argument.
|
||||
|
||||
VcsRoots, BuildTypes, and Templates of this project must be
|
||||
registered inside project using the vcsRoot(), buildType(), and
|
||||
template() methods respectively.
|
||||
|
||||
Subprojects can be defined either in their own settings.kts or by
|
||||
calling the subProjects() method in this project.
|
||||
|
||||
To debug settings scripts in command-line, run the
|
||||
|
||||
mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
|
||||
|
||||
command and attach your debugger to the port 8000.
|
||||
|
||||
To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View ->
|
||||
Tool Windows -> Maven Projects), find the generate task
|
||||
node (Plugins -> teamcity-configs -> teamcity-configs:generate),
|
||||
the 'Debug' option is available in the context menu for the task.
|
||||
*/
|
||||
|
||||
version = "2020.1"
|
||||
project(_Self.Project)
|
24
AUTHORS.md
24
AUTHORS.md
@@ -299,6 +299,30 @@ Contributors:
|
||||
[![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
|
||||
contact the maintainers.
|
||||
|
245
CHANGES.md
245
CHANGES.md
@@ -22,13 +22,100 @@ 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
|
||||
usual beta standards.
|
||||
|
||||
To Be Released
|
||||
-------------
|
||||
## To Be Released
|
||||
|
||||
_Available since 0.57.1 EAP:_
|
||||
...
|
||||
|
||||
**Features:**
|
||||
* `exchange` plugin emulation ([vim-exchange](https://github.com/tommcdo/vim-exchange)).
|
||||
## 0.61, 2020-11-12
|
||||
|
||||
### Features:
|
||||
* Ability to map IDE actions via the `<Action>` keyword. E.g. `map <C-K> <Action>(CommentByLineComment)`.
|
||||
Check out `README.md` for the details.
|
||||
* `IdeaVim: track action Ids` command to find action ids for the `:action` command.
|
||||
Enable this option in "Search everywhere" (double shift).
|
||||
* Ability to enable extensions using `vim-plug` or `vundle` syntax.
|
||||
E.g. to enable commentary extension you can use one of the following commands:
|
||||
```vim
|
||||
set commentary
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'https://github.com/tpope/vim-commentary'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
...
|
||||
```
|
||||
This approach is especially handy if you have `.vimrc` with plugins registered via `vim-plug` or `vundle`.
|
||||
|
||||
|
||||
### Changes:
|
||||
* Fix `<Esc>` for dialogs. Now `<Esc>` will exit insert / visual mode and close the dialog from normal mode.
|
||||
* Add option to disable IdeaVim in dialogs / single line editors. [VIM-765](https://youtrack.jetbrains.com/issue/VIM-765)
|
||||
Use `set ideavimsupport=` to disable IdeaVim in dialog editors.
|
||||
* Reposition cursor when `scrolloff` changes
|
||||
|
||||
### Fixes:
|
||||
* [VIM-2150](https://youtrack.jetbrains.com/issue/VIM-2150) `Shift-D` should not delete an empty line
|
||||
* [VIM-2157](https://youtrack.jetbrains.com/issue/VIM-2157) Fix tab with an active template
|
||||
* [VIM-2156](https://youtrack.jetbrains.com/issue/VIM-2156) Correct up/down motions with inlays
|
||||
* [VIM-2144](https://youtrack.jetbrains.com/issue/VIM-2144) Correct text position after block insert with inlays
|
||||
* [VIM-2158](https://youtrack.jetbrains.com/issue/VIM-2158) Fix scrolling when `scrolloff` is over half screen height, but less than full height
|
||||
|
||||
### Merged PRs:
|
||||
* [255](https://github.com/JetBrains/ideavim/pull/255) by [Matt Ellis](https://github.com/citizenmatt): Fix various scrolling issues
|
||||
|
||||
## 0.60, 2020-10-09
|
||||
|
||||
### 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>
|
||||
@@ -38,52 +125,52 @@ _Available since 0.57.1 EAP:_
|
||||
|
||||
* Add `:buffer` command.
|
||||
|
||||
**Changes:**
|
||||
### Changes:
|
||||
* Support IntelliJ's smooth scrolling. Use "Enable smooth scrolling" checkbox in _Preferences | Editor | General_ to disable.
|
||||
|
||||
**Fixes:**
|
||||
### 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:**
|
||||
|
||||
### 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
|
||||
|
||||
_To Be Released..._
|
||||
## 0.57, 2020-04-28
|
||||
|
||||
...
|
||||
|
||||
|
||||
0.57, 2020-04-28
|
||||
-------------
|
||||
|
||||
**Fixes:**
|
||||
### 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:**
|
||||
### 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
|
||||
--------------
|
||||
## 0.56, 2020-04-09
|
||||
|
||||
**Features:**
|
||||
### 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:**
|
||||
### Changes:
|
||||
* Replace `ideastatusbar` option with `ideastatusicon`. Now you can make the icon gray.
|
||||
|
||||
**Deprecations:**
|
||||
### Deprecations:
|
||||
* `ideastatusbar` option is deprecated now. See `ideastatusicon`.
|
||||
|
||||
**Fixes:**
|
||||
### 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>`.
|
||||
@@ -96,15 +183,14 @@ _To Be Released..._
|
||||
* [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
|
||||
--------------
|
||||
## 0.55, 2020-01-20
|
||||
|
||||
**Features:**
|
||||
### 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:**
|
||||
### 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)
|
||||
@@ -127,21 +213,20 @@ _To Be Released..._
|
||||
* [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
|
||||
--------------
|
||||
## 0.54, 2019-11-20
|
||||
|
||||
**Features:**
|
||||
### 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))
|
||||
* 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:**
|
||||
### 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-1032](https://youtrack.jetbrains.com/issue/VIM-1032) Annotations work well with relative line numbers enabled
|
||||
* [VIM-1762](https://youtrack.jetbrains.com/issue/VIM-1762) Relative line numbers respect line number theme
|
||||
@@ -168,8 +253,7 @@ _To Be Released..._
|
||||
* [VIM-1604](https://youtrack.jetbrains.com/issue/VIM-1604) Add IdeaVim logo
|
||||
|
||||
|
||||
0.53, 2019-08-07
|
||||
--------------
|
||||
## 0.53, 2019-08-07
|
||||
* [VIM-1711](https://youtrack.jetbrains.com/issue/VIM-1711) Search is not triggered during surround action
|
||||
* [VIM-1712](https://youtrack.jetbrains.com/issue/VIM-1712) Fix `Y` command for visual mode
|
||||
* [VIM-1713](https://youtrack.jetbrains.com/issue/VIM-1713) Surround in visual mode put caret in correct position
|
||||
@@ -180,8 +264,7 @@ _To Be Released..._
|
||||
* [VIM-1736](https://youtrack.jetbrains.com/issue/VIM-1736) Fix `` for ex panel
|
||||
* [VIM-1739](https://youtrack.jetbrains.com/issue/VIM-1739) Fix full-width characters for ex pane
|
||||
|
||||
0.52, 2019-07-23
|
||||
--------------
|
||||
## 0.52, 2019-07-23
|
||||
|
||||
* Introduce [Select Mode](https://github.com/JetBrains/ideavim/wiki/Select-mode).
|
||||
|
||||
@@ -274,8 +357,7 @@ _To Be Released..._
|
||||
* [VIM-1698](https://youtrack.jetbrains.com/issue/VIM-1698) Paste doesn't clear clipboard
|
||||
* [VIM-1359](https://youtrack.jetbrains.com/issue/VIM-1359) Fix behavior of i_CTRL-W action
|
||||
|
||||
0.51, 2019-02-12
|
||||
----------------
|
||||
## 0.51, 2019-02-12
|
||||
|
||||
* [VIM-1558](https://youtrack.jetbrains.com/issue/VIM-1558) Fixed scrolling for code with block inlays in Rider 2018.3
|
||||
* [VIM-1187](https://youtrack.jetbrains.com/issue/VIM-1187) Improved performance of `set relativelinenumber` on large files
|
||||
@@ -283,8 +365,7 @@ _To Be Released..._
|
||||
* [VIM-798](https://youtrack.jetbrains.com/issue/VIM-798) Allow arrow keys for window navigation commands
|
||||
|
||||
|
||||
0.50, 2018-10-18
|
||||
----------------
|
||||
## 0.50, 2018-10-18
|
||||
|
||||
Moved "Vim Emulation" settings into "File | Settings | Vim Emulation". Support
|
||||
for vim-multiple-cursors commands `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>` (put `set
|
||||
@@ -310,8 +391,7 @@ Vim commands for multiple cursors. Various bug fixes.
|
||||
* [VIM-1274](https://youtrack.jetbrains.com/issue/VIM-1274) Correctly process escaping when `smartcase` is on
|
||||
|
||||
|
||||
0.49, 2017-12-12
|
||||
----------------
|
||||
## 0.49, 2017-12-12
|
||||
|
||||
Enabled zero-latency typing for Vim emulation. Added support for `iskeyword` option. Various bug fixes.
|
||||
|
||||
@@ -319,8 +399,7 @@ Enabled zero-latency typing for Vim emulation. Added support for `iskeyword` opt
|
||||
* [VIM-1367](https://youtrack.jetbrains.com/issue/VIM-1367) Support `iskeyword` option
|
||||
* [VIM-523](https://youtrack.jetbrains.com/issue/VIM-523) Fixed global mark remembering only the line number
|
||||
|
||||
0.48, 2017-01-15
|
||||
----------------
|
||||
## 0.48, 2017-01-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -334,8 +413,7 @@ Features:
|
||||
* Support for zero-latency rendering
|
||||
|
||||
|
||||
0.47, 2016-10-19
|
||||
----------------
|
||||
## 0.47, 2016-10-19
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -345,8 +423,7 @@ Bug fixes:
|
||||
* VIM-1190 Fixed exception "Write access is allowed from write-safe contexts only"
|
||||
|
||||
|
||||
0.46, 2016-07-07
|
||||
----------------
|
||||
## 0.46, 2016-07-07
|
||||
|
||||
Added `incsearch` option for incremental search. Added support for `it` and
|
||||
`at` tag block selection. Added `vim-surround` commands `ys`, `cs`, `ds`,
|
||||
@@ -374,8 +451,7 @@ Bug fixes:
|
||||
* VIM-1126 Fixed warning about modifying shortcuts of global actions for 2016.2
|
||||
|
||||
|
||||
0.44, 2015-11-02
|
||||
----------------
|
||||
## 0.44, 2015-11-02
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -384,16 +460,14 @@ A bugfix release.
|
||||
plugin disabled
|
||||
|
||||
|
||||
0.43, 2015-11-02
|
||||
----------------
|
||||
## 0.43, 2015-11-02
|
||||
|
||||
A bugfix release.
|
||||
|
||||
* VIM-1039 Fixed running the plugin with Java 6
|
||||
|
||||
|
||||
0.42, 2015-11-01
|
||||
----------------
|
||||
## 0.42, 2015-11-01
|
||||
|
||||
This release is compatible with IntelliJ 15+ and other IDEs based on the
|
||||
IntelliJ platform branch 143+.
|
||||
@@ -401,8 +475,7 @@ IntelliJ platform branch 143+.
|
||||
* VIM-970 Fixed move commands in read-only files
|
||||
|
||||
|
||||
0.41, 2015-06-10
|
||||
----------------
|
||||
## 0.41, 2015-06-10
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -410,8 +483,7 @@ A bugfix release.
|
||||
IntelliJ
|
||||
|
||||
|
||||
0.40, 2015-06-09
|
||||
----------------
|
||||
## 0.40, 2015-06-09
|
||||
|
||||
Added support for `mapleader`. Support comments in `%` brace matching. Various
|
||||
bug fixes.
|
||||
@@ -438,8 +510,7 @@ Bug fixes:
|
||||
* VIM-930 Fixed editor focus issues after closing Ex entry box on Oracle Java 6
|
||||
|
||||
|
||||
0.39, 2014-12-03
|
||||
----------------
|
||||
## 0.39, 2014-12-03
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -451,8 +522,7 @@ Bug fixes:
|
||||
* EA-63022 Don't update line numbers in the caret movement event listener
|
||||
|
||||
|
||||
0.38, 2014-12-01
|
||||
----------------
|
||||
## 0.38, 2014-12-01
|
||||
|
||||
Added support for `number` and `relativenumber` options, `clipboard=unnamed`
|
||||
option. Added `:action` and `:actionlist` commands for executing arbitrary
|
||||
@@ -484,8 +554,7 @@ Bug fixes:
|
||||
* VIM-723 Fix pasting to an empty line
|
||||
|
||||
|
||||
0.37, 2014-10-15
|
||||
----------------
|
||||
## 0.37, 2014-10-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -496,8 +565,7 @@ Bug fixes:
|
||||
* VIM-407 Fixed `>>` to work if a line contains only one character
|
||||
|
||||
|
||||
0.36, 2014-10-14
|
||||
----------------
|
||||
## 0.36, 2014-10-14
|
||||
|
||||
Added support for common window splitting and navigation commands. Various bug
|
||||
fixes.
|
||||
@@ -516,8 +584,7 @@ Bug fixes:
|
||||
* VIM-569 Fixed `<C-W>` when the caret is at the end of a line
|
||||
|
||||
|
||||
0.35, 2014-05-15
|
||||
----------------
|
||||
## 0.35, 2014-05-15
|
||||
|
||||
The `~/.vimrc` initialization file is no longer read by default, use
|
||||
`~/.ideavimrc` instead.
|
||||
@@ -538,8 +605,7 @@ Bug fixes:
|
||||
selection
|
||||
|
||||
|
||||
0.34, 2014-04-29
|
||||
----------------
|
||||
## 0.34, 2014-04-29
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -553,8 +619,7 @@ Bug fixes:
|
||||
* VIM-667 Ignore potentially nested lines of .vimrc based on leading whitespace
|
||||
|
||||
|
||||
0.33, 2014-04-28
|
||||
----------------
|
||||
## 0.33, 2014-04-28
|
||||
|
||||
Added support for `:map` key mapping commands. New keyboard shortcuts handler
|
||||
that doesn't require a separate keymap for Vim emulation. Added support for
|
||||
@@ -573,14 +638,12 @@ Bug fixes:
|
||||
* VIM-281 Don't disable global reformat code action for Vim emulation
|
||||
|
||||
|
||||
0.32, 2013-11-15
|
||||
----------------
|
||||
## 0.32, 2013-11-15
|
||||
|
||||
Fixed API compatibility with IntelliJ platform builds 132.1052+.
|
||||
|
||||
|
||||
0.31, 2013-11-12
|
||||
----------------
|
||||
## 0.31, 2013-11-12
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -589,8 +652,7 @@ Bug fixes:
|
||||
* VIM-582 Fixed line comment and reformat commands with no visual selection
|
||||
|
||||
|
||||
0.30, 2013-11-11
|
||||
----------------
|
||||
## 0.30, 2013-11-11
|
||||
|
||||
Added support for a separate `.ideavimrc` config file. Fixed long-standing
|
||||
issues with merged undo/redo commands and `<Esc>` during code completion.
|
||||
@@ -610,8 +672,7 @@ Bug fixes:
|
||||
* Fixed several reported exceptions
|
||||
|
||||
|
||||
0.29, 2013-05-15
|
||||
----------------
|
||||
## 0.29, 2013-05-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -622,8 +683,7 @@ Bug fixes:
|
||||
* VIM-121 Don't move cursor while scrolling
|
||||
|
||||
|
||||
0.28, 2013-04-06
|
||||
----------------
|
||||
## 0.28, 2013-04-06
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -633,8 +693,7 @@ Bug fixes:
|
||||
* VIM-479 Don't try to activate insert mode for diff view
|
||||
|
||||
|
||||
0.27, 2013-04-03
|
||||
----------------
|
||||
## 0.27, 2013-04-03
|
||||
|
||||
New Vim keymap generator creates better keymaps, especially for Mac OS X.
|
||||
Restart after reconfiguring the keymap is no longer required.
|
||||
@@ -655,8 +714,7 @@ Bug fixes:
|
||||
* Fixed command window font size to match editor font size
|
||||
|
||||
|
||||
0.26, 2012-12-26
|
||||
----------------
|
||||
## 0.26, 2012-12-26
|
||||
|
||||
Added support for paste in the command mode: from a register using `<C-R>`,
|
||||
from the clipboard using `<S-Insert>` or `<M-V>`. Added support for the last
|
||||
@@ -675,8 +733,7 @@ Bug fixes:
|
||||
* VIM-302 Fixed tab switching order for `gt` and `gT`
|
||||
|
||||
|
||||
0.25, 2012-12-19
|
||||
----------------
|
||||
## 0.25, 2012-12-19
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -685,8 +742,7 @@ A bugfix release.
|
||||
character
|
||||
|
||||
|
||||
0.24, 2012-12-03
|
||||
----------------
|
||||
## 0.24, 2012-12-03
|
||||
|
||||
Added Vim string object selection motions (see help topics `v_i"`, `v_a"`).
|
||||
Various bug fixes.
|
||||
@@ -725,8 +781,7 @@ Bug fixes:
|
||||
* VIM-157 Fixed regression in moving the cursor after `~`
|
||||
|
||||
|
||||
0.23.115, 2012-11-14
|
||||
--------------------
|
||||
## 0.23.115, 2012-11-14
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -735,8 +790,7 @@ A bugfix release.
|
||||
* VIM-112 Delete a single previous word with <C-W> in insert mode, not all inserted words
|
||||
|
||||
|
||||
0.23.111, 2012-11-12
|
||||
--------------------
|
||||
## 0.23.111, 2012-11-12
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -755,8 +809,7 @@ A bugfix release.
|
||||
found
|
||||
|
||||
|
||||
0.23.93, 2012-03-21
|
||||
-------------------
|
||||
## 0.23.93, 2012-03-21
|
||||
|
||||
A bugfix release. Vim.xml was fixed to use Command+C, Command+V on Mac OS.
|
||||
Unfortunately you need to update Vim.xml manually this time.
|
||||
|
164
CONTRIBUTING.md
164
CONTRIBUTING.md
@@ -1,71 +1,145 @@
|
||||
[![TeamCity Build][teamcity-build-status-svg]][teamcity-build-status]
|
||||
|
||||
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 [Kotlin](https://kotlinlang.org/) or Java.
|
||||
## 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)
|
||||
* [IntelliJ plugin development resources](https://www.jetbrains.org/intellij/sdk/docs/welcome.html)
|
||||
- If you come across some IntelliJ Platform code, these links may prove helpful:
|
||||
|
||||
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.
|
||||
We've prepared some useful configurations for you:
|
||||
|
||||

|
||||
|
||||
And here are 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)
|
||||
in the issue tracker.
|
||||
- Read about the `@VimBehaviorDiffers` annotation and fix the corresponding functionality.
|
||||
in the issue tracker.
|
||||
- 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.
|
||||
|
||||
Also 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!
|
||||
> :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
|
||||
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".
|
||||
1. Read the javadoc for the `@VimBehaviorDiffers` annotation in the source code.
|
||||
|
||||
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.
|
||||
|
||||
3. Don't forget to test your functionality with line start, line end, file start, file end, empty line, multiple
|
||||
carets, dollar motion, etc.
|
||||
|
||||
* Select your Java 8+ JDK as the Gradle JVM; leave other parameters unchanged.
|
||||
|
||||
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.
|
||||
|
||||
* Launch "ideavim | intellij | runIde" from the 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.
|
||||
|
||||
4. Run IdeaVim tests via a Gradle task:
|
||||
|
||||
* Select the "View | Tool Windows | Gradle" tool window.
|
||||
|
||||
* Launch "ideavim | verification | test" from the tool window.
|
||||
## A common direction
|
||||
|
||||
5. Build the plugin distribution by running `./gradlew clean buildPlugin` in the
|
||||
terminal in your project root.
|
||||
We’re trying to make IdeaVim close to the original Vim both in terms of functionality and architecture.
|
||||
|
||||
* The resulting distribution file will be located at build/distributions/IdeaVim-VERSION.zip
|
||||
- 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`.
|
||||
|
||||
* You can install this file by selecting "Settings | Plugins | Install plugin
|
||||
from disk...".
|
||||
|
||||
### Testing
|
||||
-----
|
||||
|
||||
1. Read about the `@VimBehaviorDiffers` annotation.
|
||||
### I read the whole page but something is still unclear.
|
||||
|
||||
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.
|
||||
Oh no! No cookies for the maintainers today! Please [tell us](https://github.com/JetBrains/ideavim#contact-maintainers) about it so we can help.
|
||||
|
||||
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.
|
||||
|
||||
<!-- Badges -->
|
||||
### I’ve found a bug in this documentation.
|
||||
|
||||
[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
|
||||
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.
|
||||
|
||||
|
||||
### The lack of documentation or a javadoc/ktdoc makes it difficult to start contributing.
|
||||
|
||||
This is just terrible. [You know what to do](https://github.com/JetBrains/ideavim#contact-maintainers).
|
||||
|
||||
### Resources:
|
||||
|
||||
* [Continuous integration builds](https://teamcity.jetbrains.com/project.html?projectId=IdeaVim&guest=1)
|
||||
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
||||
* [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)
|
||||
|
||||
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJEAP&guest=1
|
||||
[teamcity-build-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJEAP)/statusIcon.svg?guest=1
|
||||
|
211
README.md
211
README.md
@@ -4,38 +4,46 @@ IdeaVim
|
||||
===
|
||||
|
||||
[![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 can be used with IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm,
|
||||
RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive, and Android Studio.
|
||||
IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs.
|
||||
|
||||
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)
|
||||
* [Changelog](CHANGES.md)
|
||||
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
||||
* [Continuous integration builds](https://teamcity.jetbrains.com/project.html?projectId=IdeaVim&guest=1)
|
||||
* [@IdeaVim](https://twitter.com/ideavim) in Twitter
|
||||
|
||||
#### Compatibility
|
||||
|
||||
IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm, RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive,
|
||||
Android Studio and other IntelliJ platform based IDEs.
|
||||
|
||||
Setup
|
||||
------------
|
||||
|
||||
- IdeaVim can be installed via `Settings | Plugins`.
|
||||
See [detailed instructions](https://www.jetbrains.com/help/idea/managing-plugins.html#).
|
||||
See the [detailed instructions](https://www.jetbrains.com/help/idea/managing-plugins.html#).
|
||||
|
||||
- Use `Tools | Vim Emulator` to enable or disable emulation.
|
||||
|
||||
- Use `~/.ideavimrc` file as an analog of `~/.vimrc` ([details](#Files)). XGD standard is supported as well.
|
||||
- Use the `~/.ideavimrc` file as an analog of `~/.vimrc` ([learn more](#Files)). The XDG standard is supported, as well.
|
||||
|
||||
- Shortcut conflicts can be resolved using:
|
||||
- Linux & Windows: `File | Settings | Editor | Vim Emulation` & `File | Settings | Keymap`,
|
||||
- macOS: `Preferences | Editor | Vim Emulation` & `Preferences | Keymap`,
|
||||
- regular vim mappings in the `~/.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
|
||||
-------------------
|
||||
@@ -67,25 +75,16 @@ You can always leave your feedback with:
|
||||
Summary of Supported Vim Features
|
||||
---------------------------------
|
||||
|
||||
Supported:
|
||||
Here are some examples of supported vim features and commands:
|
||||
|
||||
* Motion keys
|
||||
* Deletion/changing
|
||||
* 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
|
||||
* Normal / insert / visual / select / etc. modes
|
||||
* Motion / deletion / change / window / etc. commands
|
||||
* Key mappings
|
||||
* Macros
|
||||
* Digraphs
|
||||
* Command line and search history
|
||||
* Window commands
|
||||
* Marks / Macros / Digraphs / Registers
|
||||
* Some [set commands](doc/set-commands.md)
|
||||
* Full Vim regexps for search and search/replace
|
||||
* Vim web help
|
||||
* Select mode
|
||||
* `~/.ideavimrc` configuration file
|
||||
|
||||
[Emulated Vim plugins](doc/emulated-plugins.md):
|
||||
|
||||
@@ -96,17 +95,13 @@ Supported:
|
||||
* argtextobj.vim
|
||||
* vim-textobj-entire
|
||||
* ReplaceWithRegister
|
||||
* vim-exchange [To Be Released]
|
||||
|
||||
Not supported (yet):
|
||||
|
||||
* Jump lists
|
||||
* Various less-used commands
|
||||
* vim-exchange
|
||||
* vim-highlightedyank
|
||||
|
||||
See also:
|
||||
|
||||
* [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
|
||||
@@ -114,12 +109,63 @@ Files
|
||||
|
||||
* `~/.ideavimrc`
|
||||
* Your IdeaVim-specific Vim initialization commands
|
||||
|
||||
<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
|
||||
|
||||
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
|
||||
of VimL files.
|
||||
|
||||
@@ -129,7 +175,7 @@ have `-Duser.home=/my/alternate/home` then IdeaVim will source
|
||||
`/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.
|
||||
Put your settings to `$XDG_CONFIG_HOME/ideavim/ideavimrc` file.
|
||||
|
||||
|
||||
Emulated Vim Plugins
|
||||
@@ -142,17 +188,39 @@ Changes to the IDE
|
||||
|
||||
### Executing IDE Actions
|
||||
|
||||
IdeaVim adds two commands for listing and executing arbitrary IDE actions as
|
||||
IdeaVim adds various commands for listing and executing arbitrary IDE actions as
|
||||
Ex commands or via `:map` command mappings:
|
||||
|
||||
**Executing actions:**
|
||||
* `:action {action_id}`
|
||||
* Execute an action by id. Works from Ex command line.
|
||||
* `<Action>(*action_id*)`
|
||||
* For the mappings you can use a special `<Action>` keyword. Don't forget the parentheses.
|
||||
|
||||
**Finding actions:**
|
||||
* `:actionlist [pattern]`
|
||||
* Find IDE actions by name or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
||||
* `:action {name}`
|
||||
* Execute an action named `NAME`
|
||||
* Find IDE actions by id or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
||||
|
||||
* In addition to `:actionlist` command, IdeaVim provides `IdeaVim: track action Ids` option to
|
||||
extract the ids of executed command. This option can be found in "Search everywhere" (double `shift`).
|
||||
|
||||
For example, here `\r` is mapped to the Reformat Code action:
|
||||
<details>
|
||||
<summary><strong>"Track aciton Ids" Details</strong> (click to see)</summary>
|
||||
<img src="resources/readme/track_action_id.gif" alt="track action ids"/>
|
||||
</details>
|
||||
|
||||
:map \r :action ReformatCode<CR>
|
||||
Examples:
|
||||
|
||||
```vim
|
||||
" Map \r to the Reformat Code action
|
||||
:map \r <Action>(ReformatCode)
|
||||
|
||||
" Map <leader>d to start debug
|
||||
:map <leader>d <Action>(Debug)
|
||||
|
||||
" Map \b to toggle the breakpoint on the current line
|
||||
:map \b <Action>(ToggleLineBreakpoint)
|
||||
```
|
||||
|
||||
### Undo/Redo
|
||||
|
||||
@@ -172,10 +240,12 @@ improvement.
|
||||
|
||||
See also [unresolved escape issues](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+Help+topic%3A+i_Esc).
|
||||
|
||||
Contributing
|
||||
:gem: 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
|
||||
-------
|
||||
@@ -183,6 +253,54 @@ Authors
|
||||
See [AUTHORS.md](AUTHORS.md)
|
||||
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
|
||||
-------
|
||||
@@ -205,3 +323,6 @@ or any later version.
|
||||
|
||||
[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
|
||||
|
85
build.gradle
85
build.gradle
@@ -1,15 +1,21 @@
|
||||
import dev.feedforward.markdownto.DownParser
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "com.github.AlexPl292:mark-down-to-slack:1.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.intellij' version '0.4.18'
|
||||
id 'org.jetbrains.intellij' version '0.6.2'
|
||||
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
||||
id "org.jetbrains.changelog" version "0.6.2"
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
@@ -46,13 +52,23 @@ intellij {
|
||||
}
|
||||
}
|
||||
|
||||
runPluginVerifier {
|
||||
ideVersions = ["IC-2020.1.4", "IC-2020.2.3"]
|
||||
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
||||
teamCityOutputFormat = true
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||
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 {
|
||||
@@ -66,15 +82,44 @@ compileTestKotlin {
|
||||
}
|
||||
}
|
||||
|
||||
detekt {
|
||||
config = files("${rootProject.projectDir}/.detekt/config.yaml")
|
||||
baseline = file("${rootProject.projectDir}/.detekt/baseline.xml")
|
||||
input = files("src")
|
||||
|
||||
buildUponDefaultConfig = true
|
||||
|
||||
reports {
|
||||
html.enabled = false
|
||||
xml.enabled = false
|
||||
txt.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
tasks.detekt.jvmTarget = javaVersion
|
||||
|
||||
task testWithNeovim(type: Test) {
|
||||
group = "verification"
|
||||
systemProperty "ideavim.nvim.test", 'true'
|
||||
}
|
||||
|
||||
changelog {
|
||||
groups = ["Features:", "Changes:", "Deprecations:", "Fixes:", "Merged PRs:"]
|
||||
itemPrefix = "*"
|
||||
path = "${project.projectDir}/CHANGES.md"
|
||||
unreleasedTerm = "To Be Released"
|
||||
headerParserRegex = /0\.\d{2}(.\d+)?/
|
||||
// header = { "${project.version}" }
|
||||
// version = "0.60"
|
||||
}
|
||||
|
||||
tasks.register("slackEapNotification") {
|
||||
doLast {
|
||||
if (!slackUrl) return
|
||||
def post = new URL(slackUrl).openConnection()
|
||||
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 ="""
|
||||
def changeLog = changelog.getUnreleased().toText()
|
||||
def slackDown = new DownParser(changeLog, true).toSlack().toString()
|
||||
def message = """
|
||||
{
|
||||
"text": "New version of IdeaVim",
|
||||
"blocks": [
|
||||
@@ -82,7 +127,7 @@ tasks.register("slackEapNotification") {
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "IdeaVim EAP $version has been relesed\\n$changeLog"
|
||||
"text": "IdeaVim EAP $version has been released\\n$slackDown"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -94,32 +139,8 @@ tasks.register("slackEapNotification") {
|
||||
post.getOutputStream().write(message.getBytes("UTF-8"))
|
||||
def postRC = post.getResponseCode()
|
||||
println(postRC)
|
||||
if(postRC == 200) {
|
||||
if (postRC == 200) {
|
||||
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()
|
||||
}
|
@@ -4,7 +4,15 @@ 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>
|
||||
```
|
||||
set <extension-name>
|
||||
```
|
||||
|
||||
If you reuse your existing `.vimrc` file using `source ~/.vimrc`, IdeaVim can parse and enable plugins that are defined
|
||||
using [vim-plug](https://github.com/junegunn/vim-plug) or [vundle](https://github.com/VundleVim/Vundle.vim).
|
||||
No additional set commands in `~/.ideavimrc` are required.
|
||||
If you'd like to disable some plugin that's enabled in `.vimrc`, you can use `set no<extension-name>`
|
||||
in `~/.ideavimrc`.
|
||||
|
||||
Available extensions:
|
||||
|
||||
@@ -20,31 +28,93 @@ Available extensions:
|
||||
## surround
|
||||
|
||||
* Setup: `set surround`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tpope/vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'tpope/vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=1697'</code>
|
||||
</details>
|
||||
* Emulates [vim-surround](https://github.com/tpope/vim-surround)
|
||||
* Commands: `ys`, `cs`, `ds`, `S`
|
||||
|
||||
## multiple-cursors
|
||||
|
||||
* Setup: `set multiple-cursors`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/terryma/vim-multiple-cursors'</code>
|
||||
<br/>
|
||||
<code>Plug 'terryma/vim-multiple-cursors'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-multiple-cursors'</code>
|
||||
</details>
|
||||
* 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`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tpope/vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'tpope/vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=3695'</code>
|
||||
<br/>
|
||||
<code>Plug 'tomtom/tcomment_vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'tcomment_vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=1173'</code>
|
||||
</details>
|
||||
* 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`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/vim-scripts/ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-scripts/ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://github.com/inkarkat/vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'inkarkat/vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2703'</code>
|
||||
</details>
|
||||
* Emulates [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister)
|
||||
* Commands: `gr`, `grr`
|
||||
* By [igrekster](https://github.com/igrekster)
|
||||
|
||||
## argtextobj
|
||||
|
||||
* Setup:
|
||||
* `set argtextobj`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/vim-scripts/argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-scripts/argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2699'</code>
|
||||
</details>
|
||||
* 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
|
||||
@@ -54,15 +124,55 @@ Available extensions:
|
||||
* Emulates [argtextobj.vim](https://www.vim.org/scripts/script.php?script_id=2699)
|
||||
* Additional text objects: `aa`, `ia`
|
||||
|
||||
## exchange [To Be Released]
|
||||
## exchange
|
||||
|
||||
* Setup: `set exchange`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tommcdo/vim-exchange'</code>
|
||||
<br/>
|
||||
<code>Plug 'tommcdo/vim-exchange'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-exchange'</code>
|
||||
</details>
|
||||
* 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`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/kana/vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'kana/vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2610'</code>
|
||||
</details>
|
||||
* 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`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/machakann/vim-highlightedyank'</code>
|
||||
<br/>
|
||||
<code>Plug 'machakann/vim-highlightedyank'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-highlightedyank'</code>
|
||||
</details>
|
||||
* 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)
|
||||
|
@@ -38,6 +38,7 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
acts like startsel is enabled
|
||||
|
||||
'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
|
||||
'number' 'nu' print the line number in front of each line
|
||||
'relativenumber' 'rnu' show the line number relative to the line with
|
||||
@@ -58,12 +59,6 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
ideaselection when IDE sets a selection - IdeaVim ONLY
|
||||
(examples: extend selection, wrap with while, etc.)
|
||||
|
||||
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
|
||||
'showcmd' 'sc' show (partial) command in the status bar
|
||||
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
||||
@@ -103,12 +98,6 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
|
||||
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")
|
||||
|
||||
@@ -118,6 +107,13 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
- 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
|
||||
|
||||
@@ -128,6 +124,13 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
"<Tab>", "<Down>", "<Up>", "<Enter>", "<Left>", "<Right>",
|
||||
"<C-Down>", "<C-Up>", "<PageUp>", "<PageDown>",
|
||||
"<C-J>", "<C-Q>"
|
||||
|
||||
`ideavimsupport` `ideavimsupport` List of strings (default "dialog")
|
||||
|
||||
Define the list of additional buffers where IdeaVim is enabled.
|
||||
|
||||
- dialog - enable IdeaVim in dialogs
|
||||
- singleline - enable IdeaVim in single line editors (not suggested)
|
||||
|
||||
----------
|
||||
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# suppress inspection "UnusedProperty" for whole file
|
||||
|
||||
ideaVersion=2020.1
|
||||
ideaVersion=LATEST-EAP-SNAPSHOT
|
||||
downloadIdeaSources=true
|
||||
instrumentPluginCode=true
|
||||
version=SNAPSHOT
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
||||
#Fri Apr 10 10:57:10 MSK 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
31
gradlew
vendored
31
gradlew
vendored
@@ -82,6 +82,7 @@ esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
@@ -129,6 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
@@ -154,19 +156,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -175,14 +177,9 @@ save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# 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"
|
||||
|
||||
# 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" "$@"
|
||||
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
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.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@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%
|
||||
|
||||
|
@@ -150,6 +150,8 @@
|
||||
<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»"/>
|
||||
|
@@ -15,6 +15,7 @@
|
||||
<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]"/>
|
||||
@@ -60,7 +61,9 @@
|
||||
<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]"/>
|
||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PlugHandler" names="Plug[in]"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
@@ -1,11 +1,84 @@
|
||||
<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.surround.VimSurroundExtension" name="surround">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tpope/vim-surround"/>
|
||||
<alias name="tpope/vim-surround"/>
|
||||
<alias name="vim-surround"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=1697"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"
|
||||
name="multiple-cursors">
|
||||
<aliases>
|
||||
<alias name="https://github.com/terryma/vim-multiple-cursors"/>
|
||||
<alias name="terryma/vim-multiple-cursors"/>
|
||||
<alias name="vim-multiple-cursors"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension" name="commentary">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tpope/vim-commentary"/>
|
||||
<alias name="tpope/vim-commentary"/>
|
||||
<alias name="vim-commentary"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=3695"/>
|
||||
<alias name="https://github.com/tomtom/tcomment_vim"/>
|
||||
<alias name="tomtom/tcomment_vim"/>
|
||||
<alias name="tcomment_vim"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=1173"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.textobjentire.VimTextObjEntireExtension"
|
||||
name="textobj-entire">
|
||||
<aliases>
|
||||
<alias name="https://github.com/kana/vim-textobj-entire"/>
|
||||
<alias name="kana/vim-textobj-entire"/>
|
||||
<alias name="vim-textobj-entire"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2610"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.argtextobj.VimArgTextObjExtension"
|
||||
name="argtextobj">
|
||||
<aliases>
|
||||
<alias name="https://github.com/vim-scripts/argtextobj.vim"/>
|
||||
<alias name="vim-scripts/argtextobj.vim"/>
|
||||
<alias name="argtextobj.vim"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2699"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.replacewithregister.ReplaceWithRegister"
|
||||
name="ReplaceWithRegister">
|
||||
<aliases>
|
||||
<alias name="https://github.com/vim-scripts/ReplaceWithRegister"/>
|
||||
<alias name="vim-scripts/ReplaceWithRegister"/>
|
||||
<alias name="ReplaceWithRegister"/>
|
||||
<alias name="https://github.com/inkarkat/vim-ReplaceWithRegister"/>
|
||||
<alias name="inkarkat/vim-ReplaceWithRegister"/>
|
||||
<alias name="vim-ReplaceWithRegister"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2703"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension" name="exchange">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tommcdo/vim-exchange"/>
|
||||
<alias name="tommcdo/vim-exchange"/>
|
||||
<alias name="vim-exchange"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.highlightedyank.VimHighlightedYank"
|
||||
name="highlightedyank">
|
||||
<aliases>
|
||||
<alias name="https://github.com/machakann/vim-highlightedyank"/>
|
||||
<alias name="machakann/vim-highlightedyank"/>
|
||||
<alias name="vim-highlightedyank"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
@@ -2,6 +2,8 @@
|
||||
<applicationListeners>
|
||||
<listener class="com.maddyhome.idea.vim.ui.ExEntryPanel$LafListener"
|
||||
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||
<listener class="com.maddyhome.idea.vim.extension.highlightedyank.HighlightColorResetter"
|
||||
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||
</applicationListeners>
|
||||
<projectListeners>
|
||||
<listener class="com.maddyhome.idea.vim.ui.ExOutputPanel$LafListener"
|
||||
|
@@ -1,17 +1,54 @@
|
||||
<idea-plugin url="https://plugins.jetbrains.com/plugin/164" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<name>IdeaVim</name>
|
||||
<id>IdeaVIM</id>
|
||||
<change-notes><![CDATA[
|
||||
<ul>
|
||||
<li>vim-exchange plugin emulation</li>
|
||||
<li>A new floating action for reloading .ideavimrc</li>
|
||||
<li>Various bug fixes</li>
|
||||
</ul>
|
||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||
]]></change-notes>
|
||||
<change-notes>
|
||||
<h3>Features:</h3>
|
||||
<br/>
|
||||
<ul><li>Ability to map IDE actions via the <code>&lt;Action&gt;</code> keyword. E.g.
|
||||
<code>map &lt;C-K&gt; &lt;Action&gt;(CommentByLineComment)</code>.
|
||||
Check out <code>README.md</code> for the details.</li><li><code>IdeaVim: track action
|
||||
Ids</code> command to find action ids for the <code>:action</code> command.
|
||||
Enable this option in &quot;Search everywhere&quot; (double shift).</li><li>Ability to enable
|
||||
extensions using <code>vim-plug</code> or <code>vundle</code> syntax.<br />
|
||||
E.g. to enable commentary extension you can use one of the following commands:<pre><code
|
||||
class="language-vim">set commentary
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'https://github.com/tpope/vim-commentary'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
...
|
||||
</code></pre><p>This approach is especially handy if you have <code>.vimrc</code> with
|
||||
plugins registered via <code>vim-plug</code> or <code>vundle</code>.</p></li></ul>
|
||||
|
||||
|
||||
<br/>
|
||||
<h3>Changes:</h3>
|
||||
<br/>
|
||||
<ul><li>Fix <code>&lt;Esc&gt;</code> for dialogs. Now <code>&lt;Esc&gt;</code>
|
||||
will exit insert / visual mode and close the dialog from normal mode.</li><li>Add option to disable
|
||||
IdeaVim in dialogs / single line editors. <a href="https://youtrack.jetbrains.com/issue/VIM-765">VIM-765</a><br
|
||||
/>
|
||||
Use <code>set ideavimsupport=</code> to disable IdeaVim in dialog editors. </li><li>Reposition
|
||||
cursor when <code>scrolloff</code> changes</li></ul>
|
||||
|
||||
<br/>
|
||||
<h3>Fixes:</h3>
|
||||
<br/>
|
||||
<ul><li><a href="https://youtrack.jetbrains.com/issue/VIM-2150">VIM-2150</a> <code>Shift-D</code>
|
||||
should not delete an empty line</li><li><a href="https://youtrack.jetbrains.com/issue/VIM-2157">VIM-2157</a>
|
||||
Fix tab with an active template</li><li><a href="https://youtrack.jetbrains.com/issue/VIM-2156">VIM-2156</a>
|
||||
Correct up/down motions with inlays</li><li><a href="https://youtrack.jetbrains.com/issue/VIM-2144">VIM-2144</a>
|
||||
Correct text position after block insert with inlays</li><li><a
|
||||
href="https://youtrack.jetbrains.com/issue/VIM-2158">VIM-2158</a> Fix scrolling when <code>scrolloff</code>
|
||||
is over half screen height, but less than full height</li></ul>
|
||||
<br/>
|
||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||
</change-notes>
|
||||
<description><![CDATA[
|
||||
<p>Vim emulation plug-in for IDEs based on the IntelliJ platform.</p>
|
||||
<p>IdeaVim supports many Vim features including normal/insert/visual modes, motion keys, deletion/changing, marks, registers, some Ex commands, Vim regexps, configuration via ~/.ideavimrc, macros, window commands, etc.</p>
|
||||
<p>Vim emulation plugin for IntelliJ Platform-based IDEs.</p>
|
||||
<br/>
|
||||
<p>IdeaVim supports many Vim features including normal/insert/visual modes, motion keys, deletion/changing,
|
||||
marks, registers, some Ex commands, Vim regexps, configuration via ~/.ideavimrc, macros, Vim plugins, etc.</p>
|
||||
<br/>
|
||||
<p>See also:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/JetBrains/ideavim">GitHub repository</a>: documentation and contributing</li>
|
||||
@@ -23,7 +60,7 @@
|
||||
|
||||
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
||||
<!-- Check for [Version Update] tag in YouTrack as well -->
|
||||
<idea-version since-build="201.5985"/>
|
||||
<idea-version since-build="201.5985.32"/>
|
||||
|
||||
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
||||
<depends>com.intellij.modules.lang</depends>
|
||||
@@ -36,7 +73,10 @@
|
||||
</application-components>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="vimExtension" interface="com.maddyhome.idea.vim.extension.VimExtension" dynamic="true"/>
|
||||
<extensionPoint name="vimExtension" beanClass="com.maddyhome.idea.vim.extension.ExtensionBeanClass" dynamic="true">
|
||||
<with attribute="implementation" implements="com.maddyhome.idea.vim.extension.VimExtension"/>
|
||||
|
||||
</extensionPoint>
|
||||
|
||||
<!-- For internal use only -->
|
||||
<extensionPoint name="vimExCommand" beanClass="com.maddyhome.idea.vim.ex.ExBeanClass" dynamic="true">
|
||||
@@ -54,7 +94,7 @@
|
||||
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.StatusBarIconFactory"/>
|
||||
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.ShowCmdStatusBarWidgetFactory" order="first"/>
|
||||
|
||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.VimLocalConfig"/>
|
||||
<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,
|
||||
@@ -72,15 +112,16 @@
|
||||
<xi:include href="/META-INF/includes/VimListeners.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<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">
|
||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<!-- 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="VimActions" class="com.maddyhome.idea.vim.ui.VimActions" text="Vim Actions"/>
|
||||
<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">
|
||||
@@ -95,5 +136,9 @@
|
||||
<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>
|
||||
</idea-plugin>
|
||||
|
BIN
resources/changes/0.59/highlight_yank.gif
Normal file
BIN
resources/changes/0.59/highlight_yank.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
BIN
resources/contributing/configurations.png
Normal file
BIN
resources/contributing/configurations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@@ -70,3 +70,10 @@ unkopt=Unknown option: {0}
|
||||
e_invarg=Invalid argument: {0}
|
||||
E475=E475: Invalid argument: {0}
|
||||
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
|
||||
|
BIN
resources/readme/track_action_id.gif
Normal file
BIN
resources/readme/track_action_id.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
@@ -21,4 +21,4 @@ package com.maddyhome.idea.vim
|
||||
/**
|
||||
* This class prevents dynamic loading of IdeaVim plugin
|
||||
*/
|
||||
class DynamicLoaderStopper
|
||||
class DynamicLoaderStopper
|
||||
|
@@ -19,15 +19,9 @@
|
||||
package com.maddyhome.idea.vim;
|
||||
|
||||
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.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.ShortcutSet;
|
||||
import com.intellij.openapi.actionSystem.ex.AnActionListener;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
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.TypedActionHandler;
|
||||
import com.intellij.openapi.editor.event.*;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
|
||||
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.Nullable;
|
||||
|
||||
@@ -46,8 +37,6 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author vlan
|
||||
@@ -87,7 +76,7 @@ public class EventFacade {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@ import com.intellij.openapi.command.UndoConfirmationPolicy;
|
||||
import com.intellij.openapi.editor.Caret;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext;
|
||||
import com.intellij.openapi.editor.actionSystem.DocCommandGroupId;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -300,7 +301,7 @@ public class KeyHandler {
|
||||
return node;
|
||||
}
|
||||
|
||||
private static <T> boolean isPrefix(@NotNull List<T> list1, @NotNull List<T> list2) {
|
||||
public static <T> boolean isPrefix(@NotNull List<T> list1, @NotNull List<T> list2) {
|
||||
if (list1.size() > list2.size()) {
|
||||
return false;
|
||||
}
|
||||
@@ -337,7 +338,8 @@ public class KeyHandler {
|
||||
|
||||
if (commandBuilder.isAwaitingCharOrDigraphArgument()
|
||||
|| commandBuilder.isBuildingMultiKeyCommand()
|
||||
|| isMappingDisabledForKey(key, commandState)) {
|
||||
|| isMappingDisabledForKey(key, commandState)
|
||||
|| commandState.getSubMode() == CommandState.SubMode.REGISTER_PENDING) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -391,7 +393,7 @@ public class KeyHandler {
|
||||
}
|
||||
|
||||
for (KeyStroke keyStroke : unhandledKeys) {
|
||||
handleKey(editor, keyStroke, new EditorDataContext(editor), false);
|
||||
handleKey(editor, keyStroke, new EditorDataContext(editor, null), false);
|
||||
}
|
||||
}, ModalityState.stateForComponent(editor.getComponent())));
|
||||
}
|
||||
@@ -434,80 +436,9 @@ public class KeyHandler {
|
||||
|
||||
mappingState.resetMappingSequence();
|
||||
|
||||
final EditorDataContext currentContext = new EditorDataContext(editor);
|
||||
final EditorDataContext currentContext = new EditorDataContext(editor, context);
|
||||
|
||||
if (mappingInfo instanceof ToKeysMappingInfo) {
|
||||
final List<KeyStroke> toKeys = ((ToKeysMappingInfo)mappingInfo).getToKeys();
|
||||
final boolean fromIsPrefix = isPrefix(mappingInfo.getFromKeys(), toKeys);
|
||||
boolean first = true;
|
||||
for (KeyStroke keyStroke : toKeys) {
|
||||
final boolean recursive = mappingInfo.isRecursive() && !(first && fromIsPrefix);
|
||||
handleKey(editor, keyStroke, currentContext, recursive);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
else if (mappingInfo instanceof ToHandlerMappingInfo) {
|
||||
final VimExtensionHandler extensionHandler = ((ToHandlerMappingInfo)mappingInfo).getExtensionHandler();
|
||||
final CommandProcessor processor = CommandProcessor.getInstance();
|
||||
|
||||
// Cache isOperatorPending in case the extension changes the mode while moving the caret
|
||||
// See CommonExtensionTest
|
||||
// TODO: Is this legal? Should we assert in this case?
|
||||
final boolean shouldCalculateOffsets = commandState.isOperatorPending();
|
||||
|
||||
Map<Caret, Integer> startOffsets =
|
||||
editor.getCaretModel().getAllCarets().stream().collect(Collectors.toMap(Function.identity(), Caret::getOffset));
|
||||
|
||||
if (extensionHandler.isRepeatable()) {
|
||||
VimRepeater.Extension.INSTANCE.clean();
|
||||
}
|
||||
|
||||
processor.executeCommand(editor.getProject(), () -> extensionHandler.execute(editor, context),
|
||||
"Vim " + extensionHandler.getClass().getSimpleName(), null);
|
||||
|
||||
if (extensionHandler.isRepeatable()) {
|
||||
VimRepeater.Extension.INSTANCE.setLastExtensionHandler(extensionHandler);
|
||||
VimRepeater.Extension.INSTANCE.setArgumentCaptured(null);
|
||||
VimRepeater.INSTANCE.setRepeatHandler(true);
|
||||
}
|
||||
|
||||
if (shouldCalculateOffsets && !commandState.getCommandBuilder().hasCurrentCommandPartArgument()) {
|
||||
Map<Caret, VimSelection> offsets = new HashMap<>();
|
||||
|
||||
for (Caret caret : editor.getCaretModel().getAllCarets()) {
|
||||
@Nullable Integer startOffset = startOffsets.get(caret);
|
||||
if (caret.hasSelection()) {
|
||||
final VimSelection vimSelection = VimSelection.Companion
|
||||
.create(UserDataManager.getVimSelectionStart(caret), caret.getOffset(),
|
||||
SelectionType.fromSubMode(CommandStateHelper.getSubMode(editor)), editor);
|
||||
offsets.put(caret, vimSelection);
|
||||
commandState.popModes();
|
||||
}
|
||||
else if (startOffset != null && startOffset != caret.getOffset()) {
|
||||
// Command line motions are always characterwise exclusive
|
||||
int endOffset = caret.getOffset();
|
||||
if (startOffset < endOffset) {
|
||||
endOffset -= 1;
|
||||
} else {
|
||||
startOffset -= 1;
|
||||
}
|
||||
final VimSelection vimSelection = VimSelection.Companion
|
||||
.create(startOffset, endOffset, SelectionType.CHARACTER_WISE, editor);
|
||||
offsets.put(caret, vimSelection);
|
||||
|
||||
try (VimListenerSuppressor.Locked ignored = SelectionVimListenerSuppressor.INSTANCE.lock()) {
|
||||
// Move caret to the initial offset for better undo action
|
||||
// This is not a necessary thing, but without it undo action look less convenient
|
||||
editor.getCaretModel().moveToOffset(startOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!offsets.isEmpty()) {
|
||||
commandState.getCommandBuilder().completeCommandPart(new Argument(offsets));
|
||||
}
|
||||
}
|
||||
}
|
||||
mappingInfo.execute(editor, context);
|
||||
|
||||
// If we've just evaluated the previous key sequence, make sure to also handle the current key
|
||||
if (mappingInfo != currentMappingInfo) {
|
||||
@@ -560,20 +491,33 @@ public class KeyHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("RedundantIfStatement")
|
||||
private boolean isCommandCountKey(char chKey, @NotNull CommandState editorState) {
|
||||
// Make sure to avoid handling '0' as the start of a count.
|
||||
final CommandBuilder commandBuilder = editorState.getCommandBuilder();
|
||||
return ((editorState.getMode() == CommandState.Mode.COMMAND
|
||||
&&editorState.getSubMode()!=CommandState.SubMode.REGISTER_PENDING)
|
||||
|| editorState.getMode() == CommandState.Mode.VISUAL)
|
||||
&& commandBuilder.isExpectingCount() && Character.isDigit(chKey) && (commandBuilder.getCount() > 0 || chKey != '0');
|
||||
boolean notRegisterPendingCommand = editorState.getMode() == CommandState.Mode.COMMAND &&
|
||||
editorState.getSubMode() != CommandState.SubMode.REGISTER_PENDING;
|
||||
boolean visualMode = editorState.getMode() == CommandState.Mode.VISUAL;
|
||||
boolean opPendingMode = editorState.getMode() == CommandState.Mode.OP_PENDING;
|
||||
if (notRegisterPendingCommand || visualMode || opPendingMode) {
|
||||
if (commandBuilder.isExpectingCount() &&
|
||||
Character.isDigit(chKey) &&
|
||||
(commandBuilder.getCount() > 0 || chKey != '0')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isDeleteCommandCountKey(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
||||
// See `:help N<Del>`
|
||||
final CommandBuilder commandBuilder = editorState.getCommandBuilder();
|
||||
return (editorState.getMode() == CommandState.Mode.COMMAND || editorState.getMode() == CommandState.Mode.VISUAL)
|
||||
&& commandBuilder.isExpectingCount() && commandBuilder.getCount() > 0 && key.getKeyCode() == KeyEvent.VK_DELETE;
|
||||
return (editorState.getMode() == CommandState.Mode.COMMAND ||
|
||||
editorState.getMode() == CommandState.Mode.VISUAL ||
|
||||
editorState.getMode() == CommandState.Mode.OP_PENDING) &&
|
||||
commandBuilder.isExpectingCount() &&
|
||||
commandBuilder.getCount() > 0 &&
|
||||
key.getKeyCode() == KeyEvent.VK_DELETE;
|
||||
}
|
||||
|
||||
private boolean isEditorReset(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
||||
@@ -800,7 +744,7 @@ public class KeyHandler {
|
||||
if (editorState.isDotRepeatInProgress() && VimRepeater.Extension.INSTANCE.getArgumentCaptured() != null) {
|
||||
commandBuilder.completeCommandPart(VimRepeater.Extension.INSTANCE.getArgumentCaptured());
|
||||
}
|
||||
editorState.pushModes(editorState.getMode(), CommandState.SubMode.OP_PENDING);
|
||||
editorState.pushModes(CommandState.Mode.OP_PENDING, CommandState.SubMode.NONE);
|
||||
break;
|
||||
case DIGRAPH:
|
||||
// Command actions represent the completion of a command. Showcmd relies on this - if the action represents a
|
||||
|
@@ -42,4 +42,4 @@ class PluginStartup : StartupActivity.DumbAware {
|
||||
// This code should be executed once
|
||||
VimPlugin.getInstance().initialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
package com.maddyhome.idea.vim;
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointListener;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.extensions.PluginDescriptor;
|
||||
import com.maddyhome.idea.vim.group.KeyGroup;
|
||||
import com.maddyhome.idea.vim.handler.ActionBeanClass;
|
||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase;
|
||||
|
@@ -24,10 +24,7 @@ import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.components.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.keymap.Keymap;
|
||||
@@ -40,6 +37,9 @@ import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.wm.StatusBar;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
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.vimscript.VimScriptParser;
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionRegistrar;
|
||||
@@ -55,6 +55,7 @@ import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
||||
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable;
|
||||
import com.maddyhome.idea.vim.ui.VimRcFileState;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -77,7 +78,7 @@ import static com.maddyhome.idea.vim.group.KeyGroup.SHORTCUT_CONFLICTS_ELEMENT;
|
||||
@State(name = "VimSettings", storages = {@Storage("$APP_CONFIG$/vim_settings.xml")})
|
||||
public class VimPlugin implements PersistentStateComponent<Element>, Disposable {
|
||||
private static final String IDEAVIM_PLUGIN_ID = "IdeaVIM";
|
||||
private static final int STATE_VERSION = 6;
|
||||
public static final int STATE_VERSION = 7;
|
||||
|
||||
private static long lastBeepTimeMillis;
|
||||
|
||||
@@ -94,6 +95,10 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
|
||||
private final @NotNull VimState state = new VimState();
|
||||
|
||||
VimPlugin() {
|
||||
ApplicationConfigurationMigrator.getInstance().migrate();
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
LOG.debug("initComponent");
|
||||
|
||||
@@ -241,9 +246,13 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
public void executeIdeaVimRc() {
|
||||
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() {
|
||||
@@ -315,7 +324,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
showMessage(msg);
|
||||
}
|
||||
|
||||
public static void showMessage(@Nullable String msg) {
|
||||
public static void showMessage(@Nls @Nullable String msg) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
getInstance().message = msg;
|
||||
}
|
||||
|
@@ -25,7 +25,9 @@ import com.intellij.openapi.project.Project
|
||||
|
||||
@Service
|
||||
class VimProjectService(val project: Project) : Disposable {
|
||||
override fun dispose() {}
|
||||
override fun dispose() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@@ -36,4 +38,4 @@ class VimProjectService(val project: Project) : Disposable {
|
||||
}
|
||||
|
||||
val Project.vimDisposable
|
||||
get() = VimProjectService.getInstance(this)
|
||||
get() = VimProjectService.getInstance(this)
|
||||
|
@@ -24,6 +24,7 @@ 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
|
||||
@@ -41,16 +42,26 @@ class VimTypedActionHandler(origHandler: TypedActionHandler?) : TypedActionHandl
|
||||
}
|
||||
|
||||
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))
|
||||
handler.handleKey(editor, keyStroke, EditorDataContext(editor, context))
|
||||
} catch (e: Throwable) {
|
||||
logger.error(e)
|
||||
}
|
||||
@@ -71,4 +82,4 @@ object VimKeyListener : KeyAdapter() {
|
||||
override fun keyPressed(e: KeyEvent) {
|
||||
isSpaceShift = e.modifiersEx and KeyEvent.SHIFT_DOWN_MASK != 0 && e.keyChar == ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,15 +20,29 @@ 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.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandState
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
||||
import com.maddyhome.idea.vim.helper.mode
|
||||
import com.maddyhome.idea.vim.helper.vimForEachCaret
|
||||
|
||||
class ResetModeAction : VimActionHandler.SingleExecution() {
|
||||
override val type: Command.Type = Command.Type.RESET
|
||||
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
val modeBeforeReset = editor.mode
|
||||
KeyHandler.getInstance().fullReset(editor.getTopLevelEditor())
|
||||
|
||||
if (modeBeforeReset == CommandState.Mode.INSERT) {
|
||||
editor.vimForEachCaret { caret ->
|
||||
val position = VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, -1, false)
|
||||
MotionGroup.moveCaret(editor, caret, position)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ package com.maddyhome.idea.vim.action
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.project.DumbAwareToggleAction
|
||||
import com.maddyhome.idea.vim.ui.VimActions
|
||||
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
|
||||
|
@@ -26,8 +26,6 @@ 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.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.util.Key
|
||||
@@ -39,6 +37,9 @@ 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.helper.isTemplateActive
|
||||
import com.maddyhome.idea.vim.key.ShortcutOwner
|
||||
import com.maddyhome.idea.vim.listener.IdeaSpecifics.aceJumpActive
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
@@ -63,7 +64,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
}
|
||||
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||
try {
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor))
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor, e.dataContext))
|
||||
} catch (ignored: ProcessCanceledException) {
|
||||
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
||||
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
||||
@@ -82,8 +83,9 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
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")
|
||||
@Suppress("DEPRECATION", "LocalVariableName", "VariableNaming")
|
||||
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
|
||||
|
||||
@@ -95,6 +97,8 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
|
||||
if (keyCode == KeyEvent.VK_ESCAPE) return isEnabledForEscape(editor)
|
||||
|
||||
if (keyCode == KeyEvent.VK_TAB && editor.isTemplateActive()) return false
|
||||
|
||||
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
||||
if (keyCode == KeyEvent.VK_TAB) {
|
||||
VimPlugin.getChange().tabAction = true
|
||||
@@ -122,16 +126,9 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
}
|
||||
|
||||
private fun isEnabledForEscape(editor: Editor): Boolean {
|
||||
return isPrimaryEditor(editor) || EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the editor is a primary editor in the main editing area.
|
||||
*/
|
||||
private fun isPrimaryEditor(editor: Editor): Boolean {
|
||||
val project = editor.project ?: return false
|
||||
val fileEditorManager = FileEditorManagerEx.getInstanceEx(project) ?: return false
|
||||
return fileEditorManager.allEditors.any { fileEditor -> editor == EditorUtil.getEditorEx(fileEditor) }
|
||||
return editor.isPrimaryEditor()
|
||||
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||
|| OptionsManager.ideavimsupport.contains("dialog") && !editor.inNormalMode
|
||||
}
|
||||
|
||||
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
||||
|
@@ -51,7 +51,7 @@ class OperatorAction : VimActionHandler.SingleExecution() {
|
||||
.getMotionRange(editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount, argument)
|
||||
if (range != null) {
|
||||
VimPlugin.getMark().setChangeMarks(editor, range)
|
||||
val selectionType = SelectionType.fromCommandFlags(motion.flags)
|
||||
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
|
||||
|
@@ -64,7 +64,7 @@ class RepeatChangeAction : VimActionHandler.SingleExecution() {
|
||||
}
|
||||
state.setExecutingCommand(lastCommand)
|
||||
|
||||
KeyHandler.executeVimAction(editor, lastCommand.action!!, context)
|
||||
KeyHandler.executeVimAction(editor, lastCommand.action, context)
|
||||
|
||||
VimRepeater.saveLastChange(lastCommand)
|
||||
}
|
||||
|
@@ -24,6 +24,8 @@ 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.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -31,14 +33,16 @@ 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 val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
return VimPlugin.getChange().changeCharacters(editor, caret, count)
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,8 @@ 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.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -31,7 +33,7 @@ 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 val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -21,9 +21,12 @@ 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.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -31,14 +34,19 @@ 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 val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
return VimPlugin.getChange().changeLine(editor, caret, count, context)
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
@@ -23,6 +23,9 @@ 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.CommandFlags.FLAG_EXIT_VISUAL
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MOT_LINEWISE
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
@@ -37,7 +40,7 @@ import java.util.*
|
||||
class ChangeVisualLinesAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, FLAG_EXIT_VISUAL)
|
||||
|
||||
override fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -23,6 +23,9 @@ 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.CommandFlags.FLAG_EXIT_VISUAL
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MOT_LINEWISE
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
@@ -37,7 +40,7 @@ import java.util.*
|
||||
class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, FLAG_EXIT_VISUAL)
|
||||
|
||||
override fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -25,15 +25,13 @@ import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
|
||||
class ChangeNumberIncAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||
sealed class IncAction(val inc: Int) : 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().changeNumber(editor, caret, count)
|
||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean {
|
||||
return VimPlugin.getChange().changeNumber(editor, caret, inc * count)
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeNumberIncAction : IncAction(1)
|
||||
class ChangeNumberDecAction : IncAction(-1)
|
||||
|
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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.number
|
||||
|
||||
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.*
|
||||
|
||||
class ChangeVisualNumberAvalancheDecAction : 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()
|
||||
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), -cmd.count, true)
|
||||
}
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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.number
|
||||
|
||||
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.*
|
||||
|
||||
class ChangeVisualNumberAvalancheIncAction : 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()
|
||||
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), cmd.count, true)
|
||||
}
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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.number
|
||||
|
||||
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.*
|
||||
|
||||
class ChangeVisualNumberDecAction : 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()
|
||||
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), -cmd.count, false)
|
||||
}
|
||||
}
|
@@ -28,17 +28,16 @@ import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
class ChangeVisualNumberIncAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
sealed class IncNumber(val inc: Int, private val avalanche: Boolean) : 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()
|
||||
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), cmd.count, false)
|
||||
override fun executeAction(editor: Editor, caret: Caret, context: DataContext, cmd: Command, range: VimSelection): Boolean {
|
||||
return VimPlugin.getChange().changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)
|
||||
}
|
||||
}
|
||||
|
||||
class ChangeVisualNumberIncAction : IncNumber(1, false)
|
||||
class ChangeVisualNumberDecAction : IncNumber(-1, false)
|
||||
class ChangeVisualNumberAvalancheIncAction : IncNumber(1, true)
|
||||
class ChangeVisualNumberAvalancheDecAction : IncNumber(-1, true)
|
||||
|
@@ -10,7 +10,7 @@ import javax.swing.KeyStroke
|
||||
|
||||
class InsertCompletedDigraphAction : VimActionHandler.SingleExecution() {
|
||||
override val type: Command.Type = Command.Type.INSERT
|
||||
override val argumentType: Argument.Type? = Argument.Type.DIGRAPH
|
||||
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
// The converted digraph character has been captured as an argument, push it back through key handler
|
||||
|
@@ -10,7 +10,7 @@ import javax.swing.KeyStroke
|
||||
|
||||
class InsertCompletedLiteralAction : VimActionHandler.SingleExecution() {
|
||||
override val type: Command.Type = Command.Type.INSERT
|
||||
override val argumentType: Argument.Type? = Argument.Type.DIGRAPH
|
||||
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
// The converted literal character has been captured as an argument, push it back through key handler
|
||||
|
@@ -25,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.group.copy.PutData
|
||||
import com.maddyhome.idea.vim.group.copy.PutData.TextData
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.StringHelper
|
||||
|
||||
sealed class PutTextBaseAction(
|
||||
private val insertTextBeforeCaret: Boolean,
|
||||
@@ -35,7 +36,7 @@ sealed class PutTextBaseAction(
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean {
|
||||
val lastRegister = VimPlugin.getRegister().lastRegister
|
||||
val textData = if (lastRegister != null) TextData(lastRegister.text, lastRegister.type, lastRegister.transferableData) else null
|
||||
val textData = if (lastRegister != null) TextData(lastRegister.text ?: StringHelper.toKeyNotation(lastRegister.keys), lastRegister.type, lastRegister.transferableData) else null
|
||||
val putData = PutData(textData, null, count, insertTextBeforeCaret, indent, caretAfterInsertedText, -1)
|
||||
return VimPlugin.getPut().putText(editor, context, putData)
|
||||
}
|
||||
|
@@ -19,73 +19,72 @@
|
||||
package com.maddyhome.idea.vim.action.fold
|
||||
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_COLLAPSE_ALL_REGIONS
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_COLLAPSE_REGION
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_COLLAPSE_REGION_RECURSIVELY
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_EXPAND_ALL_REGIONS
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_EXPAND_REGION
|
||||
import com.intellij.openapi.actionSystem.IdeActions.ACTION_EXPAND_REGION_RECURSIVELY
|
||||
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
|
||||
|
||||
class VimCollapseAllRegions : VimActionHandler.SingleExecution() {
|
||||
val actionName: String = "CollapseAllRegions"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_COLLAPSE_ALL_REGIONS, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class VimCollapseRegion : VimActionHandler.SingleExecution() {
|
||||
private val actionName: String = "CollapseRegion"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_COLLAPSE_REGION, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class VimCollapseRegionRecursively : VimActionHandler.SingleExecution() {
|
||||
private val actionName: String = "CollapseRegionRecursively"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_COLLAPSE_REGION_RECURSIVELY, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class VimExpandAllRegions : VimActionHandler.SingleExecution() {
|
||||
private val actionName: String = "ExpandAllRegions"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_EXPAND_ALL_REGIONS, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class VimExpandRegion : VimActionHandler.SingleExecution() {
|
||||
private val actionName: String = "ExpandRegion"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_EXPAND_REGION, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class VimExpandRegionRecursively : VimActionHandler.SingleExecution() {
|
||||
private val actionName: String = "ExpandRegionRecursively"
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
KeyHandler.executeAction(actionName, context)
|
||||
KeyHandler.executeAction(ACTION_EXPAND_REGION_RECURSIVELY, context)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@@ -39,8 +39,9 @@ import java.awt.RenderingHints
|
||||
import java.awt.font.FontRenderContext
|
||||
import java.util.*
|
||||
import javax.swing.UIManager
|
||||
import kotlin.math.max
|
||||
|
||||
class AddInlaysAction : AnAction() {
|
||||
class AddBlockInlaysAction : AnAction() {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val dataContext = e.dataContext
|
||||
val editor = getEditor(dataContext) ?: return
|
||||
@@ -94,7 +95,7 @@ class AddInlaysAction : AnAction() {
|
||||
|
||||
private fun getFontMetrics(editor: Editor): MyFontMetrics {
|
||||
val familyName = UIManager.getFont("Label.font").family
|
||||
val size = (Math.max(1, editor.colorsScheme.editorFontSize - 1) * factor).toInt()
|
||||
val size = (max(1, editor.colorsScheme.editorFontSize - 1) * factor).toInt()
|
||||
var metrics = editor.getUserData(HINT_FONT_METRICS)
|
||||
if (metrics != null && !metrics.isActual(editor, familyName, size)) {
|
||||
metrics = null
|
||||
@@ -110,7 +111,7 @@ class AddInlaysAction : AnAction() {
|
||||
return if (text == null) 0 else fontMetrics.stringWidth(text)
|
||||
}
|
||||
|
||||
private inner class MyFontMetrics internal constructor(editor: Editor, familyName: String?, size: Int) {
|
||||
private inner class MyFontMetrics(editor: Editor, familyName: String?, size: Int) {
|
||||
val metrics: FontMetrics
|
||||
fun isActual(editor: Editor, familyName: String, size: Int): Boolean {
|
||||
val font = metrics.font
|
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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.internal
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HintRenderer
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.VisualPosition
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import java.util.*
|
||||
import kotlin.math.max
|
||||
|
||||
class AddInlineInlaysAction : AnAction() {
|
||||
companion object {
|
||||
private val random = Random()
|
||||
}
|
||||
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val dataContext = e.dataContext
|
||||
val editor = getEditor(dataContext) ?: return
|
||||
val inlayModel = editor.inlayModel
|
||||
val currentVisualLine = editor.caretModel.primaryCaret.visualPosition.line
|
||||
var i = random.nextInt(10)
|
||||
val lineLength = EditorHelper.getLineLength(editor, EditorHelper.visualLineToLogicalLine(editor, currentVisualLine))
|
||||
while (i < lineLength) {
|
||||
val relatesToPrecedingText = random.nextInt(10) > 7
|
||||
val text = "a".repeat(max(1, random.nextInt(7)))
|
||||
val offset = EditorHelper.visualPositionToOffset(editor, VisualPosition(currentVisualLine, i))
|
||||
// We don't need a custom renderer, just use the standard parameter hint renderer
|
||||
inlayModel.addInlineElement(offset, relatesToPrecedingText, HintRenderer(if (relatesToPrecedingText) ":$text" else "$text:"))
|
||||
// Every 20 chars +/- 5 chars
|
||||
i += 20 + (random.nextInt(10) - 5)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getEditor(dataContext: DataContext): Editor? {
|
||||
return CommonDataKeys.EDITOR.getData(dataContext)
|
||||
}
|
||||
}
|
@@ -23,12 +23,9 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
@@ -36,7 +33,7 @@ import javax.swing.KeyStroke
|
||||
|
||||
class GnNextTextObject : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE)
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
if (caret != editor.caretModel.primaryCaret) return null
|
||||
|
@@ -23,11 +23,9 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
@@ -35,7 +33,8 @@ import java.util.*
|
||||
|
||||
class GnPreviousTextObject : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE)
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
if (caret != editor.caretModel.primaryCaret) return null
|
||||
val range = VimPlugin.getSearch().getNextSearchRange(editor, count, false)
|
||||
|
@@ -36,7 +36,7 @@ class MotionArrowLeftAction : NonShiftedSpecialKeyHandler(), ComplicatedKeysActi
|
||||
override val keyStrokesSet: Set<List<KeyStroke>> = setOf(parseKeys("<Left>"), listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0)))
|
||||
|
||||
override fun offset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, -count, false)
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, -count, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,6 +27,8 @@ import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.handler.NonShiftedSpecialKeyHandler
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.parseKeys
|
||||
import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import java.awt.event.KeyEvent
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
@@ -39,7 +41,8 @@ class MotionArrowRightAction : NonShiftedSpecialKeyHandler(), ComplicatedKeysAct
|
||||
)
|
||||
|
||||
override fun offset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, count, false)
|
||||
val allowPastEnd = editor.commandState.mode.isEndAllowed
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, count, allowPastEnd)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,7 @@ class MotionLeftAction : MotionActionHandler.ForEachCaret() {
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, -count, false)
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, -count, false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,6 @@ class MotionLeftInsertModeAction : MotionActionHandler.ForEachCaret(), Complicat
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, -count, false)
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, -count, false)
|
||||
}
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class MotionRightAction : MotionActionHandler.ForEachCaret() {
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, count, true)
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, count, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,6 @@ class MotionRightInsertAction : MotionActionHandler.ForEachCaret(), ComplicatedK
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Int {
|
||||
return VimPlugin.getMotion().moveCaretHorizontal(editor, caret, count, true)
|
||||
return VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, count, true)
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ class MotionShiftLeftAction : ShiftedArrowKeyHandler() {
|
||||
|
||||
override fun motionWithKeyModel(editor: Editor, context: DataContext, cmd: Command) {
|
||||
editor.vimForEachCaret { caret ->
|
||||
val vertical = VimPlugin.getMotion().moveCaretHorizontal(editor, caret, -cmd.count, true)
|
||||
val vertical = VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, -cmd.count, true)
|
||||
MotionGroup.moveCaret(editor, caret, vertical)
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ class MotionShiftRightAction : ShiftedArrowKeyHandler() {
|
||||
|
||||
override fun motionWithKeyModel(editor: Editor, context: DataContext, cmd: Command) {
|
||||
editor.vimForEachCaret { caret ->
|
||||
val vertical = VimPlugin.getMotion().moveCaretHorizontal(editor, caret, cmd.count, true)
|
||||
val vertical = VimPlugin.getMotion().getOffsetOfHorizontalMotion(editor, caret, cmd.count, true)
|
||||
MotionGroup.moveCaret(editor, caret, vertical)
|
||||
}
|
||||
}
|
||||
|
@@ -29,11 +29,11 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import java.util.*
|
||||
|
||||
class MotionGotoFileMarkLineAction : MotionActionHandler.ForEachCaret() {
|
||||
override val motionType: MotionType = MotionType.INCLUSIVE
|
||||
override val motionType: MotionType = MotionType.LINE_WISE
|
||||
|
||||
override val argumentType: Argument.Type = Argument.Type.CHARACTER
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_SAVE_JUMP)
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_SAVE_JUMP)
|
||||
|
||||
override fun getOffset(editor: Editor,
|
||||
caret: Caret,
|
||||
@@ -49,12 +49,10 @@ class MotionGotoFileMarkLineAction : MotionActionHandler.ForEachCaret() {
|
||||
}
|
||||
|
||||
class MotionGotoFileMarkLineNoSaveJumpAction : MotionActionHandler.ForEachCaret() {
|
||||
override val motionType: MotionType = MotionType.INCLUSIVE
|
||||
override val motionType: MotionType = MotionType.LINE_WISE
|
||||
|
||||
override val argumentType: Argument.Type = Argument.Type.CHARACTER
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE)
|
||||
|
||||
override fun getOffset(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
|
@@ -29,11 +29,11 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import java.util.*
|
||||
|
||||
class MotionGotoMarkLineAction : MotionActionHandler.ForEachCaret() {
|
||||
override val motionType: MotionType = MotionType.INCLUSIVE
|
||||
override val motionType: MotionType = MotionType.LINE_WISE
|
||||
|
||||
override val argumentType: Argument.Type = Argument.Type.CHARACTER
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_SAVE_JUMP)
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_SAVE_JUMP)
|
||||
|
||||
override fun getOffset(editor: Editor,
|
||||
caret: Caret,
|
||||
@@ -49,12 +49,10 @@ class MotionGotoMarkLineAction : MotionActionHandler.ForEachCaret() {
|
||||
}
|
||||
|
||||
class MotionGotoMarkLineNoSaveJumpAction : MotionActionHandler.ForEachCaret() {
|
||||
override val motionType: MotionType = MotionType.INCLUSIVE
|
||||
override val motionType: MotionType = MotionType.LINE_WISE
|
||||
|
||||
override val argumentType: Argument.Type = Argument.Type.CHARACTER
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = EnumSet.of(CommandFlags.FLAG_MOT_LINEWISE)
|
||||
|
||||
override fun getOffset(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
|
@@ -23,15 +23,13 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
class MotionInnerBigWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE)
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockAngleAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockBackQuoteAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -32,7 +33,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockBraceAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -32,7 +33,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockBracketAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockDoubleQuoteAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockParenAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockRange(editor, caret, count, false, '(')
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockSingleQuoteAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockQuoteRange(editor, caret, '\'', false)
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerBlockTagAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockTagRange(editor, caret, count, false)
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -32,7 +33,9 @@ import java.util.*
|
||||
|
||||
class MotionInnerParagraphAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.LINE_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getParagraphRange(editor, caret, count, false)
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -34,7 +35,9 @@ class MotionInnerSentenceAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getSentenceRange(editor, caret, count, false)
|
||||
}
|
||||
}
|
||||
|
@@ -23,17 +23,15 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
class MotionInnerWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE)
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getWordRange(editor, caret, count, false, false)
|
||||
}
|
||||
}
|
||||
|
@@ -23,18 +23,16 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
|
||||
class MotionOuterBigWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE)
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getWordRange(editor, caret, count, true, true)
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -32,7 +33,9 @@ import java.util.*
|
||||
|
||||
class MotionOuterBlockAngleAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockRange(editor, caret, count, true, '<')
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -31,7 +32,9 @@ import java.util.*
|
||||
|
||||
class MotionOuterBlockBackQuoteAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockQuoteRange(editor, caret, '`', true)
|
||||
|
@@ -24,6 +24,7 @@ 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.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.TextObjectVisualType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
@@ -32,7 +33,9 @@ import java.util.*
|
||||
|
||||
class MotionOuterBlockBraceAction : TextObjectActionHandler() {
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_CHARACTERWISE, CommandFlags.FLAG_TEXT_BLOCK)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_TEXT_BLOCK)
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
return VimPlugin.getMotion().getBlockRange(editor, caret, count, true, '{')
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user